@protobase/server 0.25.2 → 0.25.3
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.
|
@@ -15,9 +15,10 @@ import { Hono } from "hono";
|
|
|
15
15
|
* one of the app's hosts, the RP IDs a passkey sign-in can ask for, the passkey domain first; with organizations, who may create them and the roles
|
|
16
16
|
* with their labels, `membership` for those a member can hold, and the roles each one's holders may also give; and
|
|
17
17
|
* `anonymous` when the project's anonymous role reads a resource, so the admin app opens for visitors before anyone signs in; and
|
|
18
|
-
* `plugins`, those the app loads before sign-in (see `PluginOption`).
|
|
18
|
+
* `plugins`, those the app loads before sign-in (see `PluginOption`); and `locale`, the language `options.locale` puts
|
|
19
|
+
* the screens in, so the sign-in screens and public forms, which come before `/meta`, are in it too.
|
|
19
20
|
*/
|
|
20
|
-
const statusRoute = (auth, { anonymous = false, plugins = [] } = {}) => {
|
|
21
|
+
const statusRoute = (auth, { anonymous = false, plugins = [], locale } = {}) => {
|
|
21
22
|
const app = new Hono();
|
|
22
23
|
app.get("/status", async (c) => {
|
|
23
24
|
const context = await auth.$context;
|
|
@@ -44,6 +45,7 @@ const statusRoute = (auth, { anonymous = false, plugins = [] } = {}) => {
|
|
|
44
45
|
...passkeyDomains.length > 1 && { passkeyDomains },
|
|
45
46
|
...anonymous && { anonymous },
|
|
46
47
|
...plugins.length > 0 && { plugins },
|
|
48
|
+
...locale && { locale },
|
|
47
49
|
...auth.organizations && { organizations: {
|
|
48
50
|
create: auth.organizations.create,
|
|
49
51
|
roles: roleLabels(auth.roleDefinitions)
|
package/dist/create-admin.js
CHANGED
|
@@ -221,7 +221,8 @@ const createAdmin = ({ resources: appResources, views: appViews = [], pages = []
|
|
|
221
221
|
if (auth) {
|
|
222
222
|
app.route(authBasePath, statusRoute(auth, {
|
|
223
223
|
anonymous: visitorsBrowse(options.roles),
|
|
224
|
-
plugins: pluginsBeforeSignIn(plugins)
|
|
224
|
+
plugins: pluginsBeforeSignIn(plugins),
|
|
225
|
+
...locale && { locale }
|
|
225
226
|
}));
|
|
226
227
|
if (auth.organizations) app.route(authBasePath, organizationRoutes({
|
|
227
228
|
auth,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/server",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.3",
|
|
4
4
|
"description": "The Protobase REST API as a Hono app, with Better Auth sign-in.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@better-auth/passkey": "^1.7.7",
|
|
34
34
|
"@better-auth/sso": "^1.7.7",
|
|
35
|
-
"@protobase/layout": "0.25.
|
|
36
|
-
"@protobase/query": "0.25.
|
|
37
|
-
"@protobase/schema": "0.25.
|
|
35
|
+
"@protobase/layout": "0.25.3",
|
|
36
|
+
"@protobase/query": "0.25.3",
|
|
37
|
+
"@protobase/schema": "0.25.3",
|
|
38
38
|
"@react-email/render": "^2.1.0",
|
|
39
39
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
40
40
|
"@sentry/core": "^11.7.0",
|