@void/platform 0.26.1 → 0.27.0

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/README.md CHANGED
@@ -16,7 +16,7 @@ npx void platform install
16
16
  Once the platform is installed, developers connect and deploy:
17
17
 
18
18
  ```sh
19
- npx void connect https://api.example.com
19
+ npx void connect api.example.com
20
20
  npx void deploy
21
21
  ```
22
22
 
package/dist/index.mjs CHANGED
@@ -956,7 +956,11 @@ function normalizeOrigin(value, name) {
956
956
  } catch {
957
957
  throw new Error(`${name} must be an absolute URL.`);
958
958
  }
959
- if (!(url.protocol === "http:" && (url.hostname === "localhost" || url.hostname === "127.0.0.1" || url.hostname === "::1")) && url.protocol !== "https:" || url.username || url.password) throw new Error(`${name} must be a credential-free HTTPS URL.`);
959
+ if (!(url.protocol === "http:" && [
960
+ "localhost",
961
+ "127.0.0.1",
962
+ "[::1]"
963
+ ].includes(url.hostname)) && url.protocol !== "https:" || url.username || url.password) throw new Error(`${name} must be a credential-free HTTPS URL.`);
960
964
  if (url.pathname !== "" && url.pathname !== "/" || url.search || url.hash) throw new Error(`${name} must be an origin without a path, query, or fragment.`);
961
965
  return url.origin;
962
966
  }