@seamapi/http 0.25.2 → 0.25.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.
package/dist/connect.cjs CHANGED
@@ -721,7 +721,7 @@ _a = Symbol.toStringTag;
721
721
  _parent = new WeakMap();
722
722
  _config = new WeakMap();
723
723
  var getUrlPrefix = (input) => {
724
- if (URL.canParse(input)) {
724
+ if (canParseUrl(input)) {
725
725
  const url = new URL(input).toString();
726
726
  if (url.endsWith("/"))
727
727
  return url.slice(0, -1);
@@ -735,6 +735,13 @@ var getUrlPrefix = (input) => {
735
735
  `Cannot resolve origin from ${input} in a non-browser environment`
736
736
  );
737
737
  };
738
+ var canParseUrl = (input) => {
739
+ try {
740
+ return new URL(input) != null;
741
+ } catch {
742
+ return false;
743
+ }
744
+ };
738
745
 
739
746
  // src/lib/seam/connect/routes/client-sessions.ts
740
747
  var SeamHttpClientSessions = class _SeamHttpClientSessions {