dexie-cloud-addon 4.0.1-rc.3 → 4.0.2

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.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.0.1-rc.3, Wed Mar 20 2024
11
+ * Version 4.0.2, Wed Apr 10 2024
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -2482,11 +2482,21 @@
2482
2482
  }
2483
2483
  else {
2484
2484
  const email = yield promptForEmail(userInteraction, 'Enter email address', hints === null || hints === void 0 ? void 0 : hints.email);
2485
- tokenRequest = {
2486
- email,
2487
- grant_type: 'otp',
2488
- scopes: ['ACCESS_DB'],
2489
- };
2485
+ if (/@demo.local$/.test(email)) {
2486
+ tokenRequest = {
2487
+ demo_user: email,
2488
+ grant_type: 'demo',
2489
+ scopes: ['ACCESS_DB'],
2490
+ public_key
2491
+ };
2492
+ }
2493
+ else {
2494
+ tokenRequest = {
2495
+ email,
2496
+ grant_type: 'otp',
2497
+ scopes: ['ACCESS_DB'],
2498
+ };
2499
+ }
2490
2500
  }
2491
2501
  const res1 = yield fetch(`${url}/token`, {
2492
2502
  body: JSON.stringify(tokenRequest),
@@ -6293,7 +6303,7 @@
6293
6303
  const syncComplete = new rxjs.Subject();
6294
6304
  dexie.cloud = {
6295
6305
  // @ts-ignore
6296
- version: "4.0.1-rc.3",
6306
+ version: "4.0.2",
6297
6307
  options: Object.assign({}, DEFAULT_OPTIONS),
6298
6308
  schema: null,
6299
6309
  get currentUserId() {
@@ -6570,7 +6580,7 @@
6570
6580
  }
6571
6581
  }
6572
6582
  // @ts-ignore
6573
- dexieCloud.version = "4.0.1-rc.3";
6583
+ dexieCloud.version = "4.0.2";
6574
6584
  Dexie.Cloud = dexieCloud;
6575
6585
 
6576
6586
  exports.default = dexieCloud;