@graphql-codegen/typescript-jit-sdk 2.1.6 → 3.0.0-alpha-20230524082546-d7e1d0a4a

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/config.js CHANGED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
package/cjs/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.JitSdkVisitor = exports.validate = exports.plugin = void 0;
4
- const plugin_helpers_1 = require("@graphql-codegen/plugin-helpers");
5
- const graphql_1 = require("graphql");
6
4
  const path_1 = require("path");
5
+ const graphql_1 = require("graphql");
6
+ const plugin_helpers_1 = require("@graphql-codegen/plugin-helpers");
7
7
  const visitor_js_1 = require("./visitor.js");
8
8
  Object.defineProperty(exports, "JitSdkVisitor", { enumerable: true, get: function () { return visitor_js_1.JitSdkVisitor; } });
9
9
  const plugin = (schema, documents, config) => {
package/cjs/visitor.js CHANGED
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.JitSdkVisitor = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const visitor_plugin_common_1 = require("@graphql-codegen/visitor-plugin-common");
6
5
  const auto_bind_1 = tslib_1.__importDefault(require("auto-bind"));
7
6
  const graphql_1 = require("graphql");
7
+ const visitor_plugin_common_1 = require("@graphql-codegen/visitor-plugin-common");
8
8
  class JitSdkVisitor extends visitor_plugin_common_1.ClientSideBaseVisitor {
9
9
  constructor(schema, fragments, rawConfig) {
10
10
  super(schema, fragments, rawConfig, {});
@@ -12,7 +12,8 @@ class JitSdkVisitor extends visitor_plugin_common_1.ClientSideBaseVisitor {
12
12
  (0, auto_bind_1.default)(this);
13
13
  const importType = this.config.useTypeImports ? 'import type' : 'import';
14
14
  this._additionalImports.push(`${importType} { GraphQLSchema, ExecutionResult } from 'graphql';`);
15
- if (this.config.documentMode !== visitor_plugin_common_1.DocumentMode.string && this.config.documentMode !== visitor_plugin_common_1.DocumentMode.graphQLTag) {
15
+ if (this.config.documentMode !== visitor_plugin_common_1.DocumentMode.string &&
16
+ this.config.documentMode !== visitor_plugin_common_1.DocumentMode.graphQLTag) {
16
17
  this._additionalImports.push(`${importType} { DocumentNode } from 'graphql';`);
17
18
  }
18
19
  if (this.config.documentMode === visitor_plugin_common_1.DocumentMode.string) {
package/esm/config.js CHANGED
@@ -1 +0,0 @@
1
- export {};
package/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { oldVisit } from '@graphql-codegen/plugin-helpers';
2
- import { concatAST, Kind } from 'graphql';
3
1
  import { extname } from 'path';
2
+ import { concatAST, Kind } from 'graphql';
3
+ import { oldVisit } from '@graphql-codegen/plugin-helpers';
4
4
  import { JitSdkVisitor } from './visitor.js';
5
5
  export const plugin = (schema, documents, config) => {
6
6
  const allAst = concatAST(documents.reduce((prev, v) => {
package/esm/visitor.js CHANGED
@@ -1,6 +1,6 @@
1
- import { ClientSideBaseVisitor, DocumentMode, indentMultiline, } from '@graphql-codegen/visitor-plugin-common';
2
1
  import autoBind from 'auto-bind';
3
2
  import { Kind, print } from 'graphql';
3
+ import { ClientSideBaseVisitor, DocumentMode, indentMultiline, } from '@graphql-codegen/visitor-plugin-common';
4
4
  export class JitSdkVisitor extends ClientSideBaseVisitor {
5
5
  constructor(schema, fragments, rawConfig) {
6
6
  super(schema, fragments, rawConfig, {});
@@ -8,7 +8,8 @@ export class JitSdkVisitor extends ClientSideBaseVisitor {
8
8
  autoBind(this);
9
9
  const importType = this.config.useTypeImports ? 'import type' : 'import';
10
10
  this._additionalImports.push(`${importType} { GraphQLSchema, ExecutionResult } from 'graphql';`);
11
- if (this.config.documentMode !== DocumentMode.string && this.config.documentMode !== DocumentMode.graphQLTag) {
11
+ if (this.config.documentMode !== DocumentMode.string &&
12
+ this.config.documentMode !== DocumentMode.graphQLTag) {
12
13
  this._additionalImports.push(`${importType} { DocumentNode } from 'graphql';`);
13
14
  }
14
15
  if (this.config.documentMode === DocumentMode.string) {
package/package.json CHANGED
@@ -1,25 +1,28 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-jit-sdk",
3
- "version": "2.1.6",
3
+ "version": "3.0.0-alpha-20230524082546-d7e1d0a4a",
4
4
  "description": "GraphQL Code Generator plugin for generating a ready-to-use SDK that uses GraphQL JIT",
5
5
  "peerDependencies": {
6
+ "@graphql-tools/utils": "^8.8.0",
6
7
  "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
7
- "graphql-tag": "^2.0.0",
8
8
  "graphql-jit": "^0.6.0 || ^0.7.0",
9
- "@graphql-tools/utils": "^8.8.0"
9
+ "graphql-tag": "^2.0.0"
10
10
  },
11
11
  "dependencies": {
12
- "@graphql-codegen/plugin-helpers": "^2.7.2",
12
+ "@graphql-codegen/plugin-helpers": "^3.0.0",
13
13
  "@graphql-codegen/visitor-plugin-common": "2.13.1",
14
14
  "auto-bind": "~4.0.0",
15
15
  "tslib": "~2.4.0"
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "https://github.com/dotansimha/graphql-code-generator.git",
19
+ "url": "https://github.com/dotansimha/graphql-code-generator-community.git",
20
20
  "directory": "packages/plugins/typescript/jit-sdk"
21
21
  },
22
22
  "license": "MIT",
23
+ "engines": {
24
+ "node": ">= 16.0.0"
25
+ },
23
26
  "main": "cjs/index.js",
24
27
  "module": "esm/index.js",
25
28
  "typings": "typings/index.d.ts",
@@ -1,5 +1,5 @@
1
- import { ClientSideBasePluginConfig, ClientSideBaseVisitor, LoadedFragment } from '@graphql-codegen/visitor-plugin-common';
2
1
  import { GraphQLSchema, OperationDefinitionNode } from 'graphql';
2
+ import { ClientSideBasePluginConfig, ClientSideBaseVisitor, LoadedFragment } from '@graphql-codegen/visitor-plugin-common';
3
3
  import { RawJitSdkPluginConfig } from './config.cjs';
4
4
  export interface JitSdkPluginConfig extends ClientSideBasePluginConfig {
5
5
  }
@@ -1,5 +1,5 @@
1
- import { ClientSideBasePluginConfig, ClientSideBaseVisitor, LoadedFragment } from '@graphql-codegen/visitor-plugin-common';
2
1
  import { GraphQLSchema, OperationDefinitionNode } from 'graphql';
2
+ import { ClientSideBasePluginConfig, ClientSideBaseVisitor, LoadedFragment } from '@graphql-codegen/visitor-plugin-common';
3
3
  import { RawJitSdkPluginConfig } from './config.js';
4
4
  export interface JitSdkPluginConfig extends ClientSideBasePluginConfig {
5
5
  }