Repository navigation
Releases: crate-works/arocapi
Releases · crate-works/arocapi
Release list
v5.0.0-beta.8
v5.0.0-beta.7
5.0.0-beta.7 (2026-10-21)
⚠ BREAKING CHANGES
fileHandlerandroCrateHandlerare replaced by the
requiredstorageoption:fileHandlerbecomesstorage.contentand
roCrateHandlerbecomesstorage.metadata. Each half is a single function
replacing the separateheadandget, and returnsnullwhere a handler
returnedfalse. Thefileresult is now apathdelivery, andaccelPath
(X-Accel-Redirect) is gone. TheFileHandler,RoCrateHandler,
GetFileHandler,HeadFileHandler,GetRoCrateHandler,HeadRoCrateHandler,
FileResult,FileRedirectResult,FileStreamResult,FilePathResultand
FileMetadataexports are removed.arocapi/opensearchandarocapi/postgresare removed
with no aliases. ImportOpenSearchBackendfromarocapi/search/opensearch
andPostgresBackendfromarocapi/search/postgresinstead.
Features
- deliver Metadata and Content through a StorageBackend (a2544d0)
- move search backends to arocapi/search/* subpaths (60a8457)
- resolve OCFL standard storage layouts 0002, 0003 and 0004 in OcflStorage (7087bf5), closes #129
- serve Metadata and Content from S3 with S3Storage (d7f8adb)
- serve Metadata from Entity.meta with EntityMetaMetadata (453e4bb)
- serve OCFL storage roots on LDaCA's layout with OcflStorage (b1729ad)
v5.0.0-beta.6
5.0.0-beta.6 (2026-10-21)
⚠ BREAKING CHANGES
- consumers must install fastify ^5.12.7 themselves.
- import OpenSearchBackend from 'arocapi/opensearch' and
PostgresBackend from 'arocapi/postgres' instead of 'arocapi'. Consumers
of OpenSearchBackend must install @opensearch-project/opensearch. searchVisibilityFilterOpenSearch query → the shared
search visibility filter language (SearchVisibilityWhere).- the
opensearch,queryBuilderClassand
queryBuilderOptionsoptions are removed; pass
search: OpenSearchBackend({ client, fields })instead, declaring your
search fields and creating the index withcreateIndex(). The
OpensearchQueryBuilderexport and itsQueryBuilderOptions,
FilterCapability,FacetCapabilityandSearchCapabilitytypes are
removed; use field declarations,BackendSearchCapabilityand
capabilitiesFromFields, or write your ownSearchBackend. POST /searchonly accepts the filter keys and sorts
the backend declares; the fixedid,name,createdAtand
updatedAtsorts are replaced by declaredsortfields. Facets are
keyed by field name and present for every declared facet, and
searchExtrais whatever the backend returns.GET /capabilitiesreportsapiVersion0.5.0, adding
search.sorts,search.searchTypesandsearch.geo.- arocapi requires PostgreSQL 18 or later; MySQL and
MariaDB are no longer supported. Consumers must switch their Prisma
datasource to postgresql and use @prisma/adapter-pg. MySQL users stay on
4.x. - @prisma/client 6 is no longer supported; upgrade to 7.10 or later.
- comma-separated entityType values on GET /entities are
no longer split. Repeat the parameter for each type instead:
?entityType=A&entityType=B.
Features
- add field declarations and OpenSearchBackend indexing (06ec6d0)
- add the EntitySearch model and PostgresBackend indexing (4b3a80a)
- advanced queries on PostgresBackend (b3bc5bb)
- export checkSearchVisibility and VisibilityCondition for custom backends (f878471)
- export search backends from arocapi/opensearch and arocapi/postgres (5a86ece)
- make fastify a peer dependency (0973892)
- parse advanced queries into a tree for the search backend (65ef05a), closes #102
- range filters, year date facets, geo and highlights (d2a21b1)
- ranges, date facets and geo on PostgresBackend (3c4f235), closes #107
- refresh option on OpenSearchBackend, default false (32fdfea)
- run on Postgres 18 only (72b1947)
- search through a SearchBackend (0eccedf)
- search visibility filter language (07fef2d)
- search with PostgresBackend (70f87d4)
Bug Fixes
- accept repeated entityType parameters on GET /entities (596f272), closes #42
- declare the supported Node.js version (6ca7cb1)
- harden search visibility checking and cap geohash grids (d050c9e)
- reject a prisma option that isn't a Prisma 7 client with the arocapi models (f767660)
- require Prisma 7 as the @prisma/client peer (089d4bc)
- search edge cases across the route and both backends (2e924ef)
- ship only the library in the package (651cd84)
- ship the generated Prisma declarations and type the prisma option structurally (2f29088), closes #92
v5.0.0-beta.5
v5.0.0-beta.4
v5.0.0-beta.3
5.0.0-beta.3 (2026-10-16)
⚠ BREAKING CHANGES
- accessTransformer and fileAccessTransformer are replaced
byaccess: (entity: BaseEntity, context) => { metadata, content, metadataAuthorizationUrl?, contentAuthorizationUrl? }. A file's access is
its file entity's access. Replace AllPublicAccessTransformer and
AllPublicFileAccessTransformer with AllPublicAccess. Requests a handler
used to serve while the access flag was false are now Denied before the
handler runs. - hiddenResponse is replaced by isAuthenticated(context) and
promptLoginForHidden. For the anonymous login prompt use
promptLoginForHidden: true with isAuthenticated; a hidden entity can no
longer get a 403. - TransformerContext and FileHandlerContext are replaced by
RequestContext, which has the same { request, fastify } shape. - POST /search answers malformed queries with 422
VALIDATION_ERROR instead of INVALID_REQUEST, and unexpected errors answer
{ error: { code: 'INTERNAL_ERROR', message: 'Internal server error' } }
instead of { error: 'Internal Server Error', message }. - entityVisibilityFilter and searchVisibilityFilter are now
required; use AllVisibleEntityFilter and AllVisibleSearchFilter to keep
every entity visible.
Features
- enforce access on Metadata and Content through one access function (d5688fa), closes #41
- export the error handler and error helpers (d85784f), closes #43
- hide entities with visibility filters (1e1f6de), closes #39
Bug Fixes
- don't crash the error handler on errors with a non-string code (fa51e02)
- keep error headers and status in the error handler (fca25bd)
- trust only safe 4xx errors and let routes rely on errorHandler (c8fcf46), closes #50
Code Refactoring
v5.0.0-beta.2
v5.0.0-beta.1
5.0.0-beta.1 (2026-10-12)
⚠ BREAKING CHANGES
-
arocapi no longer sets CORS headers and the
disableCorsoption is removed. To keep the previous behaviour, register
@fastify/cors on the root instance before arocapi:fastify.register(cors);
fastify.register(arocapi, options); -
GETandHEAD /entity/:id/rocratehave been renamed to
/entity/:id/metadata. Clients must use the new path; the old path now
returns 404. -
the
arocapi/expressentry point has been removed and
expressis no longer a dependency. To mount the API in Express, register
the plugin on a Fastify instance and forward requests with
fastify.routing(req, res); see "Using with Express" in the README.
Features
Bug Fixes
v4.0.1
v4.0.0
4.0.0 (2026-04-29)
⚠ BREAKING CHANGES
- arocapi no longer decorates fastify.prisma or
fastify.opensearch; consumers must close over their own client
references. Arocapi no longer calls
prisma.$connect()/$disconnect() or opensearch.ping()/close() —
consumers now own connecting before registration and closing on
shutdown.