@formo/analytics 1.16.11 → 1.16.12
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/cjs/src/FormoAnalytics.d.ts.map +1 -1
- package/dist/cjs/src/FormoAnalytics.js +4 -0
- package/dist/cjs/src/FormoAnalytics.js.map +1 -1
- package/dist/cjs/src/lib/storage/built-in/web.js +3 -3
- package/dist/cjs/src/lib/storage/built-in/web.js.map +1 -1
- package/dist/cjs/src/lib/version.d.ts +1 -1
- package/dist/cjs/src/lib/version.js +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/src/FormoAnalytics.d.ts.map +1 -1
- package/dist/esm/src/FormoAnalytics.js +4 -0
- package/dist/esm/src/FormoAnalytics.js.map +1 -1
- package/dist/esm/src/lib/storage/built-in/web.js +3 -3
- package/dist/esm/src/lib/storage/built-in/web.js.map +1 -1
- package/dist/esm/src/lib/version.d.ts +1 -1
- package/dist/esm/src/lib/version.js +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/FormoAnalytics.ts +3 -0
- package/src/lib/storage/built-in/web.ts +3 -3
- package/src/lib/version.ts +1 -1
package/package.json
CHANGED
package/src/FormoAnalytics.ts
CHANGED
|
@@ -384,6 +384,7 @@ export class FormoAnalytics implements IFormoAnalytics {
|
|
|
384
384
|
try {
|
|
385
385
|
if (!params) {
|
|
386
386
|
// If no params provided, auto-identify
|
|
387
|
+
logger.info("Auto-identifying with providers:", this._providers.map(p => p.info.name));
|
|
387
388
|
for (const providerDetail of this._providers) {
|
|
388
389
|
const provider = providerDetail.provider;
|
|
389
390
|
if (!provider) continue;
|
|
@@ -391,6 +392,7 @@ export class FormoAnalytics implements IFormoAnalytics {
|
|
|
391
392
|
try {
|
|
392
393
|
const address = await this.getAddress(provider);
|
|
393
394
|
if (address) {
|
|
395
|
+
logger.info("Auto-identifying", address, providerDetail.info.name, providerDetail.info.rdns);
|
|
394
396
|
// NOTE: do not set this.currentAddress without explicit connect or identify
|
|
395
397
|
await this.identify(
|
|
396
398
|
{
|
|
@@ -415,6 +417,7 @@ export class FormoAnalytics implements IFormoAnalytics {
|
|
|
415
417
|
|
|
416
418
|
// Explicit identify
|
|
417
419
|
const { userId, address, providerName, rdns } = params;
|
|
420
|
+
logger.info("Identify", address, userId, providerName, rdns);
|
|
418
421
|
if (address) this.currentAddress = address;
|
|
419
422
|
if (userId) {
|
|
420
423
|
this.currentUserId = userId;
|
|
@@ -21,11 +21,11 @@ class WebStorage extends StorageBlueprint {
|
|
|
21
21
|
public override set(key: string, value: any): void {
|
|
22
22
|
if (typeof value === "boolean") value = value === true ? "true" : "false";
|
|
23
23
|
if (typeof value === "object") value = JSON_PREFIX + JSON.stringify(value);
|
|
24
|
-
this.backend.setItem(key, value);
|
|
24
|
+
this.backend.setItem(this.getKey(key), value);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
public override get(key: string): string | boolean | Record<any, any> | null {
|
|
28
|
-
const value = this.backend.getItem(key);
|
|
28
|
+
const value = this.backend.getItem(this.getKey(key));
|
|
29
29
|
|
|
30
30
|
if (!value || typeof value !== "string") return null;
|
|
31
31
|
if (["null", "undefined"].some((item) => item == value)) return null;
|
|
@@ -50,7 +50,7 @@ class WebStorage extends StorageBlueprint {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
public override remove(key: string): void {
|
|
53
|
-
this.backend.removeItem(key);
|
|
53
|
+
this.backend.removeItem(this.getKey(key));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
package/src/lib/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '1.16.
|
|
2
|
+
export const version = '1.16.12';
|