@protobase/server 0.9.0 → 0.11.0

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.
Files changed (43) hide show
  1. package/dist/active-role.js +8 -0
  2. package/dist/admin-options.d.ts +8 -0
  3. package/dist/api-cors.d.ts +5 -0
  4. package/dist/api-cors.js +53 -0
  5. package/dist/better-auth/admin-only.js +5 -3
  6. package/dist/better-auth/authenticator.d.ts +1 -1
  7. package/dist/better-auth/authenticator.js +1 -1
  8. package/dist/better-auth/create-auth.d.ts +166 -160
  9. package/dist/better-auth/create-auth.js +40 -10
  10. package/dist/better-auth/operator-provider.d.ts +2 -1
  11. package/dist/better-auth/origins.d.ts +4 -0
  12. package/dist/better-auth/origins.js +43 -0
  13. package/dist/better-auth/passkey-domain.js +41 -0
  14. package/dist/better-auth/passkey-plugin.js +151 -0
  15. package/dist/better-auth/roles/active-role.js +26 -0
  16. package/dist/better-auth/roles/roles-plugin.js +73 -0
  17. package/dist/better-auth/roles/session-role.js +28 -0
  18. package/dist/better-auth/staff-sign-in-endpoints.js +9 -2
  19. package/dist/better-auth/status-route.js +5 -1
  20. package/dist/better-auth/tokens.d.ts +2 -1
  21. package/dist/better-auth/tokens.js +5 -2
  22. package/dist/check-shell.js +11 -2
  23. package/dist/check-views.js +28 -5
  24. package/dist/create-admin.d.ts +5 -3
  25. package/dist/create-admin.js +24 -3
  26. package/dist/index.d.ts +4 -2
  27. package/dist/index.js +2 -1
  28. package/dist/jobs/failed-jobs.js +10 -10
  29. package/dist/jobs/functions-sql.js +8 -5
  30. package/dist/jobs/runtime.js +2 -0
  31. package/dist/meta.js +9 -2
  32. package/dist/openapi/components.js +1 -1
  33. package/dist/openapi/document.js +7 -5
  34. package/dist/openapi/naming.js +2 -1
  35. package/dist/resource-source.d.ts +3 -2
  36. package/dist/resource-source.js +3 -1
  37. package/dist/routes/docs.js +2 -2
  38. package/dist/view-access.js +136 -37
  39. package/dist/webhooks/table/owner-roles.js +15 -9
  40. package/dist/webhooks/table/plugin.d.ts +1 -1
  41. package/dist/webhooks/table/plugin.js +1 -1
  42. package/dist/webhooks/table/validate-hook.js +1 -1
  43. package/package.json +4 -4
@@ -4,7 +4,7 @@ import { ProjectConfig } from "../../project-config.js";
4
4
  /**
5
5
  * Webhook subscriptions made in the admin app: `extends: [webhooks()]` in `protobase.config.ts`. It adds the Webhook
6
6
  * subscriptions and Webhook deliveries pages, over a `webhooks` schema that `protobase migration` writes. Who may
7
- * create subscriptions is the resources' access (`webhookSubscriptions.create`, ...); each delivers as its owner.
7
+ * create subscriptions is the resources' access (`webhook_subscriptions.create`, ...); each delivers as its owner.
8
8
  */
9
9
  export declare const webhooks: (options?: WebhooksOptions) => ProjectConfig;
10
10
  //#endregion
@@ -4,7 +4,7 @@ import { webhookResources } from "@protobase/schema";
4
4
  /**
5
5
  * Webhook subscriptions made in the admin app: `extends: [webhooks()]` in `protobase.config.ts`. It adds the Webhook
6
6
  * subscriptions and Webhook deliveries pages, over a `webhooks` schema that `protobase migration` writes. Who may
7
- * create subscriptions is the resources' access (`webhookSubscriptions.create`, ...); each delivers as its owner.
7
+ * create subscriptions is the resources' access (`webhook_subscriptions.create`, ...); each delivers as its owner.
8
8
  */
9
9
  const webhooks = (options = {}) => {
10
10
  const schema = webhooksSchema(options);
@@ -8,7 +8,7 @@ const isHeaders = (value) => value === null || value === void 0 || typeof value
8
8
  * it covers, headers of text, and a URL at a public address. A refusal is a 400 problem, and the write rolls back.
9
9
  */
10
10
  const subscriptionWriteCheck = (models, checkUrl) => async (event) => {
11
- if (event.resource.name !== "webhookSubscriptions" || !event.after) return;
11
+ if (event.resource.name !== "webhook_subscriptions" || !event.after) return;
12
12
  const { events, url, filter, headers } = event.after;
13
13
  const candidate = {
14
14
  kind: "subscription",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/server",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
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": {
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@better-auth/passkey": "^1.7.7",
33
- "@protobase/layout": "0.9.0",
34
- "@protobase/query": "0.9.0",
35
- "@protobase/schema": "0.9.0",
33
+ "@protobase/layout": "0.11.0",
34
+ "@protobase/query": "0.11.0",
35
+ "@protobase/schema": "0.11.0",
36
36
  "@scalar/hono-api-reference": "^0.12.10",
37
37
  "@simplewebauthn/server": "^13.3.1",
38
38
  "better-auth": "^1.7.7",