@tineon/t9n 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -306,9 +306,8 @@ export class T9nCheckout {
306
306
  }
307
307
  assertSecureConfig() {
308
308
  const apiURL = new URL(this.getApiBaseUrl());
309
- const isLocalHost = apiURL.hostname === "localhost" || apiURL.hostname === "127.0.0.1";
310
- if (!isLocalHost && apiURL.protocol !== "https:") {
311
- throw new Error("T9N: apiBaseUrl must use HTTPS outside local development.");
309
+ if (apiURL.protocol !== "https:") {
310
+ throw new Error("T9N: apiBaseUrl must use HTTPS");
312
311
  }
313
312
  }
314
313
  applyButtonStyle(btn, style) {
@@ -397,14 +396,6 @@ export class T9nCheckout {
397
396
  }
398
397
  }
399
398
  function resolveDefaultApiBaseUrl() {
400
- if (typeof window === "undefined") {
401
- return T9N_DEFAULT_API_BASE_URL;
402
- }
403
- const host = window.location.hostname.toLowerCase();
404
- const isLocal = host === "localhost" || host === "127.0.0.1" || host === "::1";
405
- if (isLocal) {
406
- return "http://localhost:8090";
407
- }
408
399
  return T9N_DEFAULT_API_BASE_URL;
409
400
  }
410
401
  export function initializeT9n(config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tineon/t9n",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",