@graphql-tools/url-loader 7.17.16 → 7.17.17-rc-20230407153012-56a9d2d0

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/cjs/index.js CHANGED
@@ -30,11 +30,11 @@ var SubscriptionProtocol;
30
30
  */
31
31
  SubscriptionProtocol["GRAPHQL_SSE"] = "GRAPHQL_SSE";
32
32
  })(SubscriptionProtocol = exports.SubscriptionProtocol || (exports.SubscriptionProtocol = {}));
33
+ const acceptableProtocols = ['http:', 'https:', 'ws:', 'wss:'];
33
34
  function isCompatibleUri(uri) {
34
35
  try {
35
- // eslint-disable-next-line no-new
36
- new URL(uri);
37
- return true;
36
+ const url = new URL(uri);
37
+ return acceptableProtocols.includes(url.protocol);
38
38
  }
39
39
  catch (_a) {
40
40
  return false;
package/esm/index.js CHANGED
@@ -26,11 +26,11 @@ export var SubscriptionProtocol;
26
26
  */
27
27
  SubscriptionProtocol["GRAPHQL_SSE"] = "GRAPHQL_SSE";
28
28
  })(SubscriptionProtocol || (SubscriptionProtocol = {}));
29
+ const acceptableProtocols = ['http:', 'https:', 'ws:', 'wss:'];
29
30
  function isCompatibleUri(uri) {
30
31
  try {
31
- // eslint-disable-next-line no-new
32
- new URL(uri);
33
- return true;
32
+ const url = new URL(uri);
33
+ return acceptableProtocols.includes(url.protocol);
34
34
  }
35
35
  catch (_a) {
36
36
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/url-loader",
3
- "version": "7.17.16",
3
+ "version": "7.17.17-rc-20230407153012-56a9d2d0",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {