@globus/sdk 6.5.0-canary.6.4dc8abc → 6.5.0-canary.8.fe1be0d

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/cjs/index.js CHANGED
@@ -5516,19 +5516,23 @@ __export(utils_exports3, {
5516
5516
  getEndpointIdFromURL: () => getEndpointIdFromURL,
5517
5517
  getGCSDomainFromURL: () => getGCSDomainFromURL
5518
5518
  });
5519
- var GCS_DEFAULT_DOMAIN = "data.globus.org";
5519
+ var GCS_DEFAULT_DOMAINS = ["data.globus.org", "gaccess.io"];
5520
+ function getDefaultDomain(hostname) {
5521
+ return GCS_DEFAULT_DOMAINS.find((d) => hostname.endsWith(`.${d}`));
5522
+ }
5520
5523
  function getGCSDomainFromURL(url2) {
5521
- const { host: host2 } = typeof url2 === "string" ? new URL(url2) : url2;
5522
- if (!host2.endsWith(GCS_DEFAULT_DOMAIN)) {
5524
+ const { host: host2, hostname } = typeof url2 === "string" ? new URL(url2) : url2;
5525
+ const defaultDomain = getDefaultDomain(hostname);
5526
+ if (!defaultDomain) {
5523
5527
  return host2;
5524
5528
  }
5525
- const [subdomain] = host2.split(`.${GCS_DEFAULT_DOMAIN}`);
5529
+ const subdomain = hostname.slice(0, -`.${defaultDomain}`.length);
5526
5530
  const parts = subdomain.split(".");
5527
- return (parts.length === 2 ? [...parts, GCS_DEFAULT_DOMAIN] : [parts[1], parts[2], GCS_DEFAULT_DOMAIN]).join(".");
5531
+ return (parts.length === 2 ? [...parts, defaultDomain] : [parts[1], parts[2], defaultDomain]).join(".");
5528
5532
  }
5529
5533
  async function getEndpointIdFromURL(url2) {
5530
5534
  const u = typeof url2 === "string" ? new URL(url2) : url2;
5531
- const isCustomDomain = !u.host.endsWith(GCS_DEFAULT_DOMAIN);
5535
+ const isCustomDomain = !getDefaultDomain(u.hostname);
5532
5536
  if (isCustomDomain) {
5533
5537
  return null;
5534
5538
  }