fleek-track-analytics 1.2.4-dimensions → 1.2.5-dimensions

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.
@@ -5,16 +5,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.checkAndSet = void 0;
7
7
  const js_cookie_1 = __importDefault(require("js-cookie"));
8
- const uuid_1 = require("uuid");
9
8
  const getFromStorage = (key) => {
10
9
  return js_cookie_1.default.get(key);
11
10
  };
11
+ const generateRandom = () => {
12
+ return Math.floor(Math.random() * 1000000000).toString();
13
+ };
12
14
  const setInStorage = (config, value) => {
13
15
  const cookieValue = `${cookiePrefix(config)}${value}`;
14
16
  console.log('lib console - setting cookie value'), config, cookieValue;
15
17
  js_cookie_1.default.set(config.name, cookieValue, {
16
18
  expires: config.expiryInDays,
17
- path: '',
19
+ path: '/',
18
20
  sameSite: 'Lax',
19
21
  });
20
22
  return cookieValue;
@@ -26,7 +28,7 @@ const checkAndSet = (config, value) => {
26
28
  let storageValue = getFromStorage(config.name);
27
29
  console.log('lib console - storage value for cookie', config.name, storageValue);
28
30
  if (!storageValue) {
29
- storageValue = setInStorage(config, value || (0, uuid_1.v4)());
31
+ storageValue = setInStorage(config, value || generateRandom());
30
32
  }
31
33
  return storageValue;
32
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"set-dimension-util.js","sourceRoot":"","sources":["../../../../src/web/utils/DImentsionManager/set-dimension-util.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAgC;AAEhC,+BAAoC;AAEpC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE;IACrC,OAAO,mBAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAE,KAAa,EAAE,EAAE;IACzD,MAAM,WAAW,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,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AC,QAAQ,EAAE,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAE,KAAa,EAAE,EAAE;IACzD,MAAM,WAAW,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,KAAK,EAAE,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC;IACvE,mBAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE;QACpC,OAAO,EAAE,MAAM,CAAC,YAAY;QAC5B,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;IACH,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAE,EAAE;IAC1C,OAAO,GAAG,MAAM,CAAC,MAAM,MAAM,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC;AAC7C,CAAC,CAAC;AAEK,MAAM,WAAW,GAAG,CAAC,MAAkB,EAAE,KAAc,EAAE,EAAE;IAChE,IAAI,YAAY,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,wCAAwC,EAAE,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACjF,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,YAAY,GAAG,YAAY,CAAC,MAAM,EAAE,KAAK,IAAI,cAAc,EAAE,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAPW,QAAA,WAAW,eAOtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleek-track-analytics",
3
- "version": "1.2.4-dimensions",
3
+ "version": "1.2.5-dimensions",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "exports": {