rimecms 0.25.6 → 0.25.8
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/core/config/auth/better-auth.server.d.ts +45 -45
- package/dist/core/config/server/build-config.server.d.ts +90 -90
- package/dist/core/config/types.d.ts +2 -2
- package/dist/core/dev/cli/init/index.js +2 -2
- package/dist/core/rime.server.d.ts +90 -90
- package/dist/core/rime.server.js +1 -1
- package/dist/fields/tabs/component/Tabs.svelte +2 -2
- package/dist/panel/components/sections/document/AuthFooter.svelte +2 -2
- package/dist/panel/components/ui/language-switcher/LanguageSwitcher.svelte +1 -1
- package/dist/panel/style/font.css +5 -5
- package/package.json +2 -2
|
@@ -61,7 +61,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
61
61
|
context: import("better-auth/*").MiddlewareContext<import("better-auth/*").MiddlewareOptions, {
|
|
62
62
|
returned?: unknown | undefined;
|
|
63
63
|
responseHeaders?: Headers | undefined;
|
|
64
|
-
} & import("better-auth/*").PluginContext & {
|
|
64
|
+
} & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
|
|
65
65
|
options: import("better-auth/types").BetterAuthOptions;
|
|
66
66
|
appName: string;
|
|
67
67
|
baseURL: string;
|
|
@@ -93,13 +93,10 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
93
93
|
window: number;
|
|
94
94
|
max: number;
|
|
95
95
|
storage: "memory" | "database" | "secondary-storage";
|
|
96
|
-
} & import("better-auth/types").BetterAuthRateLimitOptions
|
|
96
|
+
} & Omit<import("better-auth/types").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
97
97
|
adapter: import("better-auth/types").DBAdapter<import("better-auth/types").BetterAuthOptions>;
|
|
98
98
|
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
|
-
};
|
|
99
|
+
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => import("better-auth/*").BetterAuthCookie;
|
|
103
100
|
secret: string;
|
|
104
101
|
sessionConfig: {
|
|
105
102
|
updateAge: number;
|
|
@@ -134,10 +131,10 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
134
131
|
anonymousId?: string | undefined;
|
|
135
132
|
payload: Record<string, any>;
|
|
136
133
|
}) => Promise<void>;
|
|
137
|
-
skipOriginCheck: boolean;
|
|
134
|
+
skipOriginCheck: boolean | string[];
|
|
138
135
|
skipCSRFCheck: boolean;
|
|
139
|
-
runInBackground: (promise: Promise<
|
|
140
|
-
runInBackgroundOrAwait: (promise: Promise<unknown> |
|
|
136
|
+
runInBackground: (promise: Promise<unknown>) => void;
|
|
137
|
+
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth/*").Awaitable<unknown>;
|
|
141
138
|
}>;
|
|
142
139
|
}>;
|
|
143
140
|
}[];
|
|
@@ -318,10 +315,25 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
318
315
|
permissions: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>>;
|
|
319
316
|
}, import("better-auth/*").$strip>;
|
|
320
317
|
}, {
|
|
318
|
+
valid: boolean;
|
|
319
|
+
error: {
|
|
320
|
+
message: "Invalid API key.";
|
|
321
|
+
code: "KEY_NOT_FOUND";
|
|
322
|
+
};
|
|
323
|
+
key: null;
|
|
324
|
+
} | {
|
|
321
325
|
valid: boolean;
|
|
322
326
|
error: {
|
|
323
327
|
message: string | undefined;
|
|
324
328
|
code: string;
|
|
329
|
+
cause?: unknown;
|
|
330
|
+
};
|
|
331
|
+
key: null;
|
|
332
|
+
} | {
|
|
333
|
+
valid: boolean;
|
|
334
|
+
error: {
|
|
335
|
+
message: "Invalid API key.";
|
|
336
|
+
code: "INVALID_API_KEY";
|
|
325
337
|
};
|
|
326
338
|
key: null;
|
|
327
339
|
} | {
|
|
@@ -1169,20 +1181,12 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1169
1181
|
};
|
|
1170
1182
|
};
|
|
1171
1183
|
};
|
|
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
|
-
}>;
|
|
1184
|
+
}, import("better-auth/plugins").UserWithRole>;
|
|
1181
1185
|
createUser: import("better-auth/*").StrictEndpoint<"/admin/create-user", {
|
|
1182
1186
|
method: "POST";
|
|
1183
1187
|
body: import("better-auth/*").ZodObject<{
|
|
1184
1188
|
email: import("better-auth/*").ZodString;
|
|
1185
|
-
password: import("better-auth/*").ZodString
|
|
1189
|
+
password: import("better-auth/*").ZodOptional<import("better-auth/*").ZodString>;
|
|
1186
1190
|
name: import("better-auth/*").ZodString;
|
|
1187
1191
|
role: import("better-auth/*").ZodOptional<import("better-auth/*").ZodUnion<readonly [import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>]>>;
|
|
1188
1192
|
data: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodAny>>;
|
|
@@ -1213,7 +1217,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1213
1217
|
$Infer: {
|
|
1214
1218
|
body: {
|
|
1215
1219
|
email: string;
|
|
1216
|
-
password
|
|
1220
|
+
password?: string | undefined;
|
|
1217
1221
|
name: string;
|
|
1218
1222
|
role?: "user" | "staff" | "admin" | ("user" | "staff" | "admin")[] | undefined;
|
|
1219
1223
|
data?: Record<string, any> | undefined;
|
|
@@ -1338,11 +1342,6 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1338
1342
|
}, {
|
|
1339
1343
|
users: import("better-auth/plugins").UserWithRole[];
|
|
1340
1344
|
total: number;
|
|
1341
|
-
limit: number | undefined;
|
|
1342
|
-
offset: number | undefined;
|
|
1343
|
-
} | {
|
|
1344
|
-
users: never[];
|
|
1345
|
-
total: number;
|
|
1346
1345
|
}>;
|
|
1347
1346
|
listUserSessions: import("better-auth/*").StrictEndpoint<"/admin/list-user-sessions", {
|
|
1348
1347
|
method: "POST";
|
|
@@ -1421,15 +1420,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1421
1420
|
};
|
|
1422
1421
|
};
|
|
1423
1422
|
}, {
|
|
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>;
|
|
1423
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
1433
1424
|
}>;
|
|
1434
1425
|
banUser: import("better-auth/*").StrictEndpoint<"/admin/ban-user", {
|
|
1435
1426
|
method: "POST";
|
|
@@ -1469,15 +1460,7 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1469
1460
|
};
|
|
1470
1461
|
};
|
|
1471
1462
|
}, {
|
|
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>;
|
|
1463
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
1481
1464
|
}>;
|
|
1482
1465
|
impersonateUser: import("better-auth/*").StrictEndpoint<"/admin/impersonate-user", {
|
|
1483
1466
|
method: "POST";
|
|
@@ -1534,8 +1517,25 @@ export declare function getBaseAuthConfig<const C extends Config>(ctx: {
|
|
|
1534
1517
|
method: "POST";
|
|
1535
1518
|
requireHeaders: true;
|
|
1536
1519
|
}, {
|
|
1537
|
-
session:
|
|
1538
|
-
|
|
1520
|
+
session: {
|
|
1521
|
+
id: string;
|
|
1522
|
+
createdAt: Date;
|
|
1523
|
+
updatedAt: Date;
|
|
1524
|
+
userId: string;
|
|
1525
|
+
expiresAt: Date;
|
|
1526
|
+
token: string;
|
|
1527
|
+
ipAddress?: string | null | undefined;
|
|
1528
|
+
userAgent?: string | null | undefined;
|
|
1529
|
+
} & Record<string, any>;
|
|
1530
|
+
user: {
|
|
1531
|
+
id: string;
|
|
1532
|
+
createdAt: Date;
|
|
1533
|
+
updatedAt: Date;
|
|
1534
|
+
email: string;
|
|
1535
|
+
emailVerified: boolean;
|
|
1536
|
+
name: string;
|
|
1537
|
+
image?: string | null | undefined;
|
|
1538
|
+
} & Record<string, any>;
|
|
1539
1539
|
}>;
|
|
1540
1540
|
revokeUserSession: import("better-auth/*").StrictEndpoint<"/admin/revoke-user-session", {
|
|
1541
1541
|
method: "POST";
|
|
@@ -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<
|
|
138
|
-
runInBackgroundOrAwait: (promise: 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
|
|
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:
|
|
1536
|
-
|
|
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";
|
|
@@ -2040,7 +2040,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
|
|
|
2040
2040
|
context: import("better-auth/*").MiddlewareContext<import("better-auth/*").MiddlewareOptions, {
|
|
2041
2041
|
returned?: unknown | undefined;
|
|
2042
2042
|
responseHeaders?: Headers | undefined;
|
|
2043
|
-
} & import("better-auth/*").PluginContext & {
|
|
2043
|
+
} & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
|
|
2044
2044
|
options: import("better-auth/types").BetterAuthOptions;
|
|
2045
2045
|
appName: string;
|
|
2046
2046
|
baseURL: string;
|
|
@@ -2072,13 +2072,10 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
|
|
|
2072
2072
|
window: number;
|
|
2073
2073
|
max: number;
|
|
2074
2074
|
storage: "memory" | "database" | "secondary-storage";
|
|
2075
|
-
} & import("better-auth/types").BetterAuthRateLimitOptions
|
|
2075
|
+
} & Omit<import("better-auth/types").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
2076
2076
|
adapter: import("better-auth/types").DBAdapter<import("better-auth/types").BetterAuthOptions>;
|
|
2077
2077
|
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
|
-
};
|
|
2078
|
+
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => import("better-auth/*").BetterAuthCookie;
|
|
2082
2079
|
secret: string;
|
|
2083
2080
|
sessionConfig: {
|
|
2084
2081
|
updateAge: number;
|
|
@@ -2113,10 +2110,10 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
|
|
|
2113
2110
|
anonymousId?: string | undefined;
|
|
2114
2111
|
payload: Record<string, any>;
|
|
2115
2112
|
}) => Promise<void>;
|
|
2116
|
-
skipOriginCheck: boolean;
|
|
2113
|
+
skipOriginCheck: boolean | string[];
|
|
2117
2114
|
skipCSRFCheck: boolean;
|
|
2118
|
-
runInBackground: (promise: Promise<
|
|
2119
|
-
runInBackgroundOrAwait: (promise: Promise<unknown> |
|
|
2115
|
+
runInBackground: (promise: Promise<unknown>) => void;
|
|
2116
|
+
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth/*").Awaitable<unknown>;
|
|
2120
2117
|
}>;
|
|
2121
2118
|
}>;
|
|
2122
2119
|
}[];
|
|
@@ -2297,10 +2294,25 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
|
|
|
2297
2294
|
permissions: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>>;
|
|
2298
2295
|
}, import("better-auth/*").$strip>;
|
|
2299
2296
|
}, {
|
|
2297
|
+
valid: boolean;
|
|
2298
|
+
error: {
|
|
2299
|
+
message: "Invalid API key.";
|
|
2300
|
+
code: "KEY_NOT_FOUND";
|
|
2301
|
+
};
|
|
2302
|
+
key: null;
|
|
2303
|
+
} | {
|
|
2300
2304
|
valid: boolean;
|
|
2301
2305
|
error: {
|
|
2302
2306
|
message: string | undefined;
|
|
2303
2307
|
code: string;
|
|
2308
|
+
cause?: unknown;
|
|
2309
|
+
};
|
|
2310
|
+
key: null;
|
|
2311
|
+
} | {
|
|
2312
|
+
valid: boolean;
|
|
2313
|
+
error: {
|
|
2314
|
+
message: "Invalid API key.";
|
|
2315
|
+
code: "INVALID_API_KEY";
|
|
2304
2316
|
};
|
|
2305
2317
|
key: null;
|
|
2306
2318
|
} | {
|
|
@@ -3148,20 +3160,12 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
|
|
|
3148
3160
|
};
|
|
3149
3161
|
};
|
|
3150
3162
|
};
|
|
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
|
-
}>;
|
|
3163
|
+
}, import("better-auth/plugins").UserWithRole>;
|
|
3160
3164
|
createUser: import("better-auth/*").StrictEndpoint<"/admin/create-user", {
|
|
3161
3165
|
method: "POST";
|
|
3162
3166
|
body: import("better-auth/*").ZodObject<{
|
|
3163
3167
|
email: import("better-auth/*").ZodString;
|
|
3164
|
-
password: import("better-auth/*").ZodString
|
|
3168
|
+
password: import("better-auth/*").ZodOptional<import("better-auth/*").ZodString>;
|
|
3165
3169
|
name: import("better-auth/*").ZodString;
|
|
3166
3170
|
role: import("better-auth/*").ZodOptional<import("better-auth/*").ZodUnion<readonly [import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>]>>;
|
|
3167
3171
|
data: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodAny>>;
|
|
@@ -3192,7 +3196,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
|
|
|
3192
3196
|
$Infer: {
|
|
3193
3197
|
body: {
|
|
3194
3198
|
email: string;
|
|
3195
|
-
password
|
|
3199
|
+
password?: string | undefined;
|
|
3196
3200
|
name: string;
|
|
3197
3201
|
role?: "user" | "staff" | "admin" | ("user" | "staff" | "admin")[] | undefined;
|
|
3198
3202
|
data?: Record<string, any> | undefined;
|
|
@@ -3317,11 +3321,6 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
|
|
|
3317
3321
|
}, {
|
|
3318
3322
|
users: import("better-auth/plugins").UserWithRole[];
|
|
3319
3323
|
total: number;
|
|
3320
|
-
limit: number | undefined;
|
|
3321
|
-
offset: number | undefined;
|
|
3322
|
-
} | {
|
|
3323
|
-
users: never[];
|
|
3324
|
-
total: number;
|
|
3325
3324
|
}>;
|
|
3326
3325
|
listUserSessions: import("better-auth/*").StrictEndpoint<"/admin/list-user-sessions", {
|
|
3327
3326
|
method: "POST";
|
|
@@ -3400,15 +3399,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
|
|
|
3400
3399
|
};
|
|
3401
3400
|
};
|
|
3402
3401
|
}, {
|
|
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>;
|
|
3402
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
3412
3403
|
}>;
|
|
3413
3404
|
banUser: import("better-auth/*").StrictEndpoint<"/admin/ban-user", {
|
|
3414
3405
|
method: "POST";
|
|
@@ -3448,15 +3439,7 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
|
|
|
3448
3439
|
};
|
|
3449
3440
|
};
|
|
3450
3441
|
}, {
|
|
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>;
|
|
3442
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
3460
3443
|
}>;
|
|
3461
3444
|
impersonateUser: import("better-auth/*").StrictEndpoint<"/admin/impersonate-user", {
|
|
3462
3445
|
method: "POST";
|
|
@@ -3513,8 +3496,25 @@ export declare const buildConfig: <const C extends Config>(config: C) => Promise
|
|
|
3513
3496
|
method: "POST";
|
|
3514
3497
|
requireHeaders: true;
|
|
3515
3498
|
}, {
|
|
3516
|
-
session:
|
|
3517
|
-
|
|
3499
|
+
session: {
|
|
3500
|
+
id: string;
|
|
3501
|
+
createdAt: Date;
|
|
3502
|
+
updatedAt: Date;
|
|
3503
|
+
userId: string;
|
|
3504
|
+
expiresAt: Date;
|
|
3505
|
+
token: string;
|
|
3506
|
+
ipAddress?: string | null | undefined;
|
|
3507
|
+
userAgent?: string | null | undefined;
|
|
3508
|
+
} & Record<string, any>;
|
|
3509
|
+
user: {
|
|
3510
|
+
id: string;
|
|
3511
|
+
createdAt: Date;
|
|
3512
|
+
updatedAt: Date;
|
|
3513
|
+
email: string;
|
|
3514
|
+
emailVerified: boolean;
|
|
3515
|
+
name: string;
|
|
3516
|
+
image?: string | null | undefined;
|
|
3517
|
+
} & Record<string, any>;
|
|
3518
3518
|
}>;
|
|
3519
3519
|
revokeUserSession: import("better-auth/*").StrictEndpoint<"/admin/revoke-user-session", {
|
|
3520
3520
|
method: "POST";
|
|
@@ -130,8 +130,8 @@ export type PanelConfig = {
|
|
|
130
130
|
};
|
|
131
131
|
/** a relative path from the "static" directory or an external url
|
|
132
132
|
* @example
|
|
133
|
-
* // for static/
|
|
134
|
-
* css : '/
|
|
133
|
+
* // for static/assets/custom.css
|
|
134
|
+
* css : '/assets/custom.css'
|
|
135
135
|
*/
|
|
136
136
|
css?: string;
|
|
137
137
|
};
|
|
@@ -152,8 +152,8 @@ export const init = async ({ force, name: incomingName, skipInstall }) => {
|
|
|
152
152
|
async function copyAssets() {
|
|
153
153
|
try {
|
|
154
154
|
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
155
|
-
await mkdir(path.resolve(process.cwd(), 'static/panel/fonts'), { recursive: true });
|
|
156
|
-
await cp(path.join(currentDir, '../../../../panel/fonts'), path.resolve(process.cwd(), 'static/panel/fonts'), {
|
|
155
|
+
await mkdir(path.resolve(process.cwd(), 'static/assets/panel/fonts'), { recursive: true });
|
|
156
|
+
await cp(path.join(currentDir, '../../../../panel/fonts'), path.resolve(process.cwd(), 'static/assets/panel/fonts'), {
|
|
157
157
|
recursive: true
|
|
158
158
|
});
|
|
159
159
|
logger.info('[✓] Copied assets');
|
|
@@ -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<
|
|
150
|
-
runInBackgroundOrAwait: (promise: 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
|
|
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:
|
|
1548
|
-
|
|
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";
|
|
@@ -2076,7 +2076,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2076
2076
|
context: import("better-auth/*").MiddlewareContext<import("better-auth/*").MiddlewareOptions, {
|
|
2077
2077
|
returned?: unknown | undefined;
|
|
2078
2078
|
responseHeaders?: Headers | undefined;
|
|
2079
|
-
} & import("better-auth/*").PluginContext & {
|
|
2079
|
+
} & import("better-auth/*").PluginContext & import("better-auth/*").InfoContext & {
|
|
2080
2080
|
options: import("better-auth/*").BetterAuthOptions;
|
|
2081
2081
|
appName: string;
|
|
2082
2082
|
baseURL: string;
|
|
@@ -2108,13 +2108,10 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2108
2108
|
window: number;
|
|
2109
2109
|
max: number;
|
|
2110
2110
|
storage: "memory" | "database" | "secondary-storage";
|
|
2111
|
-
} & import("better-auth/*").BetterAuthRateLimitOptions
|
|
2111
|
+
} & Omit<import("better-auth/*").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
|
|
2112
2112
|
adapter: import("better-auth/*").DBAdapter<import("better-auth/*").BetterAuthOptions>;
|
|
2113
2113
|
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
|
-
};
|
|
2114
|
+
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth/*").CookieOptions> | undefined) => import("better-auth/*").BetterAuthCookie;
|
|
2118
2115
|
secret: string;
|
|
2119
2116
|
sessionConfig: {
|
|
2120
2117
|
updateAge: number;
|
|
@@ -2149,10 +2146,10 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2149
2146
|
anonymousId?: string | undefined;
|
|
2150
2147
|
payload: Record<string, any>;
|
|
2151
2148
|
}) => Promise<void>;
|
|
2152
|
-
skipOriginCheck: boolean;
|
|
2149
|
+
skipOriginCheck: boolean | string[];
|
|
2153
2150
|
skipCSRFCheck: boolean;
|
|
2154
|
-
runInBackground: (promise: Promise<
|
|
2155
|
-
runInBackgroundOrAwait: (promise: Promise<unknown> |
|
|
2151
|
+
runInBackground: (promise: Promise<unknown>) => void;
|
|
2152
|
+
runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth/*").Awaitable<unknown>;
|
|
2156
2153
|
}>;
|
|
2157
2154
|
}>;
|
|
2158
2155
|
}[];
|
|
@@ -2333,10 +2330,25 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
2333
2330
|
permissions: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>>>;
|
|
2334
2331
|
}, import("better-auth/*").$strip>;
|
|
2335
2332
|
}, {
|
|
2333
|
+
valid: boolean;
|
|
2334
|
+
error: {
|
|
2335
|
+
message: "Invalid API key.";
|
|
2336
|
+
code: "KEY_NOT_FOUND";
|
|
2337
|
+
};
|
|
2338
|
+
key: null;
|
|
2339
|
+
} | {
|
|
2336
2340
|
valid: boolean;
|
|
2337
2341
|
error: {
|
|
2338
2342
|
message: string | undefined;
|
|
2339
2343
|
code: string;
|
|
2344
|
+
cause?: unknown;
|
|
2345
|
+
};
|
|
2346
|
+
key: null;
|
|
2347
|
+
} | {
|
|
2348
|
+
valid: boolean;
|
|
2349
|
+
error: {
|
|
2350
|
+
message: "Invalid API key.";
|
|
2351
|
+
code: "INVALID_API_KEY";
|
|
2340
2352
|
};
|
|
2341
2353
|
key: null;
|
|
2342
2354
|
} | {
|
|
@@ -3184,20 +3196,12 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3184
3196
|
};
|
|
3185
3197
|
};
|
|
3186
3198
|
};
|
|
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
|
-
}>;
|
|
3199
|
+
}, import("better-auth/plugins").UserWithRole>;
|
|
3196
3200
|
createUser: import("better-auth/*").StrictEndpoint<"/admin/create-user", {
|
|
3197
3201
|
method: "POST";
|
|
3198
3202
|
body: import("better-auth/*").ZodObject<{
|
|
3199
3203
|
email: import("better-auth/*").ZodString;
|
|
3200
|
-
password: import("better-auth/*").ZodString
|
|
3204
|
+
password: import("better-auth/*").ZodOptional<import("better-auth/*").ZodString>;
|
|
3201
3205
|
name: import("better-auth/*").ZodString;
|
|
3202
3206
|
role: import("better-auth/*").ZodOptional<import("better-auth/*").ZodUnion<readonly [import("better-auth/*").ZodString, import("better-auth/*").ZodArray<import("better-auth/*").ZodString>]>>;
|
|
3203
3207
|
data: import("better-auth/*").ZodOptional<import("better-auth/*").ZodRecord<import("better-auth/*").ZodString, import("better-auth/*").ZodAny>>;
|
|
@@ -3228,7 +3232,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3228
3232
|
$Infer: {
|
|
3229
3233
|
body: {
|
|
3230
3234
|
email: string;
|
|
3231
|
-
password
|
|
3235
|
+
password?: string | undefined;
|
|
3232
3236
|
name: string;
|
|
3233
3237
|
role?: "user" | "staff" | "admin" | ("user" | "staff" | "admin")[] | undefined;
|
|
3234
3238
|
data?: Record<string, any> | undefined;
|
|
@@ -3353,11 +3357,6 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3353
3357
|
}, {
|
|
3354
3358
|
users: import("better-auth/plugins").UserWithRole[];
|
|
3355
3359
|
total: number;
|
|
3356
|
-
limit: number | undefined;
|
|
3357
|
-
offset: number | undefined;
|
|
3358
|
-
} | {
|
|
3359
|
-
users: never[];
|
|
3360
|
-
total: number;
|
|
3361
3360
|
}>;
|
|
3362
3361
|
listUserSessions: import("better-auth/*").StrictEndpoint<"/admin/list-user-sessions", {
|
|
3363
3362
|
method: "POST";
|
|
@@ -3436,15 +3435,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3436
3435
|
};
|
|
3437
3436
|
};
|
|
3438
3437
|
}, {
|
|
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>;
|
|
3438
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
3448
3439
|
}>;
|
|
3449
3440
|
banUser: import("better-auth/*").StrictEndpoint<"/admin/ban-user", {
|
|
3450
3441
|
method: "POST";
|
|
@@ -3484,15 +3475,7 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3484
3475
|
};
|
|
3485
3476
|
};
|
|
3486
3477
|
}, {
|
|
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>;
|
|
3478
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
3496
3479
|
}>;
|
|
3497
3480
|
impersonateUser: import("better-auth/*").StrictEndpoint<"/admin/impersonate-user", {
|
|
3498
3481
|
method: "POST";
|
|
@@ -3549,8 +3532,25 @@ export declare function createRime<const C extends Config>(config: BuildConfig<C
|
|
|
3549
3532
|
method: "POST";
|
|
3550
3533
|
requireHeaders: true;
|
|
3551
3534
|
}, {
|
|
3552
|
-
session:
|
|
3553
|
-
|
|
3535
|
+
session: {
|
|
3536
|
+
id: string;
|
|
3537
|
+
createdAt: Date;
|
|
3538
|
+
updatedAt: Date;
|
|
3539
|
+
userId: string;
|
|
3540
|
+
expiresAt: Date;
|
|
3541
|
+
token: string;
|
|
3542
|
+
ipAddress?: string | null | undefined;
|
|
3543
|
+
userAgent?: string | null | undefined;
|
|
3544
|
+
} & Record<string, any>;
|
|
3545
|
+
user: {
|
|
3546
|
+
id: string;
|
|
3547
|
+
createdAt: Date;
|
|
3548
|
+
updatedAt: Date;
|
|
3549
|
+
email: string;
|
|
3550
|
+
emailVerified: boolean;
|
|
3551
|
+
name: string;
|
|
3552
|
+
image?: string | null | undefined;
|
|
3553
|
+
} & Record<string, any>;
|
|
3554
3554
|
}>;
|
|
3555
3555
|
revokeUserSession: import("better-auth/*").StrictEndpoint<"/admin/revoke-user-session", {
|
|
3556
3556
|
method: "POST";
|
package/dist/core/rime.server.js
CHANGED
|
@@ -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('
|
|
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.
|
|
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.
|
|
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">
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: 'Lora';
|
|
3
|
-
src: url('/panel/fonts/Lora-Italic-VariableFont_wght.ttf') format('truetype');
|
|
3
|
+
src: url('/assets/panel/fonts/Lora-Italic-VariableFont_wght.ttf') format('truetype');
|
|
4
4
|
font-weight: 100 1000;
|
|
5
5
|
font-style: Italic;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
@font-face {
|
|
9
9
|
font-family: 'Lora';
|
|
10
|
-
src: url('/panel/fonts/Lora-VariableFont_wght.ttf') format('truetype');
|
|
10
|
+
src: url('/assets/panel/fonts/Lora-VariableFont_wght.ttf') format('truetype');
|
|
11
11
|
font-weight: 100 1000;
|
|
12
12
|
font-style: normal;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
@font-face {
|
|
16
16
|
font-family: 'Chivo';
|
|
17
|
-
src: url('/panel/fonts/ChivoMono-Italic-VariableFont_wght.ttf') format('truetype');
|
|
17
|
+
src: url('/assets/panel/fonts/ChivoMono-Italic-VariableFont_wght.ttf') format('truetype');
|
|
18
18
|
font-weight: 100 1000;
|
|
19
19
|
font-style: Italic;
|
|
20
20
|
}
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
--rz-font-scale: 0.8;
|
|
24
24
|
|
|
25
25
|
--rz-font-sans:
|
|
26
|
-
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
|
|
27
|
-
'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
26
|
+
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
|
|
27
|
+
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
28
28
|
--rz-font-mono: 'SFMono-Regular', Consolas, Liberation Mono, Menlo, Courier, monospace;
|
|
29
29
|
--rz-font-serif: 'Lora';
|
|
30
30
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rimecms",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.8",
|
|
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": "
|
|
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",
|