@graphql-tools/code-file-loader 8.1.8 → 8.1.9

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/exports.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pickExportFromModuleSync = exports.pickExportFromModule = void 0;
3
+ exports.pickExportFromModule = pickExportFromModule;
4
+ exports.pickExportFromModuleSync = pickExportFromModuleSync;
4
5
  const graphql_1 = require("graphql");
5
6
  const helpers_js_1 = require("./helpers.js");
6
7
  const identifiersToLookFor = ['default', 'schema', 'typeDefs', 'data'];
@@ -12,7 +13,6 @@ function pickExportFromModule({ module, filepath }) {
12
13
  ensureModule({ module, filepath });
13
14
  return resolveModule(ensureExports({ module, filepath }));
14
15
  }
15
- exports.pickExportFromModule = pickExportFromModule;
16
16
  /**
17
17
  * @internal
18
18
  */
@@ -20,7 +20,6 @@ function pickExportFromModuleSync({ module, filepath }) {
20
20
  ensureModule({ module, filepath });
21
21
  return resolveModuleSync(ensureExports({ module, filepath }));
22
22
  }
23
- exports.pickExportFromModuleSync = pickExportFromModuleSync;
24
23
  // module
25
24
  async function resolveModule(identifiers) {
26
25
  const exportValue = await (0, helpers_js_1.pick)(await identifiers, identifiersToLookFor);
package/cjs/helpers.js CHANGED
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSchemaAst = exports.isSchemaJson = exports.isWrappedSchemaJson = exports.isSchemaText = exports.pick = void 0;
3
+ exports.pick = pick;
4
+ exports.isSchemaText = isSchemaText;
5
+ exports.isWrappedSchemaJson = isWrappedSchemaJson;
6
+ exports.isSchemaJson = isSchemaJson;
7
+ exports.isSchemaAst = isSchemaAst;
4
8
  /**
5
9
  * @internal
6
10
  */
@@ -12,7 +16,6 @@ function pick(obj, keys) {
12
16
  }
13
17
  return obj;
14
18
  }
15
- exports.pick = pick;
16
19
  // checkers
17
20
  /**
18
21
  * @internal
@@ -20,7 +23,6 @@ exports.pick = pick;
20
23
  function isSchemaText(obj) {
21
24
  return typeof obj === 'string';
22
25
  }
23
- exports.isSchemaText = isSchemaText;
24
26
  /**
25
27
  * @internal
26
28
  */
@@ -28,7 +30,6 @@ function isWrappedSchemaJson(obj) {
28
30
  const json = obj;
29
31
  return json.data !== undefined && json.data.__schema !== undefined;
30
32
  }
31
- exports.isWrappedSchemaJson = isWrappedSchemaJson;
32
33
  /**
33
34
  * @internal
34
35
  */
@@ -36,11 +37,9 @@ function isSchemaJson(obj) {
36
37
  const json = obj;
37
38
  return json !== undefined && json.__schema !== undefined;
38
39
  }
39
- exports.isSchemaJson = isSchemaJson;
40
40
  /**
41
41
  * @internal
42
42
  */
43
43
  function isSchemaAst(obj) {
44
44
  return obj.kind !== undefined;
45
45
  }
46
- exports.isSchemaAst = isSchemaAst;
@@ -15,15 +15,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.tryToLoadFromExportSync = exports.tryToLoadFromExport = void 0;
36
+ exports.tryToLoadFromExport = tryToLoadFromExport;
37
+ exports.tryToLoadFromExportSync = tryToLoadFromExportSync;
27
38
  const exports_js_1 = require("./exports.js");
28
39
  /**
29
40
  * @internal
@@ -38,7 +49,6 @@ async function tryToLoadFromExport(rawFilePath) {
38
49
  throw new Error(`Unable to load from file "${rawFilePath}": ${e.stack || e.message}`);
39
50
  }
40
51
  }
41
- exports.tryToLoadFromExport = tryToLoadFromExport;
42
52
  /**
43
53
  * @internal
44
54
  */
@@ -53,7 +63,6 @@ function tryToLoadFromExportSync(rawFilePath) {
53
63
  throw new Error(`Unable to load from file "${rawFilePath}": ${e.stack || e.message}`);
54
64
  }
55
65
  }
56
- exports.tryToLoadFromExportSync = tryToLoadFromExportSync;
57
66
  /**
58
67
  * @internal
59
68
  */
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@graphql-tools/code-file-loader",
3
- "version": "8.1.8",
3
+ "version": "8.1.9",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
8
8
  },
9
9
  "dependencies": {
10
- "@graphql-tools/graphql-tag-pluck": "8.3.7",
11
- "@graphql-tools/utils": "^10.6.2",
10
+ "@graphql-tools/graphql-tag-pluck": "8.3.8",
11
+ "@graphql-tools/utils": "^10.6.3",
12
12
  "globby": "^11.0.3",
13
13
  "tslib": "^2.4.0",
14
14
  "unixify": "^1.0.0"