Releases: SpineEventEngine/web
1.9.1
This is a patch release of Spine Web library, addressing the reported issues observed in production usage of 1.9.0.
In particular, prior to 1.9.0 release, all Topic
s that were detected as "stale" (meaning there was no active subscription for a topic), were forcefully removed from Firebase RDB by deleting their corresponding nodes.
In 1.9.0, this behaviour was changed, and such a forceful removal became no longer the case.
This release addresses the issue, as it turns out, there are no other convenient means to clear outdated Firebase nodes.
Also, due to a critical vulnerability in protobuf-js
, its parent NPM dependency firebase
was updated to the latest available 9.x release. We don't use the latest 10.x branch of NPM firebase artifact, as it may not be fully compatible with our library code in spine-web 1.9.0.
1.9.0
This release is a part of Spine 1.9.0.
Notable changes:
- Bulk keep-up and cancellation requests for subscriptions (#193).
This feature was previously a hot-update for Spine 1.7.4. Now, the functionality is ported to v1
branch.
HttpClient
customisation (#194).
It is now possible to customise HttpClient
for each type of requests (sending commands, queries, or interacting with subscriptions).
In particular, end-users are now able to set HTTP headers, request mode, or customise how the original Proto message is transformed for transmission over the wire.
Additionally, a new HttpResponseHandler
routine has been extracted from the existing code to allow its customisation for end-users.
It is responsible for transforming the raw response content into JS objects. The default implementation — what we used to have in previous versions as a hard-coded behaviour — expects the server-side to return a JSON string, and parses it into a JS object.
- Immediate subscription cancellation (#195).
Calling unsubscribe for any subscription now leads to an immediate cancellation on both client- and server-side. Previously, all such cancellations were only processed during the next "keep-up" propagation.
Client now allows cancelling all known subscription via cancelAllSubscriptions()
no-args call. Its invocation leads to sending the bulk cancellation request to server-side, as well as shutting down the client-level subscriptions. Such an API is useful in case end-users choose to log out from the application.
- Observing Entity deletions at client-side (#197).
Previously itemRemoved
callback for subscriptions was not functioning properly. Now, it is invoked whenever a target Entity becomes archived or deleted.
-
Updated third-party dependencies:
- Firebase Admin SDK (server-side) ~>
9.1.1
, - Firebase JS SDK (client-side) ~>
9.16.0
, - Guava ~>
31.1-jre
, - Google's repackaged Apache HTTP Client is now at version 2 (v1 is now deprecated) ~>
1.42.2
.
- Firebase Admin SDK (server-side) ~>
1.8.2
This is a part of Spine release in version 1.8.2
.
With this update, web
library now supports the changes recently introduced in core-java
.
Also, the JavaScript dependencies were upgraded to eliminate their known vulnerabilities.
1.8.0
This is a public release of Spine web
libraries, which support all the features recently introduced in the corresponding core-java:1.8.0
release.
1.7.4
This patch release expands the mechanism of client-server interactions by allowing batch subscription keep-up and cancel requests.
This reduces the amount of request-response pairs greatly, lowering the load on the webserver.
Automatically, the client will always use the batch versions of the requests. However, the server may still receive singular requests for compatibility. Therefore, when migrating to this version, the server must be updated first and the clients should follow.
See the PR #170 for more details.
1.7.3
This is a patch release of Spine 1.x. It follows up on the production use of Spine libraries and brings a few requested improvements.
- Fixed issues with using local Firebase RDB emulator with the Firebase client (see #166).
- Exposed and published
spine-testutils-web
(see #167).
Additionally, several improvements of config
scripts were brought to this version.
Compare v1.7.0 and v1.7.3.
1.7.0
A public release of web-related Spine libraries.
Breaking Changes
-
The default
grand_origin
value must not be set for the signalOrigin
for the filtering anymore.With the #160 and upgrade to the newest version of the
spine-server
, the default (empty)grand_origin
instance must not be set anymore. This change is already done for the JS client, but if one is using a custom solution, she must not set the defaultgrand_origin
. -
The
firebase-web
artifact no longer provides theappengine-sdk
dependency (see #153 and #155).
API Changes
-
New
web
test utilities.The
testutil-web
artifact now provides new test utilities that simplify the creation of pre-configured servlet requests and responses.If one needs an immutable HTTP request or response, she may use the
KnownRequest
andKnownResponse
entries respectively. They allow setting a constant request or response data and headers that are not gonna be changed while the entry is being used.If it is required to verify that a response is modified by the underlying code, one may use the
MemoizingResponse
that records actions applied to it and allows getting back the modifications.If none of these matches the requirements, the
MockedRequest
andMockedResponse
interfaces provide default no-op overrides for the respectiveHttpServletRequest
andHttpServletResponse
interfaces and could be implemented to match specific needs.See #159 for additional details.
Fixes
- Fixed keep-up and cancellation of Firebase subscriptions from the
spine-web
client (see #154).
Infrastructure
- The libraries now do not use
implementation
for compile-only annotations likeerrorprone
annotations but use the newly introducedcompileOnlyApi
configuration for such dependencies (see #159).
Dependency upgrades
- base64-js:
1.3.0
->1.5.1
- google-protobuf:
3.8.0
->3.13.0
- isomorphic-fetch:
2.2.1
->3.0.0
- uuid:
3.4.0
->8.3.2
Compare v1.6.0 and v1.7.0.
1.6.0
This release brings API and infrastructure updates to the framework.
API changes
- The JS
Client
now supports multitenancy [#141].
The Client
factory API now accepts a TenantProvider
as an element of the passed client options.
The TenantProvider
defines the current tenant ID to be used for all requests done with the client.
The current tenant ID can be dynamically updated with the help of TenantProvider.update(tenantId)
. For single-tenant applications, the TenantProvider
can be omitted in the options.
Multitenant client usage example:
let tenantProvider = new TenantProvider(initialTenantId());
let client = spineWeb.init({
protoIndexFiles: [protoIndex],
endpointUrl: endpointUrl,
firebaseDatabase: firebaseDatabase,
actorProvider: new ActorProvider(),
tenantProvider: tenantProvider
});
// …
tenantProvider.update(newTenantId());
-
The
FirebaseCredentials
are now constructed fromGoogleCrendetials
rather than the deprecatedGoogleCredential
. The factory method acceptingGoogleCredential
is deprecated [#137]. -
Breaking: the
onRejection
callback ofCommandRequest
is renamed toonImmediateRejection
to better reflect its purpose [#151]. See also the corresponding changes incore-java
.