@plumix/core 0.1.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.
- package/LICENSE +21 -0
- package/README.md +12 -0
- package/dist/admin/index.d.ts +2 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +2 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/runtime.d.ts +23 -0
- package/dist/admin/runtime.d.ts.map +1 -0
- package/dist/admin/runtime.js +46 -0
- package/dist/admin/runtime.js.map +1 -0
- package/dist/admin-bar/build-tree.d.ts +3 -0
- package/dist/admin-bar/build-tree.d.ts.map +1 -0
- package/dist/admin-bar/build-tree.js +35 -0
- package/dist/admin-bar/build-tree.js.map +1 -0
- package/dist/admin-bar/collect.d.ts +4 -0
- package/dist/admin-bar/collect.d.ts.map +1 -0
- package/dist/admin-bar/collect.js +29 -0
- package/dist/admin-bar/collect.js.map +1 -0
- package/dist/admin-bar/component.d.ts +15 -0
- package/dist/admin-bar/component.d.ts.map +1 -0
- package/dist/admin-bar/component.js +65 -0
- package/dist/admin-bar/component.js.map +1 -0
- package/dist/admin-bar/core-contributors.d.ts +12 -0
- package/dist/admin-bar/core-contributors.d.ts.map +1 -0
- package/dist/admin-bar/core-contributors.js +147 -0
- package/dist/admin-bar/core-contributors.js.map +1 -0
- package/dist/admin-bar/i18n.d.ts +34 -0
- package/dist/admin-bar/i18n.d.ts.map +1 -0
- package/dist/admin-bar/i18n.js +85 -0
- package/dist/admin-bar/i18n.js.map +1 -0
- package/dist/admin-bar/styles.d.ts +5 -0
- package/dist/admin-bar/styles.d.ts.map +1 -0
- package/dist/admin-bar/styles.js +252 -0
- package/dist/admin-bar/styles.js.map +1 -0
- package/dist/admin-bar/types.d.ts +64 -0
- package/dist/admin-bar/types.d.ts.map +1 -0
- package/dist/admin-bar/types.js +8 -0
- package/dist/admin-bar/types.js.map +1 -0
- package/dist/auth/api-tokens.d.ts +84 -0
- package/dist/auth/api-tokens.d.ts.map +1 -0
- package/dist/auth/api-tokens.js +121 -0
- package/dist/auth/api-tokens.js.map +1 -0
- package/dist/auth/authenticator.d.ts +109 -0
- package/dist/auth/authenticator.d.ts.map +1 -0
- package/dist/auth/authenticator.js +98 -0
- package/dist/auth/authenticator.js.map +1 -0
- package/dist/auth/bearer.d.ts +9 -0
- package/dist/auth/bearer.d.ts.map +1 -0
- package/dist/auth/bearer.js +28 -0
- package/dist/auth/bearer.js.map +1 -0
- package/dist/auth/bootstrap.d.ts +14 -0
- package/dist/auth/bootstrap.d.ts.map +1 -0
- package/dist/auth/bootstrap.js +27 -0
- package/dist/auth/bootstrap.js.map +1 -0
- package/dist/auth/config.d.ts +96 -0
- package/dist/auth/config.d.ts.map +1 -0
- package/dist/auth/config.js +98 -0
- package/dist/auth/config.js.map +1 -0
- package/dist/auth/cookies.d.ts +29 -0
- package/dist/auth/cookies.d.ts.map +1 -0
- package/dist/auth/cookies.js +70 -0
- package/dist/auth/cookies.js.map +1 -0
- package/dist/auth/csrf.d.ts +42 -0
- package/dist/auth/csrf.d.ts.map +1 -0
- package/dist/auth/csrf.js +80 -0
- package/dist/auth/csrf.js.map +1 -0
- package/dist/auth/device-flow-routes.d.ts +28 -0
- package/dist/auth/device-flow-routes.d.ts.map +1 -0
- package/dist/auth/device-flow-routes.js +90 -0
- package/dist/auth/device-flow-routes.js.map +1 -0
- package/dist/auth/device-flow.d.ts +111 -0
- package/dist/auth/device-flow.d.ts.map +1 -0
- package/dist/auth/device-flow.js +221 -0
- package/dist/auth/device-flow.js.map +1 -0
- package/dist/auth/email/messages.d.ts +21 -0
- package/dist/auth/email/messages.d.ts.map +1 -0
- package/dist/auth/email/messages.js +91 -0
- package/dist/auth/email/messages.js.map +1 -0
- package/dist/auth/email-change/cancel.d.ts +15 -0
- package/dist/auth/email-change/cancel.d.ts.map +1 -0
- package/dist/auth/email-change/cancel.js +18 -0
- package/dist/auth/email-change/cancel.js.map +1 -0
- package/dist/auth/email-change/errors.d.ts +13 -0
- package/dist/auth/email-change/errors.d.ts.map +1 -0
- package/dist/auth/email-change/errors.js +45 -0
- package/dist/auth/email-change/errors.js.map +1 -0
- package/dist/auth/email-change/index.d.ts +5 -0
- package/dist/auth/email-change/index.d.ts.map +1 -0
- package/dist/auth/email-change/index.js +5 -0
- package/dist/auth/email-change/index.js.map +1 -0
- package/dist/auth/email-change/request.d.ts +55 -0
- package/dist/auth/email-change/request.d.ts.map +1 -0
- package/dist/auth/email-change/request.js +93 -0
- package/dist/auth/email-change/request.js.map +1 -0
- package/dist/auth/email-change/routes.d.ts +17 -0
- package/dist/auth/email-change/routes.d.ts.map +1 -0
- package/dist/auth/email-change/routes.js +63 -0
- package/dist/auth/email-change/routes.js.map +1 -0
- package/dist/auth/email-change/verify.d.ts +30 -0
- package/dist/auth/email-change/verify.d.ts.map +1 -0
- package/dist/auth/email-change/verify.js +81 -0
- package/dist/auth/email-change/verify.js.map +1 -0
- package/dist/auth/flow-routes.d.ts +15 -0
- package/dist/auth/flow-routes.d.ts.map +1 -0
- package/dist/auth/flow-routes.js +15 -0
- package/dist/auth/flow-routes.js.map +1 -0
- package/dist/auth/identity.d.ts +96 -0
- package/dist/auth/identity.d.ts.map +1 -0
- package/dist/auth/identity.js +145 -0
- package/dist/auth/identity.js.map +1 -0
- package/dist/auth/index.d.ts +16 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +16 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/invite.d.ts +25 -0
- package/dist/auth/invite.d.ts.map +1 -0
- package/dist/auth/invite.js +53 -0
- package/dist/auth/invite.js.map +1 -0
- package/dist/auth/magic-link/errors.d.ts +13 -0
- package/dist/auth/magic-link/errors.d.ts.map +1 -0
- package/dist/auth/magic-link/errors.js +40 -0
- package/dist/auth/magic-link/errors.js.map +1 -0
- package/dist/auth/magic-link/index.d.ts +4 -0
- package/dist/auth/magic-link/index.d.ts.map +1 -0
- package/dist/auth/magic-link/index.js +6 -0
- package/dist/auth/magic-link/index.js.map +1 -0
- package/dist/auth/magic-link/request.d.ts +57 -0
- package/dist/auth/magic-link/request.d.ts.map +1 -0
- package/dist/auth/magic-link/request.js +119 -0
- package/dist/auth/magic-link/request.js.map +1 -0
- package/dist/auth/magic-link/routes.d.ts +20 -0
- package/dist/auth/magic-link/routes.d.ts.map +1 -0
- package/dist/auth/magic-link/routes.js +121 -0
- package/dist/auth/magic-link/routes.js.map +1 -0
- package/dist/auth/magic-link/verify.d.ts +43 -0
- package/dist/auth/magic-link/verify.d.ts.map +1 -0
- package/dist/auth/magic-link/verify.js +80 -0
- package/dist/auth/magic-link/verify.js.map +1 -0
- package/dist/auth/mailer/console.d.ts +22 -0
- package/dist/auth/mailer/console.d.ts.map +1 -0
- package/dist/auth/mailer/console.js +24 -0
- package/dist/auth/mailer/console.js.map +1 -0
- package/dist/auth/mailer/index.d.ts +4 -0
- package/dist/auth/mailer/index.d.ts.map +1 -0
- package/dist/auth/mailer/index.js +2 -0
- package/dist/auth/mailer/index.js.map +1 -0
- package/dist/auth/mailer/resolve.d.ts +12 -0
- package/dist/auth/mailer/resolve.d.ts.map +1 -0
- package/dist/auth/mailer/resolve.js +5 -0
- package/dist/auth/mailer/resolve.js.map +1 -0
- package/dist/auth/mailer/types.d.ts +25 -0
- package/dist/auth/mailer/types.d.ts.map +1 -0
- package/dist/auth/mailer/types.js +1 -0
- package/dist/auth/mailer/types.js.map +1 -0
- package/dist/auth/oauth/consumer.d.ts +37 -0
- package/dist/auth/oauth/consumer.d.ts.map +1 -0
- package/dist/auth/oauth/consumer.js +136 -0
- package/dist/auth/oauth/consumer.js.map +1 -0
- package/dist/auth/oauth/errors.d.ts +22 -0
- package/dist/auth/oauth/errors.d.ts.map +1 -0
- package/dist/auth/oauth/errors.js +57 -0
- package/dist/auth/oauth/errors.js.map +1 -0
- package/dist/auth/oauth/index.d.ts +7 -0
- package/dist/auth/oauth/index.d.ts.map +1 -0
- package/dist/auth/oauth/index.js +22 -0
- package/dist/auth/oauth/index.js.map +1 -0
- package/dist/auth/oauth/match.d.ts +19 -0
- package/dist/auth/oauth/match.d.ts.map +1 -0
- package/dist/auth/oauth/match.js +28 -0
- package/dist/auth/oauth/match.js.map +1 -0
- package/dist/auth/oauth/pkce.d.ts +3 -0
- package/dist/auth/oauth/pkce.d.ts.map +1 -0
- package/dist/auth/oauth/pkce.js +13 -0
- package/dist/auth/oauth/pkce.js.map +1 -0
- package/dist/auth/oauth/providers/github.d.ts +3 -0
- package/dist/auth/oauth/providers/github.d.ts.map +1 -0
- package/dist/auth/oauth/providers/github.js +39 -0
- package/dist/auth/oauth/providers/github.js.map +1 -0
- package/dist/auth/oauth/providers/google.d.ts +3 -0
- package/dist/auth/oauth/providers/google.d.ts.map +1 -0
- package/dist/auth/oauth/providers/google.js +26 -0
- package/dist/auth/oauth/providers/google.js.map +1 -0
- package/dist/auth/oauth/providers/index.d.ts +3 -0
- package/dist/auth/oauth/providers/index.d.ts.map +1 -0
- package/dist/auth/oauth/providers/index.js +3 -0
- package/dist/auth/oauth/providers/index.js.map +1 -0
- package/dist/auth/oauth/routes.d.ts +5 -0
- package/dist/auth/oauth/routes.d.ts.map +1 -0
- package/dist/auth/oauth/routes.js +134 -0
- package/dist/auth/oauth/routes.js.map +1 -0
- package/dist/auth/oauth/signup.d.ts +40 -0
- package/dist/auth/oauth/signup.d.ts.map +1 -0
- package/dist/auth/oauth/signup.js +92 -0
- package/dist/auth/oauth/signup.js.map +1 -0
- package/dist/auth/oauth/state.d.ts +19 -0
- package/dist/auth/oauth/state.d.ts.map +1 -0
- package/dist/auth/oauth/state.js +48 -0
- package/dist/auth/oauth/state.js.map +1 -0
- package/dist/auth/oauth/types.d.ts +81 -0
- package/dist/auth/oauth/types.d.ts.map +1 -0
- package/dist/auth/oauth/types.js +6 -0
- package/dist/auth/oauth/types.js.map +1 -0
- package/dist/auth/passkey/authenticate.d.ts +26 -0
- package/dist/auth/passkey/authenticate.d.ts.map +1 -0
- package/dist/auth/passkey/authenticate.js +124 -0
- package/dist/auth/passkey/authenticate.js.map +1 -0
- package/dist/auth/passkey/challenges.d.ts +31 -0
- package/dist/auth/passkey/challenges.d.ts.map +1 -0
- package/dist/auth/passkey/challenges.js +57 -0
- package/dist/auth/passkey/challenges.js.map +1 -0
- package/dist/auth/passkey/config.d.ts +18 -0
- package/dist/auth/passkey/config.d.ts.map +1 -0
- package/dist/auth/passkey/config.js +14 -0
- package/dist/auth/passkey/config.js.map +1 -0
- package/dist/auth/passkey/errors.d.ts +41 -0
- package/dist/auth/passkey/errors.d.ts.map +1 -0
- package/dist/auth/passkey/errors.js +85 -0
- package/dist/auth/passkey/errors.js.map +1 -0
- package/dist/auth/passkey/index.d.ts +7 -0
- package/dist/auth/passkey/index.d.ts.map +1 -0
- package/dist/auth/passkey/index.js +7 -0
- package/dist/auth/passkey/index.js.map +1 -0
- package/dist/auth/passkey/register.d.ts +39 -0
- package/dist/auth/passkey/register.d.ts.map +1 -0
- package/dist/auth/passkey/register.js +175 -0
- package/dist/auth/passkey/register.js.map +1 -0
- package/dist/auth/passkey/routes.d.ts +10 -0
- package/dist/auth/passkey/routes.d.ts.map +1 -0
- package/dist/auth/passkey/routes.js +450 -0
- package/dist/auth/passkey/routes.js.map +1 -0
- package/dist/auth/passkey/types.d.ts +59 -0
- package/dist/auth/passkey/types.d.ts.map +1 -0
- package/dist/auth/passkey/types.js +1 -0
- package/dist/auth/passkey/types.js.map +1 -0
- package/dist/auth/preview-token.d.ts +21 -0
- package/dist/auth/preview-token.d.ts.map +1 -0
- package/dist/auth/preview-token.js +43 -0
- package/dist/auth/preview-token.js.map +1 -0
- package/dist/auth/rbac.d.ts +81 -0
- package/dist/auth/rbac.d.ts.map +1 -0
- package/dist/auth/rbac.js +166 -0
- package/dist/auth/rbac.js.map +1 -0
- package/dist/auth/sessions.d.ts +69 -0
- package/dist/auth/sessions.d.ts.map +1 -0
- package/dist/auth/sessions.js +147 -0
- package/dist/auth/sessions.js.map +1 -0
- package/dist/auth/sign-in.d.ts +21 -0
- package/dist/auth/sign-in.d.ts.map +1 -0
- package/dist/auth/sign-in.js +26 -0
- package/dist/auth/sign-in.js.map +1 -0
- package/dist/auth/tokens.d.ts +9 -0
- package/dist/auth/tokens.d.ts.map +1 -0
- package/dist/auth/tokens.js +23 -0
- package/dist/auth/tokens.js.map +1 -0
- package/dist/base-path.d.ts +36 -0
- package/dist/base-path.d.ts.map +1 -0
- package/dist/base-path.js +57 -0
- package/dist/base-path.js.map +1 -0
- package/dist/cache/decision.d.ts +34 -0
- package/dist/cache/decision.d.ts.map +1 -0
- package/dist/cache/decision.js +47 -0
- package/dist/cache/decision.js.map +1 -0
- package/dist/cache/purge.d.ts +17 -0
- package/dist/cache/purge.d.ts.map +1 -0
- package/dist/cache/purge.js +82 -0
- package/dist/cache/purge.js.map +1 -0
- package/dist/cache/read-through.d.ts +30 -0
- package/dist/cache/read-through.d.ts.map +1 -0
- package/dist/cache/read-through.js +28 -0
- package/dist/cache/read-through.js.map +1 -0
- package/dist/cache/tags.d.ts +30 -0
- package/dist/cache/tags.d.ts.map +1 -0
- package/dist/cache/tags.js +46 -0
- package/dist/cache/tags.js.map +1 -0
- package/dist/cli/errors.d.ts +75 -0
- package/dist/cli/errors.d.ts.map +1 -0
- package/dist/cli/errors.js +85 -0
- package/dist/cli/errors.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +5 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/schema-codegen.d.ts +8 -0
- package/dist/cli/schema-codegen.d.ts.map +1 -0
- package/dist/cli/schema-codegen.js +21 -0
- package/dist/cli/schema-codegen.js.map +1 -0
- package/dist/cli/spawn.d.ts +7 -0
- package/dist/cli/spawn.d.ts.map +1 -0
- package/dist/cli/spawn.js +22 -0
- package/dist/cli/spawn.js.map +1 -0
- package/dist/cli/worker-codegen.d.ts +5 -0
- package/dist/cli/worker-codegen.d.ts.map +1 -0
- package/dist/cli/worker-codegen.js +41 -0
- package/dist/cli/worker-codegen.js.map +1 -0
- package/dist/config.d.ts +141 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.errors.d.ts +13 -0
- package/dist/config.errors.d.ts.map +1 -0
- package/dist/config.errors.js +20 -0
- package/dist/config.errors.js.map +1 -0
- package/dist/config.js +36 -0
- package/dist/config.js.map +1 -0
- package/dist/context/app.d.ts +260 -0
- package/dist/context/app.d.ts.map +1 -0
- package/dist/context/app.js +149 -0
- package/dist/context/app.js.map +1 -0
- package/dist/context/errors.d.ts +16 -0
- package/dist/context/errors.d.ts.map +1 -0
- package/dist/context/errors.js +27 -0
- package/dist/context/errors.js.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +3 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/stores.d.ts +19 -0
- package/dist/context/stores.d.ts.map +1 -0
- package/dist/context/stores.js +19 -0
- package/dist/context/stores.js.map +1 -0
- package/dist/db/errors.d.ts +2 -0
- package/dist/db/errors.d.ts.map +1 -0
- package/dist/db/errors.js +69 -0
- package/dist/db/errors.js.map +1 -0
- package/dist/db/index.d.ts +4 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +3 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/libsql.d.ts +30 -0
- package/dist/db/libsql.d.ts.map +1 -0
- package/dist/db/libsql.js +33 -0
- package/dist/db/libsql.js.map +1 -0
- package/dist/db/schema/allowed_domains.d.ts +230 -0
- package/dist/db/schema/allowed_domains.d.ts.map +1 -0
- package/dist/db/schema/allowed_domains.js +16 -0
- package/dist/db/schema/allowed_domains.js.map +1 -0
- package/dist/db/schema/api_tokens.d.ts +497 -0
- package/dist/db/schema/api_tokens.d.ts.map +1 -0
- package/dist/db/schema/api_tokens.js +72 -0
- package/dist/db/schema/api_tokens.js.map +1 -0
- package/dist/db/schema/auth_tokens.d.ts +505 -0
- package/dist/db/schema/auth_tokens.d.ts.map +1 -0
- package/dist/db/schema/auth_tokens.js +36 -0
- package/dist/db/schema/auth_tokens.js.map +1 -0
- package/dist/db/schema/credentials.d.ts +551 -0
- package/dist/db/schema/credentials.d.ts.map +1 -0
- package/dist/db/schema/credentials.js +32 -0
- package/dist/db/schema/credentials.js.map +1 -0
- package/dist/db/schema/device_codes.d.ts +454 -0
- package/dist/db/schema/device_codes.d.ts.map +1 -0
- package/dist/db/schema/device_codes.js +96 -0
- package/dist/db/schema/device_codes.js.map +1 -0
- package/dist/db/schema/entries.d.ts +779 -0
- package/dist/db/schema/entries.d.ts.map +1 -0
- package/dist/db/schema/entries.js +53 -0
- package/dist/db/schema/entries.js.map +1 -0
- package/dist/db/schema/entry_term.d.ts +167 -0
- package/dist/db/schema/entry_term.d.ts.map +1 -0
- package/dist/db/schema/entry_term.js +21 -0
- package/dist/db/schema/entry_term.js.map +1 -0
- package/dist/db/schema/index.d.ts +13 -0
- package/dist/db/schema/index.d.ts.map +1 -0
- package/dist/db/schema/index.js +13 -0
- package/dist/db/schema/index.js.map +1 -0
- package/dist/db/schema/oauth_accounts.d.ts +230 -0
- package/dist/db/schema/oauth_accounts.d.ts.map +1 -0
- package/dist/db/schema/oauth_accounts.js +22 -0
- package/dist/db/schema/oauth_accounts.js.map +1 -0
- package/dist/db/schema/sessions.d.ts +338 -0
- package/dist/db/schema/sessions.d.ts.map +1 -0
- package/dist/db/schema/sessions.js +24 -0
- package/dist/db/schema/sessions.js.map +1 -0
- package/dist/db/schema/settings.d.ts +185 -0
- package/dist/db/schema/settings.d.ts.map +1 -0
- package/dist/db/schema/settings.js +16 -0
- package/dist/db/schema/settings.js.map +1 -0
- package/dist/db/schema/terms.d.ts +452 -0
- package/dist/db/schema/terms.d.ts.map +1 -0
- package/dist/db/schema/terms.js +28 -0
- package/dist/db/schema/terms.js.map +1 -0
- package/dist/db/schema/users.d.ts +556 -0
- package/dist/db/schema/users.d.ts.map +1 -0
- package/dist/db/schema/users.js +36 -0
- package/dist/db/schema/users.js.map +1 -0
- package/dist/document-merge.d.ts +21 -0
- package/dist/document-merge.d.ts.map +1 -0
- package/dist/document-merge.js +51 -0
- package/dist/document-merge.js.map +1 -0
- package/dist/entries/errors.d.ts +22 -0
- package/dist/entries/errors.d.ts.map +1 -0
- package/dist/entries/errors.js +26 -0
- package/dist/entries/errors.js.map +1 -0
- package/dist/entries/read-service.d.ts +25 -0
- package/dist/entries/read-service.d.ts.map +1 -0
- package/dist/entries/read-service.js +159 -0
- package/dist/entries/read-service.js.map +1 -0
- package/dist/hooks/block-render.d.ts +30 -0
- package/dist/hooks/block-render.d.ts.map +1 -0
- package/dist/hooks/block-render.js +11 -0
- package/dist/hooks/block-render.js.map +1 -0
- package/dist/hooks/errors.d.ts +9 -0
- package/dist/hooks/errors.d.ts.map +1 -0
- package/dist/hooks/errors.js +19 -0
- package/dist/hooks/errors.js.map +1 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/registry.d.ts +51 -0
- package/dist/hooks/registry.d.ts.map +1 -0
- package/dist/hooks/registry.js +104 -0
- package/dist/hooks/registry.js.map +1 -0
- package/dist/hooks/types.d.ts +17 -0
- package/dist/hooks/types.d.ts.map +1 -0
- package/dist/hooks/types.js +8 -0
- package/dist/hooks/types.js.map +1 -0
- package/dist/i18n/accept-language.d.ts +3 -0
- package/dist/i18n/accept-language.d.ts.map +1 -0
- package/dist/i18n/accept-language.js +61 -0
- package/dist/i18n/accept-language.js.map +1 -0
- package/dist/i18n/context.d.ts +10 -0
- package/dist/i18n/context.d.ts.map +1 -0
- package/dist/i18n/context.js +9 -0
- package/dist/i18n/context.js.map +1 -0
- package/dist/i18n/cookie.d.ts +8 -0
- package/dist/i18n/cookie.d.ts.map +1 -0
- package/dist/i18n/cookie.js +27 -0
- package/dist/i18n/cookie.js.map +1 -0
- package/dist/i18n/errors.d.ts +16 -0
- package/dist/i18n/errors.d.ts.map +1 -0
- package/dist/i18n/errors.js +28 -0
- package/dist/i18n/errors.js.map +1 -0
- package/dist/i18n/format.d.ts +13 -0
- package/dist/i18n/format.d.ts.map +1 -0
- package/dist/i18n/format.js +37 -0
- package/dist/i18n/format.js.map +1 -0
- package/dist/i18n/generic-type-labels.d.ts +209 -0
- package/dist/i18n/generic-type-labels.d.ts.map +1 -0
- package/dist/i18n/generic-type-labels.js +125 -0
- package/dist/i18n/generic-type-labels.js.map +1 -0
- package/dist/i18n/index.d.ts +10 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +19 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/label.d.ts +15 -0
- package/dist/i18n/label.d.ts.map +1 -0
- package/dist/i18n/label.js +25 -0
- package/dist/i18n/label.js.map +1 -0
- package/dist/i18n/load-catalog.d.ts +26 -0
- package/dist/i18n/load-catalog.d.ts.map +1 -0
- package/dist/i18n/load-catalog.js +54 -0
- package/dist/i18n/load-catalog.js.map +1 -0
- package/dist/i18n/locale-registry.d.ts +33 -0
- package/dist/i18n/locale-registry.d.ts.map +1 -0
- package/dist/i18n/locale-registry.js +72 -0
- package/dist/i18n/locale-registry.js.map +1 -0
- package/dist/i18n/resolve-locale.d.ts +10 -0
- package/dist/i18n/resolve-locale.d.ts.map +1 -0
- package/dist/i18n/resolve-locale.js +29 -0
- package/dist/i18n/resolve-locale.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/content-tools.d.ts +182 -0
- package/dist/mcp/content-tools.d.ts.map +1 -0
- package/dist/mcp/content-tools.js +67 -0
- package/dist/mcp/content-tools.js.map +1 -0
- package/dist/mcp/dispatch.d.ts +12 -0
- package/dist/mcp/dispatch.d.ts.map +1 -0
- package/dist/mcp/dispatch.js +30 -0
- package/dist/mcp/dispatch.js.map +1 -0
- package/dist/mcp/errors.d.ts +29 -0
- package/dist/mcp/errors.d.ts.map +1 -0
- package/dist/mcp/errors.js +36 -0
- package/dist/mcp/errors.js.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +2 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/registry.d.ts +13 -0
- package/dist/mcp/registry.d.ts.map +1 -0
- package/dist/mcp/registry.js +28 -0
- package/dist/mcp/registry.js.map +1 -0
- package/dist/mcp/schema-describe.d.ts +13 -0
- package/dist/mcp/schema-describe.d.ts.map +1 -0
- package/dist/mcp/schema-describe.js +49 -0
- package/dist/mcp/schema-describe.js.map +1 -0
- package/dist/mcp/schema-projection.d.ts +5 -0
- package/dist/mcp/schema-projection.d.ts.map +1 -0
- package/dist/mcp/schema-projection.js +11 -0
- package/dist/mcp/schema-projection.js.map +1 -0
- package/dist/mcp/server.d.ts +7 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +40 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/term-tools.d.ts +59 -0
- package/dist/mcp/term-tools.d.ts.map +1 -0
- package/dist/mcp/term-tools.js +77 -0
- package/dist/mcp/term-tools.js.map +1 -0
- package/dist/mcp/tool.d.ts +20 -0
- package/dist/mcp/tool.d.ts.map +1 -0
- package/dist/mcp/tool.js +1 -0
- package/dist/mcp/tool.js.map +1 -0
- package/dist/plugin/define.d.ts +77 -0
- package/dist/plugin/define.d.ts.map +1 -0
- package/dist/plugin/define.js +74 -0
- package/dist/plugin/define.js.map +1 -0
- package/dist/plugin/errors.d.ts +265 -0
- package/dist/plugin/errors.d.ts.map +1 -0
- package/dist/plugin/errors.js +330 -0
- package/dist/plugin/errors.js.map +1 -0
- package/dist/plugin/fields/checkbox.d.ts +19 -0
- package/dist/plugin/fields/checkbox.d.ts.map +1 -0
- package/dist/plugin/fields/checkbox.js +20 -0
- package/dist/plugin/fields/checkbox.js.map +1 -0
- package/dist/plugin/fields/color.d.ts +28 -0
- package/dist/plugin/fields/color.d.ts.map +1 -0
- package/dist/plugin/fields/color.js +30 -0
- package/dist/plugin/fields/color.js.map +1 -0
- package/dist/plugin/fields/date.d.ts +24 -0
- package/dist/plugin/fields/date.d.ts.map +1 -0
- package/dist/plugin/fields/date.js +23 -0
- package/dist/plugin/fields/date.js.map +1 -0
- package/dist/plugin/fields/datetime.d.ts +26 -0
- package/dist/plugin/fields/datetime.d.ts.map +1 -0
- package/dist/plugin/fields/datetime.js +25 -0
- package/dist/plugin/fields/datetime.js.map +1 -0
- package/dist/plugin/fields/email.d.ts +17 -0
- package/dist/plugin/fields/email.d.ts.map +1 -0
- package/dist/plugin/fields/email.js +18 -0
- package/dist/plugin/fields/email.js.map +1 -0
- package/dist/plugin/fields/entry-list.d.ts +28 -0
- package/dist/plugin/fields/entry-list.d.ts.map +1 -0
- package/dist/plugin/fields/entry-list.js +31 -0
- package/dist/plugin/fields/entry-list.js.map +1 -0
- package/dist/plugin/fields/entry.d.ts +40 -0
- package/dist/plugin/fields/entry.d.ts.map +1 -0
- package/dist/plugin/fields/entry.js +25 -0
- package/dist/plugin/fields/entry.js.map +1 -0
- package/dist/plugin/fields/errors.d.ts +35 -0
- package/dist/plugin/fields/errors.d.ts.map +1 -0
- package/dist/plugin/fields/errors.js +41 -0
- package/dist/plugin/fields/errors.js.map +1 -0
- package/dist/plugin/fields/index.d.ts +50 -0
- package/dist/plugin/fields/index.d.ts.map +1 -0
- package/dist/plugin/fields/index.js +37 -0
- package/dist/plugin/fields/index.js.map +1 -0
- package/dist/plugin/fields/json.d.ts +19 -0
- package/dist/plugin/fields/json.d.ts.map +1 -0
- package/dist/plugin/fields/json.js +20 -0
- package/dist/plugin/fields/json.js.map +1 -0
- package/dist/plugin/fields/multiselect.d.ts +21 -0
- package/dist/plugin/fields/multiselect.d.ts.map +1 -0
- package/dist/plugin/fields/multiselect.js +43 -0
- package/dist/plugin/fields/multiselect.js.map +1 -0
- package/dist/plugin/fields/number.d.ts +23 -0
- package/dist/plugin/fields/number.d.ts.map +1 -0
- package/dist/plugin/fields/number.js +24 -0
- package/dist/plugin/fields/number.js.map +1 -0
- package/dist/plugin/fields/parse-date.d.ts +7 -0
- package/dist/plugin/fields/parse-date.d.ts.map +1 -0
- package/dist/plugin/fields/parse-date.js +42 -0
- package/dist/plugin/fields/parse-date.js.map +1 -0
- package/dist/plugin/fields/password.d.ts +24 -0
- package/dist/plugin/fields/password.d.ts.map +1 -0
- package/dist/plugin/fields/password.js +25 -0
- package/dist/plugin/fields/password.js.map +1 -0
- package/dist/plugin/fields/radio.d.ts +16 -0
- package/dist/plugin/fields/radio.d.ts.map +1 -0
- package/dist/plugin/fields/radio.js +17 -0
- package/dist/plugin/fields/radio.js.map +1 -0
- package/dist/plugin/fields/range.d.ts +28 -0
- package/dist/plugin/fields/range.d.ts.map +1 -0
- package/dist/plugin/fields/range.js +46 -0
- package/dist/plugin/fields/range.js.map +1 -0
- package/dist/plugin/fields/repeater-validate.d.ts +34 -0
- package/dist/plugin/fields/repeater-validate.d.ts.map +1 -0
- package/dist/plugin/fields/repeater-validate.js +104 -0
- package/dist/plugin/fields/repeater-validate.js.map +1 -0
- package/dist/plugin/fields/repeater.d.ts +16 -0
- package/dist/plugin/fields/repeater.d.ts.map +1 -0
- package/dist/plugin/fields/repeater.js +68 -0
- package/dist/plugin/fields/repeater.js.map +1 -0
- package/dist/plugin/fields/richtext-validate.d.ts +61 -0
- package/dist/plugin/fields/richtext-validate.d.ts.map +1 -0
- package/dist/plugin/fields/richtext-validate.js +190 -0
- package/dist/plugin/fields/richtext-validate.js.map +1 -0
- package/dist/plugin/fields/richtext.d.ts +25 -0
- package/dist/plugin/fields/richtext.d.ts.map +1 -0
- package/dist/plugin/fields/richtext.js +31 -0
- package/dist/plugin/fields/richtext.js.map +1 -0
- package/dist/plugin/fields/select.d.ts +20 -0
- package/dist/plugin/fields/select.d.ts.map +1 -0
- package/dist/plugin/fields/select.js +21 -0
- package/dist/plugin/fields/select.js.map +1 -0
- package/dist/plugin/fields/term-list.d.ts +27 -0
- package/dist/plugin/fields/term-list.d.ts.map +1 -0
- package/dist/plugin/fields/term-list.js +30 -0
- package/dist/plugin/fields/term-list.js.map +1 -0
- package/dist/plugin/fields/term.d.ts +34 -0
- package/dist/plugin/fields/term.d.ts.map +1 -0
- package/dist/plugin/fields/term.js +24 -0
- package/dist/plugin/fields/term.js.map +1 -0
- package/dist/plugin/fields/text.d.ts +37 -0
- package/dist/plugin/fields/text.d.ts.map +1 -0
- package/dist/plugin/fields/text.js +31 -0
- package/dist/plugin/fields/text.js.map +1 -0
- package/dist/plugin/fields/textarea.d.ts +20 -0
- package/dist/plugin/fields/textarea.d.ts.map +1 -0
- package/dist/plugin/fields/textarea.js +21 -0
- package/dist/plugin/fields/textarea.js.map +1 -0
- package/dist/plugin/fields/time.d.ts +24 -0
- package/dist/plugin/fields/time.d.ts.map +1 -0
- package/dist/plugin/fields/time.js +23 -0
- package/dist/plugin/fields/time.js.map +1 -0
- package/dist/plugin/fields/url.d.ts +17 -0
- package/dist/plugin/fields/url.d.ts.map +1 -0
- package/dist/plugin/fields/url.js +18 -0
- package/dist/plugin/fields/url.js.map +1 -0
- package/dist/plugin/fields/user-list.d.ts +29 -0
- package/dist/plugin/fields/user-list.d.ts.map +1 -0
- package/dist/plugin/fields/user-list.js +31 -0
- package/dist/plugin/fields/user-list.js.map +1 -0
- package/dist/plugin/fields/user.d.ts +43 -0
- package/dist/plugin/fields/user.d.ts.map +1 -0
- package/dist/plugin/fields/user.js +30 -0
- package/dist/plugin/fields/user.js.map +1 -0
- package/dist/plugin/index.d.ts +7 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +7 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/lookup.d.ts +92 -0
- package/dist/plugin/lookup.d.ts.map +1 -0
- package/dist/plugin/lookup.js +1 -0
- package/dist/plugin/lookup.js.map +1 -0
- package/dist/plugin/manifest.d.ts +1539 -0
- package/dist/plugin/manifest.d.ts.map +1 -0
- package/dist/plugin/manifest.js +913 -0
- package/dist/plugin/manifest.js.map +1 -0
- package/dist/plugin/provides-context.d.ts +26 -0
- package/dist/plugin/provides-context.d.ts.map +1 -0
- package/dist/plugin/provides-context.js +77 -0
- package/dist/plugin/provides-context.js.map +1 -0
- package/dist/plugin/register.d.ts +24 -0
- package/dist/plugin/register.d.ts.map +1 -0
- package/dist/plugin/register.js +45 -0
- package/dist/plugin/register.js.map +1 -0
- package/dist/plugin/setup-context.d.ts +224 -0
- package/dist/plugin/setup-context.d.ts.map +1 -0
- package/dist/plugin/setup-context.js +386 -0
- package/dist/plugin/setup-context.js.map +1 -0
- package/dist/plugin/validation/component-ref.d.ts +2 -0
- package/dist/plugin/validation/component-ref.d.ts.map +1 -0
- package/dist/plugin/validation/component-ref.js +7 -0
- package/dist/plugin/validation/component-ref.js.map +1 -0
- package/dist/plugin/validation/identifiers.d.ts +7 -0
- package/dist/plugin/validation/identifiers.d.ts.map +1 -0
- package/dist/plugin/validation/identifiers.js +92 -0
- package/dist/plugin/validation/identifiers.js.map +1 -0
- package/dist/plugin/validation/index.d.ts +7 -0
- package/dist/plugin/validation/index.d.ts.map +1 -0
- package/dist/plugin/validation/index.js +7 -0
- package/dist/plugin/validation/index.js.map +1 -0
- package/dist/plugin/validation/login-link.d.ts +3 -0
- package/dist/plugin/validation/login-link.d.ts.map +1 -0
- package/dist/plugin/validation/login-link.js +43 -0
- package/dist/plugin/validation/login-link.js.map +1 -0
- package/dist/plugin/validation/meta-box-fields.d.ts +6 -0
- package/dist/plugin/validation/meta-box-fields.d.ts.map +1 -0
- package/dist/plugin/validation/meta-box-fields.js +52 -0
- package/dist/plugin/validation/meta-box-fields.js.map +1 -0
- package/dist/plugin/validation/paths.d.ts +4 -0
- package/dist/plugin/validation/paths.d.ts.map +1 -0
- package/dist/plugin/validation/paths.js +44 -0
- package/dist/plugin/validation/paths.js.map +1 -0
- package/dist/plugin/validation/scheduled-task.d.ts +3 -0
- package/dist/plugin/validation/scheduled-task.d.ts.map +1 -0
- package/dist/plugin/validation/scheduled-task.js +14 -0
- package/dist/plugin/validation/scheduled-task.js.map +1 -0
- package/dist/rest/base.d.ts +27 -0
- package/dist/rest/base.d.ts.map +1 -0
- package/dist/rest/base.js +4 -0
- package/dist/rest/base.js.map +1 -0
- package/dist/rest/build-handler.d.ts +11 -0
- package/dist/rest/build-handler.d.ts.map +1 -0
- package/dist/rest/build-handler.js +53 -0
- package/dist/rest/build-handler.js.map +1 -0
- package/dist/rest/cors.d.ts +11 -0
- package/dist/rest/cors.d.ts.map +1 -0
- package/dist/rest/cors.js +58 -0
- package/dist/rest/cors.js.map +1 -0
- package/dist/rest/entries-resource.d.ts +44 -0
- package/dist/rest/entries-resource.d.ts.map +1 -0
- package/dist/rest/entries-resource.js +79 -0
- package/dist/rest/entries-resource.js.map +1 -0
- package/dist/rest/envelope.d.ts +18 -0
- package/dist/rest/envelope.d.ts.map +1 -0
- package/dist/rest/envelope.js +20 -0
- package/dist/rest/envelope.js.map +1 -0
- package/dist/rest/errors.d.ts +21 -0
- package/dist/rest/errors.d.ts.map +1 -0
- package/dist/rest/errors.js +16 -0
- package/dist/rest/errors.js.map +1 -0
- package/dist/rest/openapi.d.ts +4 -0
- package/dist/rest/openapi.d.ts.map +1 -0
- package/dist/rest/openapi.js +13 -0
- package/dist/rest/openapi.js.map +1 -0
- package/dist/rest/plugin-resources.d.ts +3 -0
- package/dist/rest/plugin-resources.d.ts.map +1 -0
- package/dist/rest/plugin-resources.js +37 -0
- package/dist/rest/plugin-resources.js.map +1 -0
- package/dist/rest/principal.d.ts +19 -0
- package/dist/rest/principal.d.ts.map +1 -0
- package/dist/rest/principal.js +27 -0
- package/dist/rest/principal.js.map +1 -0
- package/dist/rest/projection.d.ts +22 -0
- package/dist/rest/projection.d.ts.map +1 -0
- package/dist/rest/projection.js +99 -0
- package/dist/rest/projection.js.map +1 -0
- package/dist/rest/rest-base.d.ts +14 -0
- package/dist/rest/rest-base.d.ts.map +1 -0
- package/dist/rest/rest-base.js +36 -0
- package/dist/rest/rest-base.js.map +1 -0
- package/dist/rest/rest-routes.d.ts +14 -0
- package/dist/rest/rest-routes.d.ts.map +1 -0
- package/dist/rest/rest-routes.js +32 -0
- package/dist/rest/rest-routes.js.map +1 -0
- package/dist/rest/router.d.ts +117 -0
- package/dist/rest/router.d.ts.map +1 -0
- package/dist/rest/router.js +47 -0
- package/dist/rest/router.js.map +1 -0
- package/dist/rest/schemas.d.ts +102 -0
- package/dist/rest/schemas.d.ts.map +1 -0
- package/dist/rest/schemas.js +72 -0
- package/dist/rest/schemas.js.map +1 -0
- package/dist/rest/terms-resource.d.ts +22 -0
- package/dist/rest/terms-resource.d.ts.map +1 -0
- package/dist/rest/terms-resource.js +44 -0
- package/dist/rest/terms-resource.js.map +1 -0
- package/dist/revisions/errors.d.ts +6 -0
- package/dist/revisions/errors.d.ts.map +1 -0
- package/dist/revisions/errors.js +14 -0
- package/dist/revisions/errors.js.map +1 -0
- package/dist/revisions/repository.d.ts +55 -0
- package/dist/revisions/repository.d.ts.map +1 -0
- package/dist/revisions/repository.js +212 -0
- package/dist/revisions/repository.js.map +1 -0
- package/dist/revisions/slug-codec.d.ts +19 -0
- package/dist/revisions/slug-codec.d.ts.map +1 -0
- package/dist/revisions/slug-codec.js +61 -0
- package/dist/revisions/slug-codec.js.map +1 -0
- package/dist/revisions/snapshot-envelope.d.ts +20 -0
- package/dist/revisions/snapshot-envelope.d.ts.map +1 -0
- package/dist/revisions/snapshot-envelope.js +44 -0
- package/dist/revisions/snapshot-envelope.js.map +1 -0
- package/dist/route/compile.d.ts +15 -0
- package/dist/route/compile.d.ts.map +1 -0
- package/dist/route/compile.js +205 -0
- package/dist/route/compile.js.map +1 -0
- package/dist/route/current.d.ts +56 -0
- package/dist/route/current.d.ts.map +1 -0
- package/dist/route/current.js +50 -0
- package/dist/route/current.js.map +1 -0
- package/dist/route/edit-mode.d.ts +20 -0
- package/dist/route/edit-mode.d.ts.map +1 -0
- package/dist/route/edit-mode.js +22 -0
- package/dist/route/edit-mode.js.map +1 -0
- package/dist/route/errors.d.ts +19 -0
- package/dist/route/errors.d.ts.map +1 -0
- package/dist/route/errors.js +32 -0
- package/dist/route/errors.js.map +1 -0
- package/dist/route/intent.d.ts +35 -0
- package/dist/route/intent.d.ts.map +1 -0
- package/dist/route/intent.js +1 -0
- package/dist/route/intent.js.map +1 -0
- package/dist/route/match.d.ts +7 -0
- package/dist/route/match.d.ts.map +1 -0
- package/dist/route/match.js +18 -0
- package/dist/route/match.js.map +1 -0
- package/dist/route/paginate.d.ts +25 -0
- package/dist/route/paginate.d.ts.map +1 -0
- package/dist/route/paginate.js +24 -0
- package/dist/route/paginate.js.map +1 -0
- package/dist/route/path-chain.d.ts +22 -0
- package/dist/route/path-chain.d.ts.map +1 -0
- package/dist/route/path-chain.js +77 -0
- package/dist/route/path-chain.js.map +1 -0
- package/dist/route/permalink.d.ts +70 -0
- package/dist/route/permalink.d.ts.map +1 -0
- package/dist/route/permalink.js +163 -0
- package/dist/route/permalink.js.map +1 -0
- package/dist/route/preview.d.ts +12 -0
- package/dist/route/preview.d.ts.map +1 -0
- package/dist/route/preview.js +20 -0
- package/dist/route/preview.js.map +1 -0
- package/dist/route/render/archive-props.d.ts +39 -0
- package/dist/route/render/archive-props.d.ts.map +1 -0
- package/dist/route/render/archive-props.js +32 -0
- package/dist/route/render/archive-props.js.map +1 -0
- package/dist/route/render/asset-manifest.d.ts +23 -0
- package/dist/route/render/asset-manifest.d.ts.map +1 -0
- package/dist/route/render/asset-manifest.js +62 -0
- package/dist/route/render/asset-manifest.js.map +1 -0
- package/dist/route/render/build-resolved-entries.d.ts +11 -0
- package/dist/route/render/build-resolved-entries.d.ts.map +1 -0
- package/dist/route/render/build-resolved-entries.js +66 -0
- package/dist/route/render/build-resolved-entries.js.map +1 -0
- package/dist/route/render/inject-editor-bootstrap.d.ts +3 -0
- package/dist/route/render/inject-editor-bootstrap.d.ts.map +1 -0
- package/dist/route/render/inject-editor-bootstrap.js +13 -0
- package/dist/route/render/inject-editor-bootstrap.js.map +1 -0
- package/dist/route/render/inject-islands-bootstrap.d.ts +3 -0
- package/dist/route/render/inject-islands-bootstrap.d.ts.map +1 -0
- package/dist/route/render/inject-islands-bootstrap.js +34 -0
- package/dist/route/render/inject-islands-bootstrap.js.map +1 -0
- package/dist/route/render/render-template.d.ts +47 -0
- package/dist/route/render/render-template.d.ts.map +1 -0
- package/dist/route/render/render-template.js +370 -0
- package/dist/route/render/render-template.js.map +1 -0
- package/dist/route/render/resolved-entry.d.ts +58 -0
- package/dist/route/render/resolved-entry.d.ts.map +1 -0
- package/dist/route/render/resolved-entry.js +1 -0
- package/dist/route/render/resolved-entry.js.map +1 -0
- package/dist/route/render/template-hierarchy.d.ts +68 -0
- package/dist/route/render/template-hierarchy.d.ts.map +1 -0
- package/dist/route/render/template-hierarchy.js +88 -0
- package/dist/route/render/template-hierarchy.js.map +1 -0
- package/dist/route/render/tiptap.d.ts +8 -0
- package/dist/route/render/tiptap.d.ts.map +1 -0
- package/dist/route/render/tiptap.js +134 -0
- package/dist/route/render/tiptap.js.map +1 -0
- package/dist/route/resolve.d.ts +17 -0
- package/dist/route/resolve.d.ts.map +1 -0
- package/dist/route/resolve.js +408 -0
- package/dist/route/resolve.js.map +1 -0
- package/dist/rpc/authenticated.d.ts +2 -0
- package/dist/rpc/authenticated.d.ts.map +1 -0
- package/dist/rpc/authenticated.js +18 -0
- package/dist/rpc/authenticated.js.map +1 -0
- package/dist/rpc/base.d.ts +60 -0
- package/dist/rpc/base.d.ts.map +1 -0
- package/dist/rpc/base.js +4 -0
- package/dist/rpc/base.js.map +1 -0
- package/dist/rpc/build-handler.d.ts +12 -0
- package/dist/rpc/build-handler.d.ts.map +1 -0
- package/dist/rpc/build-handler.js +20 -0
- package/dist/rpc/build-handler.js.map +1 -0
- package/dist/rpc/errors.d.ts +59 -0
- package/dist/rpc/errors.d.ts.map +1 -0
- package/dist/rpc/errors.js +62 -0
- package/dist/rpc/errors.js.map +1 -0
- package/dist/rpc/hooks.d.ts +422 -0
- package/dist/rpc/hooks.d.ts.map +1 -0
- package/dist/rpc/hooks.js +2 -0
- package/dist/rpc/hooks.js.map +1 -0
- package/dist/rpc/index.d.ts +32 -0
- package/dist/rpc/index.d.ts.map +1 -0
- package/dist/rpc/index.js +20 -0
- package/dist/rpc/index.js.map +1 -0
- package/dist/rpc/meta/core.d.ts +132 -0
- package/dist/rpc/meta/core.d.ts.map +1 -0
- package/dist/rpc/meta/core.js +795 -0
- package/dist/rpc/meta/core.js.map +1 -0
- package/dist/rpc/meta/errors.d.ts +16 -0
- package/dist/rpc/meta/errors.d.ts.map +1 -0
- package/dist/rpc/meta/errors.js +26 -0
- package/dist/rpc/meta/errors.js.map +1 -0
- package/dist/rpc/namespaces.d.ts +2 -0
- package/dist/rpc/namespaces.d.ts.map +1 -0
- package/dist/rpc/namespaces.js +16 -0
- package/dist/rpc/namespaces.js.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/create.d.ts +72 -0
- package/dist/rpc/procedures/auth/allowed-domains/create.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/create.js +35 -0
- package/dist/rpc/procedures/auth/allowed-domains/create.js.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/delete.d.ts +70 -0
- package/dist/rpc/procedures/auth/allowed-domains/delete.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/delete.js +25 -0
- package/dist/rpc/procedures/auth/allowed-domains/delete.js.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/index.d.ts +281 -0
- package/dist/rpc/procedures/auth/allowed-domains/index.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/index.js +11 -0
- package/dist/rpc/procedures/auth/allowed-domains/index.js.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/list.d.ts +68 -0
- package/dist/rpc/procedures/auth/allowed-domains/list.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/list.js +19 -0
- package/dist/rpc/procedures/auth/allowed-domains/list.js.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/schemas.d.ts +16 -0
- package/dist/rpc/procedures/auth/allowed-domains/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/schemas.js +23 -0
- package/dist/rpc/procedures/auth/allowed-domains/schemas.js.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/update.d.ts +72 -0
- package/dist/rpc/procedures/auth/allowed-domains/update.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/allowed-domains/update.js +34 -0
- package/dist/rpc/procedures/auth/allowed-domains/update.js.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/admin-list.d.ts +101 -0
- package/dist/rpc/procedures/auth/api-tokens/admin-list.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/admin-list.js +69 -0
- package/dist/rpc/procedures/auth/api-tokens/admin-list.js.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/admin-revoke.d.ts +64 -0
- package/dist/rpc/procedures/auth/api-tokens/admin-revoke.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/admin-revoke.js +35 -0
- package/dist/rpc/procedures/auth/api-tokens/admin-revoke.js.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/create.d.ts +84 -0
- package/dist/rpc/procedures/auth/api-tokens/create.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/create.js +50 -0
- package/dist/rpc/procedures/auth/api-tokens/create.js.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/index.d.ts +385 -0
- package/dist/rpc/procedures/auth/api-tokens/index.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/index.js +13 -0
- package/dist/rpc/procedures/auth/api-tokens/index.js.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/list.d.ts +74 -0
- package/dist/rpc/procedures/auth/api-tokens/list.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/list.js +32 -0
- package/dist/rpc/procedures/auth/api-tokens/list.js.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/revoke.d.ts +64 -0
- package/dist/rpc/procedures/auth/api-tokens/revoke.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/revoke.js +27 -0
- package/dist/rpc/procedures/auth/api-tokens/revoke.js.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/schemas.d.ts +27 -0
- package/dist/rpc/procedures/auth/api-tokens/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/api-tokens/schemas.js +68 -0
- package/dist/rpc/procedures/auth/api-tokens/schemas.js.map +1 -0
- package/dist/rpc/procedures/auth/credentials/delete.d.ts +64 -0
- package/dist/rpc/procedures/auth/credentials/delete.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/credentials/delete.js +44 -0
- package/dist/rpc/procedures/auth/credentials/delete.js.map +1 -0
- package/dist/rpc/procedures/auth/credentials/index.d.ts +203 -0
- package/dist/rpc/procedures/auth/credentials/index.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/credentials/index.js +9 -0
- package/dist/rpc/procedures/auth/credentials/index.js.map +1 -0
- package/dist/rpc/procedures/auth/credentials/list.d.ts +72 -0
- package/dist/rpc/procedures/auth/credentials/list.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/credentials/list.js +27 -0
- package/dist/rpc/procedures/auth/credentials/list.js.map +1 -0
- package/dist/rpc/procedures/auth/credentials/rename.d.ts +67 -0
- package/dist/rpc/procedures/auth/credentials/rename.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/credentials/rename.js +27 -0
- package/dist/rpc/procedures/auth/credentials/rename.js.map +1 -0
- package/dist/rpc/procedures/auth/credentials/schemas.d.ts +10 -0
- package/dist/rpc/procedures/auth/credentials/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/credentials/schemas.js +20 -0
- package/dist/rpc/procedures/auth/credentials/schemas.js.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/approve.d.ts +66 -0
- package/dist/rpc/procedures/auth/device-flow/approve.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/approve.js +42 -0
- package/dist/rpc/procedures/auth/device-flow/approve.js.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/deny.d.ts +64 -0
- package/dist/rpc/procedures/auth/device-flow/deny.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/deny.js +27 -0
- package/dist/rpc/procedures/auth/device-flow/deny.js.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/index.d.ts +194 -0
- package/dist/rpc/procedures/auth/device-flow/index.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/index.js +9 -0
- package/dist/rpc/procedures/auth/device-flow/index.js.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/lookup-helpers.d.ts +19 -0
- package/dist/rpc/procedures/auth/device-flow/lookup-helpers.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/lookup-helpers.js +17 -0
- package/dist/rpc/procedures/auth/device-flow/lookup-helpers.js.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/lookup.d.ts +64 -0
- package/dist/rpc/procedures/auth/device-flow/lookup.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/lookup.js +23 -0
- package/dist/rpc/procedures/auth/device-flow/lookup.js.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/schemas.d.ts +13 -0
- package/dist/rpc/procedures/auth/device-flow/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/device-flow/schemas.js +45 -0
- package/dist/rpc/procedures/auth/device-flow/schemas.js.map +1 -0
- package/dist/rpc/procedures/auth/index.d.ts +1524 -0
- package/dist/rpc/procedures/auth/index.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/index.js +21 -0
- package/dist/rpc/procedures/auth/index.js.map +1 -0
- package/dist/rpc/procedures/auth/login-links.d.ts +66 -0
- package/dist/rpc/procedures/auth/login-links.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/login-links.js +14 -0
- package/dist/rpc/procedures/auth/login-links.js.map +1 -0
- package/dist/rpc/procedures/auth/mailer/index.d.ts +66 -0
- package/dist/rpc/procedures/auth/mailer/index.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/mailer/index.js +5 -0
- package/dist/rpc/procedures/auth/mailer/index.js.map +1 -0
- package/dist/rpc/procedures/auth/mailer/schemas.d.ts +5 -0
- package/dist/rpc/procedures/auth/mailer/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/mailer/schemas.js +5 -0
- package/dist/rpc/procedures/auth/mailer/schemas.js.map +1 -0
- package/dist/rpc/procedures/auth/mailer/test-send.d.ts +64 -0
- package/dist/rpc/procedures/auth/mailer/test-send.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/mailer/test-send.js +44 -0
- package/dist/rpc/procedures/auth/mailer/test-send.js.map +1 -0
- package/dist/rpc/procedures/auth/oauth-providers.d.ts +59 -0
- package/dist/rpc/procedures/auth/oauth-providers.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/oauth-providers.js +8 -0
- package/dist/rpc/procedures/auth/oauth-providers.js.map +1 -0
- package/dist/rpc/procedures/auth/schemas.d.ts +27 -0
- package/dist/rpc/procedures/auth/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/schemas.js +28 -0
- package/dist/rpc/procedures/auth/schemas.js.map +1 -0
- package/dist/rpc/procedures/auth/session.d.ts +78 -0
- package/dist/rpc/procedures/auth/session.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/session.js +32 -0
- package/dist/rpc/procedures/auth/session.js.map +1 -0
- package/dist/rpc/procedures/auth/sessions/index.d.ts +198 -0
- package/dist/rpc/procedures/auth/sessions/index.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/sessions/index.js +9 -0
- package/dist/rpc/procedures/auth/sessions/index.js.map +1 -0
- package/dist/rpc/procedures/auth/sessions/list.d.ts +72 -0
- package/dist/rpc/procedures/auth/sessions/list.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/sessions/list.js +47 -0
- package/dist/rpc/procedures/auth/sessions/list.js.map +1 -0
- package/dist/rpc/procedures/auth/sessions/revoke-others.d.ts +62 -0
- package/dist/rpc/procedures/auth/sessions/revoke-others.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/sessions/revoke-others.js +47 -0
- package/dist/rpc/procedures/auth/sessions/revoke-others.js.map +1 -0
- package/dist/rpc/procedures/auth/sessions/revoke.d.ts +64 -0
- package/dist/rpc/procedures/auth/sessions/revoke.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/sessions/revoke.js +39 -0
- package/dist/rpc/procedures/auth/sessions/revoke.js.map +1 -0
- package/dist/rpc/procedures/auth/sessions/schemas.d.ts +7 -0
- package/dist/rpc/procedures/auth/sessions/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/auth/sessions/schemas.js +11 -0
- package/dist/rpc/procedures/auth/sessions/schemas.js.map +1 -0
- package/dist/rpc/procedures/entry/activity.d.ts +75 -0
- package/dist/rpc/procedures/entry/activity.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/activity.js +76 -0
- package/dist/rpc/procedures/entry/activity.js.map +1 -0
- package/dist/rpc/procedures/entry/bulk.d.ts +190 -0
- package/dist/rpc/procedures/entry/bulk.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/bulk.js +72 -0
- package/dist/rpc/procedures/entry/bulk.js.map +1 -0
- package/dist/rpc/procedures/entry/concurrency.d.ts +4 -0
- package/dist/rpc/procedures/entry/concurrency.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/concurrency.js +13 -0
- package/dist/rpc/procedures/entry/concurrency.js.map +1 -0
- package/dist/rpc/procedures/entry/content.d.ts +20 -0
- package/dist/rpc/procedures/entry/content.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/content.js +27 -0
- package/dist/rpc/procedures/entry/content.js.map +1 -0
- package/dist/rpc/procedures/entry/create-preview-link.d.ts +66 -0
- package/dist/rpc/procedures/entry/create-preview-link.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/create-preview-link.js +38 -0
- package/dist/rpc/procedures/entry/create-preview-link.js.map +1 -0
- package/dist/rpc/procedures/entry/create.d.ts +107 -0
- package/dist/rpc/procedures/entry/create.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/create.js +115 -0
- package/dist/rpc/procedures/entry/create.js.map +1 -0
- package/dist/rpc/procedures/entry/dashboard.d.ts +140 -0
- package/dist/rpc/procedures/entry/dashboard.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/dashboard.js +82 -0
- package/dist/rpc/procedures/entry/dashboard.js.map +1 -0
- package/dist/rpc/procedures/entry/delete-permanent.d.ts +90 -0
- package/dist/rpc/procedures/entry/delete-permanent.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/delete-permanent.js +28 -0
- package/dist/rpc/procedures/entry/delete-permanent.js.map +1 -0
- package/dist/rpc/procedures/entry/discard-draft.d.ts +65 -0
- package/dist/rpc/procedures/entry/discard-draft.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/discard-draft.js +43 -0
- package/dist/rpc/procedures/entry/discard-draft.js.map +1 -0
- package/dist/rpc/procedures/entry/duplicate.d.ts +90 -0
- package/dist/rpc/procedures/entry/duplicate.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/duplicate.js +86 -0
- package/dist/rpc/procedures/entry/duplicate.js.map +1 -0
- package/dist/rpc/procedures/entry/get.d.ts +105 -0
- package/dist/rpc/procedures/entry/get.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/get.js +56 -0
- package/dist/rpc/procedures/entry/get.js.map +1 -0
- package/dist/rpc/procedures/entry/helpers.d.ts +2 -0
- package/dist/rpc/procedures/entry/helpers.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/helpers.js +10 -0
- package/dist/rpc/procedures/entry/helpers.js.map +1 -0
- package/dist/rpc/procedures/entry/index.d.ts +1811 -0
- package/dist/rpc/procedures/entry/index.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/index.js +38 -0
- package/dist/rpc/procedures/entry/index.js.map +1 -0
- package/dist/rpc/procedures/entry/lifecycle.d.ts +77 -0
- package/dist/rpc/procedures/entry/lifecycle.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/lifecycle.js +223 -0
- package/dist/rpc/procedures/entry/lifecycle.js.map +1 -0
- package/dist/rpc/procedures/entry/list.d.ts +114 -0
- package/dist/rpc/procedures/entry/list.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/list.js +19 -0
- package/dist/rpc/procedures/entry/list.js.map +1 -0
- package/dist/rpc/procedures/entry/lookup.d.ts +4 -0
- package/dist/rpc/procedures/entry/lookup.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/lookup.js +120 -0
- package/dist/rpc/procedures/entry/lookup.js.map +1 -0
- package/dist/rpc/procedures/entry/meta.d.ts +64 -0
- package/dist/rpc/procedures/entry/meta.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/meta.js +65 -0
- package/dist/rpc/procedures/entry/meta.js.map +1 -0
- package/dist/rpc/procedures/entry/publish-scheduled.d.ts +21 -0
- package/dist/rpc/procedures/entry/publish-scheduled.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/publish-scheduled.js +50 -0
- package/dist/rpc/procedures/entry/publish-scheduled.js.map +1 -0
- package/dist/rpc/procedures/entry/publish.d.ts +92 -0
- package/dist/rpc/procedures/entry/publish.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/publish.js +111 -0
- package/dist/rpc/procedures/entry/publish.js.map +1 -0
- package/dist/rpc/procedures/entry/read-errors.d.ts +29 -0
- package/dist/rpc/procedures/entry/read-errors.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/read-errors.js +23 -0
- package/dist/rpc/procedures/entry/read-errors.js.map +1 -0
- package/dist/rpc/procedures/entry/refresh-block-loader.d.ts +65 -0
- package/dist/rpc/procedures/entry/refresh-block-loader.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/refresh-block-loader.js +42 -0
- package/dist/rpc/procedures/entry/refresh-block-loader.js.map +1 -0
- package/dist/rpc/procedures/entry/restore.d.ts +90 -0
- package/dist/rpc/procedures/entry/restore.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/restore.js +27 -0
- package/dist/rpc/procedures/entry/restore.js.map +1 -0
- package/dist/rpc/procedures/entry/revisions.d.ts +672 -0
- package/dist/rpc/procedures/entry/revisions.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/revisions.js +305 -0
- package/dist/rpc/procedures/entry/revisions.js.map +1 -0
- package/dist/rpc/procedures/entry/schemas.d.ts +172 -0
- package/dist/rpc/procedures/entry/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/schemas.js +171 -0
- package/dist/rpc/procedures/entry/schemas.js.map +1 -0
- package/dist/rpc/procedures/entry/search-terms.d.ts +45 -0
- package/dist/rpc/procedures/entry/search-terms.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/search-terms.js +79 -0
- package/dist/rpc/procedures/entry/search-terms.js.map +1 -0
- package/dist/rpc/procedures/entry/terms.d.ts +61 -0
- package/dist/rpc/procedures/entry/terms.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/terms.js +128 -0
- package/dist/rpc/procedures/entry/terms.js.map +1 -0
- package/dist/rpc/procedures/entry/trash.d.ts +90 -0
- package/dist/rpc/procedures/entry/trash.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/trash.js +27 -0
- package/dist/rpc/procedures/entry/trash.js.map +1 -0
- package/dist/rpc/procedures/entry/update.d.ts +110 -0
- package/dist/rpc/procedures/entry/update.d.ts.map +1 -0
- package/dist/rpc/procedures/entry/update.js +268 -0
- package/dist/rpc/procedures/entry/update.js.map +1 -0
- package/dist/rpc/procedures/lookup/index.d.ts +135 -0
- package/dist/rpc/procedures/lookup/index.d.ts.map +1 -0
- package/dist/rpc/procedures/lookup/index.js +7 -0
- package/dist/rpc/procedures/lookup/index.js.map +1 -0
- package/dist/rpc/procedures/lookup/list.d.ts +68 -0
- package/dist/rpc/procedures/lookup/list.d.ts.map +1 -0
- package/dist/rpc/procedures/lookup/list.js +23 -0
- package/dist/rpc/procedures/lookup/list.js.map +1 -0
- package/dist/rpc/procedures/lookup/resolve.d.ts +66 -0
- package/dist/rpc/procedures/lookup/resolve.d.ts.map +1 -0
- package/dist/rpc/procedures/lookup/resolve.js +18 -0
- package/dist/rpc/procedures/lookup/resolve.js.map +1 -0
- package/dist/rpc/procedures/lookup/schemas.d.ts +31 -0
- package/dist/rpc/procedures/lookup/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/lookup/schemas.js +55 -0
- package/dist/rpc/procedures/lookup/schemas.js.map +1 -0
- package/dist/rpc/procedures/lookup-adapters.d.ts +3 -0
- package/dist/rpc/procedures/lookup-adapters.d.ts.map +1 -0
- package/dist/rpc/procedures/lookup-adapters.js +36 -0
- package/dist/rpc/procedures/lookup-adapters.js.map +1 -0
- package/dist/rpc/procedures/lookup.errors.d.ts +15 -0
- package/dist/rpc/procedures/lookup.errors.d.ts.map +1 -0
- package/dist/rpc/procedures/lookup.errors.js +23 -0
- package/dist/rpc/procedures/lookup.errors.js.map +1 -0
- package/dist/rpc/procedures/search/index.d.ts +64 -0
- package/dist/rpc/procedures/search/index.d.ts.map +1 -0
- package/dist/rpc/procedures/search/index.js +25 -0
- package/dist/rpc/procedures/search/index.js.map +1 -0
- package/dist/rpc/procedures/settings/get.d.ts +60 -0
- package/dist/rpc/procedures/settings/get.d.ts.map +1 -0
- package/dist/rpc/procedures/settings/get.js +35 -0
- package/dist/rpc/procedures/settings/get.js.map +1 -0
- package/dist/rpc/procedures/settings/index.d.ts +125 -0
- package/dist/rpc/procedures/settings/index.d.ts.map +1 -0
- package/dist/rpc/procedures/settings/index.js +7 -0
- package/dist/rpc/procedures/settings/index.js.map +1 -0
- package/dist/rpc/procedures/settings/schemas.d.ts +15 -0
- package/dist/rpc/procedures/settings/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/settings/schemas.js +33 -0
- package/dist/rpc/procedures/settings/schemas.js.map +1 -0
- package/dist/rpc/procedures/settings/upsert.d.ts +63 -0
- package/dist/rpc/procedures/settings/upsert.d.ts.map +1 -0
- package/dist/rpc/procedures/settings/upsert.js +84 -0
- package/dist/rpc/procedures/settings/upsert.js.map +1 -0
- package/dist/rpc/procedures/term/create.d.ts +85 -0
- package/dist/rpc/procedures/term/create.d.ts.map +1 -0
- package/dist/rpc/procedures/term/create.js +73 -0
- package/dist/rpc/procedures/term/create.js.map +1 -0
- package/dist/rpc/procedures/term/delete.d.ts +78 -0
- package/dist/rpc/procedures/term/delete.d.ts.map +1 -0
- package/dist/rpc/procedures/term/delete.js +33 -0
- package/dist/rpc/procedures/term/delete.js.map +1 -0
- package/dist/rpc/procedures/term/get.d.ts +78 -0
- package/dist/rpc/procedures/term/get.d.ts.map +1 -0
- package/dist/rpc/procedures/term/get.js +18 -0
- package/dist/rpc/procedures/term/get.js.map +1 -0
- package/dist/rpc/procedures/term/helpers.d.ts +13 -0
- package/dist/rpc/procedures/term/helpers.d.ts.map +1 -0
- package/dist/rpc/procedures/term/helpers.js +33 -0
- package/dist/rpc/procedures/term/helpers.js.map +1 -0
- package/dist/rpc/procedures/term/index.d.ts +407 -0
- package/dist/rpc/procedures/term/index.d.ts.map +1 -0
- package/dist/rpc/procedures/term/index.js +13 -0
- package/dist/rpc/procedures/term/index.js.map +1 -0
- package/dist/rpc/procedures/term/list.d.ts +82 -0
- package/dist/rpc/procedures/term/list.d.ts.map +1 -0
- package/dist/rpc/procedures/term/list.js +19 -0
- package/dist/rpc/procedures/term/list.js.map +1 -0
- package/dist/rpc/procedures/term/lookup.d.ts +4 -0
- package/dist/rpc/procedures/term/lookup.d.ts.map +1 -0
- package/dist/rpc/procedures/term/lookup.js +111 -0
- package/dist/rpc/procedures/term/lookup.js.map +1 -0
- package/dist/rpc/procedures/term/meta.d.ts +33 -0
- package/dist/rpc/procedures/term/meta.d.ts.map +1 -0
- package/dist/rpc/procedures/term/meta.js +37 -0
- package/dist/rpc/procedures/term/meta.js.map +1 -0
- package/dist/rpc/procedures/term/read-errors.d.ts +23 -0
- package/dist/rpc/procedures/term/read-errors.d.ts.map +1 -0
- package/dist/rpc/procedures/term/read-errors.js +24 -0
- package/dist/rpc/procedures/term/read-errors.js.map +1 -0
- package/dist/rpc/procedures/term/schemas.d.ts +40 -0
- package/dist/rpc/procedures/term/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/term/schemas.js +32 -0
- package/dist/rpc/procedures/term/schemas.js.map +1 -0
- package/dist/rpc/procedures/term/update.d.ts +85 -0
- package/dist/rpc/procedures/term/update.d.ts.map +1 -0
- package/dist/rpc/procedures/term/update.js +95 -0
- package/dist/rpc/procedures/term/update.js.map +1 -0
- package/dist/rpc/procedures/user/cancel-email-change.d.ts +64 -0
- package/dist/rpc/procedures/user/cancel-email-change.d.ts.map +1 -0
- package/dist/rpc/procedures/user/cancel-email-change.js +35 -0
- package/dist/rpc/procedures/user/cancel-email-change.js.map +1 -0
- package/dist/rpc/procedures/user/delete.d.ts +83 -0
- package/dist/rpc/procedures/user/delete.d.ts.map +1 -0
- package/dist/rpc/procedures/user/delete.js +70 -0
- package/dist/rpc/procedures/user/delete.js.map +1 -0
- package/dist/rpc/procedures/user/disable.d.ts +82 -0
- package/dist/rpc/procedures/user/disable.d.ts.map +1 -0
- package/dist/rpc/procedures/user/disable.js +51 -0
- package/dist/rpc/procedures/user/disable.js.map +1 -0
- package/dist/rpc/procedures/user/enable.d.ts +82 -0
- package/dist/rpc/procedures/user/enable.d.ts.map +1 -0
- package/dist/rpc/procedures/user/enable.js +44 -0
- package/dist/rpc/procedures/user/enable.js.map +1 -0
- package/dist/rpc/procedures/user/get.d.ts +82 -0
- package/dist/rpc/procedures/user/get.d.ts.map +1 -0
- package/dist/rpc/procedures/user/get.js +27 -0
- package/dist/rpc/procedures/user/get.js.map +1 -0
- package/dist/rpc/procedures/user/helpers.d.ts +10 -0
- package/dist/rpc/procedures/user/helpers.d.ts.map +1 -0
- package/dist/rpc/procedures/user/helpers.js +16 -0
- package/dist/rpc/procedures/user/helpers.js.map +1 -0
- package/dist/rpc/procedures/user/index.d.ts +834 -0
- package/dist/rpc/procedures/user/index.d.ts.map +1 -0
- package/dist/rpc/procedures/user/index.js +25 -0
- package/dist/rpc/procedures/user/index.js.map +1 -0
- package/dist/rpc/procedures/user/invite.d.ts +68 -0
- package/dist/rpc/procedures/user/invite.d.ts.map +1 -0
- package/dist/rpc/procedures/user/invite.js +62 -0
- package/dist/rpc/procedures/user/invite.js.map +1 -0
- package/dist/rpc/procedures/user/list.d.ts +89 -0
- package/dist/rpc/procedures/user/list.d.ts.map +1 -0
- package/dist/rpc/procedures/user/list.js +75 -0
- package/dist/rpc/procedures/user/list.js.map +1 -0
- package/dist/rpc/procedures/user/lookup.d.ts +4 -0
- package/dist/rpc/procedures/user/lookup.d.ts.map +1 -0
- package/dist/rpc/procedures/user/lookup.js +95 -0
- package/dist/rpc/procedures/user/lookup.js.map +1 -0
- package/dist/rpc/procedures/user/meta.d.ts +32 -0
- package/dist/rpc/procedures/user/meta.d.ts.map +1 -0
- package/dist/rpc/procedures/user/meta.js +38 -0
- package/dist/rpc/procedures/user/meta.js.map +1 -0
- package/dist/rpc/procedures/user/pending-email-change.d.ts +76 -0
- package/dist/rpc/procedures/user/pending-email-change.d.ts.map +1 -0
- package/dist/rpc/procedures/user/pending-email-change.js +62 -0
- package/dist/rpc/procedures/user/pending-email-change.js.map +1 -0
- package/dist/rpc/procedures/user/request-email-change.d.ts +67 -0
- package/dist/rpc/procedures/user/request-email-change.d.ts.map +1 -0
- package/dist/rpc/procedures/user/request-email-change.js +86 -0
- package/dist/rpc/procedures/user/request-email-change.js.map +1 -0
- package/dist/rpc/procedures/user/schemas.d.ts +52 -0
- package/dist/rpc/procedures/user/schemas.d.ts.map +1 -0
- package/dist/rpc/procedures/user/schemas.js +44 -0
- package/dist/rpc/procedures/user/schemas.js.map +1 -0
- package/dist/rpc/procedures/user/set-locale.d.ts +61 -0
- package/dist/rpc/procedures/user/set-locale.d.ts.map +1 -0
- package/dist/rpc/procedures/user/set-locale.js +31 -0
- package/dist/rpc/procedures/user/set-locale.js.map +1 -0
- package/dist/rpc/procedures/user/update.d.ts +89 -0
- package/dist/rpc/procedures/user/update.d.ts.map +1 -0
- package/dist/rpc/procedures/user/update.js +137 -0
- package/dist/rpc/procedures/user/update.js.map +1 -0
- package/dist/rpc/router.d.ts +4893 -0
- package/dist/rpc/router.d.ts.map +1 -0
- package/dist/rpc/router.js +17 -0
- package/dist/rpc/router.js.map +1 -0
- package/dist/rpc/schemas.d.ts +3 -0
- package/dist/rpc/schemas.d.ts.map +1 -0
- package/dist/rpc/schemas.js +9 -0
- package/dist/rpc/schemas.js.map +1 -0
- package/dist/rpc/validation.d.ts +58 -0
- package/dist/rpc/validation.d.ts.map +1 -0
- package/dist/rpc/validation.js +72 -0
- package/dist/rpc/validation.js.map +1 -0
- package/dist/rpc/vmessage.d.ts +21 -0
- package/dist/rpc/vmessage.d.ts.map +1 -0
- package/dist/rpc/vmessage.js +20 -0
- package/dist/rpc/vmessage.js.map +1 -0
- package/dist/runtime/adapter.d.ts +38 -0
- package/dist/runtime/adapter.d.ts.map +1 -0
- package/dist/runtime/adapter.js +1 -0
- package/dist/runtime/adapter.js.map +1 -0
- package/dist/runtime/admin-shell.d.ts +11 -0
- package/dist/runtime/admin-shell.d.ts.map +1 -0
- package/dist/runtime/admin-shell.js +14 -0
- package/dist/runtime/admin-shell.js.map +1 -0
- package/dist/runtime/app.d.ts +165 -0
- package/dist/runtime/app.d.ts.map +1 -0
- package/dist/runtime/app.js +232 -0
- package/dist/runtime/app.js.map +1 -0
- package/dist/runtime/bindings.d.ts +6 -0
- package/dist/runtime/bindings.d.ts.map +1 -0
- package/dist/runtime/bindings.js +1 -0
- package/dist/runtime/bindings.js.map +1 -0
- package/dist/runtime/dispatcher.d.ts +11 -0
- package/dist/runtime/dispatcher.d.ts.map +1 -0
- package/dist/runtime/dispatcher.js +560 -0
- package/dist/runtime/dispatcher.js.map +1 -0
- package/dist/runtime/env-input.d.ts +19 -0
- package/dist/runtime/env-input.d.ts.map +1 -0
- package/dist/runtime/env-input.js +13 -0
- package/dist/runtime/env-input.js.map +1 -0
- package/dist/runtime/errors.d.ts +29 -0
- package/dist/runtime/errors.d.ts.map +1 -0
- package/dist/runtime/errors.js +32 -0
- package/dist/runtime/errors.js.map +1 -0
- package/dist/runtime/http.d.ts +10 -0
- package/dist/runtime/http.d.ts.map +1 -0
- package/dist/runtime/http.js +51 -0
- package/dist/runtime/http.js.map +1 -0
- package/dist/runtime/load-user-for-public-request.d.ts +3 -0
- package/dist/runtime/load-user-for-public-request.d.ts.map +1 -0
- package/dist/runtime/load-user-for-public-request.js +13 -0
- package/dist/runtime/load-user-for-public-request.js.map +1 -0
- package/dist/runtime/memory-storage.d.ts +8 -0
- package/dist/runtime/memory-storage.d.ts.map +1 -0
- package/dist/runtime/memory-storage.js +166 -0
- package/dist/runtime/memory-storage.js.map +1 -0
- package/dist/runtime/register-core-scheduled-tasks.d.ts +7 -0
- package/dist/runtime/register-core-scheduled-tasks.d.ts.map +1 -0
- package/dist/runtime/register-core-scheduled-tasks.js +38 -0
- package/dist/runtime/register-core-scheduled-tasks.js.map +1 -0
- package/dist/runtime/scheduled.d.ts +17 -0
- package/dist/runtime/scheduled.d.ts.map +1 -0
- package/dist/runtime/scheduled.js +33 -0
- package/dist/runtime/scheduled.js.map +1 -0
- package/dist/runtime/shortcode-registry.d.ts +10 -0
- package/dist/runtime/shortcode-registry.d.ts.map +1 -0
- package/dist/runtime/shortcode-registry.js +15 -0
- package/dist/runtime/shortcode-registry.js.map +1 -0
- package/dist/runtime/slots.d.ts +203 -0
- package/dist/runtime/slots.d.ts.map +1 -0
- package/dist/runtime/slots.js +1 -0
- package/dist/runtime/slots.js.map +1 -0
- package/dist/search/admin-search.d.ts +37 -0
- package/dist/search/admin-search.d.ts.map +1 -0
- package/dist/search/admin-search.js +24 -0
- package/dist/search/admin-search.js.map +1 -0
- package/dist/search/entries-handler.d.ts +10 -0
- package/dist/search/entries-handler.d.ts.map +1 -0
- package/dist/search/entries-handler.js +77 -0
- package/dist/search/entries-handler.js.map +1 -0
- package/dist/search/register-core-handlers.d.ts +8 -0
- package/dist/search/register-core-handlers.d.ts.map +1 -0
- package/dist/search/register-core-handlers.js +20 -0
- package/dist/search/register-core-handlers.js.map +1 -0
- package/dist/search/terms-handler.d.ts +9 -0
- package/dist/search/terms-handler.d.ts.map +1 -0
- package/dist/search/terms-handler.js +61 -0
- package/dist/search/terms-handler.js.map +1 -0
- package/dist/search/users-handler.d.ts +9 -0
- package/dist/search/users-handler.d.ts.map +1 -0
- package/dist/search/users-handler.js +49 -0
- package/dist/search/users-handler.js.map +1 -0
- package/dist/seo/canonical.d.ts +31 -0
- package/dist/seo/canonical.d.ts.map +1 -0
- package/dist/seo/canonical.js +81 -0
- package/dist/seo/canonical.js.map +1 -0
- package/dist/seo/feed.d.ts +73 -0
- package/dist/seo/feed.d.ts.map +1 -0
- package/dist/seo/feed.js +254 -0
- package/dist/seo/feed.js.map +1 -0
- package/dist/seo/head-defaults.d.ts +27 -0
- package/dist/seo/head-defaults.d.ts.map +1 -0
- package/dist/seo/head-defaults.js +82 -0
- package/dist/seo/head-defaults.js.map +1 -0
- package/dist/seo/register-sitemap-invalidator.d.ts +7 -0
- package/dist/seo/register-sitemap-invalidator.d.ts.map +1 -0
- package/dist/seo/register-sitemap-invalidator.js +43 -0
- package/dist/seo/register-sitemap-invalidator.js.map +1 -0
- package/dist/seo/robots.d.ts +20 -0
- package/dist/seo/robots.d.ts.map +1 -0
- package/dist/seo/robots.js +18 -0
- package/dist/seo/robots.js.map +1 -0
- package/dist/seo/site-settings.d.ts +6 -0
- package/dist/seo/site-settings.d.ts.map +1 -0
- package/dist/seo/site-settings.js +11 -0
- package/dist/seo/site-settings.js.map +1 -0
- package/dist/seo/sitemap-cache.d.ts +20 -0
- package/dist/seo/sitemap-cache.d.ts.map +1 -0
- package/dist/seo/sitemap-cache.js +96 -0
- package/dist/seo/sitemap-cache.js.map +1 -0
- package/dist/seo/sitemap.d.ts +26 -0
- package/dist/seo/sitemap.d.ts.map +1 -0
- package/dist/seo/sitemap.js +151 -0
- package/dist/seo/sitemap.js.map +1 -0
- package/dist/seo/xml.d.ts +3 -0
- package/dist/seo/xml.d.ts.map +1 -0
- package/dist/seo/xml.js +12 -0
- package/dist/seo/xml.js.map +1 -0
- package/dist/settings-core.d.ts +49 -0
- package/dist/settings-core.d.ts.map +1 -0
- package/dist/settings-core.js +113 -0
- package/dist/settings-core.js.map +1 -0
- package/dist/slugify.d.ts +14 -0
- package/dist/slugify.d.ts.map +1 -0
- package/dist/slugify.js +17 -0
- package/dist/slugify.js.map +1 -0
- package/dist/template-deps-core.d.ts +19 -0
- package/dist/template-deps-core.d.ts.map +1 -0
- package/dist/template-deps-core.js +35 -0
- package/dist/template-deps-core.js.map +1 -0
- package/dist/template-deps.d.ts +41 -0
- package/dist/template-deps.d.ts.map +1 -0
- package/dist/template-deps.js +90 -0
- package/dist/template-deps.js.map +1 -0
- package/dist/template.d.ts +84 -0
- package/dist/template.d.ts.map +1 -0
- package/dist/template.js +54 -0
- package/dist/template.js.map +1 -0
- package/dist/terms/errors.d.ts +22 -0
- package/dist/terms/errors.d.ts.map +1 -0
- package/dist/terms/errors.js +25 -0
- package/dist/terms/errors.js.map +1 -0
- package/dist/terms/read-service.d.ts +20 -0
- package/dist/terms/read-service.d.ts.map +1 -0
- package/dist/terms/read-service.js +53 -0
- package/dist/terms/read-service.js.map +1 -0
- package/dist/test/default-theme.d.ts +2 -0
- package/dist/test/default-theme.d.ts.map +1 -0
- package/dist/test/default-theme.js +28 -0
- package/dist/test/default-theme.js.map +1 -0
- package/dist/test/defer.d.ts +19 -0
- package/dist/test/defer.d.ts.map +1 -0
- package/dist/test/defer.js +22 -0
- package/dist/test/defer.js.map +1 -0
- package/dist/test/dispatcher.d.ts +139 -0
- package/dist/test/dispatcher.d.ts.map +1 -0
- package/dist/test/dispatcher.js +125 -0
- package/dist/test/dispatcher.js.map +1 -0
- package/dist/test/factories.d.ts +707 -0
- package/dist/test/factories.d.ts.map +1 -0
- package/dist/test/factories.js +336 -0
- package/dist/test/factories.js.map +1 -0
- package/dist/test/fixtures/webauthn.d.ts +40 -0
- package/dist/test/fixtures/webauthn.d.ts.map +1 -0
- package/dist/test/fixtures/webauthn.js +209 -0
- package/dist/test/fixtures/webauthn.js.map +1 -0
- package/dist/test/harness.d.ts +10 -0
- package/dist/test/harness.d.ts.map +1 -0
- package/dist/test/harness.js +34 -0
- package/dist/test/harness.js.map +1 -0
- package/dist/test/index.d.ts +17 -0
- package/dist/test/index.d.ts.map +1 -0
- package/dist/test/index.js +16 -0
- package/dist/test/index.js.map +1 -0
- package/dist/test/mailer.d.ts +26 -0
- package/dist/test/mailer.d.ts.map +1 -0
- package/dist/test/mailer.js +14 -0
- package/dist/test/mailer.js.map +1 -0
- package/dist/test/match.d.ts +14 -0
- package/dist/test/match.d.ts.map +1 -0
- package/dist/test/match.js +83 -0
- package/dist/test/match.js.map +1 -0
- package/dist/test/playwright/acting-as.d.ts +45 -0
- package/dist/test/playwright/acting-as.d.ts.map +1 -0
- package/dist/test/playwright/acting-as.js +50 -0
- package/dist/test/playwright/acting-as.js.map +1 -0
- package/dist/test/playwright/build-admin-chunk.d.ts +24 -0
- package/dist/test/playwright/build-admin-chunk.d.ts.map +1 -0
- package/dist/test/playwright/build-admin-chunk.js +61 -0
- package/dist/test/playwright/build-admin-chunk.js.map +1 -0
- package/dist/test/playwright/index.d.ts +78 -0
- package/dist/test/playwright/index.d.ts.map +1 -0
- package/dist/test/playwright/index.js +155 -0
- package/dist/test/playwright/index.js.map +1 -0
- package/dist/test/playwright/open-playground-db.d.ts +32 -0
- package/dist/test/playwright/open-playground-db.d.ts.map +1 -0
- package/dist/test/playwright/open-playground-db.js +49 -0
- package/dist/test/playwright/open-playground-db.js.map +1 -0
- package/dist/test/playwright/playwright-config.d.ts +84 -0
- package/dist/test/playwright/playwright-config.d.ts.map +1 -0
- package/dist/test/playwright/playwright-config.js +91 -0
- package/dist/test/playwright/playwright-config.js.map +1 -0
- package/dist/test/request.d.ts +66 -0
- package/dist/test/request.d.ts.map +1 -0
- package/dist/test/request.js +110 -0
- package/dist/test/request.js.map +1 -0
- package/dist/test/rpc.d.ts +86 -0
- package/dist/test/rpc.d.ts.map +1 -0
- package/dist/test/rpc.js +91 -0
- package/dist/test/rpc.js.map +1 -0
- package/dist/test/spies.d.ts +68 -0
- package/dist/test/spies.d.ts.map +1 -0
- package/dist/test/spies.js +144 -0
- package/dist/test/spies.js.map +1 -0
- package/dist/theme-errors.d.ts +37 -0
- package/dist/theme-errors.d.ts.map +1 -0
- package/dist/theme-errors.js +87 -0
- package/dist/theme-errors.js.map +1 -0
- package/dist/theme.d.ts +91 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +74 -0
- package/dist/theme.js.map +1 -0
- package/dist/welcome/i18n.d.ts +9 -0
- package/dist/welcome/i18n.d.ts.map +1 -0
- package/dist/welcome/i18n.js +51 -0
- package/dist/welcome/i18n.js.map +1 -0
- package/dist/welcome-theme.d.ts +10 -0
- package/dist/welcome-theme.d.ts.map +1 -0
- package/dist/welcome-theme.js +165 -0
- package/dist/welcome-theme.js.map +1 -0
- package/locales/admin-bar-ar.d.mts +1 -0
- package/locales/admin-bar-ar.mjs +1 -0
- package/locales/admin-bar-ar.po +49 -0
- package/locales/admin-bar-de.d.mts +1 -0
- package/locales/admin-bar-de.mjs +1 -0
- package/locales/admin-bar-de.po +49 -0
- package/locales/admin-bar-en.d.mts +1 -0
- package/locales/admin-bar-en.mjs +1 -0
- package/locales/admin-bar-en.po +49 -0
- package/locales/admin-bar-uk.d.mts +1 -0
- package/locales/admin-bar-uk.mjs +1 -0
- package/locales/admin-bar-uk.po +49 -0
- package/locales/admin-bar-zh-CN.d.mts +1 -0
- package/locales/admin-bar-zh-CN.mjs +1 -0
- package/locales/admin-bar-zh-CN.po +49 -0
- package/locales/welcome-ar.d.mts +1 -0
- package/locales/welcome-ar.mjs +1 -0
- package/locales/welcome-ar.po +33 -0
- package/locales/welcome-de.d.mts +1 -0
- package/locales/welcome-de.mjs +1 -0
- package/locales/welcome-de.po +33 -0
- package/locales/welcome-en.d.mts +1 -0
- package/locales/welcome-en.mjs +1 -0
- package/locales/welcome-en.po +33 -0
- package/locales/welcome-uk.d.mts +1 -0
- package/locales/welcome-uk.mjs +1 -0
- package/locales/welcome-uk.po +33 -0
- package/locales/welcome-zh-CN.d.mts +1 -0
- package/locales/welcome-zh-CN.mjs +1 -0
- package/locales/welcome-zh-CN.po +33 -0
- package/package.json +150 -0
|
@@ -0,0 +1,795 @@
|
|
|
1
|
+
import { sql } from "drizzle-orm";
|
|
2
|
+
import { eq } from "../../db/index.js";
|
|
3
|
+
import { MetaReferenceError } from "./errors.js";
|
|
4
|
+
// Shared meta plumbing for every entity that stores a `meta` JSON
|
|
5
|
+
// column (entries, terms, and — eventually — users). The storage
|
|
6
|
+
// contract: writes merge into the bag via SQLite `json_set` /
|
|
7
|
+
// `json_remove`; reads come back already-parsed via drizzle's
|
|
8
|
+
// `mode: "json"`. Per-entity specializations in `procedures/{entry,
|
|
9
|
+
// term}/meta.ts` thread the right table + action name through these
|
|
10
|
+
// helpers.
|
|
11
|
+
/** Per-value byte cap after JSON encoding. 256 KiB fits any realistic
|
|
12
|
+
* plugin config while bounding adversarial payloads. */
|
|
13
|
+
const MAX_META_VALUE_BYTES = 256 * 1024;
|
|
14
|
+
export class MetaSanitizationError extends Error {
|
|
15
|
+
static {
|
|
16
|
+
MetaSanitizationError.prototype.name = "MetaSanitizationError";
|
|
17
|
+
}
|
|
18
|
+
key;
|
|
19
|
+
reason;
|
|
20
|
+
constructor(key, reason) {
|
|
21
|
+
super(`meta key "${key}" failed sanitization: ${reason}`);
|
|
22
|
+
this.key = key;
|
|
23
|
+
this.reason = reason;
|
|
24
|
+
}
|
|
25
|
+
static notRegistered(ctx) {
|
|
26
|
+
return new MetaSanitizationError(ctx.key, "not_registered");
|
|
27
|
+
}
|
|
28
|
+
static invalidValue(ctx) {
|
|
29
|
+
return new MetaSanitizationError(ctx.key, "invalid_value");
|
|
30
|
+
}
|
|
31
|
+
static valueTooLarge(ctx) {
|
|
32
|
+
return new MetaSanitizationError(ctx.key, "value_too_large");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Validate an incoming meta map against a field-lookup fn produced by
|
|
37
|
+
* the caller (entry vs term differ only in which registry they walk).
|
|
38
|
+
* Unregistered keys and type-coercion failures throw so the caller can
|
|
39
|
+
* surface them as 4xx before any write. `null` / `undefined` values
|
|
40
|
+
* are deletion requests; everything else is coerced + sanitized.
|
|
41
|
+
*/
|
|
42
|
+
export function sanitizeMetaInput(findField, input) {
|
|
43
|
+
if (input === undefined)
|
|
44
|
+
return null;
|
|
45
|
+
const upserts = new Map();
|
|
46
|
+
const deletes = [];
|
|
47
|
+
for (const [key, rawValue] of Object.entries(input)) {
|
|
48
|
+
const field = findField(key);
|
|
49
|
+
if (!field) {
|
|
50
|
+
throw MetaSanitizationError.notRegistered({ key });
|
|
51
|
+
}
|
|
52
|
+
if (rawValue === null || rawValue === undefined) {
|
|
53
|
+
deletes.push(key);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const coerced = coerceToType(field.type, key, rawValue);
|
|
57
|
+
const sanitized = field.sanitize
|
|
58
|
+
? runSanitize(field.sanitize, key, coerced)
|
|
59
|
+
: coerced;
|
|
60
|
+
assertEncodedSize(key, sanitized);
|
|
61
|
+
upserts.set(key, sanitized);
|
|
62
|
+
}
|
|
63
|
+
return { upserts, deletes };
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Run a field's sanitize callback inside a try/catch — any thrown
|
|
67
|
+
* `MetaSanitizationError` propagates as-is (so callbacks that already
|
|
68
|
+
* use the precise error type can opt into specific reasons), but
|
|
69
|
+
* generic errors (including plain `Error("invalid_value")` thrown
|
|
70
|
+
* from builder-injected default sanitizers) are translated into a
|
|
71
|
+
* uniform `invalid_value` failure. Callbacks therefore stay free to
|
|
72
|
+
* throw vanilla errors without importing the package-internal error
|
|
73
|
+
* class.
|
|
74
|
+
*/
|
|
75
|
+
function runSanitize(sanitize, key, value) {
|
|
76
|
+
try {
|
|
77
|
+
return sanitize(value);
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
if (error instanceof MetaSanitizationError)
|
|
81
|
+
throw error;
|
|
82
|
+
// Buggy sanitize callbacks otherwise round to a generic
|
|
83
|
+
// `invalid_value` envelope, which is fine for the editor's UX
|
|
84
|
+
// but loses the underlying stack. Log it before translating so
|
|
85
|
+
// server logs preserve the diagnostic trail.
|
|
86
|
+
console.error(`[plumix] sanitize callback for meta key ${JSON.stringify(key)} threw:`, error);
|
|
87
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Thin wrapper that translates a thrown `MetaSanitizationError` into
|
|
92
|
+
* the RPC handler's CONFLICT envelope.
|
|
93
|
+
*/
|
|
94
|
+
export function sanitizeMetaForRpc(findField, input, errors) {
|
|
95
|
+
try {
|
|
96
|
+
return sanitizeMetaInput(findField, input);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
if (error instanceof MetaSanitizationError) {
|
|
100
|
+
throw errors.CONFLICT({
|
|
101
|
+
data: { reason: `meta_${error.reason}`, key: error.key },
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Walk a sanitized patch, group every reference upsert by
|
|
109
|
+
* `(kind, scope)`, and issue one `LookupAdapter.list({ ids })`
|
|
110
|
+
* query per group to confirm all upserted IDs are real and in
|
|
111
|
+
* scope **at validation time**. Throws `invalid_value` for any id
|
|
112
|
+
* missing from its group's live-id set — same surface whether the
|
|
113
|
+
* adapter is unregistered, the target is gone, or scope rejected
|
|
114
|
+
* it. Sync `sanitize` callbacks can't run DB queries, so this is a
|
|
115
|
+
* separate async step the RPC procedures invoke between
|
|
116
|
+
* sanitisation and `applyMetaPatch`.
|
|
117
|
+
*
|
|
118
|
+
* TOCTOU note: validate runs in a separate query from the eventual
|
|
119
|
+
* `applyMetaPatch`, and callers don't share a transaction. A
|
|
120
|
+
* concurrent delete between validate and apply leaves an orphan id
|
|
121
|
+
* in the meta bag; `filterMetaOrphans` masks it on read. Wrap the
|
|
122
|
+
* validate/apply pair in `ctx.db.transaction()` if a caller needs
|
|
123
|
+
* serializable consistency.
|
|
124
|
+
*/
|
|
125
|
+
export async function validateMetaReferences(ctx, findField, patch) {
|
|
126
|
+
const groups = new Map();
|
|
127
|
+
for (const [key, value] of patch.upserts) {
|
|
128
|
+
const field = findField(key);
|
|
129
|
+
const target = referenceTargetOf(field);
|
|
130
|
+
if (target) {
|
|
131
|
+
const registered = ctx.plugins.lookupAdapters.get(target.kind);
|
|
132
|
+
if (!registered) {
|
|
133
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
134
|
+
}
|
|
135
|
+
const ids = referenceIdsForValidation(key, value, target, fieldMax(field));
|
|
136
|
+
const group = upsertGroup(groups, target, registered);
|
|
137
|
+
for (const id of ids)
|
|
138
|
+
group.ids.add(id);
|
|
139
|
+
group.contributions.push({
|
|
140
|
+
errorKey: key,
|
|
141
|
+
ids,
|
|
142
|
+
applyNormalize: (rowsById) => {
|
|
143
|
+
if (target.valueShape !== "object")
|
|
144
|
+
return;
|
|
145
|
+
if (target.multiple) {
|
|
146
|
+
patch.upserts.set(key, ids.map((id) => buildCachedReference(id, rowsById)));
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const [singleId] = ids;
|
|
150
|
+
if (singleId !== undefined) {
|
|
151
|
+
patch.upserts.set(key, buildCachedReference(singleId, rowsById));
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
// Repeater fields don't carry a `referenceTarget` themselves but
|
|
158
|
+
// their rows can. Walk into rows so nested `entry` / `term` /
|
|
159
|
+
// `user` / `media` refs flow through the same `(kind, scope)`
|
|
160
|
+
// batch as top-level fields. Errors attribute to the top-level
|
|
161
|
+
// repeater key — the row index + subKey live in the developer
|
|
162
|
+
// log, not the wire response (per slice acceptance).
|
|
163
|
+
if (!isRepeaterField(field))
|
|
164
|
+
continue;
|
|
165
|
+
if (!Array.isArray(value))
|
|
166
|
+
continue;
|
|
167
|
+
collectRepeaterReferences(ctx, key, field, value, groups);
|
|
168
|
+
}
|
|
169
|
+
for (const group of groups.values()) {
|
|
170
|
+
if (group.ids.size === 0)
|
|
171
|
+
continue;
|
|
172
|
+
const liveRows = await fetchLiveRows(ctx, group.registered, group.scope, group.ids, "validateMetaReferences");
|
|
173
|
+
const rowsById = new Map(liveRows.map((r) => [r.id, r]));
|
|
174
|
+
for (const contribution of group.contributions) {
|
|
175
|
+
for (const id of contribution.ids) {
|
|
176
|
+
if (!rowsById.has(id)) {
|
|
177
|
+
if (contribution.diagnostic !== undefined) {
|
|
178
|
+
// Wire error keys on the top-level field; this log line
|
|
179
|
+
// is the only place the row index + subKey surface, so
|
|
180
|
+
// an engineer debugging a `meta_invalid_value` on a
|
|
181
|
+
// repeater can locate the offending subField without
|
|
182
|
+
// bisecting the saved bag. `JSON.stringify(id)` escapes
|
|
183
|
+
// control characters so a user-supplied id with newlines
|
|
184
|
+
// can't poison the log stream.
|
|
185
|
+
console.error(`[plumix] meta repeater ${JSON.stringify(contribution.errorKey)} ` +
|
|
186
|
+
`row ${String(contribution.diagnostic.rowIdx)} ` +
|
|
187
|
+
`subField ${JSON.stringify(contribution.diagnostic.subKey)} ` +
|
|
188
|
+
`references missing id ${JSON.stringify(id)}`);
|
|
189
|
+
}
|
|
190
|
+
throw MetaSanitizationError.invalidValue({
|
|
191
|
+
key: contribution.errorKey,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
contribution.applyNormalize(rowsById);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function isRepeaterField(field) {
|
|
200
|
+
if (!field)
|
|
201
|
+
return false;
|
|
202
|
+
return field.inputType === "repeater";
|
|
203
|
+
}
|
|
204
|
+
function collectRepeaterReferences(ctx, topKey, field, rows, groups) {
|
|
205
|
+
// Nested repeaters are rejected at registration by `repeater()`, so
|
|
206
|
+
// any subField that's itself a repeater wouldn't get here in
|
|
207
|
+
// practice. We don't recurse into subField repeaters either way —
|
|
208
|
+
// single-source-of-truth on the registration guard.
|
|
209
|
+
for (const [rowIdx, row] of rows.entries()) {
|
|
210
|
+
if (!row || typeof row !== "object" || Array.isArray(row))
|
|
211
|
+
continue;
|
|
212
|
+
const rowObj = row;
|
|
213
|
+
for (const subField of field.subFields) {
|
|
214
|
+
const target = referenceTargetOf(subField);
|
|
215
|
+
if (!target)
|
|
216
|
+
continue;
|
|
217
|
+
const subValue = rowObj[subField.key];
|
|
218
|
+
if (subValue === undefined || subValue === null)
|
|
219
|
+
continue;
|
|
220
|
+
const registered = ctx.plugins.lookupAdapters.get(target.kind);
|
|
221
|
+
if (!registered) {
|
|
222
|
+
throw MetaSanitizationError.invalidValue({ key: topKey });
|
|
223
|
+
}
|
|
224
|
+
const ids = referenceIdsForValidation(topKey, subValue, target, fieldMax(subField));
|
|
225
|
+
const group = upsertGroup(groups, target, registered);
|
|
226
|
+
for (const id of ids)
|
|
227
|
+
group.ids.add(id);
|
|
228
|
+
const subKey = subField.key;
|
|
229
|
+
group.contributions.push({
|
|
230
|
+
errorKey: topKey,
|
|
231
|
+
ids,
|
|
232
|
+
diagnostic: { rowIdx, subKey },
|
|
233
|
+
applyNormalize: (rowsById) => {
|
|
234
|
+
if (target.valueShape !== "object")
|
|
235
|
+
return;
|
|
236
|
+
// Rewrite the row's cached-object value in place — the
|
|
237
|
+
// top-level upsert array is the live storage shape, so
|
|
238
|
+
// mutating an object inside it is what the caller will
|
|
239
|
+
// serialize.
|
|
240
|
+
if (target.multiple) {
|
|
241
|
+
rowObj[subKey] = ids.map((id) => buildCachedReference(id, rowsById));
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const [singleId] = ids;
|
|
245
|
+
if (singleId !== undefined) {
|
|
246
|
+
rowObj[subKey] = buildCachedReference(singleId, rowsById);
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
function upsertGroup(groups, target, registered) {
|
|
254
|
+
const groupKey = referenceGroupKey(target);
|
|
255
|
+
let group = groups.get(groupKey);
|
|
256
|
+
if (!group) {
|
|
257
|
+
group = {
|
|
258
|
+
registered,
|
|
259
|
+
scope: target.scope,
|
|
260
|
+
ids: new Set(),
|
|
261
|
+
contributions: [],
|
|
262
|
+
};
|
|
263
|
+
groups.set(groupKey, group);
|
|
264
|
+
}
|
|
265
|
+
return group;
|
|
266
|
+
}
|
|
267
|
+
// Adapter cached fields override anything; user-supplied non-id keys
|
|
268
|
+
// don't survive. Per-usage user fields (e.g. alt overrides) are a
|
|
269
|
+
// post-v0.1 feature — when added, this is where they'd merge in.
|
|
270
|
+
function buildCachedReference(id, rowsById) {
|
|
271
|
+
const row = rowsById.get(id);
|
|
272
|
+
return { id, ...(row?.cached ?? {}) };
|
|
273
|
+
}
|
|
274
|
+
// Defense-in-depth ceiling on the internal-aggregated id-batch size.
|
|
275
|
+
// Above this, the live-id fetch throws rather than silently truncating.
|
|
276
|
+
// The wire cap (100) and per-field cap (`HARD_MULTI_REFERENCE_LIMIT`,
|
|
277
|
+
// 100) keep external + per-field batches small; this ceiling only
|
|
278
|
+
// kicks in if many fields share `(kind, scope)` and aggregate.
|
|
279
|
+
const MAX_REFERENCE_GROUP_BATCH = 1000;
|
|
280
|
+
// Same kind + same scope = same SQL filter, so they batch into one
|
|
281
|
+
// `list({ ids })` call. JSON.stringify is good enough for the scope
|
|
282
|
+
// shapes we ship (`UserFieldScope`, `EntryFieldScope`,
|
|
283
|
+
// `TermFieldScope` are all simple objects with stable key order at
|
|
284
|
+
// build time). Plugin authors who construct scopes with non-stable
|
|
285
|
+
// key order get separate groups — extra query, no correctness issue.
|
|
286
|
+
//
|
|
287
|
+
// `::` separator is collision-safe by construction: `kind` is
|
|
288
|
+
// constrained to `[a-z][a-z0-9_-]{0,63}` (no colons) by the lookup
|
|
289
|
+
// RPC schema, and core registers `user`/`entry`/`term` directly.
|
|
290
|
+
//
|
|
291
|
+
// `LookupAdapter` requires JSON-serializable scope; rethrow with a
|
|
292
|
+
// clear message if `JSON.stringify` rejects (BigInt, cycle, function)
|
|
293
|
+
// rather than letting the downstream read crash with a generic.
|
|
294
|
+
function referenceGroupKey(target) {
|
|
295
|
+
try {
|
|
296
|
+
return `${target.kind}::${JSON.stringify(target.scope ?? null)}`;
|
|
297
|
+
}
|
|
298
|
+
catch (cause) {
|
|
299
|
+
throw MetaReferenceError.scopeNotSerializable(target.kind, cause);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
// Run one `list({ ids })` per group, throwing if the aggregated batch
|
|
303
|
+
// blew past `MAX_REFERENCE_GROUP_BATCH`. The wire schema caps `ids` at
|
|
304
|
+
// 100 per-request and `HARD_MULTI_REFERENCE_LIMIT` caps each field at
|
|
305
|
+
// 100, so we only hit the ceiling when many fields share `(kind, scope)`
|
|
306
|
+
// and aggregate — at which point throwing beats silent truncation
|
|
307
|
+
// (truncation would either reject valid writes or hide live targets).
|
|
308
|
+
//
|
|
309
|
+
// Returns `LookupResult[]` rather than just live ids so the validator
|
|
310
|
+
// can read `cached` for the cached-object normalize step. Callers that
|
|
311
|
+
// only care about presence build a `Set` from the row ids.
|
|
312
|
+
async function fetchLiveRows(ctx, registered, scope, ids, callsite) {
|
|
313
|
+
if (ids.size > MAX_REFERENCE_GROUP_BATCH) {
|
|
314
|
+
throw MetaReferenceError.batchSizeExceeded(callsite, ids.size, MAX_REFERENCE_GROUP_BATCH);
|
|
315
|
+
}
|
|
316
|
+
const idList = [...ids];
|
|
317
|
+
return registered.adapter.list(ctx, {
|
|
318
|
+
ids: idList,
|
|
319
|
+
scope,
|
|
320
|
+
limit: idList.length,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
// Defensive upper bound on multi-reference array length, applied
|
|
324
|
+
// per-field before grouping. Even with the batched `list({ ids })`
|
|
325
|
+
// path, an unbounded array still pulls 10k rows in one query — the
|
|
326
|
+
// cap protects the wire / response size. 100 covers any realistic
|
|
327
|
+
// multi-reference field (authors, tags, related entries); fields
|
|
328
|
+
// can declare a lower `max` and the validator picks the smaller.
|
|
329
|
+
const HARD_MULTI_REFERENCE_LIMIT = 100;
|
|
330
|
+
// Validates the wire shape of a reference value and returns the ids
|
|
331
|
+
// to feed into the group's batched `list({ ids })` call. Four shapes
|
|
332
|
+
// are accepted, dispatching on `target.multiple` + `target.valueShape`:
|
|
333
|
+
//
|
|
334
|
+
// - multi=true, valueShape="id" (default): string[] of non-empty ids
|
|
335
|
+
// - multi=true, valueShape="object": `{ id }[]` — each item a
|
|
336
|
+
// cached-object reference
|
|
337
|
+
// (or bare strings for
|
|
338
|
+
// leniency on first write)
|
|
339
|
+
// - multi=false, valueShape="id" (default): bare string id
|
|
340
|
+
// - multi=false, valueShape="object": `{ id: string, ... }`
|
|
341
|
+
// (or a bare string for
|
|
342
|
+
// leniency on first write)
|
|
343
|
+
function referenceIdsForValidation(key, value, target, max) {
|
|
344
|
+
if (target.multiple) {
|
|
345
|
+
if (!Array.isArray(value)) {
|
|
346
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
347
|
+
}
|
|
348
|
+
if (value.length > HARD_MULTI_REFERENCE_LIMIT) {
|
|
349
|
+
throw MetaSanitizationError.valueTooLarge({ key });
|
|
350
|
+
}
|
|
351
|
+
if (max !== undefined && value.length > max) {
|
|
352
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
353
|
+
}
|
|
354
|
+
if (target.valueShape === "object") {
|
|
355
|
+
// Lenient on input: each item can be `"42"` (first-write
|
|
356
|
+
// convenience) or `{ id: "42", ... }`. Always rewritten to the
|
|
357
|
+
// canonical `{ id, ...cached }` shape after the live-id check.
|
|
358
|
+
const ids = [];
|
|
359
|
+
for (const item of value) {
|
|
360
|
+
if (typeof item === "string" && item !== "") {
|
|
361
|
+
ids.push(item);
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
const id = extractStringId(item);
|
|
365
|
+
if (id !== null && id !== "") {
|
|
366
|
+
ids.push(id);
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
370
|
+
}
|
|
371
|
+
return ids;
|
|
372
|
+
}
|
|
373
|
+
for (const item of value) {
|
|
374
|
+
if (typeof item !== "string" || item === "") {
|
|
375
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return value;
|
|
379
|
+
}
|
|
380
|
+
if (target.valueShape === "object") {
|
|
381
|
+
// Lenient on input: accept either `"42"` (first-write convenience)
|
|
382
|
+
// or `{ id: "42", ... }`. Always rewritten to the canonical
|
|
383
|
+
// `{ id, ...cached }` shape after the live-id check.
|
|
384
|
+
if (typeof value === "string" && value !== "")
|
|
385
|
+
return [value];
|
|
386
|
+
const id = extractStringId(value);
|
|
387
|
+
if (id !== null && id !== "")
|
|
388
|
+
return [id];
|
|
389
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
390
|
+
}
|
|
391
|
+
if (typeof value !== "string") {
|
|
392
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
393
|
+
}
|
|
394
|
+
return [value];
|
|
395
|
+
}
|
|
396
|
+
// Returns the `id` string of a `{ id: string, ... }` object, or null
|
|
397
|
+
// for any other shape (string, array, null, primitive, missing key).
|
|
398
|
+
function extractStringId(value) {
|
|
399
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
400
|
+
return null;
|
|
401
|
+
}
|
|
402
|
+
const id = value.id;
|
|
403
|
+
return typeof id === "string" ? id : null;
|
|
404
|
+
}
|
|
405
|
+
function fieldMax(field) {
|
|
406
|
+
return field?.max;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* RPC-shaped wrapper around `validateMetaReferences` — same envelope
|
|
410
|
+
* translation as `sanitizeMetaForRpc`. Procedures call this right
|
|
411
|
+
* after `sanitizeMetaForRpc` so reference validation rides on the
|
|
412
|
+
* same `meta_invalid_value` error surface authors already match on.
|
|
413
|
+
*/
|
|
414
|
+
export async function validateMetaReferencesForRpc(ctx, findField, patch, errors) {
|
|
415
|
+
try {
|
|
416
|
+
await validateMetaReferences(ctx, findField, patch);
|
|
417
|
+
}
|
|
418
|
+
catch (error) {
|
|
419
|
+
if (error instanceof MetaSanitizationError) {
|
|
420
|
+
throw errors.CONFLICT({
|
|
421
|
+
data: { reason: `meta_${error.reason}`, key: error.key },
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
throw error;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Yield every reference-field occurrence in a decoded meta bag: top-level
|
|
429
|
+
* reference fields, plus reference subFields inside each repeater row. One
|
|
430
|
+
* structural walk so the orphan-strip pass doesn't reinline the
|
|
431
|
+
* top-level/repeater traversal twice.
|
|
432
|
+
*/
|
|
433
|
+
function* referenceOccurrences(entries, findField) {
|
|
434
|
+
for (const [key, value] of entries) {
|
|
435
|
+
const field = findField(key);
|
|
436
|
+
const target = referenceTargetOf(field);
|
|
437
|
+
if (target) {
|
|
438
|
+
yield { key, target, value };
|
|
439
|
+
continue;
|
|
440
|
+
}
|
|
441
|
+
if (!isRepeaterField(field))
|
|
442
|
+
continue;
|
|
443
|
+
if (!Array.isArray(value))
|
|
444
|
+
continue;
|
|
445
|
+
for (const [rowIdx, row] of value.entries()) {
|
|
446
|
+
if (!row || typeof row !== "object" || Array.isArray(row))
|
|
447
|
+
continue;
|
|
448
|
+
const rowObj = row;
|
|
449
|
+
for (const subField of field.subFields) {
|
|
450
|
+
const subTarget = referenceTargetOf(subField);
|
|
451
|
+
if (!subTarget)
|
|
452
|
+
continue;
|
|
453
|
+
yield {
|
|
454
|
+
key,
|
|
455
|
+
target: subTarget,
|
|
456
|
+
value: rowObj[subField.key],
|
|
457
|
+
nested: { rowIdx, subKey: subField.key },
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
export async function filterMetaOrphans(ctx, findField, decoded) {
|
|
464
|
+
const candidates = [];
|
|
465
|
+
const groups = new Map();
|
|
466
|
+
// Top-level refs and repeater-row subField refs get identical orphan-strip
|
|
467
|
+
// treatment, so the single `referenceOccurrences` walk feeds both. Nested
|
|
468
|
+
// candidates carry their `rowIdx`/`subKey`; Pass 3 rewrites the row slot in
|
|
469
|
+
// a per-key clone so the caller's `decoded` bag stays untouched.
|
|
470
|
+
for (const occ of referenceOccurrences(Object.entries(decoded), findField)) {
|
|
471
|
+
const registered = ctx.plugins.lookupAdapters.get(occ.target.kind);
|
|
472
|
+
if (!registered)
|
|
473
|
+
continue;
|
|
474
|
+
const ids = orphanCandidateIds(occ.target, occ.value);
|
|
475
|
+
if (ids === null)
|
|
476
|
+
continue; // non-array multi / non-string single — leave untouched
|
|
477
|
+
const groupKey = referenceGroupKey(occ.target);
|
|
478
|
+
candidates.push({
|
|
479
|
+
key: occ.key,
|
|
480
|
+
multiple: occ.target.multiple === true,
|
|
481
|
+
valueShape: occ.target.valueShape ?? "id",
|
|
482
|
+
groupKey,
|
|
483
|
+
ids,
|
|
484
|
+
nested: occ.nested,
|
|
485
|
+
});
|
|
486
|
+
if (ids.length === 0)
|
|
487
|
+
continue;
|
|
488
|
+
let group = groups.get(groupKey);
|
|
489
|
+
if (!group) {
|
|
490
|
+
group = { registered, scope: occ.target.scope, ids: new Set() };
|
|
491
|
+
groups.set(groupKey, group);
|
|
492
|
+
}
|
|
493
|
+
for (const id of ids)
|
|
494
|
+
group.ids.add(id);
|
|
495
|
+
}
|
|
496
|
+
// Pass 2: one `list({ ids })` per group, keyed for O(1) apply lookup.
|
|
497
|
+
const liveIdsByGroup = new Map();
|
|
498
|
+
for (const [groupKey, group] of groups) {
|
|
499
|
+
const rows = await fetchLiveRows(ctx, group.registered, group.scope, group.ids, "filterMetaOrphans");
|
|
500
|
+
liveIdsByGroup.set(groupKey, new Set(rows.map((row) => row.id)));
|
|
501
|
+
}
|
|
502
|
+
// Pass 3: apply the filter. Orphan handling differs by shape:
|
|
503
|
+
// - multi + id: filter the string[] in place, dropping missing
|
|
504
|
+
// - multi + object: filter the object[] preserving order
|
|
505
|
+
// - single + id: null on missing
|
|
506
|
+
// - single + object: null on missing; otherwise keep the stored
|
|
507
|
+
// cached value as-is (no read-time refresh — write rewrites)
|
|
508
|
+
// Nested-in-repeater candidates rewrite the row's subField slot in
|
|
509
|
+
// a per-key cloned array so the input bag stays untouched.
|
|
510
|
+
const out = { ...decoded };
|
|
511
|
+
const empty = new Set();
|
|
512
|
+
for (const candidate of candidates) {
|
|
513
|
+
const { key, multiple, valueShape, groupKey, ids, nested } = candidate;
|
|
514
|
+
const liveIds = liveIdsByGroup.get(groupKey) ?? empty;
|
|
515
|
+
if (nested !== undefined) {
|
|
516
|
+
const rowObj = takeWritableRow(out, decoded, key, nested.rowIdx);
|
|
517
|
+
if (!rowObj)
|
|
518
|
+
continue;
|
|
519
|
+
applyOrphanToSlot(rowObj, nested.subKey, multiple, valueShape, ids, liveIds);
|
|
520
|
+
continue;
|
|
521
|
+
}
|
|
522
|
+
if (multiple) {
|
|
523
|
+
if (valueShape === "object") {
|
|
524
|
+
const stored = decoded[key];
|
|
525
|
+
out[key] = stored.filter((item) => {
|
|
526
|
+
const id = extractStringId(item);
|
|
527
|
+
return id !== null && liveIds.has(id);
|
|
528
|
+
});
|
|
529
|
+
continue;
|
|
530
|
+
}
|
|
531
|
+
out[key] = ids.filter((id) => liveIds.has(id));
|
|
532
|
+
continue;
|
|
533
|
+
}
|
|
534
|
+
const [singleId] = ids;
|
|
535
|
+
if (singleId === undefined)
|
|
536
|
+
continue; // single non-string already filtered upstream
|
|
537
|
+
if (!liveIds.has(singleId))
|
|
538
|
+
out[key] = null;
|
|
539
|
+
}
|
|
540
|
+
return out;
|
|
541
|
+
}
|
|
542
|
+
function takeWritableRow(out, decoded, key, rowIdx) {
|
|
543
|
+
// Lazily clone the rows array (and the targeted row inside it) on
|
|
544
|
+
// first nested write so the caller's `decoded` bag stays untouched.
|
|
545
|
+
// Subsequent nested writes hit the same cloned array.
|
|
546
|
+
let arr = out[key];
|
|
547
|
+
if (arr === decoded[key]) {
|
|
548
|
+
if (!Array.isArray(arr))
|
|
549
|
+
return null;
|
|
550
|
+
const cloned = arr.map((row) => row && typeof row === "object" && !Array.isArray(row)
|
|
551
|
+
? { ...row }
|
|
552
|
+
: row);
|
|
553
|
+
out[key] = cloned;
|
|
554
|
+
arr = cloned;
|
|
555
|
+
}
|
|
556
|
+
if (!Array.isArray(arr))
|
|
557
|
+
return null;
|
|
558
|
+
const row = arr[rowIdx];
|
|
559
|
+
if (!row || typeof row !== "object" || Array.isArray(row))
|
|
560
|
+
return null;
|
|
561
|
+
return row;
|
|
562
|
+
}
|
|
563
|
+
function applyOrphanToSlot(rowObj, subKey, multiple, valueShape, ids, liveIds) {
|
|
564
|
+
if (multiple) {
|
|
565
|
+
if (valueShape === "object") {
|
|
566
|
+
const stored = rowObj[subKey];
|
|
567
|
+
rowObj[subKey] = stored.filter((item) => {
|
|
568
|
+
const id = extractStringId(item);
|
|
569
|
+
return id !== null && liveIds.has(id);
|
|
570
|
+
});
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
rowObj[subKey] = ids.filter((id) => liveIds.has(id));
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
const [singleId] = ids;
|
|
577
|
+
if (singleId === undefined)
|
|
578
|
+
return;
|
|
579
|
+
if (!liveIds.has(singleId))
|
|
580
|
+
rowObj[subKey] = null;
|
|
581
|
+
}
|
|
582
|
+
// Returns `null` to mean "no candidates from this key" (skip), or
|
|
583
|
+
// the ids to feed into the group's batch query. Mirrors the storage-
|
|
584
|
+
// shape guards in the apply step so we don't enqueue work that's
|
|
585
|
+
// going to be skipped. Cached-object values (`valueShape === "object"`)
|
|
586
|
+
// extract `id` from the object — the rest of the cached fields are
|
|
587
|
+
// trusted on read (refresh happens on next write via the validator's
|
|
588
|
+
// normalize step, not on every render).
|
|
589
|
+
function orphanCandidateIds(target, value) {
|
|
590
|
+
if (target.multiple) {
|
|
591
|
+
if (!Array.isArray(value))
|
|
592
|
+
return null;
|
|
593
|
+
if (target.valueShape === "object") {
|
|
594
|
+
const ids = [];
|
|
595
|
+
for (const item of value) {
|
|
596
|
+
const id = extractStringId(item);
|
|
597
|
+
if (id !== null)
|
|
598
|
+
ids.push(id);
|
|
599
|
+
}
|
|
600
|
+
return ids;
|
|
601
|
+
}
|
|
602
|
+
return value.filter((id) => typeof id === "string");
|
|
603
|
+
}
|
|
604
|
+
if (target.valueShape === "object") {
|
|
605
|
+
const id = extractStringId(value);
|
|
606
|
+
return id !== null ? [id] : null;
|
|
607
|
+
}
|
|
608
|
+
return typeof value === "string" ? [value] : null;
|
|
609
|
+
}
|
|
610
|
+
function referenceTargetOf(field) {
|
|
611
|
+
if (!field)
|
|
612
|
+
return undefined;
|
|
613
|
+
return field
|
|
614
|
+
.referenceTarget;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Decode a raw meta bag (as returned by drizzle's JSON-mode column)
|
|
618
|
+
* into the plugin-typed shape RPC consumers expect. Unregistered keys
|
|
619
|
+
* pass through untouched — the row exists in the DB but the plugin
|
|
620
|
+
* that wrote it is no longer installed; we don't pretend to know its
|
|
621
|
+
* shape.
|
|
622
|
+
*/
|
|
623
|
+
export function decodeMetaBag(findField, raw) {
|
|
624
|
+
if (!raw)
|
|
625
|
+
return {};
|
|
626
|
+
const out = {};
|
|
627
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
628
|
+
const field = findField(key);
|
|
629
|
+
out[key] = field ? coerceOnRead(field.type, value) : value;
|
|
630
|
+
}
|
|
631
|
+
return out;
|
|
632
|
+
}
|
|
633
|
+
export function isEmptyMetaPatch(patch) {
|
|
634
|
+
return (patch === null || (patch.upserts.size === 0 && patch.deletes.length === 0));
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Merge a validated patch into the given `meta` JSON column for the
|
|
638
|
+
* row identified by `idColumn = id`. Uses SQLite `json_set` /
|
|
639
|
+
* `json_remove` so concurrent updaters touching disjoint keys don't
|
|
640
|
+
* clobber each other at the row level. Deletes nest inside sets so a
|
|
641
|
+
* caller clearing + re-setting the same key in one request behaves
|
|
642
|
+
* predictably.
|
|
643
|
+
*/
|
|
644
|
+
export async function applyMetaPatch(ctx, table, idColumn, id, patch) {
|
|
645
|
+
if (isEmptyMetaPatch(patch))
|
|
646
|
+
return;
|
|
647
|
+
let expr = sql `${table.meta}`;
|
|
648
|
+
if (patch.deletes.length > 0) {
|
|
649
|
+
const paths = patch.deletes.map((k) => sql `${metaJsonPath(k)}`);
|
|
650
|
+
expr = sql `json_remove(${expr}, ${sql.join(paths, sql `, `)})`;
|
|
651
|
+
}
|
|
652
|
+
if (patch.upserts.size > 0) {
|
|
653
|
+
const pairs = Array.from(patch.upserts, ([key, value]) => sql `${metaJsonPath(key)}, json(${JSON.stringify(value)})`);
|
|
654
|
+
expr = sql `json_set(${expr}, ${sql.join(pairs, sql `, `)})`;
|
|
655
|
+
}
|
|
656
|
+
await ctx.db
|
|
657
|
+
// drizzle's `update(table)` wants an `AnyTable` shape; our generic
|
|
658
|
+
// constraint only pins `meta`, so the update helper accepts any
|
|
659
|
+
// sqlite table via structural matching. Cast keeps the helper
|
|
660
|
+
// reusable across tables without widening the public types.
|
|
661
|
+
.update(table)
|
|
662
|
+
.set({ meta: expr })
|
|
663
|
+
.where(eq(idColumn, id));
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Load + decode the full meta bag for a single row. Returns empty
|
|
667
|
+
* when the row is missing (deleted mid-flight) or has no saved meta.
|
|
668
|
+
*/
|
|
669
|
+
export async function loadMeta(ctx, table, idColumn, id, findField) {
|
|
670
|
+
const [row] = (await ctx.db
|
|
671
|
+
.select({ meta: table.meta })
|
|
672
|
+
.from(table)
|
|
673
|
+
.where(eq(idColumn, id)));
|
|
674
|
+
return decodeMetaBag(findField, row?.meta);
|
|
675
|
+
}
|
|
676
|
+
// --- internals below ---------------------------------------------------
|
|
677
|
+
function coerceToType(type, key, value) {
|
|
678
|
+
switch (type) {
|
|
679
|
+
case "string":
|
|
680
|
+
return coerceString(key, value);
|
|
681
|
+
case "number":
|
|
682
|
+
return coerceNumber(key, value);
|
|
683
|
+
case "boolean":
|
|
684
|
+
return coerceBoolean(key, value);
|
|
685
|
+
case "json":
|
|
686
|
+
return coerceJson(key, value);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
function coerceString(key, value) {
|
|
690
|
+
if (typeof value === "string")
|
|
691
|
+
return value;
|
|
692
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
693
|
+
return String(value);
|
|
694
|
+
if (typeof value === "boolean")
|
|
695
|
+
return String(value);
|
|
696
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
697
|
+
}
|
|
698
|
+
function coerceNumber(key, value) {
|
|
699
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
700
|
+
return value;
|
|
701
|
+
if (typeof value === "string") {
|
|
702
|
+
// Empty string comes from cleared form inputs; the admin dispatcher
|
|
703
|
+
// already sends `null` for those, but a direct RPC caller might send
|
|
704
|
+
// "" — reject here so we don't silently coerce to 0 (`Number("") === 0`).
|
|
705
|
+
if (value.trim() === "") {
|
|
706
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
707
|
+
}
|
|
708
|
+
const parsed = Number(value);
|
|
709
|
+
if (Number.isFinite(parsed))
|
|
710
|
+
return parsed;
|
|
711
|
+
}
|
|
712
|
+
if (typeof value === "boolean")
|
|
713
|
+
return value ? 1 : 0;
|
|
714
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
715
|
+
}
|
|
716
|
+
function coerceBoolean(key, value) {
|
|
717
|
+
if (typeof value === "boolean")
|
|
718
|
+
return value;
|
|
719
|
+
if (value === 1 || value === "1" || value === "true")
|
|
720
|
+
return true;
|
|
721
|
+
if (value === 0 || value === "0" || value === "false")
|
|
722
|
+
return false;
|
|
723
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
724
|
+
}
|
|
725
|
+
function coerceJson(key, value) {
|
|
726
|
+
// json keys take anything round-trippable through JSON.stringify —
|
|
727
|
+
// we reject values that throw (BigInt) or silently drop (functions,
|
|
728
|
+
// Symbols) so reads don't hand back `undefined` for something a
|
|
729
|
+
// plugin thought it stored. TS types JSON.stringify as always-
|
|
730
|
+
// string, but at runtime it returns `undefined` for unserializable
|
|
731
|
+
// inputs — hence the cast.
|
|
732
|
+
try {
|
|
733
|
+
const encoded = JSON.stringify(value);
|
|
734
|
+
if (encoded === undefined) {
|
|
735
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
736
|
+
}
|
|
737
|
+
return JSON.parse(encoded);
|
|
738
|
+
}
|
|
739
|
+
catch {
|
|
740
|
+
throw MetaSanitizationError.invalidValue({ key });
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
function assertEncodedSize(key, value) {
|
|
744
|
+
const encoded = JSON.stringify(value);
|
|
745
|
+
if (encoded === undefined)
|
|
746
|
+
return; // already caught in coerceJson
|
|
747
|
+
const byteLength = new TextEncoder().encode(encoded).length;
|
|
748
|
+
if (byteLength > MAX_META_VALUE_BYTES) {
|
|
749
|
+
throw MetaSanitizationError.valueTooLarge({ key });
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
// Mirror the write-side accepted tokens instead of `Boolean(value)` — the
|
|
753
|
+
// latter would flip `"false"` → `true`, silently inverting rows persisted
|
|
754
|
+
// via `type: "json"` before a plugin tightened the field to `boolean`.
|
|
755
|
+
const TRUTHY_BOOLEAN_TOKENS = new Set([1, "1", "true"]);
|
|
756
|
+
const FALSY_BOOLEAN_TOKENS = new Set([0, "0", "false"]);
|
|
757
|
+
function coerceBooleanOnRead(value) {
|
|
758
|
+
if (typeof value === "boolean")
|
|
759
|
+
return value;
|
|
760
|
+
if (TRUTHY_BOOLEAN_TOKENS.has(value))
|
|
761
|
+
return true;
|
|
762
|
+
if (FALSY_BOOLEAN_TOKENS.has(value))
|
|
763
|
+
return false;
|
|
764
|
+
return value;
|
|
765
|
+
}
|
|
766
|
+
function coerceOnRead(type, value) {
|
|
767
|
+
// Reads are forgiving — the row was validated on write but a
|
|
768
|
+
// schema change (e.g. a plugin flipping `number` → `string`)
|
|
769
|
+
// shouldn't 500 the editor. We coerce when we can and fall through
|
|
770
|
+
// to the raw value otherwise.
|
|
771
|
+
switch (type) {
|
|
772
|
+
case "string":
|
|
773
|
+
return typeof value === "string" ? value : String(value);
|
|
774
|
+
case "number":
|
|
775
|
+
return typeof value === "number" ? value : Number(value);
|
|
776
|
+
case "boolean":
|
|
777
|
+
return coerceBooleanOnRead(value);
|
|
778
|
+
case "json":
|
|
779
|
+
return value;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
// SQLite's JSON path `$.label` only accepts `[A-Za-z0-9_]` in unquoted
|
|
783
|
+
// labels, but valid meta keys may include `-` or `:` (see the input
|
|
784
|
+
// schema regex). The double-quoted label form `$."foo-bar"` handles
|
|
785
|
+
// them; the RPC input schema already rejects `"` and `\`, but belt-and-
|
|
786
|
+
// braces matters here because non-RPC callers (tests, hook listeners,
|
|
787
|
+
// future surfaces) could bypass that schema and trigger SQL injection
|
|
788
|
+
// via a crafted path.
|
|
789
|
+
function metaJsonPath(key) {
|
|
790
|
+
if (/["\\]/.test(key)) {
|
|
791
|
+
throw MetaReferenceError.metaKeyForbiddenChars(key);
|
|
792
|
+
}
|
|
793
|
+
return `$."${key}"`;
|
|
794
|
+
}
|
|
795
|
+
//# sourceMappingURL=core.js.map
|