graphql-atg
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -44,2 +44,3 @@ { | ||
], | ||
"import/extensions": ["error", "always"], | ||
"sort-imports": [ | ||
@@ -46,0 +47,0 @@ "error", |
@@ -1,3 +0,3 @@ | ||
import { runGraphQLAtg } from './lib/core/atg/graphqlAtg'; | ||
import { getAtgConfiguration } from './lib/core/cli/cli'; | ||
import { runGraphQLAtg } from '@lib/core/atg/graphqlAtg.js'; | ||
import { getAtgConfiguration } from '@lib/core/cli/cli.js'; | ||
async function run() { | ||
@@ -4,0 +4,0 @@ const config = await getAtgConfiguration(); |
@@ -1,3 +0,3 @@ | ||
import { Kind, } from '../../introspection/types'; | ||
import { GraphQLIntrospectionResultError } from '../error'; | ||
import { Kind, } from '../../introspection/types.js'; | ||
import { GraphQLIntrospectionResultError } from '../error.js'; | ||
export function unwrapFieldType(field, typesByName) { | ||
@@ -4,0 +4,0 @@ return unwrapType(field.type, typesByName, field.name); |
import _ from 'lodash'; | ||
import micromatch from 'micromatch'; | ||
import { Kind, } from '../../introspection/types'; | ||
import { NullGenerationStrategy, } from '../config'; | ||
import { GraphQLGenerationError } from '../error'; | ||
import { DEFAULT_FACTORIES } from './defaultFactories'; | ||
import { createIntrospectionError, isList, isNonNull, typeToString, unwrapList, unwrapNonNull, unwrapType, } from './extractor'; | ||
import { Kind, } from '../../introspection/types.js'; | ||
import { NullGenerationStrategy, } from '../config.js'; | ||
import { GraphQLGenerationError } from '../error.js'; | ||
import { DEFAULT_FACTORIES } from './defaultFactories.js'; | ||
import { createIntrospectionError, isList, isNonNull, typeToString, unwrapList, unwrapNonNull, unwrapType, } from './extractor.js'; | ||
export function generateArgsForField(field, typesByName, config) { | ||
@@ -9,0 +9,0 @@ return field.args.map((argument) => generateInputParameter(argument, typesByName, config)); |
@@ -1,7 +0,7 @@ | ||
import { queryBuilder, subSelectionBuilder, } from '../../../graphql/query/builder'; | ||
import { newTask } from '../../../task/task'; | ||
import { queryBuilder, subSelectionBuilder, } from '@lib/core/graphql/query/builder.js'; | ||
import { newTask } from '@lib/core/task/task.js'; | ||
import _ from 'lodash'; | ||
import { NullGenerationStrategy } from '../config'; | ||
import { getRequiredType, isLeaf, unwrapFieldType } from './extractor'; | ||
import { generateArgsForField } from './fakeGenerator'; | ||
import { NullGenerationStrategy } from '../config.js'; | ||
import { getRequiredType, isLeaf, unwrapFieldType } from './extractor.js'; | ||
import { generateArgsForField } from './fakeGenerator.js'; | ||
const DEFAULT_CONFIG = { | ||
@@ -8,0 +8,0 @@ maxDepth: 5, |
@@ -1,5 +0,5 @@ | ||
import { createClient } from '../../infrastructure/graphql/client'; | ||
import { generateGraphQLQueries } from './generator/query/queryGenerator'; | ||
import { introspect } from './introspection/introspecter'; | ||
import { executeQueries } from './runner/runner'; | ||
import { createClient } from '@lib/infrastructure/graphql/client.js'; | ||
import { generateGraphQLQueries } from './generator/query/queryGenerator.js'; | ||
import { introspect } from './introspection/introspecter.js'; | ||
import { executeQueries } from './runner/runner.js'; | ||
export async function runGraphQLAtg(config) { | ||
@@ -6,0 +6,0 @@ const client = createClient(config.endpoint, config.headers); |
@@ -1,4 +0,4 @@ | ||
import { GraphQLQueryError } from '../../graphql/error'; | ||
import { newTask } from '../../task/task'; | ||
import { INTROSPECTION_QUERY } from './query'; | ||
import { GraphQLQueryError } from '@lib/core/graphql/error.js'; | ||
import { newTask } from '@lib/core/task/task.js'; | ||
import { INTROSPECTION_QUERY } from './query.js'; | ||
const DEFAULT_INTROSPECTION_CONFIG = { | ||
@@ -5,0 +5,0 @@ includeDeprecated: true, |
@@ -1,2 +0,2 @@ | ||
import gql from '../../graphql/gql'; | ||
import gql from '@lib/core/graphql/gql.js'; | ||
export const INTROSPECTION_QUERY = gql ` | ||
@@ -3,0 +3,0 @@ query IntrospectionQuery($includeDeprecated: Boolean) { |
/* eslint-disable functional/no-this-expression */ | ||
/* eslint-disable functional/no-class */ | ||
import { minify, prettify } from '../../graphql/gql'; | ||
import { minify, prettify } from '@lib/core/graphql/gql.js'; | ||
export class FailedGraphQLRequestError extends Error { | ||
@@ -5,0 +5,0 @@ constructor(details) { |
@@ -1,3 +0,3 @@ | ||
import { newMultiTask } from '../../task/task'; | ||
import { FailedGraphQLRequestError } from './error'; | ||
import { newMultiTask } from '@lib/core/task/task.js'; | ||
import { FailedGraphQLRequestError } from './error.js'; | ||
const DEFAULT_RUNNER_CONFIG = { | ||
@@ -4,0 +4,0 @@ concurrency: 1, |
import { InvalidArgumentError, Option, program } from 'commander'; | ||
import _ from 'lodash'; | ||
import { NullGenerationStrategy } from '../atg/generator/config'; | ||
import { NullGenerationStrategy, } from '../atg/generator/config.js'; | ||
export async function getAtgConfiguration() { | ||
@@ -5,0 +5,0 @@ const version = process.env.npm_package_version || 'unknown'; |
import compress from 'graphql-query-compress'; | ||
import { gql as implementation } from 'graphql-request'; | ||
import prettierGraphql from 'prettier/parser-graphql'; | ||
import prettier from 'prettier/standalone'; | ||
import prettierGraphql from 'prettier/parser-graphql.js'; | ||
import prettier from 'prettier/standalone.js'; | ||
export default function (chunks) { | ||
@@ -6,0 +6,0 @@ return implementation(chunks); |
{ | ||
"name": "graphql-atg", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "GraphQL Automated Test Generator (ATG) generates automatic tests for you API by fetching the GraphQL introspection schema and by automatically generating requests for that API", | ||
@@ -32,3 +32,3 @@ "main": "build/index.js", | ||
"version": "standard-version", | ||
"clean": "rm -r build build-testserver coverage || true" | ||
"clean": "rm -r build build-testserver coverage buildcache || true" | ||
}, | ||
@@ -39,4 +39,2 @@ "engines": { | ||
"dependencies": { | ||
"@types/node": "^16.11.1", | ||
"async-mutex": "^0.3.2", | ||
"commander": "^8.2.0", | ||
@@ -59,2 +57,3 @@ "faker": "^5.5.3", | ||
"@types/micromatch": "^4.0.2", | ||
"@types/node": "^16.11.4", | ||
"@types/omit-deep-lodash": "^1.1.1", | ||
@@ -77,2 +76,3 @@ "@typescript-eslint/eslint-plugin": "^5.0.0", | ||
"jest": "^27.2.5", | ||
"jest-ts-webcompat-resolver": "^1.0.0", | ||
"npm-run-all": "^4.1.5", | ||
@@ -110,2 +110,3 @@ "omit-deep-lodash": "^1.1.5", | ||
}, | ||
"resolver": "jest-ts-webcompat-resolver", | ||
"coverageReporters": [ | ||
@@ -112,0 +113,0 @@ "html", |
@@ -22,3 +22,2 @@ import type { IResolvers } from '@graphql-tools/utils' | ||
resolvers: resolvers, | ||
}) | ||
@@ -25,0 +24,0 @@ |
import { | ||
GeneratorConfig, | ||
NullGenerationStrategy, | ||
} from '@lib/core/atg/generator/config' | ||
import { GraphQLIntrospectionResultError } from '@lib/core/atg/generator/error' | ||
import { generateGraphQLQueries } from '@lib/core/atg/generator/query/queryGenerator' | ||
import gql, { minify, prettify } from '@lib/core/graphql/gql' | ||
import { GraphQLQuery } from '@lib/core/graphql/query/query' | ||
import { INTROSPECTION_SCHEMA } from '@test/__utils__/farm/server' | ||
} from '@lib/core/atg/generator/config.js' | ||
import { GraphQLIntrospectionResultError } from '@lib/core/atg/generator/error.js' | ||
import { generateGraphQLQueries } from '@lib/core/atg/generator/query/queryGenerator.js' | ||
import gql, { minify, prettify } from '@lib/core/graphql/gql.js' | ||
import { GraphQLQuery } from '@lib/core/graphql/query/query.js' | ||
import { INTROSPECTION_SCHEMA } from '@test/__utils__/farm/server.js' | ||
@@ -11,0 +11,0 @@ const DEFAULT_CONFIG: GeneratorConfig = { |
@@ -1,9 +0,8 @@ | ||
import { introspect } from '@lib/core/atg/introspection/introspecter' | ||
import { INTROSPECTION_QUERY } from '@lib/core/atg/introspection/query' | ||
import { createClient } from '@lib/infrastructure/graphql/client' | ||
import { introspect } from '@lib/core/atg/introspection/introspecter.js' | ||
import { createClient } from '@lib/infrastructure/graphql/client.js' | ||
import { | ||
INTROSPECTION_SCHEMA, | ||
startFarmServer, | ||
} from '@test/__utils__/farm/server' | ||
import { lazy } from '@test/__utils__/lazy' | ||
} from '@test/__utils__/farm/server.js' | ||
import { lazy } from '@test/__utils__/lazy.js' | ||
import _ from 'lodash' | ||
@@ -10,0 +9,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { runGraphQLAtg } from '@lib/core/atg/graphqlAtg' | ||
import { getAtgConfiguration } from '@lib/core/cli/cli' | ||
import { runGraphQLAtg } from '@lib/core/atg/graphqlAtg.js' | ||
import { getAtgConfiguration } from '@lib/core/cli/cli.js' | ||
@@ -4,0 +4,0 @@ async function run() { |
@@ -1,6 +0,6 @@ | ||
import { Headers } from '@lib/infrastructure/graphql/client' | ||
import { Headers } from '@lib/infrastructure/graphql/client.js' | ||
import { GeneratorConfig } from './generator/config' | ||
import { IntrospectionQueryConfig } from './introspection/config' | ||
import { RunnerConfig } from './runner/config' | ||
import { GeneratorConfig } from './generator/config.js' | ||
import { IntrospectionQueryConfig } from './introspection/config.js' | ||
import { RunnerConfig } from './runner/config.js' | ||
@@ -7,0 +7,0 @@ export type GraphQLAtgConfig = { |
import faker from 'faker' | ||
import { GraphQLFactory } from '../config' | ||
import { GraphQLFactory } from '../config.js' | ||
@@ -5,0 +5,0 @@ export const DEFAULT_FACTORIES: Record<string, GraphQLFactory> = { |
@@ -7,6 +7,6 @@ import { | ||
TypeRef, | ||
} from '../../introspection/types' | ||
import { GraphQLIntrospectionResultError } from '../error' | ||
} from '../../introspection/types.js' | ||
import { GraphQLIntrospectionResultError } from '../error.js' | ||
import { TypesByName } from './types' | ||
import { TypesByName } from './types.js' | ||
@@ -13,0 +13,0 @@ export function unwrapFieldType( |
@@ -1,2 +0,2 @@ | ||
import { Parameter } from '@lib/core/graphql/query/builder' | ||
import { Parameter } from '@lib/core/graphql/query/builder.js' | ||
import _ from 'lodash' | ||
@@ -11,3 +11,3 @@ import micromatch from 'micromatch' | ||
TypeRef, | ||
} from '../../introspection/types' | ||
} from '../../introspection/types.js' | ||
import { | ||
@@ -17,6 +17,6 @@ GeneratorConfig, | ||
NullGenerationStrategy, | ||
} from '../config' | ||
import { GraphQLGenerationError } from '../error' | ||
} from '../config.js' | ||
import { GraphQLGenerationError } from '../error.js' | ||
import { DEFAULT_FACTORIES } from './defaultFactories' | ||
import { DEFAULT_FACTORIES } from './defaultFactories.js' | ||
import { | ||
@@ -30,4 +30,4 @@ createIntrospectionError, | ||
unwrapType, | ||
} from './extractor' | ||
import { TypesByName } from './types' | ||
} from './extractor.js' | ||
import { TypesByName } from './types.js' | ||
@@ -34,0 +34,0 @@ export function generateArgsForField( |
@@ -6,7 +6,7 @@ import { | ||
subSelectionBuilder, | ||
} from '@lib/core/graphql/query/builder' | ||
import { newTask } from '@lib/core/task/task' | ||
} from '@lib/core/graphql/query/builder.js' | ||
import { newTask } from '@lib/core/task/task.js' | ||
import _ from 'lodash' | ||
import { GraphQLQuery } from '../../../graphql/query/query' | ||
import { GraphQLQuery } from '../../../graphql/query/query.js' | ||
import { | ||
@@ -16,8 +16,8 @@ Field, | ||
GraphQLIntrospectionResult, | ||
} from '../../introspection/types' | ||
import { GeneratorConfig, NullGenerationStrategy } from '../config' | ||
} from '../../introspection/types.js' | ||
import { GeneratorConfig, NullGenerationStrategy } from '../config.js' | ||
import { getRequiredType, isLeaf, unwrapFieldType } from './extractor' | ||
import { generateArgsForField } from './fakeGenerator' | ||
import { TypesByName } from './types' | ||
import { getRequiredType, isLeaf, unwrapFieldType } from './extractor.js' | ||
import { generateArgsForField } from './fakeGenerator.js' | ||
import { TypesByName } from './types.js' | ||
@@ -24,0 +24,0 @@ const DEFAULT_CONFIG: GeneratorConfig = { |
@@ -1,3 +0,3 @@ | ||
import { FullType } from '../../introspection/types' | ||
import { FullType } from '../../introspection/types.js' | ||
export type TypesByName = Record<string, FullType> |
@@ -1,7 +0,7 @@ | ||
import { createClient } from '@lib/infrastructure/graphql/client' | ||
import { createClient } from '@lib/infrastructure/graphql/client.js' | ||
import { GraphQLAtgConfig } from './config' | ||
import { generateGraphQLQueries } from './generator/query/queryGenerator' | ||
import { introspect } from './introspection/introspecter' | ||
import { executeQueries, QueryExecutionResults } from './runner/runner' | ||
import { GraphQLAtgConfig } from './config.js' | ||
import { generateGraphQLQueries } from './generator/query/queryGenerator.js' | ||
import { introspect } from './introspection/introspecter.js' | ||
import { executeQueries, QueryExecutionResults } from './runner/runner.js' | ||
@@ -8,0 +8,0 @@ export async function runGraphQLAtg( |
@@ -1,8 +0,8 @@ | ||
import { GraphQLClient, GraphQLResponse } from '@lib/core/graphql/client' | ||
import { GraphQLQueryError } from '@lib/core/graphql/error' | ||
import { newTask } from '@lib/core/task/task' | ||
import { GraphQLClient, GraphQLResponse } from '@lib/core/graphql/client.js' | ||
import { GraphQLQueryError } from '@lib/core/graphql/error.js' | ||
import { newTask } from '@lib/core/task/task.js' | ||
import { IntrospectionQueryConfig } from './config' | ||
import { INTROSPECTION_QUERY } from './query' | ||
import { GraphQLIntrospectionResult } from './types' | ||
import { IntrospectionQueryConfig } from './config.js' | ||
import { INTROSPECTION_QUERY } from './query.js' | ||
import { GraphQLIntrospectionResult } from './types.js' | ||
@@ -9,0 +9,0 @@ const DEFAULT_INTROSPECTION_CONFIG: IntrospectionQueryConfig = { |
@@ -1,2 +0,2 @@ | ||
import gql from '@lib/core/graphql/gql' | ||
import gql from '@lib/core/graphql/gql.js' | ||
@@ -3,0 +3,0 @@ export const INTROSPECTION_QUERY = gql` |
/* eslint-disable functional/no-this-expression */ | ||
/* eslint-disable functional/no-class */ | ||
import { minify, prettify } from '@lib/core/graphql/gql' | ||
import { minify, prettify } from '@lib/core/graphql/gql.js' | ||
import { QueryExecutionResultDetails } from './runner' | ||
import { QueryExecutionResultDetails } from './runner.js' | ||
@@ -8,0 +8,0 @@ export class FailedGraphQLRequestError extends Error { |
@@ -1,7 +0,7 @@ | ||
import { GraphQLClient, GraphQLResponse } from '@lib/core/graphql/client' | ||
import { GraphQLQuery } from '@lib/core/graphql/query/query' | ||
import { newMultiTask } from '@lib/core/task/task' | ||
import { GraphQLClient, GraphQLResponse } from '@lib/core/graphql/client.js' | ||
import { GraphQLQuery } from '@lib/core/graphql/query/query.js' | ||
import { newMultiTask } from '@lib/core/task/task.js' | ||
import { RunnerConfig } from './config' | ||
import { FailedGraphQLRequestError } from './error' | ||
import { RunnerConfig } from './config.js' | ||
import { FailedGraphQLRequestError } from './error.js' | ||
@@ -8,0 +8,0 @@ export type QueryExecutionResultDetails = { |
@@ -1,7 +0,10 @@ | ||
import { Headers } from '@lib/infrastructure/graphql/client' | ||
import { Headers } from '@lib/infrastructure/graphql/client.js' | ||
import { InvalidArgumentError, Option, program } from 'commander' | ||
import _ from 'lodash' | ||
import { GraphQLAtgConfig } from '../atg/config' | ||
import { GraphQLFactory, NullGenerationStrategy } from '../atg/generator/config' | ||
import { GraphQLAtgConfig } from '../atg/config.js' | ||
import { | ||
GraphQLFactory, | ||
NullGenerationStrategy, | ||
} from '../atg/generator/config.js' | ||
@@ -8,0 +11,0 @@ export async function getAtgConfiguration(): Promise<GraphQLAtgConfig> { |
/* eslint-disable functional/no-this-expression */ | ||
/* eslint-disable functional/no-class */ | ||
import { GraphQLResponse } from './client' | ||
import { GraphQLResponse } from './client.js' | ||
@@ -6,0 +6,0 @@ export class GraphQLQueryError<T> extends Error { |
import compress from 'graphql-query-compress' | ||
import { gql as implementation } from 'graphql-request' | ||
import prettierGraphql from 'prettier/parser-graphql' | ||
import prettier from 'prettier/standalone' | ||
import prettierGraphql from 'prettier/parser-graphql.js' | ||
import prettier from 'prettier/standalone.js' | ||
@@ -6,0 +6,0 @@ export default function (chunks: TemplateStringsArray): string { |
@@ -6,3 +6,3 @@ /* eslint-disable functional/prefer-readonly-type */ | ||
import { GraphQLQuery } from './query' | ||
import { GraphQLQuery } from './query.js' | ||
@@ -9,0 +9,0 @@ export enum QueryType { |
@@ -1,2 +0,2 @@ | ||
import { GraphQLVariables } from '@lib/core/graphql/client' | ||
import { GraphQLVariables } from '@lib/core/graphql/client.js' | ||
@@ -3,0 +3,0 @@ export type GraphQLQuery = { |
/* eslint-disable functional/immutable-data */ | ||
import { Listr, ListrDefaultRendererOptions, ListrRendererValue } from 'listr2' | ||
import { TaskWrapper } from 'listr2/dist/lib/task-wrapper' | ||
import { TaskWrapper } from 'listr2/dist/lib/task-wrapper.js' | ||
@@ -6,0 +6,0 @@ const RENDERER_OPTIONS: ListrDefaultRendererOptions<ListrRendererValue> = { |
@@ -1,2 +0,2 @@ | ||
import { GraphQLClient, GraphQLVariables } from '@lib/core/graphql/client' | ||
import { GraphQLClient, GraphQLVariables } from '@lib/core/graphql/client.js' | ||
import { ClientError, GraphQLClient as NativeClient } from 'graphql-request' | ||
@@ -3,0 +3,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9
1303631
34
86
5074
- Removed@types/node@^16.11.1
- Removedasync-mutex@^0.3.2
- Removed@types/node@16.18.123(transitive)
- Removedasync-mutex@0.3.2(transitive)