Releases: zazuko/trifid
[email protected]
Patch Changes
- 195cb7b: Bump import-meta-resolve from 2.2.2 to 4.0.0
[email protected]
[email protected]
Major Changes
-
4b515f8: Use 'plugins' instead of 'middlewares'
-
0eaf2b7: Completely change the way it is working.
Instead of being an handler that is made to be called only when dereferencing, it is now a Trifid plugin that is exposing a new endpoint
/query
(for example) that can be used to perform SPARQL queries against the dataset.This means that it is now possible to perform SPARQL queries against a dataset that is loaded from a URL, which was not possible before.
This also means that it is possible to use all other Trifid plugins that were only working with a SPARQL endpoint and not with a dataset coming from a simple file.Please take a look on how to use it in the documentation here: https://github.com/zazuko/trifid/tree/main/packages/handler-fetch#readme
-
293d7e6: The plugin is now using the new Trifid factory, which is a breaking change.
Patch Changes
[email protected]
Major Changes
-
849fa3d: Health check is now exposed at
/healthz
instead of/health
-
4b515f8: Use 'plugins' instead of 'middlewares'
-
849fa3d: Trifid Plugins should return an object:
/** @type {import('trifid-core/types/index.js').TrifidPlugin} */ const factory = async (trifid) => { return { defaultConfiguration: async () => { return { methods: ["GET"], paths: ["/hello"], // ... }; }, routeHandler: async () => { /** * Route handler. * @param {import('fastify').FastifyRequest} _request Request. * @param {import('fastify').FastifyReply} reply Reply. */ const handler = async (_request, reply) => { reply.send("Hello, world!"); }; return handler; }, }; }; export default factory;
The factory should also be a promise.
Previously, the factory was a function that returned an Express middleware.
Since the move to Fastify, we are now returning an object with two methods:defaultConfiguration
androuteHandler
.
TherouteHandler
method should return a route handler function.
ThedefaultConfiguration
method should return the default configuration for the plugin.
This allows the user to use the plugin with the default configuration or to override it.
This can be useful to simplify the Trifid configuration files. -
d9963cd: Remove the
rewrite
middleware
Minor Changes
- a454dbb: Expose a
query
function that can be used in all plugins to perform a SPARQL query - 1dd9ae7: Allow listening on a random port by using port
0
.
Patch Changes
@zazuko/[email protected]
Major Changes
- b38cbc5: The plugin is now using the new Trifid factory, which is a breaking change.
- 4b515f8: Use 'plugins' instead of 'middlewares'
- b38cbc5: The plugin was completely restructured to remove extra complexity.
Patch Changes
@zazuko/[email protected]
@zazuko/[email protected]
Major Changes
- 4b515f8: Use 'plugins' instead of 'middlewares'
- eedaa53: The plugin is now using the new Trifid factory, which is a breaking change.
Minor Changes
- 0c53ff7: The SPARQL query that is made to get all datasets is now querying all graphs by default
Patch Changes
- 69d6ad0: Improve included TypeScript types.
@zazuko/[email protected]
Patch Changes
- 777bc01: Force the
text/html
content-type