angel3_production 10.2.0
angel3_production: ^10.2.0 copied to clipboard
Helpers for concurrency, message-passing, rotating loggers, and other production functionality in Angel3.
Change Log #
10.2.0 #
New in 10.2.0 #
- Environment:
Runnerruns its instances in production mode unlessANGEL_ENVis set (and not empty), so that a deployed app caches the routes of its requests without being told to; anAngelalone is still in development mode withoutANGEL_ENV.ANGEL_ENV=developmentruns them in development mode, as before.Runner.environmentgives the environment they run in. In production mode the routes are read once, when an instance starts: add them inconfigureServer
10.1.0 #
New in 10.1.0 #
- Mutual TLS:
--client-ca-fileasks each client for a certificate, which a handler reads asreq.clientCertificate, and trusts the CAs of the file to sign it, for--ssland--http2.--require-client-certificaterefuses a client that presents none.RunnerOptionstakes them asclientCaFileandrequireClientCertificate, and throws anArgumentErrorof aclientCaFilewithoutsslorhttp2, or ofrequireClientCertificatewithoutclientCaFile, whichrunreports as usage errors. Requiresangel3_framework10.2.0
Fixes in 10.1.0 #
- Docs: The README says to set
ANGEL_ENV=productionfor the runner, which does not set it, as instances are much slower without it - Docs: The README has a Metrics section: how to serve the metrics of each instance on a port of its own, for Prometheus, with
angel3_prometheus - Options:
RunnerOptionsthrows anArgumentErrorofsslorhttp2without acertificateFileand akeyFile, sospawnIsolaterefuses them asrundoes, where an instance failed to start
10.0.0 #
Breaking changes in 10.0.0 #
- Breaking: An instance that fails to start ends
runwith exit code 70, instead of leaving the runner up with nothing serving - Breaking:
InstanceInfo.idis a non-nullableint - Breaking:
Runner.isolateMainsends the runner's own messages onRunnerArgs.loggingSendPort, notLogRecords, and the instance it starts runs until the runner stops it. Start instances withrunorspawnIsolateinstead of spawningisolateMainwith a port of your own
New in 10.0.0 #
- Graceful shutdown on
SIGINT,SIGTERMandRunner.stop(): requests in progress finish and shutdown hooks run, withinshutdownTimeout, and the process exits as soon as the instances have closed. It closes the instances ofrunand ofspawnIsolatealike, andspawnIsolatecan start instances again afterwards. Called while no instance runs, it makes the nextrunreturn without starting instances, unlessspawnIsolatestarts one before. One signal closes everyrunin progress gracefully - Key and certificate passwords can come from the
ANGEL_KEY_PASSWORDandANGEL_CERTIFICATE_PASSWORDenvironment variables
Fixes in 10.0.0 #
- Logs: Each record is printed once, at its own level and with the time it was logged at, including records logged during
configureServer. The runner prints the records of every logger, so a listener thatconfigureServeradds to print them prints each one twice - Respawn: Crashed instances are respawned with a backoff from 1 s to 30 s, also when their isolate fails to spawn again, and no longer leak ports
- Arguments: An invalid
--portor--concurrencyis a usage error;--helpcomes before other checks - HTTP/2:
responseHeadersandremoveResponseHeadersapply with--http2as without it, to HTTP/2 requests and to the HTTP/1 requests it also serves: the added headers are defaults that a handler's own headers replace, and the removed values are removed from the defaults only. A list value is one header of its values, exceptSet-Cookie, whose values are sent one header each, before the cookies of the handler, so that one of these wins. Its HTTP/1 requests finish on shutdown removeResponseHeaders: A list value removes each of its values, where it removed nothing; a value matches exactly, or ignoring case if nothing matches exactly, such assameoriginfor theSAMEORIGINofdart:io, and anullvalue removes a header whatever its values, as withAngelHttp.removeResponseHeader- Docs: The README tells how to install and use the package, and how to migrate from 9.x
9.1.0 #
- Require Dart >= 3.13
9.0.0 #
- Require Dart >= 3.12
8.5.0 #
- Require Dart >= 3.8
- Updated
lintsto 6.0.0 - Updated dependencies to the latest release
8.4.1 #
- Updated
intlto 0.20.0
8.4.0 #
- Require Dart >= 3.6
- Updated
lintsto 5.0.0 - Updated dependencies to the latest release
8.3.0 #
- Require Dart >= 3.3
- Updated
lintsto 4.0.0
8.2.1 #
- Updated repository link
8.2.0 #
- Updated
lintsto 3.0.0 - Updated
intlto 0.19.0 - Fixed linter warnings
8.1.0 #
- Added optional
responseHeadersandremoveResponseHeaderstoRunner
8.0.0 #
- Require Dart >= 3.0
7.0.0 #
- Require Dart >= 2.17
6.0.0 #
- Require Dart >= 2.16
5.0.0 #
- Skipped release
4.0.0 #
- Skipped release
3.1.2 #
- Updated repo link
- Fixed null safety warnings
3.1.1 #
- Fixed license link
3.1.0 #
- Updated to use
belatuk_pub_subpackage
3.0.3 #
- Upgraded from
pendantictolintslinter
3.0.2 #
- Fixed NNBD issues
- Updated references to
angel3framework - Updated README
3.0.1 #
- Fixed static analysis warnings
3.0.0 #
- Migrated to support Dart >= 2.12 NNBD
2.0.0 #
- Migrated to work with Dart >= 2.12 Non NNBD
1.0.0 #
- Support SSL/HTTP2.
- Support muting the logger via
--quiet.
1.0.0-alpha.1 #
- Import
framework/http.
1.0.0-alpha #
- Initial version.