@uniformdev/context 19.79.1-alpha.7 → 19.79.1-alpha.8

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/index.esm.js CHANGED
@@ -1481,19 +1481,7 @@ var Context = class {
1481
1481
  try {
1482
1482
  this.manifest = new ManifestInstance({
1483
1483
  onLogMessage: (message) => __privateGet(this, _mitt3).emit("log", message),
1484
- manifest: {
1485
- project: {
1486
- ...manifest.project,
1487
- goal: {
1488
- is_developer: {
1489
- type: "sig",
1490
- id: "1_dev",
1491
- op: ">",
1492
- score: 0
1493
- }
1494
- }
1495
- }
1496
- },
1484
+ manifest,
1497
1485
  evaluator: new GroupCriteriaEvaluator({
1498
1486
  CK: cookieEvaluator,
1499
1487
  QS: queryStringEvaluator,
@@ -2628,8 +2616,13 @@ var enableUniformInsights = (options) => {
2628
2616
  const insights = createInsights({
2629
2617
  endpoint: options.endpoint
2630
2618
  });
2619
+ let previousUrl = void 0;
2631
2620
  return {
2632
2621
  init: (context) => {
2622
+ if (typeof window === "undefined") {
2623
+ return () => {
2624
+ };
2625
+ }
2633
2626
  const consentChanged = () => {
2634
2627
  if (context.storage.data.consent) {
2635
2628
  insights.init();
@@ -2661,7 +2654,8 @@ var enableUniformInsights = (options) => {
2661
2654
  };
2662
2655
  },
2663
2656
  update: (context) => {
2664
- if (context.url) {
2657
+ if (context.url && context.url !== previousUrl) {
2658
+ previousUrl = context.url;
2665
2659
  insights.pageHit();
2666
2660
  }
2667
2661
  },
package/dist/index.js CHANGED
@@ -1552,19 +1552,7 @@ var Context = class {
1552
1552
  try {
1553
1553
  this.manifest = new ManifestInstance({
1554
1554
  onLogMessage: (message) => __privateGet(this, _mitt3).emit("log", message),
1555
- manifest: {
1556
- project: {
1557
- ...manifest.project,
1558
- goal: {
1559
- is_developer: {
1560
- type: "sig",
1561
- id: "1_dev",
1562
- op: ">",
1563
- score: 0
1564
- }
1565
- }
1566
- }
1567
- },
1555
+ manifest,
1568
1556
  evaluator: new GroupCriteriaEvaluator({
1569
1557
  CK: cookieEvaluator,
1570
1558
  QS: queryStringEvaluator,
@@ -2699,8 +2687,13 @@ var enableUniformInsights = (options) => {
2699
2687
  const insights = createInsights({
2700
2688
  endpoint: options.endpoint
2701
2689
  });
2690
+ let previousUrl = void 0;
2702
2691
  return {
2703
2692
  init: (context) => {
2693
+ if (typeof window === "undefined") {
2694
+ return () => {
2695
+ };
2696
+ }
2704
2697
  const consentChanged = () => {
2705
2698
  if (context.storage.data.consent) {
2706
2699
  insights.init();
@@ -2732,7 +2725,8 @@ var enableUniformInsights = (options) => {
2732
2725
  };
2733
2726
  },
2734
2727
  update: (context) => {
2735
- if (context.url) {
2728
+ if (context.url && context.url !== previousUrl) {
2729
+ previousUrl = context.url;
2736
2730
  insights.pageHit();
2737
2731
  }
2738
2732
  },
package/dist/index.mjs CHANGED
@@ -1481,19 +1481,7 @@ var Context = class {
1481
1481
  try {
1482
1482
  this.manifest = new ManifestInstance({
1483
1483
  onLogMessage: (message) => __privateGet(this, _mitt3).emit("log", message),
1484
- manifest: {
1485
- project: {
1486
- ...manifest.project,
1487
- goal: {
1488
- is_developer: {
1489
- type: "sig",
1490
- id: "1_dev",
1491
- op: ">",
1492
- score: 0
1493
- }
1494
- }
1495
- }
1496
- },
1484
+ manifest,
1497
1485
  evaluator: new GroupCriteriaEvaluator({
1498
1486
  CK: cookieEvaluator,
1499
1487
  QS: queryStringEvaluator,
@@ -2628,8 +2616,13 @@ var enableUniformInsights = (options) => {
2628
2616
  const insights = createInsights({
2629
2617
  endpoint: options.endpoint
2630
2618
  });
2619
+ let previousUrl = void 0;
2631
2620
  return {
2632
2621
  init: (context) => {
2622
+ if (typeof window === "undefined") {
2623
+ return () => {
2624
+ };
2625
+ }
2633
2626
  const consentChanged = () => {
2634
2627
  if (context.storage.data.consent) {
2635
2628
  insights.init();
@@ -2661,7 +2654,8 @@ var enableUniformInsights = (options) => {
2661
2654
  };
2662
2655
  },
2663
2656
  update: (context) => {
2664
- if (context.url) {
2657
+ if (context.url && context.url !== previousUrl) {
2658
+ previousUrl = context.url;
2665
2659
  insights.pageHit();
2666
2660
  }
2667
2661
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context",
3
- "version": "19.79.1-alpha.7+bd4b0c6f4",
3
+ "version": "19.79.1-alpha.8+5ba1ad1ca",
4
4
  "description": "Uniform Context core package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "bd4b0c6f4a67549f8eb7e127a85927c798e7eed0"
70
+ "gitHead": "5ba1ad1ca42f7a035f32e8bb6f51bd1e955f0792"
71
71
  }