@picked/fingerprintjs 0.0.62-next.12 → 0.0.62-next.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.
- package/dist/cjs/index.js +1 -1
- package/dist/esm/index.js +2 -5
- package/dist/types/index.d.ts +4 -6
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@picked/client`);var t=()=>({name:`fingerprintjs-plugin`,setup:t=>{(0,e.supportsWindow)()&&(async()=>{let e=await n(1e4);if(!e){t.session
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@picked/client`);var t=()=>({name:`fingerprintjs-plugin`,setup:t=>{(0,e.supportsWindow)()&&(async()=>{let e=await n(1e4);if(!e){t.session?.removeIdentifier(`fingerprintjs_visitor_id`);return}let{visitorId:r}=await(await e.load()).get();t.session?.setIdentifier(`fingerprintjs_visitor_id`,r)})()}});function n(t){return new Promise(n=>{if(!(0,e.supportsWindow)()){n(void 0);return}let r=Date.now(),i=()=>{let e=globalThis.window.FingerprintJS;if(e)return n(e);if(Date.now()-r>=t)return n(void 0);setTimeout(i,100)};i()})}exports.fingerprintjsPlugin=t;
|
package/dist/esm/index.js
CHANGED
|
@@ -6,14 +6,11 @@ var t = () => ({
|
|
|
6
6
|
e() && (async () => {
|
|
7
7
|
let e = await n(1e4);
|
|
8
8
|
if (!e) {
|
|
9
|
-
t.session
|
|
9
|
+
t.session?.removeIdentifier("fingerprintjs_visitor_id");
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
let { visitorId: r } = await (await e.load()).get();
|
|
13
|
-
t.session
|
|
14
|
-
key: "fingerprintjs_visitor_id",
|
|
15
|
-
value: r
|
|
16
|
-
});
|
|
13
|
+
t.session?.setIdentifier("fingerprintjs_visitor_id", r);
|
|
17
14
|
})();
|
|
18
15
|
}
|
|
19
16
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,13 +12,11 @@ interface FingerprintJS {
|
|
|
12
12
|
}>;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* FingerprintJS plugin
|
|
15
|
+
* FingerprintJS plugin.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* createClient({ plugins: [fingerprintjsPlugin()] })
|
|
21
|
-
* ```
|
|
17
|
+
* This plugin gets the visitorId from FingerprintJS and stores it in Client Session
|
|
18
|
+
*
|
|
19
|
+
* @returns FingerprintJS plugin.
|
|
22
20
|
*/
|
|
23
21
|
export declare const fingerprintjsPlugin: () => Plugin;
|
|
24
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE5D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,aAAa,CAAC,EAAE,aAAa,CAAA;KAC9B;CACF;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,OAAO,CAAC;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAA;CACnE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,QAAO,MAyBtC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/fingerprintjs",
|
|
3
3
|
"description": "Fingerprintjs plugin",
|
|
4
|
-
"version": "0.0.62-next.
|
|
4
|
+
"version": "0.0.62-next.2",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@picked/client": "workspace:*",
|
|
7
7
|
"@repo/eslint-config": "workspace:*",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"main": "./dist/cjs/index.js",
|
|
41
41
|
"module": "./dist/esm/index.js",
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@picked/client": "0.0.62-next.
|
|
43
|
+
"@picked/client": "0.0.62-next.2"
|
|
44
44
|
},
|
|
45
45
|
"private": false,
|
|
46
46
|
"scripts": {
|