cloud-url-resolver
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -15,3 +15,3 @@ const inBrowser = typeof window !== "undefined"; | ||
if (inBrowser && origin) { | ||
if (origin.includes("gitpod.io")) { | ||
if (origin.endsWith("gitpod.io")) { | ||
const regex = /^https?:\/\/\d{1,5}/; | ||
@@ -23,3 +23,3 @@ const url = origin.replace(regex, ""); | ||
return `${resolvedProtocol}://${port}${url}`; | ||
} else if (origin.includes("github.dev")) { | ||
} else if (origin.endsWith("app.github.dev")) { | ||
const protocolRegex = /^https?:\/\//; | ||
@@ -32,2 +32,4 @@ const regex = /\d{1,5}\.app\.github\.dev$/; | ||
return `${resolvedProtocol}://${url}${port}.app.github.dev`; | ||
} else if (origin.endsWith("glitch.me")) { | ||
return `${resolvedProtocol}://${new URL(origin).host}`; | ||
} | ||
@@ -34,0 +36,0 @@ } |
{ | ||
"name": "cloud-url-resolver", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Allow changing the port and protocol of any common development url", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -11,2 +11,3 @@ # cloud-url-resolver | ||
- [Gitpod](https://www.gitpod.io/) | ||
- [Glitch](https://glitch.com/) - _no port support_ | ||
@@ -13,0 +14,0 @@ If you would like to add support for another platform, please open an issue about it. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6082
50
22