@picked/fingerprintjs 0.0.62-next.1 → 0.0.62-next.11
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/README.md +0 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/index.js +5 -2
- package/dist/types/index.d.ts +6 -4
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
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({key:`fingerprintjs_visitor_id`,value: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,11 +6,14 @@ 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
|
|
13
|
+
t.session.setIdentifier({
|
|
14
|
+
key: "fingerprintjs_visitor_id",
|
|
15
|
+
value: r
|
|
16
|
+
});
|
|
14
17
|
})();
|
|
15
18
|
}
|
|
16
19
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,11 +12,13 @@ interface FingerprintJS {
|
|
|
12
12
|
}>;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* FingerprintJS plugin.
|
|
15
|
+
* FingerprintJS plugin that captures the visitor id and stores it in the client's session identifiers.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* @returns {Plugin} The FingerprintJS plugin definition.
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* createClient({ plugins: [fingerprintjsPlugin()] })
|
|
21
|
+
* ```
|
|
20
22
|
*/
|
|
21
23
|
export declare const fingerprintjsPlugin: () => Plugin;
|
|
22
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,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;;;;;;;;GAQG;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.11",
|
|
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.11"
|
|
44
44
|
},
|
|
45
45
|
"private": false,
|
|
46
46
|
"scripts": {
|