@graphql-codegen/typescript-mongodb 2.4.6 → 3.0.0-alpha-20230524083052-08ce957b4
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/fields-tree.js +1 -1
- package/cjs/index.js +2 -2
- package/cjs/visitor.js +3 -3
- package/esm/fields-tree.js +1 -1
- package/esm/index.js +2 -2
- package/esm/visitor.js +3 -3
- package/package.json +6 -3
- package/typings/visitor.d.cts +2 -2
- package/typings/visitor.d.ts +2 -2
package/cjs/fields-tree.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FieldsTree = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const visitor_plugin_common_1 = require("@graphql-codegen/visitor-plugin-common");
|
|
6
5
|
const set_js_1 = tslib_1.__importDefault(require("lodash/set.js"));
|
|
6
|
+
const visitor_plugin_common_1 = require("@graphql-codegen/visitor-plugin-common");
|
|
7
7
|
class FieldsTree {
|
|
8
8
|
constructor() {
|
|
9
9
|
this._fields = {};
|
package/cjs/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validate = exports.addToSchema = exports.DIRECTIVES = exports.plugin = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const plugin_helpers_1 = require("@graphql-codegen/plugin-helpers");
|
|
6
5
|
const path_1 = require("path");
|
|
7
6
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
8
|
-
const
|
|
7
|
+
const plugin_helpers_1 = require("@graphql-codegen/plugin-helpers");
|
|
9
8
|
const config_js_1 = require("./config.js");
|
|
9
|
+
const visitor_js_1 = require("./visitor.js");
|
|
10
10
|
const plugin = (schema, documents, config) => {
|
|
11
11
|
const visitor = new visitor_js_1.TsMongoVisitor(schema, config);
|
|
12
12
|
const astNode = (0, plugin_helpers_1.getCachedDocumentNodeFromSchema)(schema);
|
package/cjs/visitor.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TsMongoVisitor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const fields_tree_js_1 = require("./fields-tree.js");
|
|
6
|
-
const visitor_plugin_common_1 = require("@graphql-codegen/visitor-plugin-common");
|
|
7
5
|
const auto_bind_1 = tslib_1.__importDefault(require("auto-bind"));
|
|
8
|
-
const config_js_1 = require("./config.js");
|
|
9
6
|
const graphql_1 = require("graphql");
|
|
7
|
+
const visitor_plugin_common_1 = require("@graphql-codegen/visitor-plugin-common");
|
|
8
|
+
const config_js_1 = require("./config.js");
|
|
9
|
+
const fields_tree_js_1 = require("./fields-tree.js");
|
|
10
10
|
function resolveObjectId(pointer) {
|
|
11
11
|
if (!pointer) {
|
|
12
12
|
return { identifier: 'ObjectId', module: 'mongodb' };
|
package/esm/fields-tree.js
CHANGED
package/esm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getCachedDocumentNodeFromSchema, oldVisit, } from '@graphql-codegen/plugin-helpers';
|
|
2
1
|
import { extname } from 'path';
|
|
3
2
|
import gql from 'graphql-tag';
|
|
4
|
-
import {
|
|
3
|
+
import { getCachedDocumentNodeFromSchema, oldVisit, } from '@graphql-codegen/plugin-helpers';
|
|
5
4
|
import { Directives } from './config.js';
|
|
5
|
+
import { TsMongoVisitor } from './visitor.js';
|
|
6
6
|
export const plugin = (schema, documents, config) => {
|
|
7
7
|
const visitor = new TsMongoVisitor(schema, config);
|
|
8
8
|
const astNode = getCachedDocumentNodeFromSchema(schema);
|
package/esm/visitor.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FieldsTree } from './fields-tree.js';
|
|
2
|
-
import { getBaseTypeNode, DeclarationBlock, getConfigValue, BaseVisitor, buildScalarsFromConfig, wrapTypeNodeWithModifiers, } from '@graphql-codegen/visitor-plugin-common';
|
|
3
1
|
import autoBind from 'auto-bind';
|
|
2
|
+
import { isEnumType, Kind, } from 'graphql';
|
|
3
|
+
import { BaseVisitor, buildScalarsFromConfig, DeclarationBlock, getBaseTypeNode, getConfigValue, wrapTypeNodeWithModifiers, } from '@graphql-codegen/visitor-plugin-common';
|
|
4
4
|
import { Directives } from './config.js';
|
|
5
|
-
import {
|
|
5
|
+
import { FieldsTree } from './fields-tree.js';
|
|
6
6
|
function resolveObjectId(pointer) {
|
|
7
7
|
if (!pointer) {
|
|
8
8
|
return { identifier: 'ObjectId', module: 'mongodb' };
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-mongodb",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha-20230524083052-08ce957b4",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generting a ready-to-use ORM types for MongoDB",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"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
7
|
"graphql-tag": "^2.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-codegen/plugin-helpers": "^
|
|
10
|
+
"@graphql-codegen/plugin-helpers": "^3.0.0",
|
|
11
11
|
"@graphql-codegen/typescript": "^2.8.1",
|
|
12
12
|
"@graphql-codegen/visitor-plugin-common": "2.13.1",
|
|
13
13
|
"@graphql-tools/utils": "^8.8.0",
|
|
@@ -17,10 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
|
-
"url": "https://github.com/dotansimha/graphql-code-generator.git",
|
|
20
|
+
"url": "https://github.com/dotansimha/graphql-code-generator-community.git",
|
|
21
21
|
"directory": "packages/plugins/typescript/mongodb"
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">= 16.0.0"
|
|
26
|
+
},
|
|
24
27
|
"main": "cjs/index.js",
|
|
25
28
|
"module": "esm/index.js",
|
|
26
29
|
"typings": "typings/index.d.ts",
|
package/typings/visitor.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphQLSchema, InterfaceTypeDefinitionNode, ObjectTypeDefinitionNode, UnionTypeDefinitionNode } from 'graphql';
|
|
2
|
+
import { BaseVisitor, ParsedConfig } from '@graphql-codegen/visitor-plugin-common';
|
|
2
3
|
import { TypeScriptMongoPluginConfig } from './config.cjs';
|
|
3
|
-
import { GraphQLSchema, ObjectTypeDefinitionNode, InterfaceTypeDefinitionNode, UnionTypeDefinitionNode } from 'graphql';
|
|
4
4
|
export interface TypeScriptMongoPluginParsedConfig extends ParsedConfig {
|
|
5
5
|
dbTypeSuffix: string;
|
|
6
6
|
dbInterfaceSuffix: string;
|
package/typings/visitor.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphQLSchema, InterfaceTypeDefinitionNode, ObjectTypeDefinitionNode, UnionTypeDefinitionNode } from 'graphql';
|
|
2
|
+
import { BaseVisitor, ParsedConfig } from '@graphql-codegen/visitor-plugin-common';
|
|
2
3
|
import { TypeScriptMongoPluginConfig } from './config.js';
|
|
3
|
-
import { GraphQLSchema, ObjectTypeDefinitionNode, InterfaceTypeDefinitionNode, UnionTypeDefinitionNode } from 'graphql';
|
|
4
4
|
export interface TypeScriptMongoPluginParsedConfig extends ParsedConfig {
|
|
5
5
|
dbTypeSuffix: string;
|
|
6
6
|
dbInterfaceSuffix: string;
|