angel3_client 10.0.1
angel3_client: ^10.0.1 copied to clipboard
A browser, mobile and command line based client that supports querying Angel3 servers
Change Log #
10.0.1 #
Fixes in 10.0.1 #
- Browser: An app that imports
package:angel3_client/browser.dartcompiles to JavaScript, where dart2js failed withFunction converted via 'toJS' contains invalid types in its function signature(inauthenticateViaPopup)
10.0.0 #
Breaking changes in 10.0.0 #
- Breaking: The streams of the client, its services and
ServiceListare broadcast streams: events are not kept for later listeners, so memory no longer grows without bound, andclose()completes without listeners, where it never returned - Breaking: A REST service is a
Service<Id, Data>, soservice<String, Todo>()works, where only a nullable type such asTodo?did. Its methods returnDataand throw anAngelHttpExceptionon an error, also when its stream has a listener, where they returnednull - Breaking: Removed
belatuk_json_serializerand thetypeparameter ofservice(), which neededdart:mirrors. Pass adeserializerinstead, such asdeserializer: (x) => TodoSerializer.fromMap(x as Map); without one, a service returns the decoded JSON. Objects sent to the server are encoded withjsonEncode, which calls theirtoJson() - Breaking: Removed
RestService:Rest.service()returns aBaseAngelService, like the other clients - Breaking: An id is encoded as one segment of the URL path, so
read('a/b')requests/todos/a%2Fb, where it requested/todos/a/b, and an id starting with/no longer replaces the path of the service. An id is encoded as it is, so pass ids unencoded: an id the caller encoded, such asa%20b, is sent asa%2520band is the ida%20bon the server. An empty id,.and..throw anArgumentError, since they would be the URL of the service or be resolved away - Breaking: A list param is sent as one param per value, such as
?tag=a&tag=b, where it was sent as?tag=[a, b]. An empty list throws anArgumentError, since leaving it out would drop a filter. The query of the client's base URL, such as?key=x, is kept as it is when params are passed, where it was dropped
Fixes in 10.0.0 #
- Errors: A JSON body that is not an object no longer hides the server's error, and an error reports the response's status, also when the body has another
status_code - Failures after a successful response: A failure such as a deserializer error is a 500 instead of the response's 2xx, also when the body is an error with a 2xx
status_code, and theAngelHttpExceptioncarries the original error aserror. The message is that of aFormatExceptionthe deserializer throws, unless it is empty, or says the response could not be read. When the body is an error, its own message is kept - Error responses: Reported once: a listener of
onIndexed,onReadand the other streams gets only theAngelHttpException, without a second error from reading the body Rest.service: Uses thedeserializerit is given- Data that cannot be encoded:
create,modifyandupdatethrow anArgumentErrornaming thejsonEncodeerror, with its stack trace, for an object without atoJson(), where they threw aJsonUnsupportedObjectError. An error thrown by atoJson()is thrown as it is, and a value atoJson()returns that cannot be encoded is also anArgumentError - Closed clients: An
authenticateresponse that arrives afterclose()is returned, where adding it to the closedonAuthenticatedthrew aStateError. A request still being sent whenclose()closes the HTTP client fails as before - Closed services: A response that arrives after the service is closed is returned or thrown, where adding it to the closed stream threw a
StateError - Typed services without a deserializer: The error says to pass a
deserializerwhen the JSON is not aData, and says so when the body ofread,create,modify,updateorremoveisnull, where it was an unhandled exception.indexstill skips items deserialized tonull - Error responses that are not JSON: The
AngelHttpExceptionhas noerroror stack trace of the internalFormatException, and an error response added to a stream has a stack trace - Mapped services:
createpasses on itsparams, andindexpasses on anullresult, such as from a WebSocket service, where it threw - URLs: No longer end in
?without params ServiceList: Passes the errors of the service's streams on toonChange, where they were uncaught, andclosecancels its subscriptions to the service- Tests: No longer use
MirrorsReflector - Docs: The README tells how to install and use the package
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.0 #
- Removed deprecated
dart:html - Refactored the code to use
package:web
8.3.0 #
- Require Dart >= 3.6
- Updated
lintsto 5.0.0 - Updated dependencies to the latest release
- Updated error handling
8.2.0 #
- Require Dart >= 3.3
- Updated
lintsto 4.0.0
8.1.1 #
- Updated repository link
8.1.0 #
- Updated
lintsto 3.0.0 - Fixed linter warnings
8.0.0 #
- Require Dart >= 3.0
- Updated
httpto 1.0.0
7.0.0 #
- Require Dart >= 2.17
6.0.0 #
- Require Dart >= 2.16
5.0.0 #
- Skipped release
4.2.0 #
- Updated
package:build_runner - Updated
package:build_web_compilers
4.1.0 #
- Updated
package:belatuk_json_serializer - Updated linter to
package:lints
4.0.2 #
- Added logging
- Added unit test for authentication
4.0.1 #
- Updated README
- Refactored NNBD fixes
- Fixed path issue on Windows
- All 13 unit tests passed
4.0.0 #
- Migrated to support Dart >= 2.12 NNBD
3.0.0 #
- Migrated to work with Dart >= 2.12 Non NNBD
2.0.2 #
_joinpreviously discarded quer parameters, etc.- Allow any
Map<String, dynamic>as body, not justMap<String, String>.
2.0.1 #
- Change
BaseAngelClientconstructor to acceptdynamicinstead ofStringfor `baseUrl.
2.0.0 #
- Deprecate
basePathin favor ofbaseUrl. Angelnow extendshttp.Client.- Deprecate
auth_types.
2.0.0-alpha.2 #
- Make Service
indexalways returnList<Data>. - Add
Service.map.
2.0.0-alpha.1 #
- Refactor
paramstoMap<String, dynamic>.
2.0.0-alpha #
- Depend on Dart 2.
- Depend on Angel 2.
- Remove
dart2_constant.
1.2.0+2 #
- Code cleanup + housekeeping, update to
dart2_constant, and ensured build works with2.0.0-dev.64.1.
1.2.0+1 #
- Removed a type annotation in
authenticateViaPopupto prevent breaking with DDC.
1.2.0 #
ServiceListnow usesEqualityfrompackage:collectionto compare items.Services will now add service errors to corresponding streams if there is a listener.
1.1.0+3 #
ServiceListno longer ignores emptyindexevents.
1.1.0+2 #
- Updated
ServiceListto also fire onindex.
1.1.0+1 #
- Added
ServiceList.