@graphql-tools/node-require 6.3.1-alpha-db7f3b43.0 → 6.3.1-alpha-8814a3d0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/node-require",
3
- "version": "6.3.1-alpha-db7f3b43.0",
3
+ "version": "6.3.1-alpha-8814a3d0.0",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@graphql-tools/graphql-file-loader": "^7.1.0",
11
- "@graphql-tools/load": "7.2.1-alpha-db7f3b43.0",
11
+ "@graphql-tools/load": "7.3.2-alpha-8814a3d0.0",
12
12
  "@graphql-tools/utils": "^8.2.0",
13
13
  "tslib": "~2.3.0"
14
14
  },
package/es5/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="packages/node-require/src/declarations" />
3
- export declare function handleModule(m: NodeModule, filename: string): void;
4
- export declare function registerGraphQLExtensions(nodeRequire: NodeRequire): void;
package/es5/index.js DELETED
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const tslib = require('tslib');
6
- const load = require('@graphql-tools/load/es5');
7
- const graphqlFileLoader = require('@graphql-tools/graphql-file-loader/es5');
8
- const graphql = require('graphql');
9
- const utils = require('@graphql-tools/utils/es5');
10
-
11
- /* eslint-disable @typescript-eslint/triple-slash-reference */
12
- var VALID_EXTENSIONS = ['graphql', 'graphqls', 'gql', 'gqls'];
13
- function handleModule(m, filename) {
14
- var sources = load.loadTypedefsSync(filename, {
15
- loaders: [new graphqlFileLoader.GraphQLFileLoader()],
16
- });
17
- var documents = sources.map(function (source) { return source.document; }).filter(utils.isSome);
18
- var mergedDoc = graphql.concatAST(documents);
19
- m.exports = mergedDoc;
20
- }
21
- function registerGraphQLExtensions(nodeRequire) {
22
- var e_1, _a;
23
- try {
24
- for (var VALID_EXTENSIONS_1 = tslib.__values(VALID_EXTENSIONS), VALID_EXTENSIONS_1_1 = VALID_EXTENSIONS_1.next(); !VALID_EXTENSIONS_1_1.done; VALID_EXTENSIONS_1_1 = VALID_EXTENSIONS_1.next()) {
25
- var ext = VALID_EXTENSIONS_1_1.value;
26
- nodeRequire.extensions["." + ext] = handleModule;
27
- }
28
- }
29
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
30
- finally {
31
- try {
32
- if (VALID_EXTENSIONS_1_1 && !VALID_EXTENSIONS_1_1.done && (_a = VALID_EXTENSIONS_1.return)) _a.call(VALID_EXTENSIONS_1);
33
- }
34
- finally { if (e_1) throw e_1.error; }
35
- }
36
- }
37
- registerGraphQLExtensions(require);
38
-
39
- exports.handleModule = handleModule;
40
- exports.registerGraphQLExtensions = registerGraphQLExtensions;
package/es5/index.mjs DELETED
@@ -1,35 +0,0 @@
1
- import { __values } from 'tslib';
2
- import { loadTypedefsSync } from '@graphql-tools/load/es5';
3
- import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader/es5';
4
- import { concatAST } from 'graphql';
5
- import { isSome } from '@graphql-tools/utils/es5';
6
-
7
- /* eslint-disable @typescript-eslint/triple-slash-reference */
8
- var VALID_EXTENSIONS = ['graphql', 'graphqls', 'gql', 'gqls'];
9
- function handleModule(m, filename) {
10
- var sources = loadTypedefsSync(filename, {
11
- loaders: [new GraphQLFileLoader()],
12
- });
13
- var documents = sources.map(function (source) { return source.document; }).filter(isSome);
14
- var mergedDoc = concatAST(documents);
15
- m.exports = mergedDoc;
16
- }
17
- function registerGraphQLExtensions(nodeRequire) {
18
- var e_1, _a;
19
- try {
20
- for (var VALID_EXTENSIONS_1 = __values(VALID_EXTENSIONS), VALID_EXTENSIONS_1_1 = VALID_EXTENSIONS_1.next(); !VALID_EXTENSIONS_1_1.done; VALID_EXTENSIONS_1_1 = VALID_EXTENSIONS_1.next()) {
21
- var ext = VALID_EXTENSIONS_1_1.value;
22
- nodeRequire.extensions["." + ext] = handleModule;
23
- }
24
- }
25
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
26
- finally {
27
- try {
28
- if (VALID_EXTENSIONS_1_1 && !VALID_EXTENSIONS_1_1.done && (_a = VALID_EXTENSIONS_1.return)) _a.call(VALID_EXTENSIONS_1);
29
- }
30
- finally { if (e_1) throw e_1.error; }
31
- }
32
- }
33
- registerGraphQLExtensions(require);
34
-
35
- export { handleModule, registerGraphQLExtensions };
package/es5/package.json DELETED
@@ -1,37 +0,0 @@
1
- {
2
- "name": "@graphql-tools/node-require/es5",
3
- "version": "6.3.1-alpha-db7f3b43.0",
4
- "description": "A set of utils for faster development of GraphQL tools",
5
- "sideEffects": false,
6
- "peerDependencies": {
7
- "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
8
- },
9
- "dependencies": {
10
- "@graphql-tools/graphql-file-loader": "^7.1.0",
11
- "@graphql-tools/load": "7.2.1-alpha-db7f3b43.0",
12
- "@graphql-tools/utils": "^8.2.0",
13
- "tslib": "~2.3.0"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "ardatan/graphql-tools",
18
- "directory": "packages/node-require"
19
- },
20
- "license": "MIT",
21
- "main": "index.js",
22
- "module": "index.mjs",
23
- "typings": "index.d.ts",
24
- "typescript": {
25
- "definition": "index.d.ts"
26
- },
27
- "exports": {
28
- ".": {
29
- "require": "./index.js",
30
- "import": "./index.mjs"
31
- },
32
- "./*": {
33
- "require": "./*.js",
34
- "import": "./*.mjs"
35
- }
36
- }
37
- }