@graphql-tools/url-loader 7.17.15 → 7.17.16-alpha-20230407131203-6663dff6
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 +5 -5
- package/esm/index.js +5 -5
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -12,8 +12,8 @@ const defaultSyncFetch_js_1 = require("./defaultSyncFetch.js");
|
|
|
12
12
|
const executor_graphql_ws_1 = require("@graphql-tools/executor-graphql-ws");
|
|
13
13
|
const executor_http_1 = require("@graphql-tools/executor-http");
|
|
14
14
|
const executor_legacy_ws_1 = require("@graphql-tools/executor-legacy-ws");
|
|
15
|
-
const asyncImport = (moduleName) => Promise.resolve(`${moduleName}`).then(s => tslib_1.__importStar(require(s)));
|
|
16
|
-
const syncImport = (moduleName) => require(moduleName);
|
|
15
|
+
const asyncImport = (moduleName) => Promise.resolve(`${`${moduleName}`}`).then(s => tslib_1.__importStar(require(s)));
|
|
16
|
+
const syncImport = (moduleName) => require(`${moduleName}`);
|
|
17
17
|
var SubscriptionProtocol;
|
|
18
18
|
(function (SubscriptionProtocol) {
|
|
19
19
|
SubscriptionProtocol["WS"] = "WS";
|
|
@@ -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
|
-
|
|
36
|
-
|
|
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
|
@@ -8,8 +8,8 @@ import { defaultSyncFetch } from './defaultSyncFetch.js';
|
|
|
8
8
|
import { buildGraphQLWSExecutor } from '@graphql-tools/executor-graphql-ws';
|
|
9
9
|
import { buildHTTPExecutor, isLiveQueryOperationDefinitionNode, } from '@graphql-tools/executor-http';
|
|
10
10
|
import { buildWSLegacyExecutor } from '@graphql-tools/executor-legacy-ws';
|
|
11
|
-
const asyncImport = (moduleName) => import(moduleName);
|
|
12
|
-
const syncImport = (moduleName) => require(moduleName);
|
|
11
|
+
const asyncImport = (moduleName) => import(`${moduleName}`);
|
|
12
|
+
const syncImport = (moduleName) => require(`${moduleName}`);
|
|
13
13
|
export var SubscriptionProtocol;
|
|
14
14
|
(function (SubscriptionProtocol) {
|
|
15
15
|
SubscriptionProtocol["WS"] = "WS";
|
|
@@ -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
|
-
|
|
32
|
-
|
|
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