@salesforcedevs/dx-components 1.14.3-alpha2 → 1.14.3-alpha4

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.14.3-alpha2",
3
+ "version": "1.14.3-alpha4",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -53,13 +53,17 @@ class UrlWatcher {
53
53
  }
54
54
 
55
55
  private async pingUrl(url: string) {
56
+ console.log("PINGING URL", url);
56
57
  try {
57
- const response = await fetch(url, {
58
+ const response = await fetch(url.replace("localhost:3000", "staging.developer.salesforce.com"), {
58
59
  method: 'HEAD',
59
60
  redirect: 'manual',
60
61
  });
61
62
 
62
- if (response.status >= 300 && response.status < 400) {
63
+ console.log("PING RESPONSE", response);
64
+ if (response.type === "opaqueredirect" || (response.status >= 300 && response.status < 400)) {
65
+ // eslint-disable-next-line no-alert
66
+ alert("redirecting to " + window.location.href);
63
67
  // eslint-disable-next-line no-self-assign
64
68
  window.location.href = window.location.href;
65
69
  }