@team-monolith/pxt-core 0.1.2 → 0.1.4

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.
@@ -727,7 +727,8 @@ var pxt;
727
727
  headers["Authorization"] = `Bearer ${token}`;
728
728
  }
729
729
  headers[X_PXT_TARGET] = (_a = pxt.appTarget) === null || _a === void 0 ? void 0 : _a.id;
730
- url = pxt.BrowserUtils.isLocalHostDev() ? `${pxt.cloud.DEV_BACKEND}${url}` : `${pxt.Cloud.apiRoot}${url}`;
730
+ // url = pxt.BrowserUtils.isLocalHostDev() ? `${pxt.cloud.DEV_BACKEND}${url}` : url;
731
+ url = `${pxt.Cloud.apiRoot.replace(/\/$/, "")}${url}`;
731
732
  return pxt.Util.requestAsync({
732
733
  url,
733
734
  headers,
@@ -23275,6 +23276,9 @@ var pxt;
23275
23276
  }
23276
23277
  codle.getEnv = getEnv;
23277
23278
  function getCookieName(name) {
23279
+ if (window.location.hostname === "localhost") {
23280
+ return `${name}_localhost_local`;
23281
+ }
23278
23282
  const tenant = window.location.hostname.split(".")[1];
23279
23283
  return `${name}_${tenant}_${getEnv()}`;
23280
23284
  }
@@ -98408,7 +98408,8 @@ var pxt;
98408
98408
  headers["Authorization"] = `Bearer ${token}`;
98409
98409
  }
98410
98410
  headers[X_PXT_TARGET] = (_a = pxt.appTarget) === null || _a === void 0 ? void 0 : _a.id;
98411
- url = pxt.BrowserUtils.isLocalHostDev() ? `${pxt.cloud.DEV_BACKEND}${url}` : `${pxt.Cloud.apiRoot}${url}`;
98411
+ // url = pxt.BrowserUtils.isLocalHostDev() ? `${pxt.cloud.DEV_BACKEND}${url}` : url;
98412
+ url = `${pxt.Cloud.apiRoot.replace(/\/$/, "")}${url}`;
98412
98413
  return pxt.Util.requestAsync({
98413
98414
  url,
98414
98415
  headers,
@@ -120956,6 +120957,9 @@ var pxt;
120956
120957
  }
120957
120958
  codle.getEnv = getEnv;
120958
120959
  function getCookieName(name) {
120960
+ if (window.location.hostname === "localhost") {
120961
+ return `${name}_localhost_local`;
120962
+ }
120959
120963
  const tenant = window.location.hostname.split(".")[1];
120960
120964
  return `${name}_${tenant}_${getEnv()}`;
120961
120965
  }
@@ -721,7 +721,8 @@ var pxt;
721
721
  headers["Authorization"] = `Bearer ${token}`;
722
722
  }
723
723
  headers[X_PXT_TARGET] = (_a = pxt.appTarget) === null || _a === void 0 ? void 0 : _a.id;
724
- url = pxt.BrowserUtils.isLocalHostDev() ? `${pxt.cloud.DEV_BACKEND}${url}` : `${pxt.Cloud.apiRoot}${url}`;
724
+ // url = pxt.BrowserUtils.isLocalHostDev() ? `${pxt.cloud.DEV_BACKEND}${url}` : url;
725
+ url = `${pxt.Cloud.apiRoot.replace(/\/$/, "")}${url}`;
725
726
  return pxt.Util.requestAsync({
726
727
  url,
727
728
  headers,
@@ -23269,6 +23270,9 @@ var pxt;
23269
23270
  }
23270
23271
  codle.getEnv = getEnv;
23271
23272
  function getCookieName(name) {
23273
+ if (window.location.hostname === "localhost") {
23274
+ return `${name}_localhost_local`;
23275
+ }
23272
23276
  const tenant = window.location.hostname.split(".")[1];
23273
23277
  return `${name}_${tenant}_${getEnv()}`;
23274
23278
  }
@@ -98418,7 +98418,8 @@ var pxt;
98418
98418
  headers["Authorization"] = `Bearer ${token}`;
98419
98419
  }
98420
98420
  headers[X_PXT_TARGET] = (_a = pxt.appTarget) === null || _a === void 0 ? void 0 : _a.id;
98421
- url = pxt.BrowserUtils.isLocalHostDev() ? `${pxt.cloud.DEV_BACKEND}${url}` : `${pxt.Cloud.apiRoot}${url}`;
98421
+ // url = pxt.BrowserUtils.isLocalHostDev() ? `${pxt.cloud.DEV_BACKEND}${url}` : url;
98422
+ url = `${pxt.Cloud.apiRoot.replace(/\/$/, "")}${url}`;
98422
98423
  return pxt.Util.requestAsync({
98423
98424
  url,
98424
98425
  headers,
@@ -120966,6 +120967,9 @@ var pxt;
120966
120967
  }
120967
120968
  codle.getEnv = getEnv;
120968
120969
  function getCookieName(name) {
120970
+ if (window.location.hostname === "localhost") {
120971
+ return `${name}_localhost_local`;
120972
+ }
120969
120973
  const tenant = window.location.hostname.split(".")[1];
120970
120974
  return `${name}_${tenant}_${getEnv()}`;
120971
120975
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/pxt-core",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "files": [
5
5
  "README.md",
6
6
  "built/*.js",