dexie-cloud-addon 4.0.1-beta.54 → 4.0.1-beta.55
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 +25 -4
- package/dist/modern/dexie-cloud-addon.js.map +1 -1
- package/dist/modern/dexie-cloud-addon.min.js +1 -1
- package/dist/modern/dexie-cloud-addon.min.js.map +1 -1
- package/dist/modern/service-worker.js +25 -4
- package/dist/modern/service-worker.js.map +1 -1
- package/dist/modern/service-worker.min.js +1 -1
- package/dist/modern/service-worker.min.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.js +25 -4
- 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 +25 -4
- package/dist/umd/service-worker.js.map +1 -1
- package/dist/umd/service-worker.min.js +1 -1
- package/dist/umd/service-worker.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ==========================================================================
|
|
10
10
|
*
|
|
11
|
-
* Version 4.0.1-beta.
|
|
11
|
+
* Version 4.0.1-beta.55, Tue Jan 02 2024
|
|
12
12
|
*
|
|
13
13
|
* https://dexie.org
|
|
14
14
|
*
|
|
@@ -2333,7 +2333,28 @@ function alertUser(userInteraction, title, ...alerts) {
|
|
|
2333
2333
|
function promptForEmail(userInteraction, title, emailHint) {
|
|
2334
2334
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2335
2335
|
let email = emailHint || '';
|
|
2336
|
-
|
|
2336
|
+
// Regular expression for email validation
|
|
2337
|
+
// ^[\w-+.]+@([\w-]+\.)+[\w-]{2,10}(\sas\s[\w-+.]+@([\w-]+\.)+[\w-]{2,10})?$
|
|
2338
|
+
//
|
|
2339
|
+
// ^[\w-+.]+ : Matches the start of the string. Allows one or more word characters
|
|
2340
|
+
// (a-z, A-Z, 0-9, and underscore), hyphen, plus, or dot.
|
|
2341
|
+
//
|
|
2342
|
+
// @ : Matches the @ symbol.
|
|
2343
|
+
// ([\w-]+\.)+ : Matches one or more word characters or hyphens followed by a dot.
|
|
2344
|
+
// The plus sign outside the parentheses means this pattern can repeat one or more times,
|
|
2345
|
+
// allowing for subdomains.
|
|
2346
|
+
// [\w-]{2,10} : Matches between 2 and 10 word characters or hyphens. This is typically for
|
|
2347
|
+
// the domain extension like .com, .net, etc.
|
|
2348
|
+
// (\sas\s[\w-+.]+@([\w-]+\.)+[\w-]{2,10})?$ : This part is optional (due to the ? at the end).
|
|
2349
|
+
// If present, it matches " as " followed by another valid email address. This allows for the
|
|
2350
|
+
// input to be either a single email address or two email addresses separated by " as ".
|
|
2351
|
+
//
|
|
2352
|
+
// The use case for "<email1> as <email2>"" is for when a database owner with full access to the
|
|
2353
|
+
// database needs to impersonate another user in the database in order to troubleshoot. This
|
|
2354
|
+
// format will only be possible to use when email1 is the owner of an API client with GLOBAL_READ
|
|
2355
|
+
// and GLOBAL_WRITE permissions on the database. The email will be checked on the server before
|
|
2356
|
+
// allowing it and giving out a token for email2, using the OTP sent to email1.
|
|
2357
|
+
while (!email || !/^[\w-+.]+@([\w-]+\.)+[\w-]{2,10}(\sas\s[\w-+.]+@([\w-]+\.)+[\w-]{2,10})?$/.test(email)) {
|
|
2337
2358
|
email = (yield interactWithUser(userInteraction, {
|
|
2338
2359
|
type: 'email',
|
|
2339
2360
|
title,
|
|
@@ -6225,7 +6246,7 @@ function dexieCloud(dexie) {
|
|
|
6225
6246
|
const syncComplete = new Subject();
|
|
6226
6247
|
dexie.cloud = {
|
|
6227
6248
|
// @ts-ignore
|
|
6228
|
-
version: "4.0.1-beta.
|
|
6249
|
+
version: "4.0.1-beta.55",
|
|
6229
6250
|
options: Object.assign({}, DEFAULT_OPTIONS),
|
|
6230
6251
|
schema: null,
|
|
6231
6252
|
get currentUserId() {
|
|
@@ -6502,7 +6523,7 @@ function dexieCloud(dexie) {
|
|
|
6502
6523
|
}
|
|
6503
6524
|
}
|
|
6504
6525
|
// @ts-ignore
|
|
6505
|
-
dexieCloud.version = "4.0.1-beta.
|
|
6526
|
+
dexieCloud.version = "4.0.1-beta.55";
|
|
6506
6527
|
Dexie.Cloud = dexieCloud;
|
|
6507
6528
|
|
|
6508
6529
|
// In case the SW lives for a while, let it reuse already opened connections:
|