VexServerConfigInput
Defined in: packages/core/src/config/types.ts:463
Server-only configuration input passed to defineServerConfig(), layered
on top of an already-resolved VexClientConfig.
A field appears in this interface only if placing it on the client config
would break the client bundle: auth.adapter and storage.adapters are
the only two.
- VexClientConfig for the client half this layers onto
- VexConfig for the resolved return type
- defineServerConfig for the config function
Properties
Section titled “Properties”
optionalauth?:object
Defined in: packages/core/src/config/types.ts:473
Auth configuration — mirrors the storage group’s shape: the adapter
instance under .adapter. The group is optional, but adapter is
required WITHIN it: server.auth present guarantees an adapter, so no
consumer needs a nested existence check.
Omit the whole group for a project with no auth, or one that does not
want its client-declared authCollections verified.
adapter
Section titled “adapter”adapter:
VexAuthAdapter
Live auth adapter, constructed from the real server-side auth options
(e.g. better-auth/src!betterAuthAdapter from
@vexcms/better-auth).
Its collections are the source of truth: defineServerConfig()
compares them against the authCollections the client config declared
and throws when the two disagree, which is the only place that check
can run — the browser cannot evaluate these options.
- VexAuthAdapter for the adapter interface
- better-auth/src!betterAuthAdapter for the Better Auth implementation
storage?
Section titled “storage?”
optionalstorage?:object
Defined in: packages/core/src/config/types.ts:503
Storage configuration — server-side adapter instances only. Media
collections themselves are declared on the client config; adapters here
are consulted only to confirm every mediaCollection.meta.storageAdapter
resolves to a registered instance.
clientUploads is deliberately NOT accepted here. VexConfigProvider
mounts the CLIENT config, so an upload function supplied only on the
server config would exist server-side and never reach the browser —
the admin upload UI would silently have no uploader. The type forbids
the mistake instead of letting it fail at runtime.
adapters
Section titled “adapters”adapters:
StorageAdapterPresignedUrlInterface[]
Storage adapters configured for the project.
VexStorageAdapter for the adapter interface