rimecms 0.25.7 → 0.25.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.
@@ -5,6 +5,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
5
5
  mailer: MailerActions | undefined;
6
6
  config: ConfigContext<C>;
7
7
  }): {
8
+ readonly baseUrl: string | undefined;
8
9
  readonly plugins: ({
9
10
  id: "api-key";
10
11
  $ERROR_CODES: {
@@ -61,7 +62,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
61
62
  context: import("better-auth/*").MiddlewareContext<import("better-auth/*").MiddlewareOptions, {
62
63
  returned?: unknown | undefined;
63
64
  responseHeaders?: Headers | undefined;
64
- } & import("better-auth/*").PluginContext & {
65
+ } & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
65
66
  options: import("better-auth/types").BetterAuthOptions;
66
67
  appName: string;
67
68
  baseURL: string;
@@ -93,13 +94,10 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
93
94
  window: number;
94
95
  max: number;
95
96
  storage: "memory" | "database" | "secondary-storage";
96
- } & import("better-auth/types").BetterAuthRateLimitOptions;
97
+ } & Omit<import("better-auth/types").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
97
98
  adapter: import("better-auth/types").DBAdapter<import("better-auth/types").BetterAuthOptions>;
98
99
  internalAdapter: import("better-auth/*").InternalAdapter<import("better-auth/types").BetterAuthOptions>;
99
- createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => {
100
- name: string;
101
- attributes: import("better-auth/*").CookieOptions;
102
- };
100
+ createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => import("better-auth/*").BetterAuthCookie;
103
101
  secret: string;
104
102
  sessionConfig: {
105
103
  updateAge: number;
@@ -134,10 +132,10 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
134
132
  anonymousId?: string | undefined;
135
133
  payload: Record<string, any>;
136
134
  }) => Promise<void>;
137
- skipOriginCheck: boolean;
135
+ skipOriginCheck: boolean | string[];
138
136
  skipCSRFCheck: boolean;
139
- runInBackground: (promise: Promise<void>) => void;
140
- runInBackgroundOrAwait: (promise: Promise<unknown> | Promise<void> | void | unknown) => Promise<unknown>;
137
+ runInBackground: (promise: Promise<unknown>) => void;
138
+ runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth/*").Awaitable<unknown>;
141
139
  }>;
142
140
  }>;
143
141
  }[];
@@ -318,10 +316,25 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
318
316
  permissions: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>>;
319
317
  }, import("better-auth/*").$strip>;
320
318
  }, {
319
+ valid: boolean;
320
+ error: {
321
+ message: "Invalid API key.";
322
+ code: "KEY_NOT_FOUND";
323
+ };
324
+ key: null;
325
+ } | {
321
326
  valid: boolean;
322
327
  error: {
323
328
  message: string | undefined;
324
329
  code: string;
330
+ cause?: unknown;
331
+ };
332
+ key: null;
333
+ } | {
334
+ valid: boolean;
335
+ error: {
336
+ message: "Invalid API key.";
337
+ code: "INVALID_API_KEY";
325
338
  };
326
339
  key: null;
327
340
  } | {
@@ -1169,20 +1182,12 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
1169
1182
  };
1170
1183
  };
1171
1184
  };
1172
- }, {
1173
- id: string;
1174
- createdAt: Date;
1175
- updatedAt: Date;
1176
- email: string;
1177
- emailVerified: boolean;
1178
- name: string;
1179
- image?: string | null | undefined;
1180
- }>;
1185
+ }, import("better-auth/plugins").UserWithRole>;
1181
1186
  createUser: import("better-auth/*").StrictEndpoint<"/admin/create-user", {
1182
1187
  method: "POST";
1183
1188
  body: import("better-auth/*").ZodObject<{
1184
1189
  email: import("better-auth/*").ZodString;
1185
- password: import("better-auth/*").ZodString;
1190
+ password: import("better-auth/*").ZodOptional<import("better-auth/*").ZodString>;
1186
1191
  name: import("better-auth/*").ZodString;
1187
1192
  role: import("better-auth/*").ZodOptional<import("better-auth/*").ZodUnion<readonly [import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>]>>;
1188
1193
  data: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodAny>>;
@@ -1213,7 +1218,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
1213
1218
  $Infer: {
1214
1219
  body: {
1215
1220
  email: string;
1216
- password: string;
1221
+ password?: string | undefined;
1217
1222
  name: string;
1218
1223
  role?: "user" | "staff" | "admin" | ("user" | "staff" | "admin")[] | undefined;
1219
1224
  data?: Record<string, any> | undefined;
@@ -1338,11 +1343,6 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
1338
1343
  }, {
1339
1344
  users: import("better-auth/plugins").UserWithRole[];
1340
1345
  total: number;
1341
- limit: number | undefined;
1342
- offset: number | undefined;
1343
- } | {
1344
- users: never[];
1345
- total: number;
1346
1346
  }>;
1347
1347
  listUserSessions: import("better-auth/*").StrictEndpoint<"/admin/list-user-sessions", {
1348
1348
  method: "POST";
@@ -1421,15 +1421,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
1421
1421
  };
1422
1422
  };
1423
1423
  }, {
1424
- user: {
1425
- id: string;
1426
- createdAt: Date;
1427
- updatedAt: Date;
1428
- email: string;
1429
- emailVerified: boolean;
1430
- name: string;
1431
- image?: string | null | undefined;
1432
- } & Record<string, any>;
1424
+ user: import("better-auth/plugins").UserWithRole;
1433
1425
  }>;
1434
1426
  banUser: import("better-auth/*").StrictEndpoint<"/admin/ban-user", {
1435
1427
  method: "POST";
@@ -1469,15 +1461,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
1469
1461
  };
1470
1462
  };
1471
1463
  }, {
1472
- user: {
1473
- id: string;
1474
- createdAt: Date;
1475
- updatedAt: Date;
1476
- email: string;
1477
- emailVerified: boolean;
1478
- name: string;
1479
- image?: string | null | undefined;
1480
- } & Record<string, any>;
1464
+ user: import("better-auth/plugins").UserWithRole;
1481
1465
  }>;
1482
1466
  impersonateUser: import("better-auth/*").StrictEndpoint<"/admin/impersonate-user", {
1483
1467
  method: "POST";
@@ -1534,8 +1518,25 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
1534
1518
  method: "POST";
1535
1519
  requireHeaders: true;
1536
1520
  }, {
1537
- session: import("better-auth/types").Session & Record<string, any>;
1538
- user: import("better-auth/types").User & Record<string, any>;
1521
+ session: {
1522
+ id: string;
1523
+ createdAt: Date;
1524
+ updatedAt: Date;
1525
+ userId: string;
1526
+ expiresAt: Date;
1527
+ token: string;
1528
+ ipAddress?: string | null | undefined;
1529
+ userAgent?: string | null | undefined;
1530
+ } & Record<string, any>;
1531
+ user: {
1532
+ id: string;
1533
+ createdAt: Date;
1534
+ updatedAt: Date;
1535
+ email: string;
1536
+ emailVerified: boolean;
1537
+ name: string;
1538
+ image?: string | null | undefined;
1539
+ } & Record<string, any>;
1539
1540
  }>;
1540
1541
  revokeUserSession: import("better-auth/*").StrictEndpoint<"/admin/revoke-user-session", {
1541
1542
  method: "POST";
@@ -4,6 +4,7 @@ import { betterAuthAfterHook, betterAuthBeforeHook } from './better-auth-hooks.j
4
4
  import { accessControl, admin, staff, user } from './better-auth-permissions.js';
5
5
  export function getBaseAuthConfig(ctx) {
6
6
  const betterAuthOptions = {
7
+ baseUrl: ctx.config.raw.siteUrl,
7
8
  plugins: configurePlugins(ctx.config.raw),
8
9
  rateLimit: {
9
10
  enabled: !dev,
@@ -59,7 +59,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
59
59
  context: import("better-auth/*").MiddlewareContext<import("better-auth/*").MiddlewareOptions, {
60
60
  returned?: unknown | undefined;
61
61
  responseHeaders?: Headers | undefined;
62
- } & import("better-auth/*").PluginContext & {
62
+ } & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
63
63
  options: import("better-auth/types").BetterAuthOptions;
64
64
  appName: string;
65
65
  baseURL: string;
@@ -91,13 +91,10 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
91
91
  window: number;
92
92
  max: number;
93
93
  storage: "memory" | "database" | "secondary-storage";
94
- } & import("better-auth/types").BetterAuthRateLimitOptions;
94
+ } & Omit<import("better-auth/types").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
95
95
  adapter: import("better-auth/types").DBAdapter<import("better-auth/types").BetterAuthOptions>;
96
96
  internalAdapter: import("better-auth/*").InternalAdapter<import("better-auth/types").BetterAuthOptions>;
97
- createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => {
98
- name: string;
99
- attributes: import("better-auth/*").CookieOptions;
100
- };
97
+ createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => import("better-auth/*").BetterAuthCookie;
101
98
  secret: string;
102
99
  sessionConfig: {
103
100
  updateAge: number;
@@ -132,10 +129,10 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
132
129
  anonymousId?: string | undefined;
133
130
  payload: Record<string, any>;
134
131
  }) => Promise<void>;
135
- skipOriginCheck: boolean;
132
+ skipOriginCheck: boolean | string[];
136
133
  skipCSRFCheck: boolean;
137
- runInBackground: (promise: Promise<void>) => void;
138
- runInBackgroundOrAwait: (promise: Promise<unknown> | Promise<void> | void | unknown) => Promise<unknown>;
134
+ runInBackground: (promise: Promise<unknown>) => void;
135
+ runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth/*").Awaitable<unknown>;
139
136
  }>;
140
137
  }>;
141
138
  }[];
@@ -316,10 +313,25 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
316
313
  permissions: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>>;
317
314
  }, import("better-auth/*").$strip>;
318
315
  }, {
316
+ valid: boolean;
317
+ error: {
318
+ message: "Invalid API key.";
319
+ code: "KEY_NOT_FOUND";
320
+ };
321
+ key: null;
322
+ } | {
319
323
  valid: boolean;
320
324
  error: {
321
325
  message: string | undefined;
322
326
  code: string;
327
+ cause?: unknown;
328
+ };
329
+ key: null;
330
+ } | {
331
+ valid: boolean;
332
+ error: {
333
+ message: "Invalid API key.";
334
+ code: "INVALID_API_KEY";
323
335
  };
324
336
  key: null;
325
337
  } | {
@@ -1167,20 +1179,12 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
1167
1179
  };
1168
1180
  };
1169
1181
  };
1170
- }, {
1171
- id: string;
1172
- createdAt: Date;
1173
- updatedAt: Date;
1174
- email: string;
1175
- emailVerified: boolean;
1176
- name: string;
1177
- image?: string | null | undefined;
1178
- }>;
1182
+ }, import("better-auth/plugins").UserWithRole>;
1179
1183
  createUser: import("better-auth/*").StrictEndpoint<"/admin/create-user", {
1180
1184
  method: "POST";
1181
1185
  body: import("better-auth/*").ZodObject<{
1182
1186
  email: import("better-auth/*").ZodString;
1183
- password: import("better-auth/*").ZodString;
1187
+ password: import("better-auth/*").ZodOptional<import("better-auth/*").ZodString>;
1184
1188
  name: import("better-auth/*").ZodString;
1185
1189
  role: import("better-auth/*").ZodOptional<import("better-auth/*").ZodUnion<readonly [import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>]>>;
1186
1190
  data: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodAny>>;
@@ -1211,7 +1215,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
1211
1215
  $Infer: {
1212
1216
  body: {
1213
1217
  email: string;
1214
- password: string;
1218
+ password?: string | undefined;
1215
1219
  name: string;
1216
1220
  role?: "user" | "staff" | "admin" | ("user" | "staff" | "admin")[] | undefined;
1217
1221
  data?: Record<string, any> | undefined;
@@ -1336,11 +1340,6 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
1336
1340
  }, {
1337
1341
  users: import("better-auth/plugins").UserWithRole[];
1338
1342
  total: number;
1339
- limit: number | undefined;
1340
- offset: number | undefined;
1341
- } | {
1342
- users: never[];
1343
- total: number;
1344
1343
  }>;
1345
1344
  listUserSessions: import("better-auth/*").StrictEndpoint<"/admin/list-user-sessions", {
1346
1345
  method: "POST";
@@ -1419,15 +1418,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
1419
1418
  };
1420
1419
  };
1421
1420
  }, {
1422
- user: {
1423
- id: string;
1424
- createdAt: Date;
1425
- updatedAt: Date;
1426
- email: string;
1427
- emailVerified: boolean;
1428
- name: string;
1429
- image?: string | null | undefined;
1430
- } & Record<string, any>;
1421
+ user: import("better-auth/plugins").UserWithRole;
1431
1422
  }>;
1432
1423
  banUser: import("better-auth/*").StrictEndpoint<"/admin/ban-user", {
1433
1424
  method: "POST";
@@ -1467,15 +1458,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
1467
1458
  };
1468
1459
  };
1469
1460
  }, {
1470
- user: {
1471
- id: string;
1472
- createdAt: Date;
1473
- updatedAt: Date;
1474
- email: string;
1475
- emailVerified: boolean;
1476
- name: string;
1477
- image?: string | null | undefined;
1478
- } & Record<string, any>;
1461
+ user: import("better-auth/plugins").UserWithRole;
1479
1462
  }>;
1480
1463
  impersonateUser: import("better-auth/*").StrictEndpoint<"/admin/impersonate-user", {
1481
1464
  method: "POST";
@@ -1532,8 +1515,25 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
1532
1515
  method: "POST";
1533
1516
  requireHeaders: true;
1534
1517
  }, {
1535
- session: import("better-auth/types").Session & Record<string, any>;
1536
- user: import("better-auth/types").User & Record<string, any>;
1518
+ session: {
1519
+ id: string;
1520
+ createdAt: Date;
1521
+ updatedAt: Date;
1522
+ userId: string;
1523
+ expiresAt: Date;
1524
+ token: string;
1525
+ ipAddress?: string | null | undefined;
1526
+ userAgent?: string | null | undefined;
1527
+ } & Record<string, any>;
1528
+ user: {
1529
+ id: string;
1530
+ createdAt: Date;
1531
+ updatedAt: Date;
1532
+ email: string;
1533
+ emailVerified: boolean;
1534
+ name: string;
1535
+ image?: string | null | undefined;
1536
+ } & Record<string, any>;
1537
1537
  }>;
1538
1538
  revokeUserSession: import("better-auth/*").StrictEndpoint<"/admin/revoke-user-session", {
1539
1539
  method: "POST";
@@ -1909,6 +1909,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
1909
1909
  plugins: any;
1910
1910
  } ? C["$auth"]["plugins"] : [])[number])[];
1911
1911
  database: (options: import("better-auth/types").BetterAuthOptions) => import("better-auth/types").DBAdapter<import("better-auth/types").BetterAuthOptions>;
1912
+ baseUrl: string | undefined;
1912
1913
  rateLimit: {
1913
1914
  readonly enabled: boolean;
1914
1915
  readonly window: 10;
@@ -2040,7 +2041,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
2040
2041
  context: import("better-auth/*").MiddlewareContext<import("better-auth/*").MiddlewareOptions, {
2041
2042
  returned?: unknown | undefined;
2042
2043
  responseHeaders?: Headers | undefined;
2043
- } & import("better-auth/*").PluginContext & {
2044
+ } & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
2044
2045
  options: import("better-auth/types").BetterAuthOptions;
2045
2046
  appName: string;
2046
2047
  baseURL: string;
@@ -2072,13 +2073,10 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
2072
2073
  window: number;
2073
2074
  max: number;
2074
2075
  storage: "memory" | "database" | "secondary-storage";
2075
- } & import("better-auth/types").BetterAuthRateLimitOptions;
2076
+ } & Omit<import("better-auth/types").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
2076
2077
  adapter: import("better-auth/types").DBAdapter<import("better-auth/types").BetterAuthOptions>;
2077
2078
  internalAdapter: import("better-auth/*").InternalAdapter<import("better-auth/types").BetterAuthOptions>;
2078
- createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => {
2079
- name: string;
2080
- attributes: import("better-auth/*").CookieOptions;
2081
- };
2079
+ createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => import("better-auth/*").BetterAuthCookie;
2082
2080
  secret: string;
2083
2081
  sessionConfig: {
2084
2082
  updateAge: number;
@@ -2113,10 +2111,10 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
2113
2111
  anonymousId?: string | undefined;
2114
2112
  payload: Record<string, any>;
2115
2113
  }) => Promise<void>;
2116
- skipOriginCheck: boolean;
2114
+ skipOriginCheck: boolean | string[];
2117
2115
  skipCSRFCheck: boolean;
2118
- runInBackground: (promise: Promise<void>) => void;
2119
- runInBackgroundOrAwait: (promise: Promise<unknown> | Promise<void> | void | unknown) => Promise<unknown>;
2116
+ runInBackground: (promise: Promise<unknown>) => void;
2117
+ runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth/*").Awaitable<unknown>;
2120
2118
  }>;
2121
2119
  }>;
2122
2120
  }[];
@@ -2297,10 +2295,25 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
2297
2295
  permissions: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>>;
2298
2296
  }, import("better-auth/*").$strip>;
2299
2297
  }, {
2298
+ valid: boolean;
2299
+ error: {
2300
+ message: "Invalid API key.";
2301
+ code: "KEY_NOT_FOUND";
2302
+ };
2303
+ key: null;
2304
+ } | {
2300
2305
  valid: boolean;
2301
2306
  error: {
2302
2307
  message: string | undefined;
2303
2308
  code: string;
2309
+ cause?: unknown;
2310
+ };
2311
+ key: null;
2312
+ } | {
2313
+ valid: boolean;
2314
+ error: {
2315
+ message: "Invalid API key.";
2316
+ code: "INVALID_API_KEY";
2304
2317
  };
2305
2318
  key: null;
2306
2319
  } | {
@@ -3148,20 +3161,12 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
3148
3161
  };
3149
3162
  };
3150
3163
  };
3151
- }, {
3152
- id: string;
3153
- createdAt: Date;
3154
- updatedAt: Date;
3155
- email: string;
3156
- emailVerified: boolean;
3157
- name: string;
3158
- image?: string | null | undefined;
3159
- }>;
3164
+ }, import("better-auth/plugins").UserWithRole>;
3160
3165
  createUser: import("better-auth/*").StrictEndpoint<"/admin/create-user", {
3161
3166
  method: "POST";
3162
3167
  body: import("better-auth/*").ZodObject<{
3163
3168
  email: import("better-auth/*").ZodString;
3164
- password: import("better-auth/*").ZodString;
3169
+ password: import("better-auth/*").ZodOptional<import("better-auth/*").ZodString>;
3165
3170
  name: import("better-auth/*").ZodString;
3166
3171
  role: import("better-auth/*").ZodOptional<import("better-auth/*").ZodUnion<readonly [import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>]>>;
3167
3172
  data: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodAny>>;
@@ -3192,7 +3197,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
3192
3197
  $Infer: {
3193
3198
  body: {
3194
3199
  email: string;
3195
- password: string;
3200
+ password?: string | undefined;
3196
3201
  name: string;
3197
3202
  role?: "user" | "staff" | "admin" | ("user" | "staff" | "admin")[] | undefined;
3198
3203
  data?: Record<string, any> | undefined;
@@ -3317,11 +3322,6 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
3317
3322
  }, {
3318
3323
  users: import("better-auth/plugins").UserWithRole[];
3319
3324
  total: number;
3320
- limit: number | undefined;
3321
- offset: number | undefined;
3322
- } | {
3323
- users: never[];
3324
- total: number;
3325
3325
  }>;
3326
3326
  listUserSessions: import("better-auth/*").StrictEndpoint<"/admin/list-user-sessions", {
3327
3327
  method: "POST";
@@ -3400,15 +3400,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
3400
3400
  };
3401
3401
  };
3402
3402
  }, {
3403
- user: {
3404
- id: string;
3405
- createdAt: Date;
3406
- updatedAt: Date;
3407
- email: string;
3408
- emailVerified: boolean;
3409
- name: string;
3410
- image?: string | null | undefined;
3411
- } & Record<string, any>;
3403
+ user: import("better-auth/plugins").UserWithRole;
3412
3404
  }>;
3413
3405
  banUser: import("better-auth/*").StrictEndpoint<"/admin/ban-user", {
3414
3406
  method: "POST";
@@ -3448,15 +3440,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
3448
3440
  };
3449
3441
  };
3450
3442
  }, {
3451
- user: {
3452
- id: string;
3453
- createdAt: Date;
3454
- updatedAt: Date;
3455
- email: string;
3456
- emailVerified: boolean;
3457
- name: string;
3458
- image?: string | null | undefined;
3459
- } & Record<string, any>;
3443
+ user: import("better-auth/plugins").UserWithRole;
3460
3444
  }>;
3461
3445
  impersonateUser: import("better-auth/*").StrictEndpoint<"/admin/impersonate-user", {
3462
3446
  method: "POST";
@@ -3513,8 +3497,25 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
3513
3497
  method: "POST";
3514
3498
  requireHeaders: true;
3515
3499
  }, {
3516
- session: import("better-auth/types").Session & Record<string, any>;
3517
- user: import("better-auth/types").User & Record<string, any>;
3500
+ session: {
3501
+ id: string;
3502
+ createdAt: Date;
3503
+ updatedAt: Date;
3504
+ userId: string;
3505
+ expiresAt: Date;
3506
+ token: string;
3507
+ ipAddress?: string | null | undefined;
3508
+ userAgent?: string | null | undefined;
3509
+ } & Record<string, any>;
3510
+ user: {
3511
+ id: string;
3512
+ createdAt: Date;
3513
+ updatedAt: Date;
3514
+ email: string;
3515
+ emailVerified: boolean;
3516
+ name: string;
3517
+ image?: string | null | undefined;
3518
+ } & Record<string, any>;
3518
3519
  }>;
3519
3520
  revokeUserSession: import("better-auth/*").StrictEndpoint<"/admin/revoke-user-session", {
3520
3521
  method: "POST";
@@ -3890,6 +3891,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
3890
3891
  plugins: any;
3891
3892
  } ? C["$auth"]["plugins"] : [])[number])[];
3892
3893
  database: (options: import("better-auth/types").BetterAuthOptions) => import("better-auth/types").DBAdapter<import("better-auth/types").BetterAuthOptions>;
3894
+ baseUrl: string | undefined;
3893
3895
  rateLimit: {
3894
3896
  readonly enabled: boolean;
3895
3897
  readonly window: 10;
@@ -71,7 +71,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
71
71
  context: import("better-auth/*").MiddlewareContext<import("better-auth/*").MiddlewareOptions, {
72
72
  returned?: unknown | undefined;
73
73
  responseHeaders?: Headers | undefined;
74
- } & import("better-auth/*").PluginContext & {
74
+ } & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
75
75
  options: import("better-auth/*").BetterAuthOptions;
76
76
  appName: string;
77
77
  baseURL: string;
@@ -103,13 +103,10 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
103
103
  window: number;
104
104
  max: number;
105
105
  storage: "memory" | "database" | "secondary-storage";
106
- } & import("better-auth/*").BetterAuthRateLimitOptions;
106
+ } & Omit<import("better-auth/*").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
107
107
  adapter: import("better-auth/*").DBAdapter<import("better-auth/*").BetterAuthOptions>;
108
108
  internalAdapter: import("better-auth/*").InternalAdapter<import("better-auth/*").BetterAuthOptions>;
109
- createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => {
110
- name: string;
111
- attributes: import("better-auth/*").CookieOptions;
112
- };
109
+ createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => import("better-auth/*").BetterAuthCookie;
113
110
  secret: string;
114
111
  sessionConfig: {
115
112
  updateAge: number;
@@ -144,10 +141,10 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
144
141
  anonymousId?: string | undefined;
145
142
  payload: Record<string, any>;
146
143
  }) => Promise<void>;
147
- skipOriginCheck: boolean;
144
+ skipOriginCheck: boolean | string[];
148
145
  skipCSRFCheck: boolean;
149
- runInBackground: (promise: Promise<void>) => void;
150
- runInBackgroundOrAwait: (promise: Promise<unknown> | Promise<void> | void | unknown) => Promise<unknown>;
146
+ runInBackground: (promise: Promise<unknown>) => void;
147
+ runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth/*").Awaitable<unknown>;
151
148
  }>;
152
149
  }>;
153
150
  }[];
@@ -328,10 +325,25 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
328
325
  permissions: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>>;
329
326
  }, import("better-auth/*").$strip>;
330
327
  }, {
328
+ valid: boolean;
329
+ error: {
330
+ message: "Invalid API key.";
331
+ code: "KEY_NOT_FOUND";
332
+ };
333
+ key: null;
334
+ } | {
331
335
  valid: boolean;
332
336
  error: {
333
337
  message: string | undefined;
334
338
  code: string;
339
+ cause?: unknown;
340
+ };
341
+ key: null;
342
+ } | {
343
+ valid: boolean;
344
+ error: {
345
+ message: "Invalid API key.";
346
+ code: "INVALID_API_KEY";
335
347
  };
336
348
  key: null;
337
349
  } | {
@@ -1179,20 +1191,12 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
1179
1191
  };
1180
1192
  };
1181
1193
  };
1182
- }, {
1183
- id: string;
1184
- createdAt: Date;
1185
- updatedAt: Date;
1186
- email: string;
1187
- emailVerified: boolean;
1188
- name: string;
1189
- image?: string | null | undefined;
1190
- }>;
1194
+ }, import("better-auth/plugins").UserWithRole>;
1191
1195
  createUser: import("better-auth/*").StrictEndpoint<"/admin/create-user", {
1192
1196
  method: "POST";
1193
1197
  body: import("better-auth/*").ZodObject<{
1194
1198
  email: import("better-auth/*").ZodString;
1195
- password: import("better-auth/*").ZodString;
1199
+ password: import("better-auth/*").ZodOptional<import("better-auth/*").ZodString>;
1196
1200
  name: import("better-auth/*").ZodString;
1197
1201
  role: import("better-auth/*").ZodOptional<import("better-auth/*").ZodUnion<readonly [import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>]>>;
1198
1202
  data: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodAny>>;
@@ -1223,7 +1227,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
1223
1227
  $Infer: {
1224
1228
  body: {
1225
1229
  email: string;
1226
- password: string;
1230
+ password?: string | undefined;
1227
1231
  name: string;
1228
1232
  role?: "user" | "staff" | "admin" | ("user" | "staff" | "admin")[] | undefined;
1229
1233
  data?: Record<string, any> | undefined;
@@ -1348,11 +1352,6 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
1348
1352
  }, {
1349
1353
  users: import("better-auth/plugins").UserWithRole[];
1350
1354
  total: number;
1351
- limit: number | undefined;
1352
- offset: number | undefined;
1353
- } | {
1354
- users: never[];
1355
- total: number;
1356
1355
  }>;
1357
1356
  listUserSessions: import("better-auth/*").StrictEndpoint<"/admin/list-user-sessions", {
1358
1357
  method: "POST";
@@ -1431,15 +1430,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
1431
1430
  };
1432
1431
  };
1433
1432
  }, {
1434
- user: {
1435
- id: string;
1436
- createdAt: Date;
1437
- updatedAt: Date;
1438
- email: string;
1439
- emailVerified: boolean;
1440
- name: string;
1441
- image?: string | null | undefined;
1442
- } & Record<string, any>;
1433
+ user: import("better-auth/plugins").UserWithRole;
1443
1434
  }>;
1444
1435
  banUser: import("better-auth/*").StrictEndpoint<"/admin/ban-user", {
1445
1436
  method: "POST";
@@ -1479,15 +1470,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
1479
1470
  };
1480
1471
  };
1481
1472
  }, {
1482
- user: {
1483
- id: string;
1484
- createdAt: Date;
1485
- updatedAt: Date;
1486
- email: string;
1487
- emailVerified: boolean;
1488
- name: string;
1489
- image?: string | null | undefined;
1490
- } & Record<string, any>;
1473
+ user: import("better-auth/plugins").UserWithRole;
1491
1474
  }>;
1492
1475
  impersonateUser: import("better-auth/*").StrictEndpoint<"/admin/impersonate-user", {
1493
1476
  method: "POST";
@@ -1544,8 +1527,25 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
1544
1527
  method: "POST";
1545
1528
  requireHeaders: true;
1546
1529
  }, {
1547
- session: import("better-auth/*").Session & Record<string, any>;
1548
- user: import("better-auth/*").User & Record<string, any>;
1530
+ session: {
1531
+ id: string;
1532
+ createdAt: Date;
1533
+ updatedAt: Date;
1534
+ userId: string;
1535
+ expiresAt: Date;
1536
+ token: string;
1537
+ ipAddress?: string | null | undefined;
1538
+ userAgent?: string | null | undefined;
1539
+ } & Record<string, any>;
1540
+ user: {
1541
+ id: string;
1542
+ createdAt: Date;
1543
+ updatedAt: Date;
1544
+ email: string;
1545
+ emailVerified: boolean;
1546
+ name: string;
1547
+ image?: string | null | undefined;
1548
+ } & Record<string, any>;
1549
1549
  }>;
1550
1550
  revokeUserSession: import("better-auth/*").StrictEndpoint<"/admin/revoke-user-session", {
1551
1551
  method: "POST";
@@ -1921,6 +1921,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
1921
1921
  plugins: any;
1922
1922
  } ? C["$auth"]["plugins"] : [])[number])[];
1923
1923
  database: (options: import("better-auth/*").BetterAuthOptions) => import("better-auth/*").DBAdapter<import("better-auth/*").BetterAuthOptions>;
1924
+ baseUrl: string | undefined;
1924
1925
  rateLimit: {
1925
1926
  readonly enabled: boolean;
1926
1927
  readonly window: 10;
@@ -2076,7 +2077,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
2076
2077
  context: import("better-auth/*").MiddlewareContext<import("better-auth/*").MiddlewareOptions, {
2077
2078
  returned?: unknown | undefined;
2078
2079
  responseHeaders?: Headers | undefined;
2079
- } & import("better-auth/*").PluginContext & {
2080
+ } & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
2080
2081
  options: import("better-auth/*").BetterAuthOptions;
2081
2082
  appName: string;
2082
2083
  baseURL: string;
@@ -2108,13 +2109,10 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
2108
2109
  window: number;
2109
2110
  max: number;
2110
2111
  storage: "memory" | "database" | "secondary-storage";
2111
- } & import("better-auth/*").BetterAuthRateLimitOptions;
2112
+ } & Omit<import("better-auth/*").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
2112
2113
  adapter: import("better-auth/*").DBAdapter<import("better-auth/*").BetterAuthOptions>;
2113
2114
  internalAdapter: import("better-auth/*").InternalAdapter<import("better-auth/*").BetterAuthOptions>;
2114
- createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => {
2115
- name: string;
2116
- attributes: import("better-auth/*").CookieOptions;
2117
- };
2115
+ createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => import("better-auth/*").BetterAuthCookie;
2118
2116
  secret: string;
2119
2117
  sessionConfig: {
2120
2118
  updateAge: number;
@@ -2149,10 +2147,10 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
2149
2147
  anonymousId?: string | undefined;
2150
2148
  payload: Record<string, any>;
2151
2149
  }) => Promise<void>;
2152
- skipOriginCheck: boolean;
2150
+ skipOriginCheck: boolean | string[];
2153
2151
  skipCSRFCheck: boolean;
2154
- runInBackground: (promise: Promise<void>) => void;
2155
- runInBackgroundOrAwait: (promise: Promise<unknown> | Promise<void> | void | unknown) => Promise<unknown>;
2152
+ runInBackground: (promise: Promise<unknown>) => void;
2153
+ runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth/*").Awaitable<unknown>;
2156
2154
  }>;
2157
2155
  }>;
2158
2156
  }[];
@@ -2333,10 +2331,25 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
2333
2331
  permissions: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>>;
2334
2332
  }, import("better-auth/*").$strip>;
2335
2333
  }, {
2334
+ valid: boolean;
2335
+ error: {
2336
+ message: "Invalid API key.";
2337
+ code: "KEY_NOT_FOUND";
2338
+ };
2339
+ key: null;
2340
+ } | {
2336
2341
  valid: boolean;
2337
2342
  error: {
2338
2343
  message: string | undefined;
2339
2344
  code: string;
2345
+ cause?: unknown;
2346
+ };
2347
+ key: null;
2348
+ } | {
2349
+ valid: boolean;
2350
+ error: {
2351
+ message: "Invalid API key.";
2352
+ code: "INVALID_API_KEY";
2340
2353
  };
2341
2354
  key: null;
2342
2355
  } | {
@@ -3184,20 +3197,12 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
3184
3197
  };
3185
3198
  };
3186
3199
  };
3187
- }, {
3188
- id: string;
3189
- createdAt: Date;
3190
- updatedAt: Date;
3191
- email: string;
3192
- emailVerified: boolean;
3193
- name: string;
3194
- image?: string | null | undefined;
3195
- }>;
3200
+ }, import("better-auth/plugins").UserWithRole>;
3196
3201
  createUser: import("better-auth/*").StrictEndpoint<"/admin/create-user", {
3197
3202
  method: "POST";
3198
3203
  body: import("better-auth/*").ZodObject<{
3199
3204
  email: import("better-auth/*").ZodString;
3200
- password: import("better-auth/*").ZodString;
3205
+ password: import("better-auth/*").ZodOptional<import("better-auth/*").ZodString>;
3201
3206
  name: import("better-auth/*").ZodString;
3202
3207
  role: import("better-auth/*").ZodOptional<import("better-auth/*").ZodUnion<readonly [import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>]>>;
3203
3208
  data: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodAny>>;
@@ -3228,7 +3233,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
3228
3233
  $Infer: {
3229
3234
  body: {
3230
3235
  email: string;
3231
- password: string;
3236
+ password?: string | undefined;
3232
3237
  name: string;
3233
3238
  role?: "user" | "staff" | "admin" | ("user" | "staff" | "admin")[] | undefined;
3234
3239
  data?: Record<string, any> | undefined;
@@ -3353,11 +3358,6 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
3353
3358
  }, {
3354
3359
  users: import("better-auth/plugins").UserWithRole[];
3355
3360
  total: number;
3356
- limit: number | undefined;
3357
- offset: number | undefined;
3358
- } | {
3359
- users: never[];
3360
- total: number;
3361
3361
  }>;
3362
3362
  listUserSessions: import("better-auth/*").StrictEndpoint<"/admin/list-user-sessions", {
3363
3363
  method: "POST";
@@ -3436,15 +3436,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
3436
3436
  };
3437
3437
  };
3438
3438
  }, {
3439
- user: {
3440
- id: string;
3441
- createdAt: Date;
3442
- updatedAt: Date;
3443
- email: string;
3444
- emailVerified: boolean;
3445
- name: string;
3446
- image?: string | null | undefined;
3447
- } & Record<string, any>;
3439
+ user: import("better-auth/plugins").UserWithRole;
3448
3440
  }>;
3449
3441
  banUser: import("better-auth/*").StrictEndpoint<"/admin/ban-user", {
3450
3442
  method: "POST";
@@ -3484,15 +3476,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
3484
3476
  };
3485
3477
  };
3486
3478
  }, {
3487
- user: {
3488
- id: string;
3489
- createdAt: Date;
3490
- updatedAt: Date;
3491
- email: string;
3492
- emailVerified: boolean;
3493
- name: string;
3494
- image?: string | null | undefined;
3495
- } & Record<string, any>;
3479
+ user: import("better-auth/plugins").UserWithRole;
3496
3480
  }>;
3497
3481
  impersonateUser: import("better-auth/*").StrictEndpoint<"/admin/impersonate-user", {
3498
3482
  method: "POST";
@@ -3549,8 +3533,25 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
3549
3533
  method: "POST";
3550
3534
  requireHeaders: true;
3551
3535
  }, {
3552
- session: import("better-auth/*").Session & Record<string, any>;
3553
- user: import("better-auth/*").User & Record<string, any>;
3536
+ session: {
3537
+ id: string;
3538
+ createdAt: Date;
3539
+ updatedAt: Date;
3540
+ userId: string;
3541
+ expiresAt: Date;
3542
+ token: string;
3543
+ ipAddress?: string | null | undefined;
3544
+ userAgent?: string | null | undefined;
3545
+ } & Record<string, any>;
3546
+ user: {
3547
+ id: string;
3548
+ createdAt: Date;
3549
+ updatedAt: Date;
3550
+ email: string;
3551
+ emailVerified: boolean;
3552
+ name: string;
3553
+ image?: string | null | undefined;
3554
+ } & Record<string, any>;
3554
3555
  }>;
3555
3556
  revokeUserSession: import("better-auth/*").StrictEndpoint<"/admin/revoke-user-session", {
3556
3557
  method: "POST";
@@ -3926,6 +3927,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
3926
3927
  plugins: any;
3927
3928
  } ? C["$auth"]["plugins"] : [])[number])[];
3928
3929
  database: (options: import("better-auth/*").BetterAuthOptions) => import("better-auth/*").DBAdapter<import("better-auth/*").BetterAuthOptions>;
3930
+ baseUrl: string | undefined;
3929
3931
  rateLimit: {
3930
3932
  readonly enabled: boolean;
3931
3933
  readonly window: 10;
@@ -73,7 +73,7 @@ export async function createRime(config) {
73
73
  const hasParams = searchParams.toString();
74
74
  const searchParamLocale = hasParams && searchParams.get('locale');
75
75
  // locale from the cookie
76
- const cookieLocale = event.cookies.get('Locale');
76
+ const cookieLocale = event.cookies.get('rime.locale');
77
77
  const defaultLocale = configCtx.getDefaultLocale();
78
78
  const locale = paramLocale || searchParamLocale || cookieLocale;
79
79
  if (locale && configCtx.getLocalesCodes().includes(locale)) {
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { dev } from '$app/environment';
2
3
  import RichText from '../../rich-text/component/RichText.svelte';
3
4
  import { RichTextFieldBuilder } from '../../rich-text/index.js';
4
5
  import RenderFields from '../../../panel/components/fields/RenderFields.svelte';
@@ -6,13 +7,12 @@
6
7
  import type { DocumentFormContext } from '../../../panel/context/documentForm.svelte.js';
7
8
  import Cookies from 'js-cookie';
8
9
  import type { TabBuilder, TabsField } from '../index.js';
9
- import { dev } from '$app/environment';
10
10
 
11
11
  type Props = { config: TabsField; path: string; form: DocumentFormContext };
12
12
 
13
13
  const { config, path: initialPath, form }: Props = $props();
14
14
 
15
- const cookieKey = `Tabs:${form.values.id || 'create'}:${initialPath}:${config.tabs.map((t) => t.name).join('-')}`;
15
+ const cookieKey = `rime.Tabs:${form.values.id || 'create'}:${initialPath}:${config.tabs.map((t) => t.name).join('-')}`;
16
16
  let activeTabName = $state(Cookies.get(cookieKey) || config.tabs[0].name);
17
17
 
18
18
  // Prevent localStorage opened tab to open when tab.live is false
@@ -57,7 +57,7 @@
57
57
 
58
58
  <!-- For creation show passwords fields -->
59
59
  <!-- For updates show reset password if mailer plugin exists -->
60
- {#if operation === 'create' || (user.attributes.roles.includes('admin') && page.data?.hasMailer)}
60
+ {#if operation === 'create' || (user.attributes.isStaff && page.data?.hasMailer)}
61
61
  <div class="rz-document-auth">
62
62
  {#if operation === 'create'}
63
63
  {#if isAuthConfig(collection) && collection.auth.type === 'password'}
@@ -69,7 +69,7 @@
69
69
  path="confirmPassword"
70
70
  />
71
71
  {/if}
72
- {:else if user.attributes.roles.includes('admin') && page.data?.hasMailer}
72
+ {:else if user.attributes.isStaff && page.data?.hasMailer}
73
73
  {#if isAuthConfig(collection) && collection.auth.type === 'password'}
74
74
  <div>
75
75
  <Button onclick={sendPasswordResetLink} variant="outline">
@@ -41,7 +41,7 @@
41
41
  disabled={isActive(item.code)}
42
42
  data-active={isActive(item.code) ? '' : null}
43
43
  onclick={() => {
44
- Cookies.set('Locale', item.code, {
44
+ Cookies.set('rime.locale', item.code, {
45
45
  sameSite: 'strict',
46
46
  secure: !dev
47
47
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimecms",
3
- "version": "0.25.7",
3
+ "version": "0.25.9",
4
4
  "homepage": "https://github.com/bienbiendev/rime",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -202,7 +202,7 @@
202
202
  "@tiptap/y-tiptap": "^3.0.1",
203
203
  "ast-kit": "^2.1.2",
204
204
  "autoprefixer": "^10.4.21",
205
- "better-auth": "^1.4.11",
205
+ "better-auth": "1.4.21",
206
206
  "bits-ui": "2.8.0",
207
207
  "camelcase": "^8.0.0",
208
208
  "chalk": "^5.6.2",