@protobase/server 0.3.4 → 0.4.1
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/assistant/assistant-settings.js +2 -1
- package/dist/better-auth/admin-only.js +13 -0
- package/dist/better-auth/create-auth.d.ts +2357 -30
- package/dist/better-auth/create-auth.js +70 -24
- package/dist/better-auth/operator-provider.d.ts +29 -0
- package/dist/better-auth/operator-provider.js +130 -0
- package/dist/better-auth/parse-roles.d.ts +7 -0
- package/dist/better-auth/parse-roles.js +12 -0
- package/dist/better-auth/policy-plugin.js +142 -0
- package/dist/better-auth/policy-store.js +65 -0
- package/dist/better-auth/sign-in-enforcement.js +65 -0
- package/dist/better-auth/sign-in-mail.js +78 -0
- package/dist/better-auth/sign-in-policy.d.ts +49 -0
- package/dist/better-auth/sign-in-policy.js +83 -0
- package/dist/better-auth/staff-checks.js +65 -0
- package/dist/better-auth/staff-log.d.ts +14 -0
- package/dist/better-auth/staff-log.js +96 -0
- package/dist/better-auth/staff-plugin.js +61 -0
- package/dist/better-auth/staff-sign-in-endpoints.js +162 -0
- package/dist/better-auth/status-route.js +23 -8
- package/dist/better-auth/tokens.js +1 -1
- package/dist/better-auth/two-factor-challenge.js +23 -0
- package/dist/better-auth/users.d.ts +5 -7
- package/dist/better-auth/users.js +3 -10
- package/dist/create-admin.js +4 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +6 -2
- package/dist/meta.js +3 -1
- package/dist/runtime/runtime-settings.d.ts +14 -0
- package/dist/runtime/runtime-settings.js +14 -0
- package/dist/types.d.ts +3 -0
- package/package.json +12 -9
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { twoFactor } from "better-auth/plugins";
|
|
2
|
+
//#region src/better-auth/two-factor-challenge.ts
|
|
3
|
+
/**
|
|
4
|
+
* Better Auth's two-factor plugin, whose second step also follows a sign-in with an emailed code: the plugin asks for
|
|
5
|
+
* it after a password only, and an inbox alone is one factor as well. A passkey is two factors already, so a passkey
|
|
6
|
+
* sign-in is not asked. The plugin's own hook does the work; only the paths it matches grow.
|
|
7
|
+
*/
|
|
8
|
+
const twoFactorAfterPasswordOrCode = (options) => {
|
|
9
|
+
const plugin = twoFactor(options);
|
|
10
|
+
const after = plugin.hooks.after.map((hook) => ({
|
|
11
|
+
...hook,
|
|
12
|
+
matcher: (context) => hook.matcher(context) || context.path === "/sign-in/email-otp"
|
|
13
|
+
}));
|
|
14
|
+
return {
|
|
15
|
+
...plugin,
|
|
16
|
+
hooks: {
|
|
17
|
+
...plugin.hooks,
|
|
18
|
+
after
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { twoFactorAfterPasswordOrCode };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AdminAuth } from "./create-auth.js";
|
|
2
|
+
import { parseRoles } from "./parse-roles.js";
|
|
2
3
|
//#region src/better-auth/users.d.ts
|
|
3
4
|
/** The roles this auth instance allows, `admin` first. */
|
|
4
5
|
export declare const roleChoices: (auth: AdminAuth) => string[];
|
|
@@ -19,18 +20,14 @@ export type StoredUser = {
|
|
|
19
20
|
export declare const hasUsers: (auth: AdminAuth) => Promise<boolean>;
|
|
20
21
|
/**
|
|
21
22
|
* Creates a user directly in the admin store. Host side only (no HTTP route creates accounts while the store is empty):
|
|
22
|
-
* the first user is always an `admin`, later ones get `role` (default `user`).
|
|
23
|
+
* the first user is always an `admin`, later ones get `role` (default `user`). The address counts as verified, so the
|
|
24
|
+
* user can also sign in with an emailed code.
|
|
23
25
|
*/
|
|
24
26
|
export declare const createUser: (auth: AdminAuth, input: NewUser) => Promise<{
|
|
25
27
|
id: string;
|
|
26
28
|
email: string;
|
|
27
29
|
role: string;
|
|
28
30
|
}>;
|
|
29
|
-
/**
|
|
30
|
-
* The admin plugin stores roles as a comma separated string. A value written as a JS array through a Postgres driver
|
|
31
|
-
* comes back as an array literal (`{admin,sales}`); that is read too, and rewritten as a plain string on the next change.
|
|
32
|
-
*/
|
|
33
|
-
export declare const parseRoles: (role: string | string[] | null | undefined) => string[];
|
|
34
31
|
export declare const listUsers: (auth: AdminAuth) => Promise<StoredUser[]>;
|
|
35
32
|
/** Deletes the user with their sessions and accounts; refuses to delete the last active admin. */
|
|
36
33
|
export declare const deleteUser: (auth: AdminAuth, email: string) => Promise<void>;
|
|
@@ -47,4 +44,5 @@ export declare const setUserBanned: (auth: AdminAuth, input: {
|
|
|
47
44
|
email: string;
|
|
48
45
|
banned: boolean;
|
|
49
46
|
}) => Promise<void>;
|
|
50
|
-
//#endregion
|
|
47
|
+
//#endregion
|
|
48
|
+
export { parseRoles };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parseRoles } from "./parse-roles.js";
|
|
1
2
|
//#region src/better-auth/users.ts
|
|
2
3
|
/** The roles this auth instance allows, `admin` first. */
|
|
3
4
|
const roleChoices = (auth) => [...auth.roles];
|
|
@@ -11,7 +12,8 @@ const checkRoles = (auth, role) => {
|
|
|
11
12
|
const hasUsers = async (auth) => (await auth.$context).adapter.count({ model: "user" }).then((count) => count > 0);
|
|
12
13
|
/**
|
|
13
14
|
* Creates a user directly in the admin store. Host side only (no HTTP route creates accounts while the store is empty):
|
|
14
|
-
* the first user is always an `admin`, later ones get `role` (default `user`).
|
|
15
|
+
* the first user is always an `admin`, later ones get `role` (default `user`). The address counts as verified, so the
|
|
16
|
+
* user can also sign in with an emailed code.
|
|
15
17
|
*/
|
|
16
18
|
const createUser = async (auth, input) => {
|
|
17
19
|
const first = !await hasUsers(auth);
|
|
@@ -30,15 +32,6 @@ const createUser = async (auth, input) => {
|
|
|
30
32
|
role: String(user.role)
|
|
31
33
|
};
|
|
32
34
|
};
|
|
33
|
-
/**
|
|
34
|
-
* The admin plugin stores roles as a comma separated string. A value written as a JS array through a Postgres driver
|
|
35
|
-
* comes back as an array literal (`{admin,sales}`); that is read too, and rewritten as a plain string on the next change.
|
|
36
|
-
*/
|
|
37
|
-
const parseRoles = (role) => {
|
|
38
|
-
if (Array.isArray(role)) return role;
|
|
39
|
-
const text = (role ?? "user").trim();
|
|
40
|
-
return (text.startsWith("{") && text.endsWith("}") ? text.slice(1, -1) : text).split(",").map((name) => name.trim().replace(/^"|"$/g, "")).filter(Boolean);
|
|
41
|
-
};
|
|
42
35
|
const allUsers = async (auth) => {
|
|
43
36
|
const { adapter } = await auth.$context;
|
|
44
37
|
return adapter.findMany({
|
package/dist/create-admin.js
CHANGED
|
@@ -6,6 +6,7 @@ import { authBasePath } from "./better-auth/create-auth.js";
|
|
|
6
6
|
import { statusRoute } from "./better-auth/status-route.js";
|
|
7
7
|
import { checkShell } from "./check-shell.js";
|
|
8
8
|
import { checkViews } from "./check-views.js";
|
|
9
|
+
import { runtimeUrl } from "./runtime/runtime-settings.js";
|
|
9
10
|
import { createMeta } from "./meta.js";
|
|
10
11
|
import { buildRegistry } from "./registry.js";
|
|
11
12
|
import { batchRoute } from "./routes/batch.js";
|
|
@@ -32,6 +33,7 @@ const createAdmin = ({ resources, views = [], pages = [], userMenu, db, authenti
|
|
|
32
33
|
});
|
|
33
34
|
const systemPath = basePath.slice(0, basePath.lastIndexOf("/"));
|
|
34
35
|
const assistant = assistantSettings(options.assistant, globalThis.process?.env ?? {});
|
|
36
|
+
const runtime = runtimeUrl(options.runtime, globalThis.process?.env ?? {});
|
|
35
37
|
const deps = {
|
|
36
38
|
db,
|
|
37
39
|
registry,
|
|
@@ -49,7 +51,8 @@ const createAdmin = ({ resources, views = [], pages = [], userMenu, db, authenti
|
|
|
49
51
|
...options.defaultAccess && { defaultAccess: options.defaultAccess }
|
|
50
52
|
},
|
|
51
53
|
rowPermissions: (resource) => typeof options.rowPermissions === "object" ? !options.rowPermissions.except.includes(resource) : options.rowPermissions !== false,
|
|
52
|
-
...assistant && { assistant: assistant.kind === "external" ? assistant.url : `${systemPath}/assistant` }
|
|
54
|
+
...assistant && { assistant: assistant.kind === "external" ? assistant.url : `${systemPath}/assistant` },
|
|
55
|
+
...runtime && { runtime }
|
|
53
56
|
};
|
|
54
57
|
const meta = createMeta(deps);
|
|
55
58
|
const onError = createErrorHandler(options.onUnhandledError);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import { SignInPolicy, SignInRule, StaffAccessRule, defaultSignInPolicy, signInPolicyMethods } from "./better-auth/sign-in-policy.js";
|
|
2
|
+
import { StaffSignIn } from "./better-auth/staff-log.js";
|
|
3
|
+
import { OperatorProvider, readOperatorSettings } from "./better-auth/operator-provider.js";
|
|
1
4
|
import { AdminAuth, CreateAuthOptions, UserCreatedHook, createAuth, normalizeRoles } from "./better-auth/create-auth.js";
|
|
2
5
|
import { ResourceSource, configExports } from "./resource-source.js";
|
|
3
6
|
import { AssistantOptions, AssistantSettings, ModelSettings, assistantRoles, assistantSettings, assistantVariables, seesAssistant } from "./assistant/assistant-settings.js";
|
|
7
|
+
import { RuntimeOptions, runtimeUrl, runtimeVariable, seesRuntime } from "./runtime/runtime-settings.js";
|
|
4
8
|
import { Admin, AdminOptions, AuditEvent, AuditQueue, Authenticator, PipelineHook, ScanGuardMode, Session, TenantValue, User, ViewSource, WriteEvent, WriteOperation } from "./types.js";
|
|
5
9
|
import { CreateAdminInput, createAdmin } from "./create-admin.js";
|
|
6
10
|
import { consoleAuditQueue } from "./audit/console-queue.js";
|
|
7
11
|
import { JwtOptions, jwtAuthenticator } from "./auth/jwt.js";
|
|
8
12
|
import { HttpProblem, badRequest, forbidden, notFound, unauthorized } from "./problem.js";
|
|
9
13
|
import { BetterAuthAuthenticatorOptions, betterAuthAuthenticator } from "./better-auth/authenticator.js";
|
|
10
|
-
import {
|
|
14
|
+
import { parseRoles } from "./better-auth/parse-roles.js";
|
|
15
|
+
import { NewUser, StoredUser, createUser, deleteUser, hasUsers, listUsers, roleChoices, setUserBanned, setUserRole } from "./better-auth/users.js";
|
|
11
16
|
import { IssueTokenOptions, issueToken, maxTokenTtlSeconds } from "./better-auth/tokens.js";
|
|
12
17
|
import { ChatMessage, ChatTextPart, Completion, CompletionOptions, ModelError, ReasoningDetail, ReasoningEffort, ToolCall, ToolSpec, streamChatCompletion } from "./assistant/chat-completions.js";
|
|
13
18
|
import { ConversationRecord, ConversationStore } from "./assistant/conversation-store.js";
|
|
@@ -20,4 +25,4 @@ import { AssistantTool, ToolContext, defineTool } from "./assistant/tools.js";
|
|
|
20
25
|
import { TurnOptions, runTurn } from "./assistant/turn.js";
|
|
21
26
|
import { QueryOptions, QueryResult, runReadOnlyQuery, runReadWriteQuery } from "./assistant/run-query.js";
|
|
22
27
|
import { readOnlyQueryTool, readWriteQueryTool } from "./assistant/query-tools.js";
|
|
23
|
-
export { type Admin, type AdminAuth, type AdminOptions, type ApprovalAnswer, type ApprovalRequest, type AssistantBackend, type AssistantOptions, type AssistantSettings, type AssistantTool, type AuditEvent, type AuditQueue, type Authenticator, type BetterAuthAuthenticatorOptions, type ChatMessage, type ChatTextPart, type Completion, type CompletionOptions, type Conversation, type ConversationRecord, type ConversationStore, type ConversationsOptions, type CreateAdminInput, type CreateAuthOptions, HttpProblem, type IssueTokenOptions, type JwtOptions, ModelError, type ModelSettings, type NewUser, type PipelineHook, type QueryOptions, type QueryResult, type ReasoningDetail, type ReasoningEffort, type ResourceSource, type ScanGuardMode, type Session, type StoredUser, type TenantValue, type ToolCall, type ToolContext, type ToolSpec, type TurnOptions, type User, type UserCreatedHook, type ViewSource, type WriteEvent, type WriteOperation, assistantProtocolRoutes, assistantRoles, assistantSettings, assistantVariables, badRequest, betterAuthAuthenticator, configExports, consoleAuditQueue, conversationKey, createAdmin, createAuth, createConversations, createUser, defineTool, deleteUser, fileConversationStore, forbidden, hasUsers, issueToken, jwtAuthenticator, listUsers, maxTokenTtlSeconds, normalizeRoles, notFound, parseRoles, readOnlyQueryTool, readWriteQueryTool, requestApproval, roleChoices, runReadOnlyQuery, runReadWriteQuery, runTurn, seesAssistant, setUserBanned, setUserRole, streamChatCompletion, unauthorized, withCacheBreakpoints };
|
|
28
|
+
export { type Admin, type AdminAuth, type AdminOptions, type ApprovalAnswer, type ApprovalRequest, type AssistantBackend, type AssistantOptions, type AssistantSettings, type AssistantTool, type AuditEvent, type AuditQueue, type Authenticator, type BetterAuthAuthenticatorOptions, type ChatMessage, type ChatTextPart, type Completion, type CompletionOptions, type Conversation, type ConversationRecord, type ConversationStore, type ConversationsOptions, type CreateAdminInput, type CreateAuthOptions, HttpProblem, type IssueTokenOptions, type JwtOptions, ModelError, type ModelSettings, type NewUser, type OperatorProvider, type PipelineHook, type QueryOptions, type QueryResult, type ReasoningDetail, type ReasoningEffort, type ResourceSource, type RuntimeOptions, type ScanGuardMode, type Session, type SignInPolicy, type SignInRule, type StaffAccessRule, type StaffSignIn, type StoredUser, type TenantValue, type ToolCall, type ToolContext, type ToolSpec, type TurnOptions, type User, type UserCreatedHook, type ViewSource, type WriteEvent, type WriteOperation, assistantProtocolRoutes, assistantRoles, assistantSettings, assistantVariables, badRequest, betterAuthAuthenticator, configExports, consoleAuditQueue, conversationKey, createAdmin, createAuth, createConversations, createUser, defaultSignInPolicy, defineTool, deleteUser, fileConversationStore, forbidden, hasUsers, issueToken, jwtAuthenticator, listUsers, maxTokenTtlSeconds, normalizeRoles, notFound, parseRoles, readOnlyQueryTool, readOperatorSettings, readWriteQueryTool, requestApproval, roleChoices, runReadOnlyQuery, runReadWriteQuery, runTurn, runtimeUrl, runtimeVariable, seesAssistant, seesRuntime, setUserBanned, setUserRole, signInPolicyMethods, streamChatCompletion, unauthorized, withCacheBreakpoints };
|
package/dist/index.js
CHANGED
|
@@ -11,11 +11,15 @@ import { withCacheBreakpoints } from "./assistant/cache-breakpoints.js";
|
|
|
11
11
|
import { ModelError, streamChatCompletion } from "./assistant/chat-completions.js";
|
|
12
12
|
import { runTurn } from "./assistant/turn.js";
|
|
13
13
|
import { consoleAuditQueue } from "./audit/console-queue.js";
|
|
14
|
+
import { readOperatorSettings } from "./better-auth/operator-provider.js";
|
|
15
|
+
import { defaultSignInPolicy, signInPolicyMethods } from "./better-auth/sign-in-policy.js";
|
|
16
|
+
import { parseRoles } from "./better-auth/parse-roles.js";
|
|
14
17
|
import { createAuth, normalizeRoles } from "./better-auth/create-auth.js";
|
|
15
|
-
import { createUser, deleteUser, hasUsers, listUsers,
|
|
18
|
+
import { createUser, deleteUser, hasUsers, listUsers, roleChoices, setUserBanned, setUserRole } from "./better-auth/users.js";
|
|
19
|
+
import { runtimeUrl, runtimeVariable, seesRuntime } from "./runtime/runtime-settings.js";
|
|
16
20
|
import { createAdmin } from "./create-admin.js";
|
|
17
21
|
import { configExports } from "./resource-source.js";
|
|
18
22
|
import { jwtAuthenticator } from "./auth/jwt.js";
|
|
19
23
|
import { betterAuthAuthenticator } from "./better-auth/authenticator.js";
|
|
20
24
|
import { issueToken, maxTokenTtlSeconds } from "./better-auth/tokens.js";
|
|
21
|
-
export { HttpProblem, ModelError, assistantProtocolRoutes, assistantRoles, assistantSettings, assistantVariables, badRequest, betterAuthAuthenticator, configExports, consoleAuditQueue, conversationKey, createAdmin, createAuth, createConversations, createUser, defineTool, deleteUser, fileConversationStore, forbidden, hasUsers, issueToken, jwtAuthenticator, listUsers, maxTokenTtlSeconds, normalizeRoles, notFound, parseRoles, readOnlyQueryTool, readWriteQueryTool, requestApproval, roleChoices, runReadOnlyQuery, runReadWriteQuery, runTurn, seesAssistant, setUserBanned, setUserRole, streamChatCompletion, unauthorized, withCacheBreakpoints };
|
|
25
|
+
export { HttpProblem, ModelError, assistantProtocolRoutes, assistantRoles, assistantSettings, assistantVariables, badRequest, betterAuthAuthenticator, configExports, consoleAuditQueue, conversationKey, createAdmin, createAuth, createConversations, createUser, defaultSignInPolicy, defineTool, deleteUser, fileConversationStore, forbidden, hasUsers, issueToken, jwtAuthenticator, listUsers, maxTokenTtlSeconds, normalizeRoles, notFound, parseRoles, readOnlyQueryTool, readOperatorSettings, readWriteQueryTool, requestApproval, roleChoices, runReadOnlyQuery, runReadWriteQuery, runTurn, runtimeUrl, runtimeVariable, seesAssistant, seesRuntime, setUserBanned, setUserRole, signInPolicyMethods, streamChatCompletion, unauthorized, withCacheBreakpoints };
|
package/dist/meta.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { seesAssistant } from "./assistant/assistant-settings.js";
|
|
2
2
|
import { sha256Hex, stableJson } from "./hash.js";
|
|
3
3
|
import { requestAccess } from "./request-access.js";
|
|
4
|
+
import { seesRuntime } from "./runtime/runtime-settings.js";
|
|
4
5
|
import { pruneView } from "./view-access.js";
|
|
5
6
|
import { prunePage } from "@protobase/layout";
|
|
6
7
|
import { pickView } from "@protobase/schema";
|
|
@@ -47,7 +48,8 @@ const createMeta = (deps) => {
|
|
|
47
48
|
].filter((op) => resolved.operations[op] && (resolved.recordChecks.includes(op) || resolved.rowFilter[op] !== void 0))
|
|
48
49
|
}])),
|
|
49
50
|
...deps.userMenu && { userMenu: { items: deps.userMenu.items.filter(shown) } },
|
|
50
|
-
...deps.assistant && seesAssistant(session.user.roles) && { assistant: { url: deps.assistant } }
|
|
51
|
+
...deps.assistant && seesAssistant(session.user.roles) && { assistant: { url: deps.assistant } },
|
|
52
|
+
...deps.runtime && seesRuntime(session.user.roles) && { runtime: { url: deps.runtime } }
|
|
51
53
|
};
|
|
52
54
|
return {
|
|
53
55
|
body,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/runtime/runtime-settings.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* `url`: the endpoint that reports the app's runtime version and updates it, such as a hosting platform's. The top
|
|
4
|
+
* bar shows an update button from what it answers. Falls back to `PROTOBASE_RUNTIME_URL`.
|
|
5
|
+
*/
|
|
6
|
+
export type RuntimeOptions = {
|
|
7
|
+
url?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const runtimeVariable = "PROTOBASE_RUNTIME_URL";
|
|
10
|
+
/** Only an admin sees the runtime endpoint: `/meta` names it to nobody else. */
|
|
11
|
+
export declare const seesRuntime: (roles: readonly string[]) => boolean;
|
|
12
|
+
/** The runtime endpoint, when one is set and the option is not `false`. A value that is no http(s) URL stops the server at startup. */
|
|
13
|
+
export declare const runtimeUrl: (option: RuntimeOptions | false | undefined, env: Record<string, string | undefined>) => string | undefined;
|
|
14
|
+
//#endregion
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { checkedUrl } from "../assistant/assistant-settings.js";
|
|
2
|
+
//#region src/runtime/runtime-settings.ts
|
|
3
|
+
const runtimeVariable = "PROTOBASE_RUNTIME_URL";
|
|
4
|
+
/** Only an admin sees the runtime endpoint: `/meta` names it to nobody else. */
|
|
5
|
+
const seesRuntime = (roles) => roles.includes("admin");
|
|
6
|
+
/** The runtime endpoint, when one is set and the option is not `false`. A value that is no http(s) URL stops the server at startup. */
|
|
7
|
+
const runtimeUrl = (option, env) => {
|
|
8
|
+
if (option === false) return void 0;
|
|
9
|
+
const url = (option?.url ?? env["PROTOBASE_RUNTIME_URL"])?.trim();
|
|
10
|
+
if (!url) return void 0;
|
|
11
|
+
return checkedUrl(url, option?.url === void 0 ? runtimeVariable : "options.runtime.url");
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { runtimeUrl, runtimeVariable, seesRuntime };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AssistantOptions } from "./assistant/assistant-settings.js";
|
|
2
|
+
import { RuntimeOptions } from "./runtime/runtime-settings.js";
|
|
2
3
|
import { Hono } from "hono";
|
|
3
4
|
import { PageModel } from "@protobase/layout";
|
|
4
5
|
import { ResolveOptions, ResourceModel, ViewModel } from "@protobase/schema";
|
|
@@ -89,6 +90,8 @@ export type AdminOptions = {
|
|
|
89
90
|
onUnhandledError?: (error: unknown) => void;
|
|
90
91
|
/** The assistant in the admin app's dock: a backend elsewhere or the built-in one (see `AssistantOptions`); `false` turns it off. */
|
|
91
92
|
assistant?: AssistantOptions | false;
|
|
93
|
+
/** The runtime updates endpoint behind the top bar's update button (see `RuntimeOptions`); `false` turns it off. */
|
|
94
|
+
runtime?: RuntimeOptions | false;
|
|
92
95
|
};
|
|
93
96
|
export type ViewSource = {
|
|
94
97
|
toModel(): ViewModel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
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": {
|
|
@@ -21,22 +21,25 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsdown",
|
|
26
|
+
"prepack": "tsdown"
|
|
27
|
+
},
|
|
24
28
|
"publishConfig": {
|
|
25
29
|
"access": "public"
|
|
26
30
|
},
|
|
27
31
|
"dependencies": {
|
|
32
|
+
"@better-auth/passkey": "^1.7.7",
|
|
33
|
+
"@protobase/layout": "0.4.1",
|
|
34
|
+
"@protobase/query": "0.4.1",
|
|
35
|
+
"@protobase/schema": "0.4.1",
|
|
28
36
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
37
|
+
"@simplewebauthn/server": "^13.3.1",
|
|
29
38
|
"better-auth": "^1.7.7",
|
|
30
39
|
"hono": "^4.13.13",
|
|
31
40
|
"jose": "^6.2.12",
|
|
32
41
|
"kysely": "^0.29.6",
|
|
33
42
|
"nodemailer": "^10.0.16",
|
|
34
|
-
"zod": "^4.6.5"
|
|
35
|
-
"@protobase/layout": "0.3.4",
|
|
36
|
-
"@protobase/query": "0.3.4",
|
|
37
|
-
"@protobase/schema": "0.3.4"
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "tsdown"
|
|
43
|
+
"zod": "^4.6.5"
|
|
41
44
|
}
|
|
42
|
-
}
|
|
45
|
+
}
|