Releases: predetermined/aqua
Releases · predetermined/aqua
v1.3.6
v1.3.5
v1.3.4
Requires at least Deno version 1.13
Updates
- Fixes a bug that caused root-level static file serving to not work (#93; thank you @felixfong227!)
v1.3.3
Requires at least Deno version 1.13
Updates
- The fallback handler now receives a second argument,
errorType
, so it's easier to determine why a route wasn't matched. You can find an example here.
export enum ErrorType {
NotFound,
SchemaMismatch,
ErrorThrownInResponseHandler,
}
- If an error occurs in a request handler, the error is now being returned as the route's content by default (can be changed with a custom fallback handler), instead of causing the application to break.
app.get("/error", (req) => {
throw new Error("test");
});
// The route now returns "Error: test"
- There is now support for more content return types (this also enables streaming).
type ResponseContent =
| Uint8Array
| Blob
| BufferSource
| FormData
| URLSearchParams
| ReadableStream<Uint8Array>
| string;
v1.3.2
Requires at least Deno version 1.13
Updates
- Support async schema validation functions
app.get("/", (_req) => "Hello, World!", {
schema: {
query: [
async (query) => {
return await isValidKey(query.key);
},
],
},
});
- Use more explicit context type for schema validation functions
schema: {
body: [
(body) => { // Record<string, Json>
return !!body.test;
},
],
query: [
(query) => { // Record<string, string>
return !!query.test;
},
],
},
v1.3.1
Requires at least Deno version 1.13
Updates
- Remove
render
example
v1.3.0
Requires at least Deno version 1.13
Updates
- Drop support for
std/http
(Discussion: #80) - Use the native
Deno.serveHttp
function- Change the
Request["raw"]
type
- Change the
- Remove the public
render
method on theAqua
class - Fix a bug where URL parameters would be set to undefined instead of the right value
- Set
Request["body"]
type toJson
- Add
conn
to theRequest
type (req.conn
) - Match user-facing
Response
type with the allowed return type of a response handler function
function test(_req: Request): Response {
return "test!"; // No response object required anymore
}
app.get("/", test);
- Match the fallback handler status code behavior when the
redirect
property is present to the one of the other request handlers
v1.2.4
Uses Deno Standard Modules v0.105.0
Updates
- Fix method mismatching for RegExp and parameter routes
v1.2.3
Uses Deno Standard Modules v0.102.0
Updates
- Use same exports for
deploy.ts
as in themod.ts
- Remove false sentence in README
v1.2.2
Uses Deno Standard Modules v0.102.0
Updates
- Fix typos