dexie-cloud-addon 4.0.1-beta.26 → 4.0.1-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modern/dexie-cloud-addon.js +24 -8
- package/dist/modern/dexie-cloud-addon.js.map +1 -1
- package/dist/modern/dexie-cloud-addon.min.js +2 -1
- package/dist/modern/dexie-cloud-addon.min.js.map +1 -1
- package/dist/modern/service-worker.js +23 -7
- package/dist/modern/service-worker.js.map +1 -1
- package/dist/modern/service-worker.min.js +2 -1
- package/dist/modern/service-worker.min.js.map +1 -1
- package/dist/module-es5/dexie-cloud-addon.js +23 -6
- package/dist/module-es5/dexie-cloud-addon.js.map +1 -1
- package/dist/module-es5/dexie-cloud-addon.min.js +2 -1
- package/dist/module-es5/dexie-cloud-addon.min.js.map +1 -1
- package/dist/types/DXCWebSocketStatus.d.ts +1 -1
- package/dist/types/DexieCloudEntity.d.ts +8 -0
- package/dist/types/DexieCloudServerState.d.ts +5 -0
- package/dist/types/DexieCloudTable.d.ts +2 -2
- package/dist/types/PermissionChecker.d.ts +1 -1
- package/dist/types/TSON.d.ts +1 -1
- package/dist/types/WSObservable.d.ts +2 -2
- package/dist/types/WebSocketStatus.d.ts +1 -0
- package/dist/types/authentication/authenticate.d.ts +1 -1
- package/dist/types/createMyMembersObservable.d.ts +14 -0
- package/dist/types/currentUserObservable.d.ts +3 -0
- package/dist/types/db/DexieCloudDB.d.ts +1 -1
- package/dist/types/extend-dexie-interface.d.ts +1 -1
- package/dist/types/getInternalAccessControlObservable.d.ts +1 -1
- package/dist/types/getPermissionsLookupObservable.d.ts +2 -2
- package/dist/types/helpers/BroadcastedLocalEvent.d.ts +8 -0
- package/dist/types/helpers/visibleState.d.ts +1 -0
- package/dist/types/permissionsLookup.d.ts +9 -0
- package/dist/types/permissionsLookupObservable.d.ts +14 -0
- package/dist/types/sync/globalizePrivateIds.d.ts +4 -0
- package/dist/types/sync/messagesFromServerQueue.d.ts +1 -1
- package/dist/types/sync/syncServerToClientOnly.d.ts +3 -0
- package/dist/types/types/CloudConnectionStatus.d.ts +0 -0
- package/dist/types/types/ConnectionStatus.d.ts +0 -0
- package/dist/types/types/DXCAlert.d.ts +1 -1
- package/dist/types/types/DXCInputField.d.ts +1 -1
- package/dist/types/types/DXCUserInteraction.d.ts +1 -1
- package/dist/types/types/LoginState.d.ts +41 -0
- package/dist/types/types/SWSyncEvent.d.ts +1 -1
- package/dist/types/types/SyncConnectionStatus.d.ts +1 -0
- package/dist/types/types/SyncFlowStatus.d.ts +6 -0
- package/dist/types/types/SyncState.d.ts +2 -2
- package/dist/types/types/SyncStatus.d.ts +6 -0
- package/dist/umd/dexie-cloud-addon.js +23 -6
- package/dist/umd/dexie-cloud-addon.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.min.js +1 -1
- package/dist/umd/dexie-cloud-addon.min.js.map +1 -1
- package/dist/umd/service-worker.js +23 -7
- package/dist/umd/service-worker.js.map +1 -1
- package/dist/umd/service-worker.min.js +2 -1
- package/dist/umd/service-worker.min.js.map +1 -1
- package/dist/umd-modern/dexie-cloud-addon.js +21 -5
- package/dist/umd-modern/dexie-cloud-addon.js.map +1 -1
- package/dist/umd-modern/dexie-cloud-addon.min.js +2 -0
- package/dist/umd-modern/dexie-cloud-addon.min.js.map +1 -0
- package/package.json +41 -12
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ==========================================================================
|
|
10
10
|
*
|
|
11
|
-
* Version 4.0.1-beta.
|
|
11
|
+
* Version 4.0.1-beta.28, Mon Mar 06 2023
|
|
12
12
|
*
|
|
13
13
|
* https://dexie.org
|
|
14
14
|
*
|
|
@@ -3277,12 +3277,12 @@ var undefinedDef = {
|
|
|
3277
3277
|
// serverRev.rev = new FakeBigInt(server.rev)
|
|
3278
3278
|
const hasBigIntSupport = typeof BigInt === 'function' && typeof BigInt(0) === 'bigint';
|
|
3279
3279
|
class FakeBigInt {
|
|
3280
|
-
constructor(value) {
|
|
3281
|
-
this.v = value;
|
|
3282
|
-
}
|
|
3283
3280
|
toString() {
|
|
3284
3281
|
return this.v;
|
|
3285
3282
|
}
|
|
3283
|
+
constructor(value) {
|
|
3284
|
+
this.v = value;
|
|
3285
|
+
}
|
|
3286
3286
|
}
|
|
3287
3287
|
const defs = Object.assign(Object.assign({}, undefinedDef), (hasBigIntSupport
|
|
3288
3288
|
? {}
|
|
@@ -4143,7 +4143,16 @@ function DexieCloudDB(dx) {
|
|
|
4143
4143
|
return db.$syncState.get('syncState');
|
|
4144
4144
|
},
|
|
4145
4145
|
getSchema() {
|
|
4146
|
-
return db.$syncState.get('schema')
|
|
4146
|
+
return db.$syncState.get('schema').then((schema) => {
|
|
4147
|
+
if (schema) {
|
|
4148
|
+
for (const table of db.tables) {
|
|
4149
|
+
if (table.schema.primKey && table.schema.primKey.keyPath && schema[table.name]) {
|
|
4150
|
+
schema[table.name].primaryKey = nameFromKeyPath(table.schema.primKey.keyPath);
|
|
4151
|
+
}
|
|
4152
|
+
}
|
|
4153
|
+
}
|
|
4154
|
+
return schema;
|
|
4155
|
+
});
|
|
4147
4156
|
},
|
|
4148
4157
|
getOptions() {
|
|
4149
4158
|
return db.$syncState.get('options');
|
|
@@ -4161,6 +4170,11 @@ function DexieCloudDB(dx) {
|
|
|
4161
4170
|
}
|
|
4162
4171
|
return db;
|
|
4163
4172
|
}
|
|
4173
|
+
function nameFromKeyPath(keyPath) {
|
|
4174
|
+
return typeof keyPath === 'string' ?
|
|
4175
|
+
keyPath :
|
|
4176
|
+
keyPath ? ('[' + [].join.call(keyPath, '+') + ']') : "";
|
|
4177
|
+
}
|
|
4164
4178
|
|
|
4165
4179
|
// @ts-ignore
|
|
4166
4180
|
const isFirefox = typeof InstallTrigger !== 'undefined';
|
|
@@ -5921,7 +5935,7 @@ function dexieCloud(dexie) {
|
|
|
5921
5935
|
currentUserEmitter.next(UNAUTHORIZED_USER);
|
|
5922
5936
|
});
|
|
5923
5937
|
dexie.cloud = {
|
|
5924
|
-
version: '4.0.1-beta.
|
|
5938
|
+
version: '4.0.1-beta.28',
|
|
5925
5939
|
options: Object.assign({}, DEFAULT_OPTIONS),
|
|
5926
5940
|
schema: null,
|
|
5927
5941
|
get currentUserId() {
|
|
@@ -6051,7 +6065,9 @@ function dexieCloud(dexie) {
|
|
|
6051
6065
|
// Update persisted options:
|
|
6052
6066
|
if (!options)
|
|
6053
6067
|
throw new Error(`Internal error`); // options cannot be null if configuredProgramatically is set.
|
|
6054
|
-
|
|
6068
|
+
const newPersistedOptions = Object.assign({}, options);
|
|
6069
|
+
delete newPersistedOptions.fetchTokens;
|
|
6070
|
+
yield db.$syncState.put(newPersistedOptions, 'options');
|
|
6055
6071
|
}
|
|
6056
6072
|
if (((_h = db.cloud.options) === null || _h === void 0 ? void 0 : _h.tryUseServiceWorker) &&
|
|
6057
6073
|
'serviceWorker' in navigator &&
|
|
@@ -6174,7 +6190,7 @@ function dexieCloud(dexie) {
|
|
|
6174
6190
|
});
|
|
6175
6191
|
}
|
|
6176
6192
|
}
|
|
6177
|
-
dexieCloud.version = '4.0.1-beta.
|
|
6193
|
+
dexieCloud.version = '4.0.1-beta.28';
|
|
6178
6194
|
Dexie.Cloud = dexieCloud;
|
|
6179
6195
|
|
|
6180
6196
|
export { dexieCloud as default, dexieCloud, getTiedObjectId, getTiedRealmId };
|