@picked/fingerprintjs 0.0.1-dev.1764633009920 → 0.0.1-dev.1764694362099
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 +22 -10
- package/dist/types/index.d.ts +1 -1
- 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 n=require("@picked/client"),i=n.createStorageKey("fingerprintjs","global"),t=()=>({name:"fingerprintjs-plugin",setup:()=>{if(console.log("====> [fingerprintjsPlugin] Setting up FingerprintJS plugin"),!n.supportsWindow()){console.log("====> [fingerprintjsPlugin] Window is not supported");return}if(!window.FingerprintJS){console.log("====> [fingerprintjsPlugin] FingerprintJS not found on window"),n.sessionStore.set(i,void 0);return}window.FingerprintJS.load().then(({get:e})=>{e().then(({visitorId:r})=>{n.sessionStore.set(i,r),console.log("====> [fingerprintjsPlugin] FingerprintJS visitorId stored:",i,r)})})}});function o(){if(!n.supportsWindow()){console.log("====> [getFingerprintVisitorId] Window is not supported");return}return console.log("====> [getFingerprintVisitorId] Retrieving FingerprintJS visitorId from session store:",i,n.sessionStore.get(i).text()),n.sessionStore.get(i)}exports.fingerprintjsPlugin=t;exports.getFingerprintVisitorId=o;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,26 +1,38 @@
|
|
|
1
|
-
import { createStorageKey as t, sessionStore as i } from "@picked/client";
|
|
2
|
-
const n =
|
|
1
|
+
import { createStorageKey as o, supportsWindow as t, sessionStore as i } from "@picked/client";
|
|
2
|
+
const n = o("fingerprintjs", "global"), p = () => ({
|
|
3
3
|
name: "fingerprintjs-plugin",
|
|
4
4
|
setup: () => {
|
|
5
|
-
if (console.log("====> Setting up FingerprintJS plugin"), !
|
|
6
|
-
console.log("====>
|
|
5
|
+
if (console.log("====> [fingerprintjsPlugin] Setting up FingerprintJS plugin"), !t()) {
|
|
6
|
+
console.log("====> [fingerprintjsPlugin] Window is not supported");
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (!window.FingerprintJS) {
|
|
10
|
+
console.log("====> [fingerprintjsPlugin] FingerprintJS not found on window"), i.set(n, void 0);
|
|
7
11
|
return;
|
|
8
12
|
}
|
|
9
13
|
window.FingerprintJS.load().then(({ get: e }) => {
|
|
10
14
|
e().then(({ visitorId: r }) => {
|
|
11
|
-
i.set(n, r), console.log(
|
|
15
|
+
i.set(n, r), console.log(
|
|
16
|
+
"====> [fingerprintjsPlugin] FingerprintJS visitorId stored:",
|
|
17
|
+
n,
|
|
18
|
+
r
|
|
19
|
+
);
|
|
12
20
|
});
|
|
13
21
|
});
|
|
14
22
|
}
|
|
15
23
|
});
|
|
16
|
-
function
|
|
24
|
+
function l() {
|
|
25
|
+
if (!t()) {
|
|
26
|
+
console.log("====> [getFingerprintVisitorId] Window is not supported");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
17
29
|
return console.log(
|
|
18
|
-
"====> Retrieving FingerprintJS visitorId from session store:",
|
|
30
|
+
"====> [getFingerprintVisitorId] Retrieving FingerprintJS visitorId from session store:",
|
|
19
31
|
n,
|
|
20
|
-
i.get(n)
|
|
32
|
+
i.get(n).text()
|
|
21
33
|
), i.get(n);
|
|
22
34
|
}
|
|
23
35
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
36
|
+
p as fingerprintjsPlugin,
|
|
37
|
+
l as getFingerprintVisitorId
|
|
26
38
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -24,6 +24,6 @@ export declare const fingerprintjsPlugin: () => Plugin;
|
|
|
24
24
|
*
|
|
25
25
|
* @returns StorageItem<string | undefined> The stored visitorId or undefined if not present.
|
|
26
26
|
*/
|
|
27
|
-
export declare function getFingerprintVisitorId(): StorageItem<string | undefined
|
|
27
|
+
export declare function getFingerprintVisitorId(): StorageItem<string | undefined> | undefined;
|
|
28
28
|
export {};
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EAEX,KAAK,MAAM,EACZ,MAAM,gBAAgB,CAAA;AAEvB,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,MA+BtC,CAAA;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,SAAS,CAYrF"}
|
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.1764694362099",
|
|
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.1764694362099"
|
|
35
35
|
},
|
|
36
36
|
"private": false,
|
|
37
37
|
"scripts": {
|