Skip to content

1.6.0

Compare
Choose a tag to compare
@dmitrykuzmin dmitrykuzmin released this 09 Sep 20:01
· 312 commits to master since this release
19dbb51

This release brings API and infrastructure updates to the framework.

API changes

  1. 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());
  1. The FirebaseCredentials are now constructed from GoogleCrendetials rather than the deprecated GoogleCredential. The factory method accepting GoogleCredential is deprecated [#137].

  2. Breaking: the onRejection callback of CommandRequest is renamed to onImmediateRejection to better reflect its purpose [#151]. See also the corresponding changes in core-java.

Infrastructure

  1. The JS client docs are now published to spine.io [#136].
  2. The project build scripts are migrated to Kotlin [#142].