@picked/fingerprintjs 0.0.1-dev.1764631564450 → 0.0.1-dev.1764633009920
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 +17 -13
- package/dist/types/index.d.ts +6 -4
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@picked/client"),n=e.createStorageKey("fingerprintjs","global"),t=()=>({name:"fingerprintjs-plugin",setup:()=>{if(console.log("====> Setting up FingerprintJS plugin"),!window.FingerprintJS){console.log("====> FingerprintJS not found on window"),e.sessionStore.set(n,void 0);return}window.FingerprintJS.load().then(({get:r})=>{r().then(({visitorId:i})=>{e.sessionStore.set(n,i),console.log("====> FingerprintJS visitorId stored:",n,i)})})}});function o(){return console.log("====> Retrieving FingerprintJS visitorId from session store:",n,e.sessionStore.get(n)),e.sessionStore.get(n)}exports.fingerprintjsPlugin=t;exports.getFingerprintVisitorId=o;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import { createStorageKey as t, sessionStore as
|
|
2
|
-
const n = t("fingerprintjs", "global")
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { createStorageKey as t, sessionStore as i } from "@picked/client";
|
|
2
|
+
const n = t("fingerprintjs", "global"), s = () => ({
|
|
3
|
+
name: "fingerprintjs-plugin",
|
|
4
|
+
setup: () => {
|
|
5
|
+
if (console.log("====> Setting up FingerprintJS plugin"), !window.FingerprintJS) {
|
|
6
|
+
console.log("====> FingerprintJS not found on window"), i.set(n, void 0);
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
window.FingerprintJS.load().then(({ get: e }) => {
|
|
10
|
+
e().then(({ visitorId: r }) => {
|
|
11
|
+
i.set(n, r), console.log("====> FingerprintJS visitorId stored:", n, r);
|
|
12
|
+
});
|
|
9
13
|
});
|
|
10
|
-
}
|
|
11
|
-
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
12
16
|
function p() {
|
|
13
17
|
return console.log(
|
|
14
18
|
"====> Retrieving FingerprintJS visitorId from session store:",
|
|
15
19
|
n,
|
|
16
|
-
|
|
17
|
-
),
|
|
20
|
+
i.get(n)
|
|
21
|
+
), i.get(n);
|
|
18
22
|
}
|
|
19
23
|
export {
|
|
20
|
-
s as
|
|
24
|
+
s as fingerprintjsPlugin,
|
|
21
25
|
p as getFingerprintVisitorId
|
|
22
26
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StorageItem } from '@picked/client';
|
|
1
|
+
import { StorageItem, Plugin } from '@picked/client';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
FingerprintJS?: FingerprintJS;
|
|
@@ -12,11 +12,13 @@ interface FingerprintJS {
|
|
|
12
12
|
}>;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* FingerprintJS plugin.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* This plugin gets the visitorId from FingerprintJS and stores it in the session store.
|
|
18
|
+
*
|
|
19
|
+
* @returns FingerprintJS plugin.
|
|
18
20
|
*/
|
|
19
|
-
export declare
|
|
21
|
+
export declare const fingerprintjsPlugin: () => Plugin;
|
|
20
22
|
/**
|
|
21
23
|
* Retrieves the FingerprintJS visitorId from the session store.
|
|
22
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,WAAW,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEzF,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;AAID;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,QAAO,MAsBtC,CAAA;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAOzE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/fingerprintjs",
|
|
3
3
|
"description": "Fingerprintjs plugin",
|
|
4
|
-
"version": "0.0.1-dev.
|
|
4
|
+
"version": "0.0.1-dev.1764633009920",
|
|
5
5
|
"dependencies": {},
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@picked/client": "workspace:*",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"main": "./dist/cjs/index.js",
|
|
32
32
|
"module": "./dist/esm/index.js",
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@picked/client": "0.0.1-dev.
|
|
34
|
+
"@picked/client": "0.0.1-dev.1764633009920"
|
|
35
35
|
},
|
|
36
36
|
"private": false,
|
|
37
37
|
"scripts": {
|