@xk2800/nextjs-template 0.7.2-beta.10 → 0.7.2-beta.11

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.
@@ -1,7 +1,7 @@
1
1
  import { unexpectedErrorMessage } from '../chunk-EXMUANQ3.mjs';
2
2
  import { MARKETING_SEGMENT_ID, setSubscribed } from '../chunk-DWLMCMXF.mjs';
3
- import { requireAdminApi } from '../chunk-S23GC776.mjs';
4
- import { auth } from '../chunk-IH6CMZIN.mjs';
3
+ import { requireAdminApi } from '../chunk-RK2B5AOQ.mjs';
4
+ import { auth } from '../chunk-ZQTI4T2K.mjs';
5
5
  import '../chunk-ZOQHHFYA.mjs';
6
6
  import '../chunk-QDUPSU5O.mjs';
7
7
  import '../chunk-NJBRKKLK.mjs';
@@ -43,8 +43,8 @@ declare const getCurrentSession: () => Promise<{
43
43
  image?: string | null | undefined | undefined;
44
44
  role: string | null | undefined;
45
45
  banned: boolean | null | undefined;
46
- banExpires?: Date | null | undefined;
47
46
  banReason?: string | null | undefined;
47
+ banExpires?: Date | null | undefined;
48
48
  twoFactorEnabled: boolean | null | undefined;
49
49
  };
50
50
  } | null>;
@@ -66,8 +66,8 @@ declare const requireAuth: () => Promise<{
66
66
  name: string;
67
67
  image?: string | null | undefined | undefined;
68
68
  banned: boolean | null | undefined;
69
- banExpires?: Date | null | undefined;
70
69
  banReason?: string | null | undefined;
70
+ banExpires?: Date | null | undefined;
71
71
  twoFactorEnabled: boolean | null | undefined;
72
72
  };
73
73
  session: {
@@ -96,8 +96,8 @@ declare function requireRole(requiredRole: 'user' | 'admin'): Promise<{
96
96
  name: string;
97
97
  image?: string | null | undefined | undefined;
98
98
  banned: boolean | null | undefined;
99
- banExpires?: Date | null | undefined;
100
99
  banReason?: string | null | undefined;
100
+ banExpires?: Date | null | undefined;
101
101
  twoFactorEnabled: boolean | null | undefined;
102
102
  };
103
103
  session: {
@@ -142,8 +142,8 @@ declare function requireAdminApi(): Promise<{
142
142
  image?: string | null | undefined | undefined;
143
143
  role: string | null | undefined;
144
144
  banned: boolean | null | undefined;
145
- banExpires?: Date | null | undefined;
146
145
  banReason?: string | null | undefined;
146
+ banExpires?: Date | null | undefined;
147
147
  twoFactorEnabled: boolean | null | undefined;
148
148
  };
149
149
  } | NextResponse<{
@@ -43,8 +43,8 @@ declare const getCurrentSession: () => Promise<{
43
43
  image?: string | null | undefined | undefined;
44
44
  role: string | null | undefined;
45
45
  banned: boolean | null | undefined;
46
- banExpires?: Date | null | undefined;
47
46
  banReason?: string | null | undefined;
47
+ banExpires?: Date | null | undefined;
48
48
  twoFactorEnabled: boolean | null | undefined;
49
49
  };
50
50
  } | null>;
@@ -66,8 +66,8 @@ declare const requireAuth: () => Promise<{
66
66
  name: string;
67
67
  image?: string | null | undefined | undefined;
68
68
  banned: boolean | null | undefined;
69
- banExpires?: Date | null | undefined;
70
69
  banReason?: string | null | undefined;
70
+ banExpires?: Date | null | undefined;
71
71
  twoFactorEnabled: boolean | null | undefined;
72
72
  };
73
73
  session: {
@@ -96,8 +96,8 @@ declare function requireRole(requiredRole: 'user' | 'admin'): Promise<{
96
96
  name: string;
97
97
  image?: string | null | undefined | undefined;
98
98
  banned: boolean | null | undefined;
99
- banExpires?: Date | null | undefined;
100
99
  banReason?: string | null | undefined;
100
+ banExpires?: Date | null | undefined;
101
101
  twoFactorEnabled: boolean | null | undefined;
102
102
  };
103
103
  session: {
@@ -142,8 +142,8 @@ declare function requireAdminApi(): Promise<{
142
142
  image?: string | null | undefined | undefined;
143
143
  role: string | null | undefined;
144
144
  banned: boolean | null | undefined;
145
- banExpires?: Date | null | undefined;
146
145
  banReason?: string | null | undefined;
146
+ banExpires?: Date | null | undefined;
147
147
  twoFactorEnabled: boolean | null | undefined;
148
148
  };
149
149
  } | NextResponse<{
@@ -4,6 +4,9 @@ var components = require('@react-email/components');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  require('server-only');
6
6
  var react = require('react');
7
+ var child_process = require('child_process');
8
+ var fs = require('fs');
9
+ var path = require('path');
7
10
  var betterAuth = require('better-auth');
8
11
  var drizzle = require('better-auth/adapters/drizzle');
9
12
  var cuid2 = require('@paralleldrive/cuid2');
@@ -1163,6 +1166,21 @@ async function getResend() {
1163
1166
  config.RESEND_BROADCAST_API_KEY || config.RESEND_API_KEY;
1164
1167
 
1165
1168
  // server/auth.ts
1169
+ function checkDepsOnce() {
1170
+ const flag = globalThis;
1171
+ if (process.env.NODE_ENV !== "development" || flag.__xkDepsChecked) return;
1172
+ flag.__xkDepsChecked = true;
1173
+ const script = path.join(
1174
+ /*turbopackIgnore: true*/
1175
+ process.cwd(),
1176
+ "node_modules/@xk2800/nextjs-template/scripts/check-deps.mjs"
1177
+ );
1178
+ if (!fs.existsSync(script)) return;
1179
+ child_process.execFile(process.execPath, [script], (_err, stdout) => {
1180
+ if (stdout == null ? void 0 : stdout.trim()) console.log(stdout);
1181
+ });
1182
+ }
1183
+ checkDepsOnce();
1166
1184
  async function logFailedLogin(ctx, log) {
1167
1185
  var _a, _b, _c;
1168
1186
  try {