@alterior/command-line
Advanced tools
Changelog
v3.13.0
@/command-line
CommandLineProcesser.process()
now obeys promises returned from run()
methods, so that lifecycle can be
observed and code can reliably run after they all have completed.Changelog
🚀 3.0.0-rc.5
@alterior/express
and @alterior/fastify
. As part of this,
you must now import @alterior/express
or @alterior/fastify
and specify it as the web server engine from this
version on. For example:
// main.ts
import { WebServerEngine } from '@alterior/web-server';
import { ExpressEngine } from '@alterior/express';
WebServerEngine.default = ExpressEngine;
Alternatively you can specify an engine via dependency injection:
@WebService({
providers: [
{ provide: WebServerEngine, useClass: ExpressEngine }
]
})
export class MyService {
// ...
}
This change reduces the complexity of Alterior's dependency tree by ensuring that excess web server dependencies
will not be present (ie fastify on an express app or express on a fastify app). It also fixes an issue where Alterior
users were required to install a lot of Express-related @types/*
packages to avoid Typescript errors during
development.@/annotations
@NgMetadataName()
and related Angular compatibility features have been entirely removed. They do not work with
newer versions of Angular. The recommended way to use Alterior with Angular is via @alterior/platform-angular
@/runtime
--self-test
option no longer starts the application (so the OnStart
lifecycle method does not execute)@/web-server
boolean
values on input parameters (ie @QueryParam()
) when a parameter annotated with boolean
type is used. The values ''
, 'no'
, '0'
, 'false'
, and 'off'
produce false
, all other values produce true
.Date
values on input parameters (ie @QueryParam
et al) when a parameter annotated with Date
type is used. Any string value that produces a valid Date
object via new Date(str)
will be accepted, otherwise a
400 Bad Request
will be returned without executing the route method. Caution: Because this accepts values in milliseconds (not seconds), it is not suitable for receiving UNIX timestamps.X-Trace
or so). Not enabled by
default. Use requestIdHeader
option when configuring the web server to enable this functionality.engine
option from WebServerOptions
. Either set WebServerEngine.default
or provide
WebServerEngine
as a dependency to specify the web engine. See above for details.@QueryParam()
no longer requires the name
parameter. Similar to the offer input decorators, @QueryParam()
already supported auto-detecting name
, this just adjusts the function signature to match the behavior.CertificateGenerator
is now properly exported for external use204 No Content
, provided the headers have not already
been sent, and the status code selected by the end of the request is 200 OK
. If you need to return an empty body
with status 200 OK
instead of 204 No Content
, call WebEvent.response.end()
before completing the request.