@salesforcedevs/dx-components 1.3.304 → 1.3.306

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.304",
3
+ "version": "1.3.306",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -46,5 +46,5 @@
46
46
  "volta": {
47
47
  "node": "16.19.1"
48
48
  },
49
- "gitHead": "00f26c1df5e3db652f423fdf880224e65ca6a4f6"
49
+ "gitHead": "98745ef7c446dc2fe3c913c99b0b84a586837948"
50
50
  }
@@ -46,7 +46,7 @@ export default class CoveoRecommendations extends LightningElement {
46
46
  const actionsHistory = localStorage.getItem(
47
47
  "__coveo.analytics.history"
48
48
  );
49
- const url = "https://platform.cloud.coveo.com/rest/search/v2";
49
+ const url = `https://${this.coveoOrganizationId}.org.coveo.com/rest/search`;
50
50
  const searchStart = performance.now();
51
51
  fetch(url, {
52
52
  headers: {
@@ -10,16 +10,12 @@ declare module globalThis {
10
10
 
11
11
  export default class TrafficLabeler extends LightningElement {
12
12
  @api internalIps?: string;
13
- @api clearbitPublicKey?: string;
14
13
  @api coveoOrganizationId!: string;
15
14
  @api coveoAnalyticsToken!: string;
16
15
 
17
16
  connectedCallback(): void {
18
17
  if (!globalThis.singletonTrafficLabelerConnected) {
19
18
  globalThis.singletonTrafficLabelerConnected = true;
20
- if (this.clearbitPublicKey) {
21
- this.loadClearBitData();
22
- }
23
19
  if (this.internalIps) {
24
20
  this.evaluateVPNAddress();
25
21
  }
@@ -30,20 +26,6 @@ export default class TrafficLabeler extends LightningElement {
30
26
  logCoveoPageView(this.coveoOrganizationId, this.coveoAnalyticsToken);
31
27
  }
32
28
 
33
- async loadClearBitData() {
34
- try {
35
- const result = await fetch(
36
- `https://reveal.clearbit.com/v1/companies/reveal?authorization=${this.clearbitPublicKey}`
37
- );
38
- const json = await result.json();
39
- if (json?.company?.name?.toLowerCase().includes("salesforce")) {
40
- this.setTrafficType("internal");
41
- }
42
- } catch (error) {
43
- console.error("fetch failed ", error);
44
- }
45
- }
46
-
47
29
  async evaluateVPNAddress() {
48
30
  try {
49
31
  const ipifyResult = await fetch(
@@ -54,10 +36,13 @@ export default class TrafficLabeler extends LightningElement {
54
36
  const internalIps = this.internalIps?.split(",");
55
37
 
56
38
  const isInternal = internalIps?.some((value) => {
39
+ console.log("TESTING:", value);
57
40
  const regex = new RegExp(value);
58
41
  return regex.test(result.ip);
59
42
  });
60
43
 
44
+ console.log("IS INTERNAL?", isInternal);
45
+
61
46
  if (isInternal) {
62
47
  this.setTrafficType("internal");
63
48
  }