Merge branch '2.3.x' of github.com:realm/realm-js into jas/backlink-queries
This commit is contained in:
commit
b10fddb722
|
@ -1,4 +1,4 @@
|
||||||
2.3.0 Release notes (2018-3-7)
|
2.3.0 Release notes (2018-3-9)
|
||||||
=============================================================
|
=============================================================
|
||||||
### Breaking changes
|
### Breaking changes
|
||||||
* [Sync] Sync protocol changed to version 24.
|
* [Sync] Sync protocol changed to version 24.
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
- Method `Realm.privilges()` to compute privileges on a Realm, a Realm object schema, or a Realm object. The method returns either a `Realm.Permissions.Realm` or `Realm.Permissions.Class` object.
|
- Method `Realm.privilges()` to compute privileges on a Realm, a Realm object schema, or a Realm object. The method returns either a `Realm.Permissions.Realm` or `Realm.Permissions.Class` object.
|
||||||
- For non-synced Realms, all privileges are always granted.
|
- For non-synced Realms, all privileges are always granted.
|
||||||
- For more details, please read the reference documentation.
|
- For more details, please read the reference documentation.
|
||||||
|
* [Sync] Revoke refresh tiken upon logout (#1354).
|
||||||
* Added `Realm.defaultSyncConfiguration()` which will return the configuration for a default synced Realm (#1688).
|
* Added `Realm.defaultSyncConfiguration()` which will return the configuration for a default synced Realm (#1688).
|
||||||
* [Sync] Decrepated `Realm.Sync.setFeatureToken` (#1689).
|
* [Sync] Decrepated `Realm.Sync.setFeatureToken` (#1689).
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
PACKAGE_NAME=realm-js
|
PACKAGE_NAME=realm-js
|
||||||
VERSION=2.3.0-beta.2
|
VERSION=2.3.0-beta.3
|
||||||
REALM_CORE_VERSION=5.4.0
|
REALM_CORE_VERSION=5.4.0
|
||||||
REALM_SYNC_VERSION=3.0.0-rc.1
|
REALM_SYNC_VERSION=3.0.0-rc.1
|
||||||
REALM_OBJECT_SERVER_VERSION=3.0.0-alpha.8
|
REALM_OBJECT_SERVER_VERSION=3.0.0-alpha.8
|
||||||
|
|
|
@ -348,6 +348,27 @@ const staticMethods = {
|
||||||
|
|
||||||
|
|
||||||
const instanceMethods = {
|
const instanceMethods = {
|
||||||
|
logout() {
|
||||||
|
this._logout();
|
||||||
|
const url = url_parse(this.server);
|
||||||
|
url.set('pathname', '/auth/revoke');
|
||||||
|
const headers = {
|
||||||
|
Authorization: this.token
|
||||||
|
};
|
||||||
|
const body = {
|
||||||
|
token: this.token
|
||||||
|
};
|
||||||
|
const options = {
|
||||||
|
method: 'POST',
|
||||||
|
headers,
|
||||||
|
body: body,
|
||||||
|
open_timeout: 5000
|
||||||
|
};
|
||||||
|
|
||||||
|
performFetch(url.href, options)
|
||||||
|
.then(() => console.log('User is logged out'))
|
||||||
|
.catch((e) => print_error(e));
|
||||||
|
},
|
||||||
openManagementRealm() {
|
openManagementRealm() {
|
||||||
let url = url_parse(this.server);
|
let url = url_parse(this.server);
|
||||||
if (url.protocol === 'http:') {
|
if (url.protocol === 'http:') {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "realm",
|
"name": "realm",
|
||||||
"description": "Realm is a mobile database: an alternative to SQLite and key-value stores",
|
"description": "Realm is a mobile database: an alternative to SQLite and key-value stores",
|
||||||
"version": "2.3.0-beta.2",
|
"version": "2.3.0-beta.3",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"homepage": "https://realm.io",
|
"homepage": "https://realm.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
@ -103,7 +103,7 @@ public:
|
||||||
static void session_for_on_disk_path(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &);
|
static void session_for_on_disk_path(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &);
|
||||||
|
|
||||||
MethodMap<T> const methods = {
|
MethodMap<T> const methods = {
|
||||||
{"logout", wrap<logout>},
|
{"_logout", wrap<logout>},
|
||||||
{"_sessionForOnDiskPath", wrap<session_for_on_disk_path>}
|
{"_sessionForOnDiskPath", wrap<session_for_on_disk_path>}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue