From e65b5a7952d6ed0e94255cd1b9e19b70ab71d779 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Thu, 2 Sep 2021 19:44:37 -0400 Subject: [PATCH 01/33] refactor: remove duplicate core schema type checks (#978) --- src/builder.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/builder.ts b/src/builder.ts index 56e64ce6..f7f60138 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -1716,7 +1716,6 @@ export function makeSchemaInternal(config: SchemaConfig) { builder.addTypes(config.schemaRoots) } const { finalConfig, typeMap, missingTypes, schemaExtension, onAfterBuildFns } = builder.getFinalTypeMap() - const { Query, Mutation, Subscription } = typeMap function getRootType(rootType: 'query' | 'mutation' | 'subscription', defaultType: string) { const rootTypeVal = config.schemaRoots?.[rootType] ?? defaultType @@ -1736,19 +1735,6 @@ export function makeSchemaInternal(config: SchemaConfig) { return returnVal } - /* istanbul ignore next */ - if (!isObjectType(Query)) { - throw new Error(`Expected Query to be a objectType, saw ${Query.constructor.name}`) - } - /* istanbul ignore next */ - if (Mutation && !isObjectType(Mutation)) { - throw new Error(`Expected Mutation to be a objectType, saw ${Mutation.constructor.name}`) - } - /* istanbul ignore next */ - if (Subscription && !isObjectType(Subscription)) { - throw new Error(`Expected Subscription to be a objectType, saw ${Subscription.constructor.name}`) - } - const schema = new GraphQLSchema({ query: getRootType('query', 'Query'), mutation: getRootType('mutation', 'Mutation'), From 7e744aa0d3d2d495f4983e37e94846a2667b3ea7 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Fri, 3 Sep 2021 10:04:28 -0400 Subject: [PATCH 02/33] refactor: Internal type cleanup (#980) * refactor: Internal type cleanup * chore: Remove prettier-plugin-jsdoc as its output is non-determinstic --- package.json | 3 - src/definitions/args.ts | 7 +- src/definitions/definitionBlocks.ts | 6 +- src/definitions/enumType.ts | 8 +- src/definitions/inputObjectType.ts | 4 +- src/definitions/interfaceType.ts | 6 +- src/definitions/list.ts | 6 +- src/definitions/mutationField.ts | 2 +- src/definitions/objectType.ts | 4 +- src/definitions/queryField.ts | 2 +- src/definitions/scalarType.ts | 4 +- src/definitions/unionType.ts | 6 +- src/definitions/wrapping.ts | 47 +++++++- src/plugin.ts | 2 +- src/utils.ts | 7 +- yarn.lock | 176 +--------------------------- 16 files changed, 76 insertions(+), 214 deletions(-) diff --git a/package.json b/package.json index 2f8d3312..99add613 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "release:pr": "dripip pr", "release:preview": "dripip preview", "release:stable": "dripip stable", - "pretest": "yarn patch-package", "test": "yarn test:types && jest --testTimeout 10000", "test:ci": "yarn test:types && jest --maxWorkers 2 --coverage --testTimeout 10000", "test:debug": "node --inspect-brk $(yarn bin)/jest -i --watch", @@ -92,9 +91,7 @@ "jest": "^26.6.3", "jest-watch-typeahead": "^0.6.1", "lint-staged": "^7.3.0", - "patch-package": "6.2.2", "prettier": "^2.3.1", - "prettier-plugin-jsdoc": "^0.3.23", "sort-package-json": "^1.22.1", "ts-jest": "^26.4.4", "ts-morph": "^8.2.0", diff --git a/src/definitions/args.ts b/src/definitions/args.ts index c8cd8a40..fad51ed2 100644 --- a/src/definitions/args.ts +++ b/src/definitions/args.ts @@ -1,7 +1,8 @@ import type { GraphQLScalarTypeConfig } from 'graphql' +import type { AllNexusInputTypeDefs } from '../core' import type { AllInputTypes, GetGen2 } from '../typegenTypeHelpers' -import type { AllNexusArgsDefs, AllNexusInputTypeDefs } from './wrapping' -import { NexusTypes, withNexusSymbol } from './_types' +import type { AllNexusArgsDefs } from './wrapping' +import { Maybe, NexusTypes, withNexusSymbol } from './_types' export type ArgsRecord = Record @@ -39,7 +40,7 @@ export type CommonArgConfig = { * // ): [Int] * // } */ - description?: string + description?: Maybe /** * Data that will be added to the arg-level [extensions field on the graphql-js type def diff --git a/src/definitions/definitionBlocks.ts b/src/definitions/definitionBlocks.ts index e9a24847..ab1313a3 100644 --- a/src/definitions/definitionBlocks.ts +++ b/src/definitions/definitionBlocks.ts @@ -11,18 +11,18 @@ import type { import type { ArgsRecord } from './args' import type { NexusMetaType } from './nexusMeta' import type { AllNexusInputTypeDefs, AllNexusOutputTypeDefs, NexusWrapKind } from './wrapping' -import type { BaseScalars } from './_types' +import type { BaseScalars, Maybe } from './_types' export interface CommonFieldConfig { //todo /** The description to annotate the GraphQL SDL */ - description?: string + description?: Maybe //todo /** * Info about a field deprecation. Formatted as a string and provided with the deprecated directive on * field/enum types and as a comment on input fields. */ - deprecation?: string // | DeprecationInfo; + deprecation?: Maybe // | DeprecationInfo; } export type CommonOutputFieldConfig = CommonFieldConfig & { diff --git a/src/definitions/enumType.ts b/src/definitions/enumType.ts index d2a7c5b4..083314ab 100644 --- a/src/definitions/enumType.ts +++ b/src/definitions/enumType.ts @@ -1,6 +1,6 @@ import { assertValidName, GraphQLEnumTypeConfig, GraphQLEnumValueConfig } from 'graphql' import { arg, NexusArgDef, NexusAsArgConfig } from './args' -import { NexusTypes, SourceTypingDef, withNexusSymbol } from './_types' +import { Maybe, NexusTypes, SourceTypingDef, withNexusSymbol } from './_types' type TypeScriptEnumLike = { [key: number]: string @@ -12,12 +12,12 @@ export interface EnumMemberInfo { /** The internal representation of the enum */ value?: string | number | object | boolean /** The description to annotate the GraphQL SDL */ - description?: string + description?: Maybe /** * Info about a field deprecation. Formatted as a string and provided with the deprecated directive on * field/enum types and as a comment on input fields. */ - deprecation?: string // | DeprecationInfo; + deprecation?: Maybe // | DeprecationInfo; /** * Custom extensions, as supported in graphql-js * @@ -29,7 +29,7 @@ export interface EnumMemberInfo { export interface NexusEnumTypeConfig { name: TypeName /** The description to annotate the GraphQL SDL */ - description?: string + description?: Maybe /** Source type information for this type */ sourceType?: SourceTypingDef /** All members of the enum, either as an array of strings/definition objects, as an object, or as a TypeScript enum */ diff --git a/src/definitions/inputObjectType.ts b/src/definitions/inputObjectType.ts index 23875309..797612f1 100644 --- a/src/definitions/inputObjectType.ts +++ b/src/definitions/inputObjectType.ts @@ -1,7 +1,7 @@ import { assertValidName, GraphQLInputObjectTypeConfig } from 'graphql' import { arg, NexusArgDef, NexusAsArgConfig } from './args' import type { InputDefinitionBlock } from './definitionBlocks' -import { NexusTypes, NonNullConfig, withNexusSymbol } from './_types' +import { Maybe, NexusTypes, NonNullConfig, withNexusSymbol } from './_types' export type NexusInputObjectTypeConfig = { /** Name of the input object type */ @@ -9,7 +9,7 @@ export type NexusInputObjectTypeConfig = { /** Definition block for the input type */ definition(t: InputDefinitionBlock): void /** The description to annotate the GraphQL SDL */ - description?: string + description?: Maybe /** * Configures the nullability for the type, check the documentation's "Getting Started" section to learn * more about GraphQL Nexus's assumptions and configuration on nullability. diff --git a/src/definitions/interfaceType.ts b/src/definitions/interfaceType.ts index df0d5f23..e8b48371 100644 --- a/src/definitions/interfaceType.ts +++ b/src/definitions/interfaceType.ts @@ -2,14 +2,14 @@ import { assertValidName, GraphQLInterfaceTypeConfig } from 'graphql' import type { FieldResolver, GetGen, InterfaceFieldsFor, ModificationType } from '../typegenTypeHelpers' import type { ArgsRecord } from './args' import { OutputDefinitionBlock, OutputDefinitionBuilder } from './definitionBlocks' -import { AbstractTypes, NexusTypes, NonNullConfig, SourceTypingDef, withNexusSymbol } from './_types' +import { AbstractTypes, Maybe, NexusTypes, NonNullConfig, SourceTypingDef, withNexusSymbol } from './_types' export type Implemented = GetGen<'interfaceNames'> | NexusInterfaceTypeDef export interface FieldModification { type?: ModificationType /** The description to annotate the GraphQL SDL */ - description?: string + description?: Maybe /** The resolve method we should be resolving the field with */ resolve?: FieldResolver /** You are allowed to add non-required args when modifying a field */ @@ -44,7 +44,7 @@ export type NexusInterfaceTypeConfig = { */ nonNullDefaults?: NonNullConfig /** The description to annotate the GraphQL SDL */ - description?: string + description?: Maybe /** Source type information for this type */ sourceType?: SourceTypingDef /** diff --git a/src/definitions/list.ts b/src/definitions/list.ts index fe9939c4..aaef0be8 100644 --- a/src/definitions/list.ts +++ b/src/definitions/list.ts @@ -1,11 +1,7 @@ import { isType } from 'graphql' import { isNexusMeta } from './nexusMeta' -import { AllNamedTypeDefs, isNexusStruct, NexusListableTypes } from './wrapping' +import { isNexusStruct, NexusListableTypes } from './wrapping' import { NexusTypes, withNexusSymbol } from './_types' -/** List() */ -export type NexusListDefConfig = { - type: TypeName -} export class NexusListDef { // @ts-ignore diff --git a/src/definitions/mutationField.ts b/src/definitions/mutationField.ts index bf075476..07693856 100644 --- a/src/definitions/mutationField.ts +++ b/src/definitions/mutationField.ts @@ -1,4 +1,4 @@ -import type { FieldOutConfig, OutputDefinitionBlock } from '../core' +import type { FieldOutConfig, OutputDefinitionBlock } from './definitionBlocks' import { extendType, NexusExtendTypeDef } from './extendType' export type MutationFieldConfig = diff --git a/src/definitions/objectType.ts b/src/definitions/objectType.ts index 9197e14e..85fc5c9e 100644 --- a/src/definitions/objectType.ts +++ b/src/definitions/objectType.ts @@ -2,7 +2,7 @@ import { assertValidName, GraphQLObjectType } from 'graphql' import type { InterfaceFieldsFor } from '../typegenTypeHelpers' import { OutputDefinitionBlock, OutputDefinitionBuilder } from './definitionBlocks' import type { FieldModification, FieldModificationDef, Implemented } from './interfaceType' -import { AbstractTypes, NexusTypes, NonNullConfig, SourceTypingDef, withNexusSymbol } from './_types' +import { AbstractTypes, Maybe, NexusTypes, NonNullConfig, SourceTypingDef, withNexusSymbol } from './_types' export interface ObjectDefinitionBuilder extends OutputDefinitionBuilder { addInterfaces(toAdd: Implemented[]): void @@ -102,7 +102,7 @@ export type NexusObjectTypeConfig = { * // # ... * // } */ - description?: string + description?: Maybe /** * [Source Types Guide](https://nxs.li/guides/backing-types) * diff --git a/src/definitions/queryField.ts b/src/definitions/queryField.ts index d21aad05..f98f6e6c 100644 --- a/src/definitions/queryField.ts +++ b/src/definitions/queryField.ts @@ -1,4 +1,4 @@ -import type { FieldOutConfig, OutputDefinitionBlock } from '../core' +import type { FieldOutConfig, OutputDefinitionBlock } from './definitionBlocks' import { extendType, NexusExtendTypeDef } from './extendType' export type QueryFieldConfig = diff --git a/src/definitions/scalarType.ts b/src/definitions/scalarType.ts index aa76da8a..d45cb111 100644 --- a/src/definitions/scalarType.ts +++ b/src/definitions/scalarType.ts @@ -1,6 +1,6 @@ import { assertValidName, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql' import { decorateType } from './decorateType' -import { NexusTypes, SourceTypingDef, withNexusSymbol } from './_types' +import { Maybe, NexusTypes, SourceTypingDef, withNexusSymbol } from './_types' export interface ScalarBase extends Pick< @@ -10,7 +10,7 @@ export interface ScalarBase export interface ScalarConfig { /** Any deprecation info for this scalar type */ - deprecation?: string // | DeprecationInfo; + deprecation?: Maybe // | DeprecationInfo; /** Adds this type as a method on the Object/Interface definition blocks */ asNexusMethod?: string /** Source type information for this type */ diff --git a/src/definitions/unionType.ts b/src/definitions/unionType.ts index 4295fd08..0d22d9bc 100644 --- a/src/definitions/unionType.ts +++ b/src/definitions/unionType.ts @@ -1,7 +1,7 @@ import { assertValidName, GraphQLUnionTypeConfig } from 'graphql' import type { GetGen } from '../typegenTypeHelpers' import type { NexusObjectTypeDef } from './objectType' -import { AbstractTypes, NexusTypes, SourceTypingDef, withNexusSymbol } from './_types' +import { AbstractTypes, Maybe, NexusTypes, SourceTypingDef, withNexusSymbol } from './_types' export interface UnionDefinitionBuilder { typeName: string @@ -27,12 +27,12 @@ export type NexusUnionTypeConfig = { /** Builds the definition for the union */ definition(t: UnionDefinitionBlock): void /** The description to annotate the GraphQL SDL */ - description?: string + description?: Maybe /** * Info about a field deprecation. Formatted as a string and provided with the deprecated directive on * field/enum types and as a comment on input fields. */ - deprecation?: string // | DeprecationInfo; + deprecation?: Maybe // | DeprecationInfo; /** Source type information for this type */ sourceType?: SourceTypingDef /** diff --git a/src/definitions/wrapping.ts b/src/definitions/wrapping.ts index 9af7565c..9358eb60 100644 --- a/src/definitions/wrapping.ts +++ b/src/definitions/wrapping.ts @@ -28,20 +28,35 @@ import { isNexusMetaType, NexusMetaType, resolveNexusMetaType } from './nexusMet import type { NexusUnionTypeDef } from './unionType' import { NexusTypes, NexusWrappedSymbol } from './_types' +/** + * input(named): Nexus only + */ export type AllNexusNamedInputTypeDefs = | NexusInputObjectTypeDef | NexusEnumTypeDef | NexusScalarTypeDef + +/** + * input(named): Nexus + GraphQLInput + */ +export type AllNamedInputTypeDefs = + | AllNexusNamedInputTypeDefs | Exclude | GraphQLNonNull> +/** + * input(all): Nexus + GraphQL + */ export type AllNexusInputTypeDefs = - | AllNexusNamedInputTypeDefs + | AllNamedInputTypeDefs | NexusListDef | NexusNonNullDef | NexusNullDef | GraphQLList | GraphQLNonNull +/** + * output(named): Nexus only + */ export type AllNexusNamedOutputTypeDefs = | NexusObjectTypeDef | NexusInterfaceTypeDef @@ -49,17 +64,35 @@ export type AllNexusNamedOutputTypeDefs = | NexusEnumTypeDef | NexusScalarTypeDef +/** + * output(all): Nexus only + */ export type AllNexusOutputTypeDefs = | AllNexusNamedOutputTypeDefs | NexusListDef | NexusNonNullDef | NexusNullDef +/** + * input + output(named): Nexus only + */ export type AllNexusNamedTypeDefs = AllNexusNamedInputTypeDefs | AllNexusNamedOutputTypeDefs +/** + * input + output(all): Nexus only + */ export type AllNexusTypeDefs = AllNexusOutputTypeDefs | AllNexusInputTypeDefs +/** + * input + output(all): Nexus only + Name + */ +export type AllNamedTypeDefs = AllNexusNamedTypeDefs | GraphQLNamedType + +/** + * All inputs to list(...) + */ export type NexusListableTypes = + | GetGen<'allNamedTypes', string> | AllNamedTypeDefs | NexusArgDef | NexusListDef @@ -68,24 +101,30 @@ export type NexusListableTypes = | GraphQLType | NexusMetaType +/** + * All inputs to nonNull(...) + */ export type NexusNonNullableTypes = + | GetGen<'allNamedTypes', string> | AllNamedTypeDefs | NexusListDef | NexusArgDef | NexusMetaType +/** + * All inputs to nullable(...) + */ export type NexusNullableTypes = + | GetGen<'allNamedTypes', string> | AllNamedTypeDefs | NexusListDef | NexusArgDef | NexusMetaType -export type AllNamedTypeDefs = GetGen<'allNamedTypes', string> | AllNexusNamedTypeDefs - export type AllNexusNamedArgsDefs = | T | NexusArgDef - | AllNexusNamedInputTypeDefs + | AllNamedInputTypeDefs | GraphQLInputType export type AllNexusArgsDefs = diff --git a/src/plugin.ts b/src/plugin.ts index c198a486..52518da4 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -51,7 +51,7 @@ export interface PluginConfig { /** A name for the plugin, useful for errors, etc. */ name: string /** A description for the plugin */ - description?: string + description?: Maybe /** Any type definitions we want to add to output field definitions */ fieldDefTypes?: StringLike | StringLike[] /** Any type definitions we want to add to input field definitions */ diff --git a/src/utils.ts b/src/utils.ts index 6734da72..d92d1e5a 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -31,9 +31,10 @@ import { AllNexusTypeDefs, isNexusWrappingType, isNexusArgDef, - AllNexusNamedInputTypeDefs, + AllNamedInputTypeDefs, } from './definitions/wrapping' import { + Maybe, MissingType, NexusFeatures, NexusGraphQLSchema, @@ -266,7 +267,7 @@ export interface PrintedGenTypingConfig { name: string optional: boolean type: string - description?: string + description?: Maybe imports?: PrintedGenTypingImport[] } @@ -517,7 +518,7 @@ export function resolveImportPath(rootType: TypingImport, typeName: string, outp } /** Given the right hand side of an arg definition, returns the underlying "named type" for us to add to the builder */ -export function getArgNamedType(argDef: AllNexusArgsDefs | string): AllNexusNamedInputTypeDefs | string { +export function getArgNamedType(argDef: AllNexusArgsDefs | string): AllNamedInputTypeDefs | string { let finalValue = argDef if (typeof finalValue === 'string') { return finalValue diff --git a/yarn.lock b/yarn.lock index 82c99112..cbf056fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1015,13 +1015,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A== -"@types/mdast@^3.0.0": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.3.tgz#2d7d671b1cd1ea3deb306ea75036c2a0407d2deb" - integrity sha512-SXPBMnFVQg1s00dlMCc/jCdvPqdE4mXaMMCeRlxLDmTAEoegHT53xKtkDnzDTOcmMHUfcjyf36/YYZ6SxRdnsw== - dependencies: - "@types/unist" "*" - "@types/minimatch@^3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -1074,11 +1067,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== -"@types/unist@*", "@types/unist@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" - integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ== - "@types/yargs-parser@*": version "13.1.0" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-13.1.0.tgz#c563aa192f39350a1d18da36c5a8da382bbd8228" @@ -1123,11 +1111,6 @@ semver "^6.3.0" tsutils "^3.17.1" -"@yarnpkg/lockfile@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" - integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== - abab@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" @@ -1574,11 +1557,6 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== -binary-search-bounds@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/binary-search-bounds/-/binary-search-bounds-2.0.5.tgz#125e5bd399882f71e6660d4bf1186384e989fba7" - integrity sha512-H0ea4Fd3lS1+sTEB2TgcLoK21lLhwEJzlQv3IN47pJS976Gx4zoWe0ak3q+uYh60ppQxg9F16Ri4tS1sfD4+jA== - bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -1802,21 +1780,6 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== -character-entities-legacy@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" - integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== - -character-entities@^1.0.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b" - integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw== - -character-reference-invalid@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" - integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== - chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -2037,11 +2000,6 @@ commander@^2.12.1, commander@^2.14.1, commander@^2.9.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== -comment-parser@^1.1.4: - version "1.1.5" - resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.1.5.tgz#453627ef8f67dbcec44e79a9bd5baa37f0bce9b2" - integrity sha512-RePCE4leIhBlmrqiYTvaqEeGYg7qpSl4etaIabKtdOQVi+mSTIBBklGUwIr79GXYnl3LpMwmDw4KeR2stNc6FA== - common-tags@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" @@ -2223,13 +2181,6 @@ debug@^3.1.0: dependencies: ms "^2.1.1" -debug@^4.0.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" @@ -3027,14 +2978,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -find-yarn-workspace-root@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz#40eb8e6e7c2502ddfaa2577c176f221422f860db" - integrity sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q== - dependencies: - fs-extra "^4.0.3" - micromatch "^3.1.4" - findup-sync@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" @@ -3126,16 +3069,7 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fs-extra@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^7.0.0, fs-extra@^7.0.1: +fs-extra@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== @@ -3776,19 +3710,6 @@ is-accessor-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-alphabetical@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d" - integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== - -is-alphanumerical@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf" - integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A== - dependencies: - is-alphabetical "^1.0.0" - is-decimal "^1.0.0" - is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -3844,11 +3765,6 @@ is-date-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== -is-decimal@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" - integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw== - is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" @@ -3930,11 +3846,6 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" -is-hexadecimal@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" - integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== - is-installed-globally@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141" @@ -4768,13 +4679,6 @@ kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -klaw-sync@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" - integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== - dependencies: - graceful-fs "^4.1.11" - kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" @@ -4853,11 +4757,6 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -linguist-languages@^7.13.0: - version "7.15.0" - resolved "https://registry.yarnpkg.com/linguist-languages/-/linguist-languages-7.15.0.tgz#a93bed6b93015d8133622cb05da6296890862bfa" - integrity sha512-qkSSNDjDDycZ2Wcw+GziNBB3nNo3ddYUInM/PL8Amgwbd9RQ/BKGj2/1d6mdxKgBFnUqZuaDbkIwkE4KUwwmtQ== - lint-staged@^7.3.0: version "7.3.0" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-7.3.0.tgz#90ff33e5ca61ed3dbac35b6f6502dbefdc0db58d" @@ -5114,22 +5013,6 @@ matchdep@^2.0.0: resolve "^1.4.0" stack-trace "0.0.10" -mdast-util-from-markdown@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz#d1ef2ca42bc377ecb0463a987910dae89bd9a28c" - integrity sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-to-string "^2.0.0" - micromark "~2.11.0" - parse-entities "^2.0.0" - unist-util-stringify-position "^2.0.0" - -mdast-util-to-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz#b8cfe6a713e1091cb5b728fc48885a4767f8b97b" - integrity sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w== - meow@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/meow/-/meow-7.0.1.tgz#1ed4a0a50b3844b451369c48362eb0515f04c1dc" @@ -5159,14 +5042,6 @@ merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -micromark@~2.11.0: - version "2.11.4" - resolved "https://registry.yarnpkg.com/micromark/-/micromark-2.11.4.tgz#d13436138eea826383e822449c9a5c50ee44665a" - integrity sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA== - dependencies: - debug "^4.0.0" - parse-entities "^2.0.0" - micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -5294,7 +5169,7 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@2.1.2, ms@^2.1.1: +ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== @@ -5689,18 +5564,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-entities@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8" - integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ== - dependencies: - character-entities "^1.0.0" - character-entities-legacy "^1.0.0" - character-reference-invalid "^1.0.0" - is-alphanumerical "^1.0.0" - is-decimal "^1.0.0" - is-hexadecimal "^1.0.0" - parse-filepath@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" @@ -5768,24 +5631,6 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -patch-package@6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.2.2.tgz#71d170d650c65c26556f0d0fbbb48d92b6cc5f39" - integrity sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg== - dependencies: - "@yarnpkg/lockfile" "^1.1.0" - chalk "^2.4.2" - cross-spawn "^6.0.5" - find-yarn-workspace-root "^1.2.1" - fs-extra "^7.0.1" - is-ci "^2.0.0" - klaw-sync "^6.0.0" - minimist "^1.2.0" - rimraf "^2.6.3" - semver "^5.6.0" - slash "^2.0.0" - tmp "^0.0.33" - path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -5946,16 +5791,6 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier-plugin-jsdoc@^0.3.23: - version "0.3.23" - resolved "https://registry.yarnpkg.com/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-0.3.23.tgz#6b2ef20d3d301110d8f23b734e31a2871ea9e0c2" - integrity sha512-dHLzMG1oYARnYEbOC4RiJelcsV5tG6IaTzYr2dBey8cj6zzJZpTzhlm+Fc6c4SnSz3LRZCJVtGv42CulLlKKVw== - dependencies: - binary-search-bounds "^2.0.5" - comment-parser "^1.1.4" - linguist-languages "^7.13.0" - mdast-util-from-markdown "^0.8.5" - prettier@^1.16.0: version "1.19.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" @@ -7441,13 +7276,6 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" -unist-util-stringify-position@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da" - integrity sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g== - dependencies: - "@types/unist" "^2.0.2" - universal-user-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-5.0.0.tgz#a3182aa758069bf0e79952570ca757de3579c1d9" From 02a73b5d74d7a86bb59778ae66ec4da6161a4b18 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Fri, 3 Sep 2021 13:00:35 -0400 Subject: [PATCH 03/33] refactor: More internal cleanup (#981) - Add Maybe on resolveType to match GraphQL signature - Don't create placeholder Query type when renamed - Internal rename rootTypings -> sourceTypings --- src/builder.ts | 38 +++++++++---------- src/extensions.ts | 2 +- src/typegenAbstractTypes.ts | 5 ++- src/typegenPrinter.ts | 6 +-- tests/__snapshots__/builder.spec.ts.snap | 11 ++++++ tests/builder.spec.ts | 17 +++++++++ .../__typegen.ts | 5 ++- .../isTypeOfsImplemented/__typegen.ts | 5 ++- .../missingIsTypeOf/__typegen.ts | 5 ++- .../missingResolveType/__typegen.ts | 5 ++- .../missingResolveTypeOrIsTypeOf/__typegen.ts | 5 ++- .../missingTypenameDiscriminant/__typegen.ts | 5 ++- .../resolveTypeImplemented/__typegen.ts | 5 ++- .../declarativeWrappingPlugin/__typegen.ts | 29 +++++++------- tests/integrations/kitchenSink/__typegen.ts | 21 +++++++--- .../unionTooComplexToRepresent/__typegen.ts | 5 ++- tests/typegen-globals/global-types.gen.ts | 5 ++- tests/typegen-globals/types.gen.ts | 5 ++- tests/typegen/types.gen.ts | 5 ++- 19 files changed, 127 insertions(+), 57 deletions(-) diff --git a/src/builder.ts b/src/builder.ts index f7f60138..5fc3922b 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -270,6 +270,15 @@ export interface BuilderConfigInput { * contextType: { module: path.join(__dirname, 'context.ts'), export: 'MyContextType' } */ contextType?: TypingImport + /** + * If we wish to override the "Root" type for the schema, we can do so by specifying the rootTypes option, + * which will replace the default roots of Query / Mutation / Subscription + */ + schemaRoots?: { + query?: GetGen<'allOutputTypes', string> | AllNexusOutputTypeDefs + mutation?: GetGen<'allOutputTypes', string> | AllNexusOutputTypeDefs + subscription?: GetGen<'allOutputTypes', string> | AllNexusOutputTypeDefs + } } export interface BuilderConfig extends Omit { @@ -284,15 +293,6 @@ export type SchemaConfig = BuilderConfigInput & { * the values, if it's an array we flatten out the valid types, ignoring invalid ones. */ types: any - /** - * If we wish to override the "Root" type for the schema, we can do so by specifying the rootTypes option, - * which will replace the default roots of Query / Mutation / Subscription - */ - schemaRoots?: { - query?: GetGen<'allOutputTypes', string> | AllNexusOutputTypeDefs - mutation?: GetGen<'allOutputTypes', string> | AllNexusOutputTypeDefs - subscription?: GetGen<'allOutputTypes', string> | AllNexusOutputTypeDefs - } /** * Whether we should process.exit after the artifacts are generated. Useful if you wish to explicitly * generate the test artifacts at a certain stage in a startup or build process. @@ -394,7 +394,7 @@ export class SchemaBuilder { protected typesToWalk: TypeToWalk[] = [] /** Root type mapping information annotated on the type definitions */ - protected rootTypings: SourceTypings = {} + protected sourceTypings: SourceTypings = {} /** Array of missing types */ protected missingTypes: Record = {} @@ -540,7 +540,7 @@ export class SchemaBuilder { this.dynamicInputFields[typeDef.value.asNexusMethod] = typeDef.name this.dynamicOutputFields[typeDef.value.asNexusMethod] = typeDef.name if (typeDef.value.sourceType) { - this.rootTypings[typeDef.name] = typeDef.value.sourceType + this.sourceTypings[typeDef.name] = typeDef.value.sourceType } } else if (isScalarType(typeDef)) { const scalarDef = typeDef as GraphQLScalarType & { @@ -553,7 +553,7 @@ export class SchemaBuilder { this.dynamicOutputFields[asNexusMethod] = typeDef.name } if (rootTyping) { - this.rootTypings[scalarDef.name] = rootTyping + this.sourceTypings[scalarDef.name] = rootTyping } } } @@ -807,7 +807,7 @@ export class SchemaBuilder { buildNexusTypes() { // If Query isn't defined, set it to null so it falls through to "missingType" - if (!this.pendingTypeMap.Query) { + if (!this.pendingTypeMap.Query && !this.config.schemaRoots?.query) { this.pendingTypeMap.Query = null as any } Object.keys(this.pendingTypeMap).forEach((key) => { @@ -853,7 +853,7 @@ export class SchemaBuilder { dynamicOutputFields: this.dynamicOutputFields, dynamicOutputProperties: this.dynamicOutputProperties, }, - rootTypings: this.rootTypings, + sourceTypings: this.sourceTypings, }) } @@ -928,7 +928,7 @@ export class SchemaBuilder { } this.typeExtendMap[config.name] = null if (config.sourceType) { - this.rootTypings[config.name] = config.sourceType + this.sourceTypings[config.name] = config.sourceType } const objectTypeConfig: NexusGraphQLObjectTypeConfig = { name: config.name, @@ -967,7 +967,7 @@ export class SchemaBuilder { config.definition(definitionBlock) if (config.sourceType) { - this.rootTypings[config.name] = config.sourceType + this.sourceTypings[config.name] = config.sourceType } const interfaceTypeConfig: NexusGraphQLInterfaceTypeConfig = { name, @@ -1047,7 +1047,7 @@ export class SchemaBuilder { throw new Error(`GraphQL Nexus: Enum ${config.name} must have at least one member`) } if (config.sourceType) { - this.rootTypings[config.name] = config.sourceType + this.sourceTypings[config.name] = config.sourceType } return this.finalize( new GraphQLEnumType({ @@ -1074,7 +1074,7 @@ export class SchemaBuilder { ) if (config.sourceType) { - this.rootTypings[config.name] = config.sourceType + this.sourceTypings[config.name] = config.sourceType } return this.finalize( new GraphQLUnionType({ @@ -1092,7 +1092,7 @@ export class SchemaBuilder { private buildScalarType(config: NexusScalarTypeConfig): GraphQLScalarType { if (config.sourceType) { - this.rootTypings[config.name] = config.sourceType + this.sourceTypings[config.name] = config.sourceType } return this.finalize( new GraphQLScalarType({ diff --git a/src/extensions.ts b/src/extensions.ts index d18d6467..8c577e79 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -61,7 +61,7 @@ export class NexusInterfaceTypeExtension { export interface NexusSchemaExtensionConfig extends Omit { dynamicFields: DynamicFieldDefs - rootTypings: SourceTypings + sourceTypings: SourceTypings } /** diff --git a/src/typegenAbstractTypes.ts b/src/typegenAbstractTypes.ts index 417c88f5..4e8a2ff0 100644 --- a/src/typegenAbstractTypes.ts +++ b/src/typegenAbstractTypes.ts @@ -1,4 +1,5 @@ import type { GraphQLResolveInfo } from 'graphql' +import type { Maybe } from './definitions/_types' import type { AbstractTypeResolver, GetGen, @@ -389,7 +390,7 @@ export type MaybeTypeDefConfigFieldResolveType = IsFeat * implementation will first look for __typename, then fallback to calling `isTypeOf` on each * implementing Object type. */ - resolveType?: AbstractTypeResolver + resolveType?: Maybe> } // Make resolveType optional when __typename strategy is enabled : IsFeatureEnabled2<'abstractTypeStrategies', '__typename'> extends true ? { @@ -400,7 +401,7 @@ export type MaybeTypeDefConfigFieldResolveType = IsFeat * implementation will first look for __typename, then fallback to calling `isTypeOf` on each * implementing Object type. */ - resolveType?: AbstractTypeResolver + resolveType?: Maybe> } : { /** diff --git a/src/typegenPrinter.ts b/src/typegenPrinter.ts index 7a1a3616..83798544 100644 --- a/src/typegenPrinter.ts +++ b/src/typegenPrinter.ts @@ -201,7 +201,7 @@ export class TypegenPrinter { } private printDynamicImport(forGlobal = false) { - const { rootTypings } = this.schema.extensions.nexus.config + const { sourceTypings } = this.schema.extensions.nexus.config const { contextTypeImport } = this.typegenInfo const imports: string[] = [] const importMap: Record> = {} @@ -222,7 +222,7 @@ export class TypegenPrinter { : contextTypeImport.export ) } - eachObj(rootTypings, (rootType, typeName) => { + eachObj(sourceTypings, (rootType, typeName) => { if (typeof rootType !== 'string') { const importPath = resolveImportPath(rootType, typeName, outputPath) importMap[importPath] = importMap[importPath] || new Set() @@ -607,7 +607,7 @@ export class TypegenPrinter { } private resolveSourceType(typeName: string): string | undefined { - const rootTyping = this.schema.extensions.nexus.config.rootTypings[typeName] + const rootTyping = this.schema.extensions.nexus.config.sourceTypings[typeName] if (rootTyping) { return typeof rootTyping === 'string' ? rootTyping : rootTyping.export } diff --git a/tests/__snapshots__/builder.spec.ts.snap b/tests/__snapshots__/builder.spec.ts.snap index a098d609..c16e0940 100644 --- a/tests/__snapshots__/builder.spec.ts.snap +++ b/tests/__snapshots__/builder.spec.ts.snap @@ -54,3 +54,14 @@ type Subscription { } " `; + +exports[`builder does not add a placeholder Query type when an alternate queryRoot has been defined 1`] = ` +"schema { + query: RootQuery +} + +type RootQuery { + name: String +} +" +`; diff --git a/tests/builder.spec.ts b/tests/builder.spec.ts index 837375ef..2a0aed7a 100644 --- a/tests/builder.spec.ts +++ b/tests/builder.spec.ts @@ -26,6 +26,23 @@ describe('builder', () => { expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() }) + it('does not add a placeholder Query type when an alternate queryRoot has been defined', () => { + const OtherQuery = objectType({ + name: 'RootQuery', + definition(t) { + t.string('name') + }, + }) + + const schema = makeSchema({ + types: [OtherQuery], + schemaRoots: { + query: OtherQuery, + }, + }) + expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + }) + it('can replace the Mutation root type with an alternate type', () => { const OtherMutation = objectType({ name: 'RootMutation', diff --git a/tests/integrations/abstractTypes/allStrategiesOptionalWhenTypeNameEnabled/__typegen.ts b/tests/integrations/abstractTypes/allStrategiesOptionalWhenTypeNameEnabled/__typegen.ts index 16d092ca..b34ff2f3 100644 --- a/tests/integrations/abstractTypes/allStrategiesOptionalWhenTypeNameEnabled/__typegen.ts +++ b/tests/integrations/abstractTypes/allStrategiesOptionalWhenTypeNameEnabled/__typegen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ import type { core } from '../../../../src' diff --git a/tests/integrations/abstractTypes/isTypeOfsImplemented/__typegen.ts b/tests/integrations/abstractTypes/isTypeOfsImplemented/__typegen.ts index e92f98be..76bae74d 100644 --- a/tests/integrations/abstractTypes/isTypeOfsImplemented/__typegen.ts +++ b/tests/integrations/abstractTypes/isTypeOfsImplemented/__typegen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ declare global { interface NexusGen extends NexusGenTypes {} diff --git a/tests/integrations/abstractTypes/missingIsTypeOf/__typegen.ts b/tests/integrations/abstractTypes/missingIsTypeOf/__typegen.ts index b359d779..5b696af2 100644 --- a/tests/integrations/abstractTypes/missingIsTypeOf/__typegen.ts +++ b/tests/integrations/abstractTypes/missingIsTypeOf/__typegen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ declare global { interface NexusGen extends NexusGenTypes {} diff --git a/tests/integrations/abstractTypes/missingResolveType/__typegen.ts b/tests/integrations/abstractTypes/missingResolveType/__typegen.ts index e5a004ab..a9918258 100644 --- a/tests/integrations/abstractTypes/missingResolveType/__typegen.ts +++ b/tests/integrations/abstractTypes/missingResolveType/__typegen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ declare global { interface NexusGen extends NexusGenTypes {} diff --git a/tests/integrations/abstractTypes/missingResolveTypeOrIsTypeOf/__typegen.ts b/tests/integrations/abstractTypes/missingResolveTypeOrIsTypeOf/__typegen.ts index 5714ef00..bcc2188c 100644 --- a/tests/integrations/abstractTypes/missingResolveTypeOrIsTypeOf/__typegen.ts +++ b/tests/integrations/abstractTypes/missingResolveTypeOrIsTypeOf/__typegen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ declare global { interface NexusGen extends NexusGenTypes {} diff --git a/tests/integrations/abstractTypes/missingTypenameDiscriminant/__typegen.ts b/tests/integrations/abstractTypes/missingTypenameDiscriminant/__typegen.ts index b3d211fe..4be588e1 100644 --- a/tests/integrations/abstractTypes/missingTypenameDiscriminant/__typegen.ts +++ b/tests/integrations/abstractTypes/missingTypenameDiscriminant/__typegen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ import type { core } from '../../../../src' diff --git a/tests/integrations/abstractTypes/resolveTypeImplemented/__typegen.ts b/tests/integrations/abstractTypes/resolveTypeImplemented/__typegen.ts index 7b81aea3..12c67097 100644 --- a/tests/integrations/abstractTypes/resolveTypeImplemented/__typegen.ts +++ b/tests/integrations/abstractTypes/resolveTypeImplemented/__typegen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ declare global { interface NexusGen extends NexusGenTypes {} diff --git a/tests/integrations/declarativeWrappingPlugin/__typegen.ts b/tests/integrations/declarativeWrappingPlugin/__typegen.ts index ffd15fd6..3e2c2f72 100644 --- a/tests/integrations/declarativeWrappingPlugin/__typegen.ts +++ b/tests/integrations/declarativeWrappingPlugin/__typegen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ declare global { interface NexusGen extends NexusGenTypes {} @@ -140,22 +143,20 @@ declare global { interface NexusGenPluginFieldConfig { /** * Whether the type can be null - * * @default (depends on whether nullability is configured in type or schema) * @see declarativeWrappingPlugin */ nullable?: boolean /** - * Whether the type is list of values, or just a single value. If list is true, we assume the type is a - * list. If list is an array, we'll assume that it's a list with the depth. The boolean indicates whether + * Whether the type is list of values, or just a single value. + * If list is true, we assume the type is a list. If list is an array, + * we'll assume that it's a list with the depth. The boolean indicates whether * the type is required (non-null), where true = nonNull, false = nullable. - * * @see declarativeWrappingPlugin */ list?: true | boolean[] /** * Whether the type should be non null, `required: true` = `nullable: false` - * * @default (depends on whether nullability is configured in type or schema) * @see declarativeWrappingPlugin */ @@ -164,22 +165,20 @@ declare global { interface NexusGenPluginInputFieldConfig { /** * Whether the type can be null - * * @default (depends on whether nullability is configured in type or schema) * @see declarativeWrappingPlugin */ nullable?: boolean /** - * Whether the type is list of values, or just a single value. If list is true, we assume the type is a - * list. If list is an array, we'll assume that it's a list with the depth. The boolean indicates whether + * Whether the type is list of values, or just a single value. + * If list is true, we assume the type is a list. If list is an array, + * we'll assume that it's a list with the depth. The boolean indicates whether * the type is required (non-null), where true = nonNull, false = nullable. - * * @see declarativeWrappingPlugin */ list?: true | boolean[] /** * Whether the type should be non null, `required: true` = `nullable: false` - * * @default (depends on whether nullability is configured in type or schema) * @see declarativeWrappingPlugin */ @@ -189,22 +188,20 @@ declare global { interface NexusGenPluginArgConfig { /** * Whether the type can be null - * * @default (depends on whether nullability is configured in type or schema) * @see declarativeWrappingPlugin */ nullable?: boolean /** - * Whether the type is list of values, or just a single value. If list is true, we assume the type is a - * list. If list is an array, we'll assume that it's a list with the depth. The boolean indicates whether + * Whether the type is list of values, or just a single value. + * If list is true, we assume the type is a list. If list is an array, + * we'll assume that it's a list with the depth. The boolean indicates whether * the type is required (non-null), where true = nonNull, false = nullable. - * * @see declarativeWrappingPlugin */ list?: true | boolean[] /** * Whether the type should be non null, `required: true` = `nullable: false` - * * @default (depends on whether nullability is configured in type or schema) * @see declarativeWrappingPlugin */ diff --git a/tests/integrations/kitchenSink/__typegen.ts b/tests/integrations/kitchenSink/__typegen.ts index b250dfcb..a59f9484 100644 --- a/tests/integrations/kitchenSink/__typegen.ts +++ b/tests/integrations/kitchenSink/__typegen.ts @@ -1,9 +1,14 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ import type { core, connectionPluginCore } from '../../../src' declare global { interface NexusGenCustomInputMethods { - /** No-Op scalar for testing purposes only */ + /** + * No-Op scalar for testing purposes only + */ myCustomScalar( fieldName: FieldName, opts?: core.CommonInputFieldConfig @@ -13,12 +18,16 @@ declare global { } declare global { interface NexusGenCustomOutputMethods { - /** No-Op scalar for testing purposes only */ + /** + * No-Op scalar for testing purposes only + */ myCustomScalar( fieldName: FieldName, ...opts: core.ScalarOutSpread ): void // "MyCustomScalar"; - /** Title of the page, optionally escaped */ + /** + * Title of the page, optionally escaped + */ title(options: { escape: boolean }): void /** * Adds a Relay-style connection to the type, with numerous options for configuration @@ -36,7 +45,9 @@ declare global { } declare global { interface NexusGenCustomOutputProperties { - /** Adds a body (weirdly, as a getter) */ + /** + * adds a body (weirdly, as a getter) + */ body: any } } diff --git a/tests/integrations/unionTooComplexToRepresent/__typegen.ts b/tests/integrations/unionTooComplexToRepresent/__typegen.ts index da397342..b74fba92 100644 --- a/tests/integrations/unionTooComplexToRepresent/__typegen.ts +++ b/tests/integrations/unionTooComplexToRepresent/__typegen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ declare global { interface NexusGen extends NexusGenTypes {} diff --git a/tests/typegen-globals/global-types.gen.ts b/tests/typegen-globals/global-types.gen.ts index c8abab6b..8b28b3db 100644 --- a/tests/typegen-globals/global-types.gen.ts +++ b/tests/typegen-globals/global-types.gen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ import type { NexusGenTypes } from './types.gen' diff --git a/tests/typegen-globals/types.gen.ts b/tests/typegen-globals/types.gen.ts index 855a40f4..f897e159 100644 --- a/tests/typegen-globals/types.gen.ts +++ b/tests/typegen-globals/types.gen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ import type { core } from '../../src' diff --git a/tests/typegen/types.gen.ts b/tests/typegen/types.gen.ts index bdca6f81..edfb1ce4 100644 --- a/tests/typegen/types.gen.ts +++ b/tests/typegen/types.gen.ts @@ -1,4 +1,7 @@ -/** This file was generated by Nexus Schema Do not make changes to this file directly */ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ import type { core } from '../../src' From 333dfb8757bdbf7e9bf26ca35f189878efb8e455 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Mon, 6 Sep 2021 09:32:43 -0400 Subject: [PATCH 04/33] feat: Add mergeSchema, better graphql-js interop (#983) - Adds a new feature mergeSchema to the makeSchema config, to consume an external schema and merge with the locally defined Nexus types - Standardizes the consumption of external GraphQLNamedType's so they are converted into Nexus type definitions, simplifying code paths - Order of resolution goes from local Nexus types -> graphql-js types -> external schema types - Adds asNexusMethod to all types, allowing for any commonly used types to be used as methods, not just scalars - Convert methods / properties from protected -> private in Builder to better detect unused code --- src/builder.ts | 502 ++++++++++-------- src/core.ts | 1 + src/definitions/args.ts | 3 +- src/definitions/decorateType.ts | 10 +- src/definitions/definitionBlocks.ts | 4 +- src/definitions/enumType.ts | 2 + src/definitions/inputObjectType.ts | 2 + src/definitions/interfaceType.ts | 4 +- src/definitions/objectType.ts | 2 + src/definitions/scalarType.ts | 15 +- src/definitions/unionType.ts | 2 + src/definitions/wrapping.ts | 7 + src/extensions.ts | 9 +- src/rebuildType.ts | 232 ++++++++ src/typegenAutoConfig.ts | 2 +- src/utils.ts | 9 +- tests/__snapshots__/builder.spec.ts.snap | 94 ++++ tests/__snapshots__/definitions.spec.ts.snap | 21 + .../__snapshots__/typegenPrinter.spec.ts.snap | 10 +- .../typegenPrinterGlobals.spec.ts.snap | 46 +- tests/builder.spec.ts | 246 ++++++++- tests/definitions.spec.ts | 32 +- tests/typegen-globals/types.gen.ts | 25 +- tests/typegen/types.gen.ts | 25 +- 24 files changed, 1021 insertions(+), 284 deletions(-) create mode 100644 src/rebuildType.ts diff --git a/src/builder.ts b/src/builder.ts index 5fc3922b..8909366d 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -1,11 +1,9 @@ import { assertValidName, defaultFieldResolver, - getNamedType, GraphQLBoolean, GraphQLEnumType, GraphQLEnumValueConfigMap, - GraphQLField, GraphQLFieldConfig, GraphQLFieldConfigArgumentMap, GraphQLFieldConfigMap, @@ -18,7 +16,6 @@ import { GraphQLInputType, GraphQLInt, GraphQLInterfaceType, - GraphQLInterfaceTypeConfig, GraphQLList, GraphQLNamedType, GraphQLNonNull, @@ -31,14 +28,13 @@ import { GraphQLType, GraphQLUnionType, isInputObjectType, + isInputType, isInterfaceType, isLeafType, isNamedType, isObjectType, isOutputType, - isScalarType, isSchema, - isUnionType, isWrappingType, printSchema, } from 'graphql' @@ -79,6 +75,8 @@ import { isNexusExtendTypeDef, isNexusInputObjectTypeDef, isNexusInterfaceTypeDef, + isNexusNamedInputTypeDef, + isNexusNamedOuputTypeDef, isNexusNamedTypeDef, isNexusObjectTypeDef, isNexusPlugin, @@ -111,7 +109,6 @@ import { NexusInputObjectTypeExtension, NexusInterfaceTypeExtension, NexusObjectTypeExtension, - NexusScalarExtensions, NexusSchemaExtension, } from './extensions' import { messages } from './messages' @@ -134,12 +131,10 @@ import { eachObj, getArgNamedType, getNexusNamedType, - graphql15InterfaceConfig, graphql15InterfaceType, invariantGuard, isArray, isObject, - mapValues, objValues, UNKNOWN_TYPE_SCALAR, } from './utils' @@ -151,6 +146,7 @@ import { NexusMeta, resolveNexusMetaType, } from './definitions/nexusMeta' +import { rebuildNamedType, RebuildConfig } from './rebuildType' type NexusShapedOutput = { name: string @@ -198,7 +194,55 @@ export interface ConfiguredTypegen { declareInputs?: boolean } +export interface MergeSchemaConfig { + /** + * GraphQL Schema to merge into the Nexus type definitions. + * + * We unwrap each type, preserve the "nullable/nonNull" status of any fields & + * arguments, and then combine with the local Nexus GraphQL types. + * + * If you have multiple schemas + */ + schema: GraphQLSchema + /** + * If we want to "merge" specific types, provide a list of the types you wish to merge here. + * + * @default ['Query', 'Mutation'] + */ + mergeTypes?: string[] | true + /** + * If there are types that we don't want to include from the external schema in our final + * Nexus generated schema, provide them here. + */ + skipTypes?: string[] + /** + * If there are certain "fields" that we want to skip, we can specify + * the fields here and we'll ensure they don't get merged into the schema + */ + skipFields?: Record + /** + * If there are certain arguments for any type fields that we want to skip, we can specify + * the fields here & ensure they don't get merged into the final schema. + * + * @example + * skipArgs: { + * Mutation: { + * createAccount: ['internalId'] + * } + * } + */ + skipArgs?: Record> +} + export interface BuilderConfigInput { + /** + * If we have an external schema that we want to "merge into" our local Nexus schema definitions, + * we can configure it here. + * + * If you have more than one schema that needs merging, you can look into using + * graphql-tools to pre-merge into a single schema: https://www.graphql-tools.com/docs/schema-merging + */ + mergeSchema?: MergeSchemaConfig /** * Generated artifact settings. Set to false to disable all. Set to true to enable all and use default * paths. Leave undefined for default behaviour of each artifact. @@ -326,7 +370,6 @@ export interface TypegenInfo { } export type TypeToWalk = - | { type: 'named'; value: GraphQLNamedType } | { type: 'input'; value: NexusShapedInput } | { type: 'object'; value: NexusShapedOutput } | { type: 'interface'; value: NexusInterfaceTypeConfig } @@ -367,77 +410,93 @@ export class SchemaBuilder { /** All objects containing a NEXUS_BUILD / NEXUS_TYPE symbol */ private nexusMetaObjects = new Set() /** Used to check for circular references. */ - protected buildingTypes = new Set() + private buildingTypes = new Set() /** The "final type" map contains all types as they are built. */ - protected finalTypeMap: Record = {} + private finalTypeMap: Record = {} /** * The "defined type" map keeps track of all of the types that were defined directly as `GraphQL*Type` * objects, so we don't accidentally overwrite any. */ - protected definedTypeMap: Record = {} + private definedTypeMap: Record = {} /** * The "pending type" map keeps track of all types that were defined w/ GraphQL Nexus and haven't been * processed into concrete types yet. */ - protected pendingTypeMap: Record = {} - /** All "extensions" to types (adding fields on types from many locations) */ - protected typeExtendMap: Record[] | null> = {} - /** All "extensions" to input types (adding fields on types from many locations) */ - protected inputTypeExtendMap: Record[] | null> = {} + private pendingTypeMap: Record = {} + /** + * All "extensions" to types (adding fields on types from many locations) + */ + private typeExtendMap: Record[] | null> = {} + /** + * All "extensions" to input types (adding fields on types from many locations) + */ + private inputTypeExtendMap: Record[] | null> = {} + /** + * When we encounter "named" types from graphql-js, we keep them separate from Nexus definitions. + * This way we can have Nexus definitions take precedence without worrying about conflicts, + * particularly when we're looking to override behavior from inherited types. + */ + private graphqlNamedTypeMap: Record = {} - protected dynamicInputFields: DynamicInputFields = {} - protected dynamicOutputFields: DynamicOutputFields = {} - protected dynamicOutputProperties: DynamicOutputProperties = {} - protected plugins: NexusPlugin[] = [] + /** + * If we're merging against a remote schema, the types from the schema are kept here, + * for fallbacks / merging when we're building the actual Schema + */ + private graphqlMergeSchemaMap: Record = {} + + private dynamicInputFields: DynamicInputFields = {} + private dynamicOutputFields: DynamicOutputFields = {} + private dynamicOutputProperties: DynamicOutputProperties = {} + private plugins: NexusPlugin[] = [] /** All types that need to be traversed for children types */ - protected typesToWalk: TypeToWalk[] = [] + private typesToWalk: TypeToWalk[] = [] /** Root type mapping information annotated on the type definitions */ - protected sourceTypings: SourceTypings = {} + private sourceTypings: SourceTypings = {} /** Array of missing types */ - protected missingTypes: Record = {} + private missingTypes: Record = {} /** Methods we are able to access to read/modify builder state from plugins */ - protected builderLens: PluginBuilderLens + private builderLens: PluginBuilderLens /** Created just before types are walked, this keeps track of all of the resolvers */ - protected onMissingTypeFns: Exclude[] = [] + private onMissingTypeFns: Exclude[] = [] /** Executed just before types are walked */ - protected onBeforeBuildFns: Exclude[] = [] + private onBeforeBuildFns: Exclude[] = [] /** Executed as the field resolvers are included on the field */ - protected onCreateResolverFns: Exclude[] = [] + private onCreateResolverFns: Exclude[] = [] /** Executed as the field "subscribe" fields are included on the schema */ - protected onCreateSubscribeFns: Exclude[] = [] + private onCreateSubscribeFns: Exclude[] = [] /** Executed after the schema is constructed, for any final verification */ - protected onAfterBuildFns: Exclude[] = [] + private onAfterBuildFns: Exclude[] = [] /** Executed after the object is defined, allowing us to add additional fields to the object */ - protected onObjectDefinitionFns: Exclude[] = [] + private onObjectDefinitionFns: Exclude[] = [] /** Executed after the object is defined, allowing us to add additional fields to the object */ - protected onInputObjectDefinitionFns: Exclude[] = [] + private onInputObjectDefinitionFns: Exclude[] = [] /** Called immediately after the field is defined, allows for using metadata to define the shape of the field. */ - protected onAddArgFns: Exclude[] = [] + private onAddArgFns: Exclude[] = [] /** Called immediately after the field is defined, allows for using metadata to define the shape of the field. */ - protected onAddOutputFieldFns: Exclude[] = [] + private onAddOutputFieldFns: Exclude[] = [] /** Called immediately after the field is defined, allows for using metadata to define the shape of the field. */ - protected onAddInputFieldFns: Exclude[] = [] + private onAddInputFieldFns: Exclude[] = [] /** The `schemaExtension` is created just after the types are walked, but before the fields are materialized. */ - protected _schemaExtension?: NexusSchemaExtension + private _schemaExtension?: NexusSchemaExtension - protected config: BuilderConfig + private config: BuilderConfig - get schemaExtension() { + private get schemaExtension() { /* istanbul ignore next */ if (!this._schemaExtension) { throw new Error('Cannot reference schemaExtension before it is created') @@ -461,6 +520,10 @@ export class SchemaBuilder { hasConfigOption: this.hasConfigOption, getConfigOption: this.getConfigOption, }) + + if (config.mergeSchema) { + this.graphqlMergeSchemaMap = this.handleMergeSchema(config.mergeSchema) + } } setConfigOption = (key: K, value: BuilderConfigInput[K]) => { @@ -479,7 +542,12 @@ export class SchemaBuilder { } hasType = (typeName: string): boolean => { - return Boolean(this.pendingTypeMap[typeName] || this.finalTypeMap[typeName]) + return Boolean( + this.pendingTypeMap[typeName] || + this.finalTypeMap[typeName] || + this.graphqlNamedTypeMap[typeName] || + this.graphqlMergeSchemaMap[typeName] + ) } /** @@ -487,12 +555,7 @@ export class SchemaBuilder { * does an initial pass on any types that are referenced on the "types" field and pulls those in too, so you * can define types anonymously, without exporting them. */ - addType = (typeDef: NexusAcceptedTypeDef) => { - if (isNexusMeta(typeDef)) { - this.addToNexusMeta(typeDef) - return - } - + private addType = (typeDef: NexusAcceptedTypeDef) => { if (isNexusDynamicInputMethod(typeDef)) { this.dynamicInputFields[typeDef.name] = typeDef return @@ -506,12 +569,15 @@ export class SchemaBuilder { return } - // Don't worry about internal types. - if (typeDef.name?.indexOf('__') === 0) { + if (isNexusMeta(typeDef)) { + this.addToNexusMeta(typeDef) return } - const existingType = this.definedTypeMap[typeDef.name] || this.pendingTypeMap[typeDef.name] + // Don't worry about internal types. + if (typeDef.name?.startsWith('__')) { + return + } if (isNexusExtendTypeDef(typeDef)) { const typeExtensions = (this.typeExtendMap[typeDef.name] = this.typeExtendMap[typeDef.name] || []) @@ -528,65 +594,70 @@ export class SchemaBuilder { return } + // Check the "defined" type map for existing Nexus types. We are able to conflict with external types, + // as we assume that locally defined types take precedence. + const existingType = this.pendingTypeMap[typeDef.name] + + // If we already have a "Nexus" type, but it's not the same, trigger mark as an error, + // otherwise early exit if (existingType) { - // Allow importing the same exact type more than once. - if (existingType === typeDef) { - return + if (existingType !== typeDef) { + throw extendError(typeDef.name) } - throw extendError(typeDef.name) + return } - if (isNexusScalarTypeDef(typeDef) && typeDef.value.asNexusMethod) { - this.dynamicInputFields[typeDef.value.asNexusMethod] = typeDef.name - this.dynamicOutputFields[typeDef.value.asNexusMethod] = typeDef.name - if (typeDef.value.sourceType) { + if (isNexusNamedTypeDef(typeDef)) { + if (isNexusNamedOuputTypeDef(typeDef) && typeDef.value.asNexusMethod) { + this.dynamicOutputFields[typeDef.value.asNexusMethod] = typeDef.name + } + if (isNexusNamedInputTypeDef(typeDef) && typeDef.value.asNexusMethod) { + this.dynamicInputFields[typeDef.value.asNexusMethod] = typeDef.name + } + if (isNexusScalarTypeDef(typeDef) && typeDef.value.sourceType) { this.sourceTypings[typeDef.name] = typeDef.value.sourceType } - } else if (isScalarType(typeDef)) { - const scalarDef = typeDef as GraphQLScalarType & { - extensions?: NexusScalarExtensions + } + + // If it's a concrete GraphQL type, we handle it directly by convering the + // type to a Nexus structure, and capturing all of the referenced types + // while we're reconstructing. + if (isNamedType(typeDef)) { + // If we've already captured the named type, we can skip it + if (this.graphqlNamedTypeMap[typeDef.name]) { + return } - if (scalarDef.extensions?.nexus) { - const { asNexusMethod, sourceType: rootTyping } = scalarDef.extensions.nexus + + // If we've used decorateType to wrap, then we can grab the types off + if (typeDef.extensions?.nexus) { + const { asNexusMethod, sourceType } = typeDef.extensions.nexus if (asNexusMethod) { - this.dynamicInputFields[asNexusMethod] = scalarDef.name - this.dynamicOutputFields[asNexusMethod] = typeDef.name + if (isInputType(typeDef)) { + this.dynamicInputFields[asNexusMethod] = typeDef.name + } + if (isOutputType(typeDef)) { + this.dynamicOutputFields[asNexusMethod] = typeDef.name + } } - if (rootTyping) { - this.sourceTypings[scalarDef.name] = rootTyping + if (sourceType) { + this.sourceTypings[typeDef.name] = sourceType } } - } - - if (isNamedType(typeDef)) { - let finalTypeDef = typeDef - if (isObjectType(typeDef)) { - const config = typeDef.toConfig() - finalTypeDef = new GraphQLObjectType({ - ...config, - fields: () => this.rebuildNamedOutputFields(config), - interfaces: () => config.interfaces.map((t) => this.getInterface(t.name)), - }) - } else if (isInterfaceType(typeDef)) { - const config = graphql15InterfaceConfig(typeDef.toConfig()) - finalTypeDef = new GraphQLInterfaceType({ - ...config, - fields: () => this.rebuildNamedOutputFields(config), - interfaces: () => config.interfaces.map((t) => this.getInterface(t.name)), - } as GraphQLInterfaceTypeConfig) - } else if (isUnionType(typeDef)) { - const config = typeDef.toConfig() - finalTypeDef = new GraphQLUnionType({ - ...config, - types: () => config.types.map((t) => this.getObjectType(t.name)), - }) + this.graphqlNamedTypeMap[typeDef.name] = this.handleNativeType(typeDef, { + captureLeafType: (t) => { + if (!this.graphqlNamedTypeMap[t.name] && t.name !== typeDef.name) { + this.addType(t) + } + }, + }) + if (typeDef.extensions?.nexus) { + this.addType(this.graphqlNamedTypeMap[typeDef.name]) } - this.finalTypeMap[typeDef.name] = finalTypeDef - this.definedTypeMap[typeDef.name] = typeDef - this.typesToWalk.push({ type: 'named', value: typeDef }) - } else { - this.pendingTypeMap[typeDef.name] = typeDef + return } + + this.pendingTypeMap[typeDef.name] = typeDef + if (isNexusInputObjectTypeDef(typeDef)) { this.typesToWalk.push({ type: 'input', value: typeDef.value }) } @@ -603,7 +674,20 @@ export class SchemaBuilder { return } if (isSchema(types)) { - this.addTypes(types.getTypeMap()) + if (this.config.mergeSchema?.schema === types) { + return + } else if (!this.config.mergeSchema) { + if (Object.keys(this.graphqlMergeSchemaMap).length) { + console.error( + new Error( + `It looks like you're trying to merge multiple GraphQL schemas.\n Please open a GitHub ticket with more info about your use case.` + ) + ) + } + this.graphqlMergeSchemaMap = this.handleMergeSchema({ schema: types }) + } else { + this.addTypes(types.getTypeMap()) + } return } if (isNexusPlugin(types)) { @@ -647,36 +731,7 @@ export class SchemaBuilder { } } - rebuildNamedOutputFields( - config: ReturnType - ) { - const { fields, ...rest } = config - const fieldsConfig = typeof fields === 'function' ? fields() : fields - return mapValues(fieldsConfig, (val, key) => { - const { resolve, type, ...fieldConfig } = val - const finalType = this.replaceNamedType(type) - return { - ...fieldConfig, - type: finalType, - resolve: this.makeFinalResolver( - { - builder: this.builderLens, - fieldConfig: { - ...fieldConfig, - type: finalType, - name: key, - }, - schemaConfig: this.config, - parentTypeConfig: rest as any, // TODO(tim): remove as any when we drop support for 14.x - schemaExtension: this.schemaExtension, - }, - resolve - ), - } - }) - } - - walkTypes() { + private walkTypes() { let obj while ((obj = this.typesToWalk.shift())) { switch (obj.type) { @@ -686,9 +741,6 @@ export class SchemaBuilder { case 'interface': this.walkInterfaceType(obj.value) break - case 'named': - this.walkNamedTypes(obj.value) - break case 'object': this.walkOutputType(obj.value) break @@ -698,7 +750,7 @@ export class SchemaBuilder { } } - beforeWalkTypes() { + private beforeWalkTypes() { this.plugins.forEach((obj, i) => { if (!isNexusPlugin(obj)) { throw new Error(`Expected a plugin in plugins[${i}], saw ${obj}`) @@ -746,7 +798,7 @@ export class SchemaBuilder { }) } - beforeBuildTypes() { + private beforeBuildTypes() { this.onBeforeBuildFns.forEach((fn) => { fn(this.builderLens) if (this.typesToWalk.length > 0) { @@ -755,7 +807,7 @@ export class SchemaBuilder { }) } - checkForInterfaceCircularDependencies() { + private checkForInterfaceCircularDependencies() { const interfaces: Record> = {} Object.keys(this.pendingTypeMap) .map((key) => this.pendingTypeMap[key]) @@ -805,9 +857,9 @@ export class SchemaBuilder { }) } - buildNexusTypes() { + private buildNexusTypes() { // If Query isn't defined, set it to null so it falls through to "missingType" - if (!this.pendingTypeMap.Query && !this.config.schemaRoots?.query) { + if (!this.pendingTypeMap.Query && !this.config.schemaRoots?.query && !this.typeExtendMap.Query) { this.pendingTypeMap.Query = null as any } Object.keys(this.pendingTypeMap).forEach((key) => { @@ -827,7 +879,7 @@ export class SchemaBuilder { }) Object.keys(this.typeExtendMap).forEach((key) => { // If we haven't defined the type, assume it's an object type - if (this.typeExtendMap[key] !== null) { + if (this.typeExtendMap[key] !== null && !this.hasType(key)) { this.buildObjectType({ name: key, definition() {}, @@ -836,7 +888,7 @@ export class SchemaBuilder { }) Object.keys(this.inputTypeExtendMap).forEach((key) => { // If we haven't defined the type, assume it's an input object type - if (this.inputTypeExtendMap[key] !== null) { + if (this.inputTypeExtendMap[key] !== null && !this.hasType(key)) { this.buildInputObjectType({ name: key, definition() {}, @@ -845,7 +897,7 @@ export class SchemaBuilder { }) } - createSchemaExtension() { + private createSchemaExtension() { this._schemaExtension = new NexusSchemaExtension({ ...this.config, dynamicFields: { @@ -873,7 +925,16 @@ export class SchemaBuilder { } } - buildInputObjectType(config: NexusInputObjectTypeConfig): GraphQLInputObjectType { + private shouldMerge(typeName: string) { + if (!this.config.mergeSchema) { + return false + } + const { mergeTypes = ['Query', 'Mutation'] } = this.config.mergeSchema + + return Boolean(mergeTypes === true || mergeTypes.includes(typeName)) + } + + private buildInputObjectType(config: NexusInputObjectTypeConfig): GraphQLInputObjectType { const fields: NexusInputFieldDef[] = [] const definitionBlock = new InputDefinitionBlock({ typeName: config.name, @@ -881,6 +942,10 @@ export class SchemaBuilder { addDynamicInputFields: (block, wrapping) => this.addDynamicInputFields(block, wrapping), warn: consoleWarn, }) + const externalNamedType = this.graphqlMergeSchemaMap[config.name] + if (this.shouldMerge(config.name) && isNexusInputObjectTypeDef(externalNamedType)) { + externalNamedType.value.definition(definitionBlock) + } config.definition(definitionBlock) this.onInputObjectDefinitionFns.forEach((fn) => { fn(definitionBlock, config) @@ -904,7 +969,7 @@ export class SchemaBuilder { return this.finalize(new GraphQLInputObjectType(inputObjectTypeConfig)) } - buildObjectType(config: NexusObjectTypeConfig) { + private buildObjectType(config: NexusObjectTypeConfig) { const fields: NexusOutputFieldDef[] = [] const interfaces: Implemented[] = [] const modifications: Record> = {} @@ -916,6 +981,10 @@ export class SchemaBuilder { addDynamicOutputMembers: (block, wrapping) => this.addDynamicOutputMembers(block, 'build', wrapping), warn: consoleWarn, }) + const externalNamedType = this.graphqlMergeSchemaMap[config.name] + if (this.shouldMerge(config.name) && isNexusObjectTypeDef(externalNamedType)) { + externalNamedType.value.definition(definitionBlock) + } config.definition(definitionBlock) this.onObjectDefinitionFns.forEach((fn) => { fn(definitionBlock, config) @@ -949,7 +1018,7 @@ export class SchemaBuilder { return this.finalize(new GraphQLObjectType(objectTypeConfig)) } - buildInterfaceType(config: NexusInterfaceTypeConfig) { + private buildInterfaceType(config: NexusInterfaceTypeConfig) { const { name, description } = config let resolveType: AbstractTypeResolver | undefined = (config as any).resolveType @@ -964,6 +1033,10 @@ export class SchemaBuilder { addDynamicOutputMembers: (block, wrapping) => this.addDynamicOutputMembers(block, 'build', wrapping), warn: consoleWarn, }) + const externalNamedType = this.graphqlMergeSchemaMap[config.name] + if (this.shouldMerge(config.name) && isNexusInterfaceTypeDef(externalNamedType)) { + externalNamedType.value.definition(definitionBlock) + } config.definition(definitionBlock) if (config.sourceType) { @@ -1105,12 +1178,12 @@ export class SchemaBuilder { ) } - protected finalize(type: T): T { + private finalize(type: T): T { this.finalTypeMap[type.name] = type return type } - protected missingType(typeName: string, fromObject: boolean = false): GraphQLNamedType { + private missingType(typeName: string, fromObject: boolean = false): GraphQLNamedType { invariantGuard(typeName) if (this.onMissingTypeFns.length) { for (let i = 0; i < this.onMissingTypeFns.length; i++) { @@ -1138,10 +1211,11 @@ export class SchemaBuilder { this.missingTypes[typeName] = { fromObject } } - return UNKNOWN_TYPE_SCALAR + this.addType(UNKNOWN_TYPE_SCALAR) + return this.getOrBuildType(UNKNOWN_TYPE_SCALAR) } - protected buildUnionMembers(unionName: string, members: UnionMembers | undefined) { + private buildUnionMembers(unionName: string, members: UnionMembers | undefined) { const unionMembers: GraphQLObjectType[] = [] /* istanbul ignore next */ if (!members) { @@ -1160,7 +1234,7 @@ export class SchemaBuilder { return unionMembers } - protected buildInterfaceList(interfaces: (string | NexusInterfaceTypeDef)[]) { + private buildInterfaceList(interfaces: (string | NexusInterfaceTypeDef)[]) { const list: GraphQLInterfaceType[] = [] interfaces.forEach((i) => { const type = this.getInterface(i) @@ -1169,7 +1243,7 @@ export class SchemaBuilder { return Array.from(new Set(list)) } - protected buildInterfaceFields( + private buildInterfaceFields( forTypeConfig: NexusGraphQLObjectTypeConfig | NexusGraphQLInterfaceTypeConfig, interfaces: (string | NexusInterfaceTypeDef)[], modifications: Record> @@ -1214,7 +1288,7 @@ export class SchemaBuilder { } if (typeof args !== 'undefined') { interfaceFieldsMap[field].args = { - ...this.buildArgs(args, forTypeConfig, field), + ...this.buildArgs(args ?? {}, forTypeConfig, field), ...interfaceFieldsMap[field].args, } } @@ -1224,7 +1298,7 @@ export class SchemaBuilder { return interfaceFieldsMap } - protected buildOutputFields( + private buildOutputFields( fields: NexusOutputFieldDef[], typeConfig: NexusGraphQLInterfaceTypeConfig | NexusGraphQLObjectTypeConfig, intoObject: GraphQLFieldConfigMap @@ -1235,7 +1309,7 @@ export class SchemaBuilder { return intoObject } - protected buildInputObjectFields( + private buildInputObjectFields( fields: NexusInputFieldDef[], typeConfig: NexusGraphQLInputObjectTypeConfig ): GraphQLInputFieldConfigMap { @@ -1246,7 +1320,7 @@ export class SchemaBuilder { return fieldMap } - protected getNonNullDefault( + private getNonNullDefault( nonNullDefaultConfig: { nonNullDefaults?: NonNullConfig } | undefined, kind: 'input' | 'output' ): boolean { @@ -1255,7 +1329,7 @@ export class SchemaBuilder { return nonNullDefaults[kind] ?? this.config.nonNullDefaults[kind] ?? false } - protected buildOutputField( + private buildOutputField( fieldConfig: NexusOutputFieldDef, typeConfig: NexusGraphQLObjectTypeConfig | NexusGraphQLInterfaceTypeConfig ): GraphQLFieldConfig { @@ -1297,7 +1371,7 @@ export class SchemaBuilder { } } - protected makeFinalResolver(info: CreateFieldResolverInfo, resolver?: GraphQLFieldResolver) { + private makeFinalResolver(info: CreateFieldResolverInfo, resolver?: GraphQLFieldResolver) { const resolveFn = resolver || defaultFieldResolver if (this.onCreateResolverFns.length) { const toCompose = this.onCreateResolverFns.map((fn) => fn(info)).filter((f) => f) as MiddlewareFn[] @@ -1308,7 +1382,7 @@ export class SchemaBuilder { return resolveFn } - protected buildInputObjectField( + private buildInputObjectField( fieldConfig: NexusInputFieldDef, typeConfig: NexusGraphQLInputObjectTypeConfig ): GraphQLInputFieldConfig { @@ -1329,27 +1403,27 @@ export class SchemaBuilder { } } - protected buildArgs( + private buildArgs( args: ArgsRecord, typeConfig: NexusGraphQLObjectTypeConfig | NexusGraphQLInterfaceTypeConfig, fieldName: string ): GraphQLFieldConfigArgumentMap { const allArgs: GraphQLFieldConfigArgumentMap = {} - Object.keys(args).forEach((argName) => { + for (const [argName, arg] of Object.entries(args)) { const nonNullDefault = this.getNonNullDefault(typeConfig.extensions?.nexus?.config, 'input') let finalArgDef: NexusFinalArgConfig = { - ...normalizeArgWrapping(args[argName]).value, + ...normalizeArgWrapping(arg).value, fieldName, argName, parentType: typeConfig.name, configFor: 'arg', } - this.onAddArgFns.forEach((onArgDef) => { + for (const onArgDef of this.onAddArgFns) { const result = onArgDef(finalArgDef) if (result != null) { finalArgDef = result } - }) + } const { namedType, wrapping } = unwrapNexusDef(finalArgDef.type) const finalWrap = finalizeWrapping(nonNullDefault, wrapping) allArgs[argName] = { @@ -1364,11 +1438,11 @@ export class SchemaBuilder { nexus: finalArgDef.extensions?.nexus ?? {}, }, } - }) + } return allArgs } - protected getInterface(name: string | NexusInterfaceTypeDef): GraphQLInterfaceType { + private getInterface(name: string | NexusInterfaceTypeDef): GraphQLInterfaceType { const type = this.getOrBuildType(name) if (!isInterfaceType(type)) { /* istanbul ignore next */ @@ -1377,7 +1451,7 @@ export class SchemaBuilder { return type } - protected getInputType( + private getInputType( possibleInputType: PossibleInputType ): Exclude | GraphQLList> { const nexusNamedType = getNexusNamedType(possibleInputType) @@ -1391,7 +1465,7 @@ export class SchemaBuilder { return graphqlType } - protected getOutputType( + private getOutputType( possibleOutputType: PossibleOutputType ): Exclude | GraphQLList> { const graphqlType = this.getOrBuildType(possibleOutputType) @@ -1404,21 +1478,7 @@ export class SchemaBuilder { return graphqlType } - protected getObjectOrInterfaceType( - name: string | NexusObjectTypeDef - ): GraphQLObjectType | GraphQLInterfaceType { - if (isNexusNamedTypeDef(name)) { - return this.getObjectOrInterfaceType(name.name) - } - const type = this.getOrBuildType(name) - if (!isObjectType(type) && !isInterfaceType(type)) { - /* istanbul ignore next */ - throw new Error(`Expected ${name} to be a objectType / interfaceType, saw ${type.constructor.name}`) - } - return type - } - - protected getObjectType(name: string | NexusObjectTypeDef): GraphQLObjectType { + private getObjectType(name: string | NexusObjectTypeDef): GraphQLObjectType { if (isNexusNamedTypeDef(name)) { return this.getObjectType(name.name) } @@ -1430,7 +1490,7 @@ export class SchemaBuilder { return type } - protected getOrBuildType( + private getOrBuildType( type: string | AllNexusNamedTypeDefs | GraphQLNamedType, fromObject: boolean = false ): GraphQLNamedType { @@ -1456,7 +1516,8 @@ export class SchemaBuilder { `GraphQL Nexus: Circular dependency detected, while building types ${Array.from(this.buildingTypes)}` ) } - const pendingType = this.pendingTypeMap[type] + const pendingType = + this.pendingTypeMap[type] ?? this.graphqlNamedTypeMap[type] ?? this.graphqlMergeSchemaMap[type] if (isNexusNamedTypeDef(pendingType)) { this.buildingTypes.add(pendingType.name) @@ -1479,7 +1540,7 @@ export class SchemaBuilder { return this.missingType(type, fromObject) } - protected walkInputType(obj: T) { + private walkInputType(obj: T) { const definitionBlock = new InputDefinitionBlock({ typeName: obj.name, addField: (f) => this.maybeTraverseInputFieldType(f), @@ -1490,10 +1551,10 @@ export class SchemaBuilder { return obj } - addDynamicInputFields(block: InputDefinitionBlock, wrapping?: NexusWrapKind[]) { + private addDynamicInputFields(block: InputDefinitionBlock, wrapping?: NexusWrapKind[]) { eachObj(this.dynamicInputFields, (val, methodName) => { if (typeof val === 'string') { - return this.addDynamicScalar(methodName, val, block) + return this.addDynamicField(methodName, val, block) } // @ts-ignore block[methodName] = (...args: any[]) => { @@ -1508,14 +1569,14 @@ export class SchemaBuilder { }) } - addDynamicOutputMembers( + private addDynamicOutputMembers( block: OutputDefinitionBlock, stage: 'walk' | 'build', wrapping?: NexusWrapKind[] ) { eachObj(this.dynamicOutputFields, (val, methodName) => { if (typeof val === 'string') { - return this.addDynamicScalar(methodName, val, block) + return this.addDynamicField(methodName, val, block) } // @ts-ignore block[methodName] = (...args: any[]) => { @@ -1544,7 +1605,7 @@ export class SchemaBuilder { }) } - addDynamicScalar( + private addDynamicField( methodName: string, typeName: string, block: OutputDefinitionBlock | InputDefinitionBlock @@ -1567,7 +1628,7 @@ export class SchemaBuilder { } } - protected walkOutputType(obj: T) { + private walkOutputType(obj: T) { const definitionBlock = new ObjectDefinitionBlock({ typeName: obj.name, addInterfaces: (i) => { @@ -1586,7 +1647,7 @@ export class SchemaBuilder { return obj } - protected walkInterfaceType(obj: NexusInterfaceTypeConfig) { + private walkInterfaceType(obj: NexusInterfaceTypeConfig) { const definitionBlock = new InterfaceDefinitionBlock({ typeName: obj.name, addModification: (o) => this.maybeTraverseModification(o), @@ -1605,7 +1666,7 @@ export class SchemaBuilder { return obj } - protected maybeTraverseModification(mod: FieldModificationDef) { + private maybeTraverseModification(mod: FieldModificationDef) { const { type, args } = mod if (type) { const namedFieldType = getNexusNamedType(mod.type) @@ -1618,7 +1679,7 @@ export class SchemaBuilder { } } - protected maybeTraverseOutputFieldType(type: NexusOutputFieldDef) { + private maybeTraverseOutputFieldType(type: NexusOutputFieldDef) { const { args, type: fieldType } = type const namedFieldType = getNexusNamedType(fieldType) if (typeof namedFieldType !== 'string') { @@ -1638,7 +1699,7 @@ export class SchemaBuilder { }) } - protected maybeTraverseInputFieldType(type: NexusInputFieldDef) { + private maybeTraverseInputFieldType(type: NexusInputFieldDef) { const { type: fieldType } = type const namedFieldType = getNexusNamedType(fieldType) if (typeof namedFieldType !== 'string') { @@ -1646,47 +1707,36 @@ export class SchemaBuilder { } } - protected walkNamedTypes(namedType: GraphQLNamedType) { - if (isObjectType(namedType) || isInterfaceType(namedType)) { - eachObj(namedType.getFields(), (val) => this.addNamedTypeOutputField(val)) - } - if (isObjectType(namedType)) { - namedType.getInterfaces().forEach((i) => this.addUnknownTypeInternal(i)) - } - if (isInputObjectType(namedType)) { - eachObj(namedType.getFields(), (val) => this.addUnknownTypeInternal(getNamedType(val.type))) - } - if (isUnionType(namedType)) { - namedType.getTypes().forEach((type) => this.addUnknownTypeInternal(type)) - } - } - - protected addUnknownTypeInternal(t: GraphQLNamedType) { - if (!this.definedTypeMap[t.name]) { - this.addType(t) - } - } - - protected addNamedTypeOutputField(obj: GraphQLField) { - this.addUnknownTypeInternal(getNamedType(obj.type)) - if (obj.args) { - obj.args.forEach((val) => this.addType(getNamedType(val.type))) + /** + * Given a "mergeSchema", gathers all of the types and constructs them + * into a map of types that we keep as a "merge schema" + * + * @param config + */ + private handleMergeSchema(config: MergeSchemaConfig) { + const { types } = config.schema.toConfig() + const mergedTypes: Record = {} + + // We don't need to worry about capturing any types while walking, + // because we have the entire schema + for (const type of types) { + if (type.name.startsWith('__')) { + continue + } + if (config.skipTypes?.includes(type.name)) { + continue + } + mergedTypes[type.name] = this.handleNativeType(type, config) } + return mergedTypes } - protected replaceNamedType(type: GraphQLType) { - let wrappingTypes: any[] = [] - let finalType = type - while (isWrappingType(finalType)) { - wrappingTypes.unshift(finalType.constructor) - finalType = finalType.ofType - } - if (this.finalTypeMap[finalType.name] === this.definedTypeMap[finalType.name]) { - return type + private handleNativeType(type: GraphQLType, config: RebuildConfig) { + while (isWrappingType(type)) { + type = type.ofType } - return wrappingTypes.reduce((result, Wrapper) => { - return new Wrapper(result) - }, this.finalTypeMap[finalType.name]) + this.pendingTypeMap[type.name] ??= null + return rebuildNamedType(type, config) } } diff --git a/src/core.ts b/src/core.ts index 2a5fed77..022186f7 100644 --- a/src/core.ts +++ b/src/core.ts @@ -28,6 +28,7 @@ export * from './definitions/_types' export * from './dynamicMethod' export * from './plugin' export * from './plugins' +export * from './rebuildType' export * from './sdlConverter' export * from './typegenAutoConfig' export * from './typegenFormatPrettier' diff --git a/src/definitions/args.ts b/src/definitions/args.ts index fad51ed2..4761bdb9 100644 --- a/src/definitions/args.ts +++ b/src/definitions/args.ts @@ -1,7 +1,6 @@ import type { GraphQLScalarTypeConfig } from 'graphql' -import type { AllNexusInputTypeDefs } from '../core' import type { AllInputTypes, GetGen2 } from '../typegenTypeHelpers' -import type { AllNexusArgsDefs } from './wrapping' +import type { AllNexusArgsDefs, AllNexusInputTypeDefs } from './wrapping' import { Maybe, NexusTypes, withNexusSymbol } from './_types' export type ArgsRecord = Record diff --git a/src/definitions/decorateType.ts b/src/definitions/decorateType.ts index bf4c8776..3a67cec4 100644 --- a/src/definitions/decorateType.ts +++ b/src/definitions/decorateType.ts @@ -6,17 +6,13 @@ export interface TypeExtensionConfig { sourceType?: SourceTypingDef } -export type NexusTypeExtensions = { - nexus: TypeExtensionConfig -} - export function decorateType(type: T, config: TypeExtensionConfig): T { type.extensions = { ...type.extensions, nexus: { - asNexusMethod: config.asNexusMethod, - sourceType: config.sourceType, + ...type.extensions?.nexus, + ...config, }, } - return type as any + return type } diff --git a/src/definitions/definitionBlocks.ts b/src/definitions/definitionBlocks.ts index ab1313a3..2369515e 100644 --- a/src/definitions/definitionBlocks.ts +++ b/src/definitions/definitionBlocks.ts @@ -14,10 +14,8 @@ import type { AllNexusInputTypeDefs, AllNexusOutputTypeDefs, NexusWrapKind } fro import type { BaseScalars, Maybe } from './_types' export interface CommonFieldConfig { - //todo /** The description to annotate the GraphQL SDL */ description?: Maybe - //todo /** * Info about a field deprecation. Formatted as a string and provided with the deprecated directive on * field/enum types and as a comment on input fields. @@ -75,7 +73,7 @@ export type CommonOutputFieldConfig /** * Data that will be added to the field-level [extensions field on the graphql-js type def * instances](https://github.com/graphql/graphql-js/issues/1527) resulting from makeSchema. Useful for some diff --git a/src/definitions/enumType.ts b/src/definitions/enumType.ts index 083314ab..ffb9c24f 100644 --- a/src/definitions/enumType.ts +++ b/src/definitions/enumType.ts @@ -43,6 +43,8 @@ export interface NexusEnumTypeConfig { * @see https://github.com/graphql/graphql-js/issues/1527 */ extensions?: GraphQLEnumTypeConfig['extensions'] + /** Adds this type as a method on the Object/Interface definition blocks */ + asNexusMethod?: string } export class NexusEnumTypeDef { diff --git a/src/definitions/inputObjectType.ts b/src/definitions/inputObjectType.ts index 797612f1..3f3360ed 100644 --- a/src/definitions/inputObjectType.ts +++ b/src/definitions/inputObjectType.ts @@ -21,6 +21,8 @@ export type NexusInputObjectTypeConfig = { * @see https://github.com/graphql/graphql-js/issues/1527 */ extensions?: GraphQLInputObjectTypeConfig['extensions'] + /** Adds this type as a method on the Object/Interface definition blocks */ + asNexusMethod?: string } & NexusGenPluginInputTypeConfig export class NexusInputObjectTypeDef { diff --git a/src/definitions/interfaceType.ts b/src/definitions/interfaceType.ts index e8b48371..d2ab9b0d 100644 --- a/src/definitions/interfaceType.ts +++ b/src/definitions/interfaceType.ts @@ -13,7 +13,7 @@ export interface FieldModification /** You are allowed to add non-required args when modifying a field */ - args?: ArgsRecord + args?: Maybe /** * Custom extensions, as supported in graphql-js * @@ -53,6 +53,8 @@ export type NexusInterfaceTypeConfig = { * @see https://github.com/graphql/graphql-js/issues/1527 */ extensions?: GraphQLInterfaceTypeConfig['extensions'] + /** Adds this type as a method on the Object/Interface definition blocks */ + asNexusMethod?: string } & AbstractTypes.MaybeTypeDefConfigFieldResolveType export interface InterfaceDefinitionBuilder extends OutputDefinitionBuilder { diff --git a/src/definitions/objectType.ts b/src/definitions/objectType.ts index 85fc5c9e..2c7833b8 100644 --- a/src/definitions/objectType.ts +++ b/src/definitions/objectType.ts @@ -189,6 +189,8 @@ export type NexusObjectTypeConfig = { * jsDoc for more detail. */ definition(t: ObjectDefinitionBlock): void + /** Adds this type as a method on the Object/Interface definition blocks */ + asNexusMethod?: string } & AbstractTypes.MaybeTypeDefConfigFieldIsTypeOf & NexusGenPluginTypeConfig diff --git a/src/definitions/scalarType.ts b/src/definitions/scalarType.ts index d45cb111..46670434 100644 --- a/src/definitions/scalarType.ts +++ b/src/definitions/scalarType.ts @@ -1,6 +1,7 @@ -import { assertValidName, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql' +import { assertValidName, GraphQLNamedType, GraphQLScalarTypeConfig } from 'graphql' +import type { AllNexusInputTypeDefs, AllNexusOutputTypeDefs } from '../core' import { decorateType } from './decorateType' -import { Maybe, NexusTypes, SourceTypingDef, withNexusSymbol } from './_types' +import { GraphQLNamedOutputType, Maybe, NexusTypes, SourceTypingDef, withNexusSymbol } from './_types' export interface ScalarBase extends Pick< @@ -43,13 +44,13 @@ export function scalarType(options: NexusScalarTypeConf return new NexusScalarTypeDef(options.name, options) } -export function asNexusMethod( - scalar: T, +export function asNexusMethod( + namedType: T, methodName: string, sourceType?: SourceTypingDef -): T { - return decorateType(scalar, { +): T extends GraphQLNamedOutputType ? AllNexusOutputTypeDefs : AllNexusInputTypeDefs { + return decorateType(namedType, { asNexusMethod: methodName, sourceType, - }) + }) as any } diff --git a/src/definitions/unionType.ts b/src/definitions/unionType.ts index 0d22d9bc..7e12fa8a 100644 --- a/src/definitions/unionType.ts +++ b/src/definitions/unionType.ts @@ -41,6 +41,8 @@ export type NexusUnionTypeConfig = { * @see https://github.com/graphql/graphql-js/issues/1527 */ extensions?: GraphQLUnionTypeConfig['extensions'] + /** Adds this type as a method on the Object/Interface definition blocks */ + asNexusMethod?: string } & AbstractTypes.MaybeTypeDefConfigFieldResolveType export class NexusUnionTypeDef { diff --git a/src/definitions/wrapping.ts b/src/definitions/wrapping.ts index 9358eb60..5710a468 100644 --- a/src/definitions/wrapping.ts +++ b/src/definitions/wrapping.ts @@ -201,6 +201,13 @@ export function isNexusArgDef(obj: any): obj is NexusArgDef { return isNexusStruct(obj) && obj[NexusWrappedSymbol] === NexusTypes.Arg } +export function isNexusNamedOuputTypeDef(obj: any): obj is AllNexusNamedOutputTypeDefs { + return isNexusNamedTypeDef(obj) && !isNexusInputObjectTypeDef(obj) +} +export function isNexusNamedInputTypeDef(obj: any): obj is AllNexusNamedInputTypeDefs { + return isNexusNamedTypeDef(obj) && !isNexusObjectTypeDef(obj) && !isNexusInterfaceTypeDef(obj) +} + export function isNexusDynamicOutputProperty(obj: any): obj is DynamicOutputPropertyDef { return isNexusStruct(obj) && obj[NexusWrappedSymbol] === NexusTypes.DynamicOutputProperty } diff --git a/src/extensions.ts b/src/extensions.ts index 8c577e79..7e7d16d2 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -1,6 +1,6 @@ import { defaultFieldResolver, GraphQLNamedType } from 'graphql' import type { DynamicFieldDefs, SchemaConfig } from './builder' -import type { SourceTypingDef, SourceTypings } from './definitions/_types' +import type { SourceTypings } from './definitions/_types' import type { NexusOutputFieldConfig } from './definitions/definitionBlocks' import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType' import type { NexusInterfaceTypeConfig } from './definitions/interfaceType' @@ -71,10 +71,3 @@ export interface NexusSchemaExtensionConfig extends Omit export class NexusSchemaExtension { constructor(readonly config: NexusSchemaExtensionConfig) {} } - -export type NexusScalarExtensions = { - nexus: { - asNexusMethod?: string - sourceType?: SourceTypingDef - } -} diff --git a/src/rebuildType.ts b/src/rebuildType.ts new file mode 100644 index 00000000..cf986f7b --- /dev/null +++ b/src/rebuildType.ts @@ -0,0 +1,232 @@ +import { + GraphQLEnumType, + GraphQLFieldConfigArgumentMap, + GraphQLFieldConfigMap, + GraphQLInputFieldConfigMap, + GraphQLInputObjectType, + GraphQLInterfaceType, + GraphQLNamedType, + GraphQLObjectType, + GraphQLScalarType, + GraphQLUnionType, + isEnumType, + isInputObjectType, + isInterfaceType, + isObjectType, + isScalarType, + isUnionType, + defaultTypeResolver, +} from 'graphql' +import type { MergeSchemaConfig } from './builder' +import { arg, ArgsRecord } from './definitions/args' +import type { InputDefinitionBlock } from './definitions/definitionBlocks' +import { enumType } from './definitions/enumType' +import { inputObjectType } from './definitions/inputObjectType' +import { InterfaceDefinitionBlock, interfaceType } from './definitions/interfaceType' +import { ObjectDefinitionBlock, objectType } from './definitions/objectType' +import { scalarType } from './definitions/scalarType' +import { unionType } from './definitions/unionType' +import { AllNexusArgsDefs, applyNexusWrapping, unwrapGraphQLDef } from './definitions/wrapping' +import type { Maybe, SourceTypingDef } from './definitions/_types' +import type { GetGen } from './typegenTypeHelpers' +import { graphql15InterfaceConfig, Unreachable } from './utils' + +export interface RebuildConfig extends Omit { + captureLeafType?: (type: GraphQLNamedType) => void + asNexusMethod?: string + sourceType?: SourceTypingDef +} + +export function rebuildNamedType(type: GraphQLNamedType, config: RebuildConfig) { + if (isObjectType(type)) { + return rebuildObjectType(type, config) + } else if (isInputObjectType(type)) { + return rebuildInputObjectType(type, config) + } else if (isInterfaceType(type)) { + return rebuildInterfaceType(type, config) + } else if (isUnionType(type)) { + return rebuildUnionType(type, config) + } else if (isScalarType(type)) { + return rebuildScalarType(type, config) + } else if (isEnumType(type)) { + return rebuildEnumType(type, config) + } + throw new Unreachable(type) +} + +export function rebuildInputObjectType(type: GraphQLInputObjectType, config: RebuildConfig) { + const { name, fields, description, extensions } = type.toConfig() + return inputObjectType({ + name, + description, + definition: (t) => { + rebuildInputDefinition(name, t, fields, config) + }, + extensions, + nonNullDefaults: { + output: false, + input: false, + }, + }) +} + +export function rebuildUnionType(type: GraphQLUnionType, config: RebuildConfig) { + const { name, types, description, resolveType, extensions } = type.toConfig() + return unionType({ + name, + description, + // @ts-ignore - todo, see why this is the case + resolveType: resolveType ?? defaultTypeResolver, + definition(t) { + t.members( + ...types.map((o) => { + config.captureLeafType?.(o) + return o.name as GetGen<'objectNames'> + }) + ) + }, + extensions, + }) +} + +export function rebuildScalarType(type: GraphQLScalarType, config: RebuildConfig) { + return scalarType({ + ...type.toConfig(), + sourceType: config.sourceType, + asNexusMethod: config.asNexusMethod, + }) +} + +export function rebuildEnumType(type: GraphQLEnumType, { sourceType, asNexusMethod }: RebuildConfig) { + const { name, values, ...config } = type.toConfig() + return enumType({ + name, + ...config, + members: Object.entries(values).map(([valueName, config]) => { + return { + name: valueName, + deprecation: config.deprecationReason, + ...config, + } + }), + sourceType, + asNexusMethod, + }) +} + +export function rebuildInterfaceType(type: GraphQLInterfaceType, config: RebuildConfig) { + const { name, fields, description, interfaces, extensions, resolveType } = graphql15InterfaceConfig( + type.toConfig() + ) + return interfaceType({ + name, + description, + // @ts-ignore - todo, see why this is the case + resolveType: resolveType ?? defaultTypeResolver, + definition: (t) => { + rebuildOutputDefinition(name, t, fields, interfaces, config) + }, + nonNullDefaults: { + output: false, + input: false, + }, + extensions, + sourceType: config.sourceType, + asNexusMethod: config.asNexusMethod, + }) +} + +export function rebuildObjectType(type: GraphQLObjectType, config: RebuildConfig) { + const { name, fields, interfaces, description, extensions } = type.toConfig() + return objectType({ + name, + description, + definition: (t) => { + rebuildOutputDefinition(name, t, fields, interfaces, config) + }, + nonNullDefaults: { + output: false, + input: false, + }, + extensions, + sourceType: config.sourceType, + asNexusMethod: config.asNexusMethod, + }) +} + +export function rebuildOutputDefinition( + typeName: string, + t: ObjectDefinitionBlock | InterfaceDefinitionBlock, + fields: GraphQLFieldConfigMap, + interfaces: ReadonlyArray, + config: RebuildConfig +) { + t.implements( + ...interfaces.map((i) => { + config.captureLeafType?.(i) + return i.name as GetGen<'interfaceNames'> + }) + ) + for (const [fieldName, fieldConfig] of Object.entries(fields)) { + if (config.skipFields?.[typeName] && config.skipFields?.[typeName].includes(fieldName)) { + continue + } + const { namedType, wrapping } = unwrapGraphQLDef(fieldConfig.type) + config.captureLeafType?.(namedType) + t.field(fieldName, { + type: applyNexusWrapping(namedType.name, wrapping), + description: fieldConfig.description, + deprecation: fieldConfig.deprecationReason, + extensions: fieldConfig.extensions, + args: rebuildArgs(typeName, fieldName, fieldConfig.args ?? {}, config), + resolve: fieldConfig.resolve, + }) + } +} + +export function rebuildInputDefinition( + typeName: string, + t: InputDefinitionBlock, + fields: GraphQLInputFieldConfigMap, + config: RebuildConfig +) { + for (const [fieldName, fieldConfig] of Object.entries(fields)) { + if (config.skipFields?.[typeName] && config.skipFields?.[typeName].includes(fieldName)) { + continue + } + const { namedType, wrapping } = unwrapGraphQLDef(fieldConfig.type) + config.captureLeafType?.(namedType) + t.field(fieldName, { + type: applyNexusWrapping(namedType.name, wrapping), + description: fieldConfig.description, + default: fieldConfig.defaultValue, + extensions: fieldConfig.extensions, + }) + } +} + +export function rebuildArgs( + typeName: string, + fieldName: string, + argMap: Maybe, + config: RebuildConfig +): Maybe { + if (!argMap) { + return null + } + const rebuiltArgs: Record = {} + for (const [argName, argConfig] of Object.entries(argMap)) { + if (config.skipArgs?.[typeName]?.[fieldName]) { + continue + } + const { namedType, wrapping } = unwrapGraphQLDef(argConfig.type) + config.captureLeafType?.(namedType) + rebuiltArgs[argName] = arg({ + type: applyNexusWrapping(namedType.name, wrapping), + default: argConfig.defaultValue, + description: argConfig.description, + extensions: argConfig.extensions, + }) + } + return rebuiltArgs +} diff --git a/src/typegenAutoConfig.ts b/src/typegenAutoConfig.ts index 56baa66c..3a31890a 100644 --- a/src/typegenAutoConfig.ts +++ b/src/typegenAutoConfig.ts @@ -194,7 +194,7 @@ export function typegenAutoConfig(options: SourceTypesConfigOptions, contextType const builtinScalars = new Set(Object.keys(SCALAR_TYPES)) Object.keys(typeMap).forEach((typeName) => { - if (typeName.indexOf('__') === 0) { + if (typeName.startsWith('__')) { return } if (typesToIgnore.has(typeName)) { diff --git a/src/utils.ts b/src/utils.ts index d92d1e5a..60880e27 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -178,7 +178,7 @@ export function groupTypes(schema: GraphQLSchema) { Object.keys(schemaTypeMap) .sort() .forEach((typeName) => { - if (typeName.indexOf('__') === 0) { + if (typeName.startsWith('__')) { return } const type = schema.getType(typeName) @@ -628,3 +628,10 @@ export const ownProp = { return Object.getOwnPropertyDescriptor(obj, key)?.value }, } + +export function result(val: T | (() => T)): T { + if (val instanceof Function) { + return val() + } + return val as T +} diff --git a/tests/__snapshots__/builder.spec.ts.snap b/tests/__snapshots__/builder.spec.ts.snap index c16e0940..7ad71a6b 100644 --- a/tests/__snapshots__/builder.spec.ts.snap +++ b/tests/__snapshots__/builder.spec.ts.snap @@ -65,3 +65,97 @@ type RootQuery { } " `; + +exports[`builder.mergeSchema Merges Mutation & Query types by default: merged mutation 1`] = ` +"type Mutation { + externalMutation(a: String): String + localMutation: String +}" +`; + +exports[`builder.mergeSchema Merges Mutation & Query types by default: merged query 1`] = ` +"type Query { + externalFn(a: String): String + localFn: String +}" +`; + +exports[`builder.mergeSchema Merges Mutation & Query types by default: unmerged mutation 1`] = ` +"type Mutation { + localMutation: String +}" +`; + +exports[`builder.mergeSchema Merges Mutation & Query types by default: unmerged query 1`] = ` +"type Query { + localFn: String +}" +`; + +exports[`builder.mergeSchema can merge with an externally created schema 1`] = ` +"type Author implements Node { + books: [Book] + + \\"\\"\\"A Node ID is globally unique\\"\\"\\" + id: ID! +} + +type Book implements Node { + id: ID! + name: String +} + +interface ExternalNode { + id: ID! +} + +type InternalType { + fieldName: String +} + +interface Node { + \\"\\"\\"A Node ID is globally unique\\"\\"\\" + id: ID! +} + +type Query { + internalNodesByIds(ids: [ID!]!, internal: String!): [Node]! + node(id: ID!): Node + someBook: Book + userByUuids(uuid: UUID): User +} + +type User implements ExternalNode & Node { + id: ID! + name: String +} + +scalar UUID +" +`; + +exports[`builder.mergeSchema can merge with local types: merged 1`] = ` +"type User implements Node & ExternalNode { + id: ID! + name: String + localName: String +}" +`; + +exports[`builder.mergeSchema can merge with local types: unmerged 1`] = ` +"type User { + localName: String +}" +`; + +exports[`graphql-js interop extend types works with GraphQLNamedType (#88) 1`] = ` +"type Query { + viewer: Viewer +} + +type Viewer { + name: String + age: Int +} +" +`; diff --git a/tests/__snapshots__/definitions.spec.ts.snap b/tests/__snapshots__/definitions.spec.ts.snap index 25890664..66aa8a2a 100644 --- a/tests/__snapshots__/definitions.spec.ts.snap +++ b/tests/__snapshots__/definitions.spec.ts.snap @@ -1,5 +1,26 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`enumType can alias as a nexus method 1`] = ` +"enum ABC { + one + three + two +} + +input Input { + inAbc: ABC +} + +type Out { + outAbc: ABC +} + +type Query { + ok: Boolean! +} +" +`; + exports[`extendInputType should allow extending input objects 1`] = ` "input InputTest { hello: String diff --git a/tests/__snapshots__/typegenPrinter.spec.ts.snap b/tests/__snapshots__/typegenPrinter.spec.ts.snap index 127b2394..4af47893 100644 --- a/tests/__snapshots__/typegenPrinter.spec.ts.snap +++ b/tests/__snapshots__/typegenPrinter.spec.ts.snap @@ -75,7 +75,7 @@ exports[`typegenPrinter should not print roots for fields with resolvers 2`] = ` exports[`typegenPrinter should print a interface type map 1`] = ` "export interface NexusGenInterfaces { - Node: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'>; + Node: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'>; }" `; @@ -138,7 +138,7 @@ exports[`typegenPrinter should print a root type map 1`] = `"export type NexusGe exports[`typegenPrinter should print a union type map 1`] = ` "export interface NexusGenUnions { - ExampleUnion: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'>; + ExampleUnion: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'>; }" `; @@ -206,11 +206,11 @@ export interface NexusGenObjects { } export interface NexusGenInterfaces { - Node: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'>; + Node: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'>; } export interface NexusGenUnions { - ExampleUnion: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'>; + ExampleUnion: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'>; } export type NexusGenRootTypes = NexusGenInterfaces & NexusGenObjects & NexusGenUnions @@ -330,7 +330,7 @@ export type NexusGenUnionNames = keyof NexusGenUnions; export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never; -export type NexusGenAbstractsUsingStrategyResolveType = never; +export type NexusGenAbstractsUsingStrategyResolveType = \\"ExampleUnion\\" | \\"Node\\"; export type NexusGenFeaturesConfig = { abstractTypeStrategies: { diff --git a/tests/__snapshots__/typegenPrinterGlobals.spec.ts.snap b/tests/__snapshots__/typegenPrinterGlobals.spec.ts.snap index bb966d73..290a2730 100644 --- a/tests/__snapshots__/typegenPrinterGlobals.spec.ts.snap +++ b/tests/__snapshots__/typegenPrinterGlobals.spec.ts.snap @@ -78,17 +78,30 @@ export interface NexusGenScalars { export interface NexusGenObjects { Mutation: {}; - Post: {}; + Post: { // root type + author: NexusGenRootTypes['User']; // User! + geo: number[][]; // [[Float!]!]! + id: string; // ID! + messyGeo?: Array | null; // [[Float!]] + uuid: NexusGenScalars['UUID']; // UUID! + } Query: {}; - User: {}; + User: { // root type + email: string; // String! + id: string; // ID! + name: string; // String! + outEnum?: SomeEnum | null; // SomeEnum + phone?: string | null; // String + posts: NexusGenRootTypes['Post'][]; // [Post!]! + } } export interface NexusGenInterfaces { - Node: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'>; + Node: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'>; } export interface NexusGenUnions { - ExampleUnion: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'>; + ExampleUnion: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'>; } export type NexusGenRootTypes = NexusGenInterfaces & NexusGenObjects & NexusGenUnions @@ -220,7 +233,7 @@ export type NexusGenUnionNames = keyof NexusGenUnions; export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never; -export type NexusGenAbstractsUsingStrategyResolveType = never; +export type NexusGenAbstractsUsingStrategyResolveType = \\"ExampleUnion\\" | \\"Node\\"; export type NexusGenFeaturesConfig = { abstractTypeStrategies: { @@ -295,17 +308,30 @@ export interface NexusGenScalars { export interface NexusGenObjects { Mutation: {}; - Post: {}; + Post: { // root type + id: string; // ID! + uuid: NexusGenScalars['UUID']; // UUID! + author: NexusGenRootTypes['User']; // User! + geo: number[][]; // [[Float!]!]! + messyGeo?: Array | null; // [[Float!]] + } Query: {}; - User: {}; + User: { // root type + id: string; // ID! + name: string; // String! + email: string; // String! + phone?: string | null; // String + posts: NexusGenRootTypes['Post'][]; // [Post!]! + outEnum?: NexusGenEnums['SomeEnum'] | null; // SomeEnum + } } export interface NexusGenInterfaces { - Node: core.Discriminate<'User', 'required'> | core.Discriminate<'Post', 'required'>; + Node: core.Discriminate<'User', 'optional'> | core.Discriminate<'Post', 'optional'>; } export interface NexusGenUnions { - ExampleUnion: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'>; + ExampleUnion: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'>; } export type NexusGenRootTypes = NexusGenInterfaces & NexusGenObjects & NexusGenUnions @@ -425,7 +451,7 @@ export type NexusGenUnionNames = keyof NexusGenUnions; export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never; -export type NexusGenAbstractsUsingStrategyResolveType = never; +export type NexusGenAbstractsUsingStrategyResolveType = \\"ExampleUnion\\" | \\"Node\\"; export type NexusGenFeaturesConfig = { abstractTypeStrategies: { diff --git a/tests/builder.spec.ts b/tests/builder.spec.ts index 2a0aed7a..7a04d407 100644 --- a/tests/builder.spec.ts +++ b/tests/builder.spec.ts @@ -1,5 +1,21 @@ -import { lexicographicSortSchema, printSchema } from 'graphql' -import { makeSchema, objectType } from '../src' +import { + buildSchema, + GraphQLNamedType, + GraphQLObjectType, + GraphQLString, + lexicographicSortSchema, + printSchema, + printType, +} from 'graphql' +import { + extendType, + interfaceType, + makeSchema, + mutationType, + objectType, + queryField, + queryType, +} from '../src' describe('builder', () => { it('can replace the Query root type with an alternate type', () => { @@ -91,3 +107,229 @@ describe('builder', () => { expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() }) }) + +describe('builder.mergeSchema', () => { + function gql(args: TemplateStringsArray) { + return args.join('') + } + + const SDL = gql` + interface Node { + id: ID! + } + + interface ExternalNode { + id: ID! + } + + type InternalType { + fieldName: String + } + + type User implements Node & ExternalNode { + id: ID! + name: String + } + + type Book implements Node { + id: ID! + name: String + } + + scalar UUID + + type Query { + node(id: ID!): Node + internalNodesByIds(ids: [ID!]!, internal: String!): [Node]! + userByUuids(uuid: UUID): User + } + ` + + const schema = buildSchema(SDL) + + const node = interfaceType({ + name: 'Node', + definition(t) { + t.nonNull.id('id', { + description: 'A Node ID is globally unique', + }) + }, + resolveType() { + return 'User' + }, + }) + + const Author = objectType({ + name: 'Author', + definition(t) { + t.implements('Node') + t.list.field('books', { + type: 'Book', + }) + }, + }) + + const someBook = queryField('someBook', { + type: 'Book', + resolve() { + return { + id: 'Book:1', + name: 'Slaughterhouse Five', + } + }, + }) + + it('can merge with an externally created schema', () => { + const finalSchema = makeSchema({ + types: [node, someBook, Author], + mergeSchema: { + schema, + }, + }) + expect(printSchema(lexicographicSortSchema(finalSchema))).toMatchSnapshot() + }) + + it('can exclude types from the output schema', () => { + const finalSchema = makeSchema({ + types: [node], + mergeSchema: { + schema, + skipTypes: ['InternalType'], + }, + }) + expect(finalSchema.getType('InternalType')).toBeUndefined() + }) + + it('can exclude fields from the output schema', () => { + const finalSchema = makeSchema({ + types: [node], + mergeSchema: { + schema, + skipFields: { + Query: ['internalNodesByIds'], + }, + }, + }) + const type = finalSchema.getType('Query') as GraphQLObjectType + expect(type.getFields()['internalNodesByIds']).toBeUndefined() + }) + + it('can exclude args from the output fields', () => { + const finalSchema = makeSchema({ + types: [node], + mergeSchema: { + schema, + skipArgs: { + Query: { + internalNodesByIds: ['internal'], + }, + }, + }, + }) + const type = finalSchema.getType('Query') as GraphQLObjectType + expect(type.getFields()['internalNodesByIds']?.args.find((a) => a.name === 'internal')).toBeUndefined() + }) + + it('can merge with local types', () => { + const LocalUser = objectType({ + name: 'User', + definition(t) { + t.string('localName') + }, + }) + const unmerged = makeSchema({ + types: [LocalUser], + mergeSchema: { + schema, + }, + }) + expect(printType(unmerged.getType('User') as GraphQLNamedType)).toMatchSnapshot('unmerged') + + const merged = makeSchema({ + types: [LocalUser], + mergeSchema: { + schema, + mergeTypes: ['User'], + }, + }) + + expect(printType(merged.getType('User') as GraphQLNamedType)).toMatchSnapshot('merged') + }) + + it('Merges Mutation & Query types by default', () => { + const sdl = gql` + type Query { + externalFn(a: String): String + } + + type Mutation { + externalMutation(a: String): String + } + ` + + const localQuery = queryType({ + definition(t) { + t.string('localFn') + }, + }) + + const localMutation = mutationType({ + definition(t) { + t.string('localMutation') + }, + }) + + const merged = makeSchema({ + types: [localQuery, localMutation], + mergeSchema: { + schema: buildSchema(sdl), + }, + }) + + expect(printType(merged.getType('Query') as GraphQLNamedType)).toMatchSnapshot('merged query') + expect(printType(merged.getType('Mutation') as GraphQLNamedType)).toMatchSnapshot('merged mutation') + + const unmerged = makeSchema({ + types: [localQuery, localMutation], + mergeSchema: { + schema: buildSchema(sdl), + mergeTypes: [], + }, + }) + + expect(printType(unmerged.getType('Query') as GraphQLNamedType)).toMatchSnapshot('unmerged query') + expect(printType(unmerged.getType('Mutation') as GraphQLNamedType)).toMatchSnapshot('unmerged mutation') + }) +}) + +describe('graphql-js interop', () => { + it('extend types works with GraphQLNamedType (#88)', () => { + const Viewer = new GraphQLObjectType({ + name: 'Viewer', + fields: { + name: { type: GraphQLString }, + }, + }) + + // Using extendType to extend types defined with `graphql` + const NexusViewer = extendType({ + type: 'Viewer', + definition(t) { + t.int('age') + }, + }) + + const Query = new GraphQLObjectType({ + name: 'Query', + fields: () => ({ + viewer: { type: Viewer }, + }), + }) + + const schema = makeSchema({ + types: [Query, NexusViewer], + }) + + expect(printSchema(schema)).toMatchSnapshot() + }) +}) diff --git a/tests/definitions.spec.ts b/tests/definitions.spec.ts index e29b1492..9d1dcfd7 100644 --- a/tests/definitions.spec.ts +++ b/tests/definitions.spec.ts @@ -1,5 +1,5 @@ /// -import { GraphQLEnumType, GraphQLObjectType, printType } from 'graphql' +import { GraphQLEnumType, GraphQLObjectType, lexicographicSortSchema, printSchema, printType } from 'graphql' import type { TypeMap } from 'graphql/type/schema' import { enumType, extendInputType, extendType, idArg, inputObjectType, makeSchema, objectType } from '../src' import { list } from '../src/definitions/list' @@ -126,6 +126,36 @@ describe('enumType', () => { expect(typeMap.NoMembers.getValues()).toHaveLength(0) }).toThrow('must have at least one member') }) + + it('can alias as a nexus method', () => { + const out = objectType({ + name: 'Out', + definition(t) { + // @ts-ignore + t.abc('outAbc') + }, + }) + const input = inputObjectType({ + name: 'Input', + definition(t) { + // @ts-ignore + t.abc('inAbc') + }, + }) + + const schema = makeSchema({ + types: [ + out, + input, + enumType({ + name: 'ABC', + members: ['one', 'two', 'three'], + asNexusMethod: 'abc', + }), + ], + }) + expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + }) }) describe('objectType', () => { diff --git a/tests/typegen-globals/types.gen.ts b/tests/typegen-globals/types.gen.ts index f897e159..92f76293 100644 --- a/tests/typegen-globals/types.gen.ts +++ b/tests/typegen-globals/types.gen.ts @@ -41,17 +41,32 @@ export interface NexusGenScalars { export interface NexusGenObjects { Mutation: {} - Post: {} + Post: { + // root type + author: NexusGenRootTypes['User'] // User! + geo: number[][] // [[Float!]!]! + id: string // ID! + messyGeo?: Array | null // [[Float!]] + uuid: NexusGenScalars['UUID'] // UUID! + } Query: {} - User: {} + User: { + // root type + email: string // String! + id: string // ID! + name: string // String! + outEnum?: SomeEnum | null // SomeEnum + phone?: string | null // String + posts: NexusGenRootTypes['Post'][] // [Post!]! + } } export interface NexusGenInterfaces { - Node: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'> + Node: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'> } export interface NexusGenUnions { - ExampleUnion: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'> + ExampleUnion: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'> } export type NexusGenRootTypes = NexusGenInterfaces & NexusGenObjects & NexusGenUnions @@ -193,7 +208,7 @@ export type NexusGenUnionNames = keyof NexusGenUnions export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never -export type NexusGenAbstractsUsingStrategyResolveType = never +export type NexusGenAbstractsUsingStrategyResolveType = 'ExampleUnion' | 'Node' export type NexusGenFeaturesConfig = { abstractTypeStrategies: { diff --git a/tests/typegen/types.gen.ts b/tests/typegen/types.gen.ts index edfb1ce4..11f205b7 100644 --- a/tests/typegen/types.gen.ts +++ b/tests/typegen/types.gen.ts @@ -39,17 +39,32 @@ export interface NexusGenScalars { export interface NexusGenObjects { Mutation: {} - Post: {} + Post: { + // root type + author: NexusGenRootTypes['User'] // User! + geo: number[][] // [[Float!]!]! + id: string // ID! + messyGeo?: Array | null // [[Float!]] + uuid: NexusGenScalars['UUID'] // UUID! + } Query: {} - User: {} + User: { + // root type + email: string // String! + id: string // ID! + name: string // String! + outEnum?: NexusGenEnums['SomeEnum'] | null // SomeEnum + phone?: string | null // String + posts: NexusGenRootTypes['Post'][] // [Post!]! + } } export interface NexusGenInterfaces { - Node: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'> + Node: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'> } export interface NexusGenUnions { - ExampleUnion: core.Discriminate<'Post', 'required'> | core.Discriminate<'User', 'required'> + ExampleUnion: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'> } export type NexusGenRootTypes = NexusGenInterfaces & NexusGenObjects & NexusGenUnions @@ -185,7 +200,7 @@ export type NexusGenUnionNames = keyof NexusGenUnions export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never -export type NexusGenAbstractsUsingStrategyResolveType = never +export type NexusGenAbstractsUsingStrategyResolveType = 'ExampleUnion' | 'Node' export type NexusGenFeaturesConfig = { abstractTypeStrategies: { From e5658cadbaba5121bd9826bab3654ef3e8aca4af Mon Sep 17 00:00:00 2001 From: Andrew McCallum <66245546+stretch0@users.noreply.github.com> Date: Tue, 7 Sep 2021 14:07:05 +0100 Subject: [PATCH 05/33] docs: Update 061-list-nonNull.mdx (#986) Fixed syntax in docs where comma was missing --- docs/content/015-api/061-list-nonNull.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/015-api/061-list-nonNull.mdx b/docs/content/015-api/061-list-nonNull.mdx index 39069680..c53b4657 100644 --- a/docs/content/015-api/061-list-nonNull.mdx +++ b/docs/content/015-api/061-list-nonNull.mdx @@ -15,7 +15,7 @@ import { queryType, stringArg, list } from 'nexus' queryType({ definition(t) { t.field('tags', { - type: list('String') // -> [String] + type: list('String'), // -> [String] args: { ids: list(stringArg()) // or list('String') -> [String] }, From b24d132d38df8c6fcbe0ab9634fe09a70d5a4002 Mon Sep 17 00:00:00 2001 From: Timo Heman <53658196+timo-tech19@users.noreply.github.com> Date: Fri, 17 Sep 2021 16:19:52 +0100 Subject: [PATCH 06/33] docs: change all "npm add" to "npm install" (#991) --- .../02-chapter-1-setup-and-first-query.mdx | 4 ++-- .../05-chapter-4-testing-your-api.mdx | 2 +- ...06-chapter-5-persisting-data-via-prisma.mdx | 4 ++-- .../07-chapter-6-testing-with-prisma.mdx | 2 +- .../030-plugins/050-prisma/010-overview.mdx | 4 ++-- .../020-nexus-framework-users.mdx | 18 +++++++++--------- .../030-neuxs-framework-prisma-users.mdx | 4 ++-- docs/content/index.mdx | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/content/010-getting-started/03-tutorial/02-chapter-1-setup-and-first-query.mdx b/docs/content/010-getting-started/03-tutorial/02-chapter-1-setup-and-first-query.mdx index 9c484eee..f9cce404 100644 --- a/docs/content/010-getting-started/03-tutorial/02-chapter-1-setup-and-first-query.mdx +++ b/docs/content/010-getting-started/03-tutorial/02-chapter-1-setup-and-first-query.mdx @@ -18,7 +18,7 @@ Start by creating your project directory, initializing your `package.json`, and ```bash-symbol copy mkdir nexus-tutorial && cd nexus-tutorial npm init -y -npm add nexus graphql apollo-server +npm install nexus graphql apollo-server ``` > Note: `nexus` works with any GraphQL compliant server. We'll use `apollo-server` in this tutorial, but you're free to use whichever fits your use-case best. @@ -26,7 +26,7 @@ npm add nexus graphql apollo-server We'll also need `typescript` and `ts-node-dev` as dev dependencies. `ts-node-dev` will enable you to transpile your TS files on the fly and restart your API on changes. ```bash-symbol copy -npm add --save-dev typescript ts-node-dev +npm install --save-dev typescript ts-node-dev ``` To properly get full advantage of TypeScript, we'll need a `tsconfig.json` file. Create one at the root of your project and copy paste the following diff --git a/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx b/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx index 95ef5051..fdd5857e 100644 --- a/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx +++ b/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx @@ -25,7 +25,7 @@ During this tutorial, you'll use the [Jest testing framework](https://jestjs.io/ First, install `jest` and accompanying tools. ```bash-symbol copy -npm add --save-dev jest @types/jest ts-jest graphql-request get-port +npm install --save-dev jest @types/jest ts-jest graphql-request get-port ``` Then, configure jest and npm scripts in your `package.json` diff --git a/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx b/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx index 50bcf8a8..96a89297 100644 --- a/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx +++ b/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx @@ -35,8 +35,8 @@ Now that you know a bit about Prisma, let's get going! Do the following: like so: ```bash-symbol copy -npm add @prisma/client -npm add --save-dev prisma +npm install @prisma/client +npm install --save-dev prisma ``` Next, add Prisma to your project by creating your [Prisma schema](https://www.prisma.io/docs/concepts/components/prisma-schema/) file with the following command: diff --git a/docs/content/010-getting-started/03-tutorial/07-chapter-6-testing-with-prisma.mdx b/docs/content/010-getting-started/03-tutorial/07-chapter-6-testing-with-prisma.mdx index d8e062b2..ab8b0d7c 100644 --- a/docs/content/010-getting-started/03-tutorial/07-chapter-6-testing-with-prisma.mdx +++ b/docs/content/010-getting-started/03-tutorial/07-chapter-6-testing-with-prisma.mdx @@ -26,7 +26,7 @@ To achieve some of the steps described above, we'll tweak our test context. First, install the `sqlite3` and `nanoid` packages ```bash copy -npm add --save-dev sqlite3 @types/sqlite3 +npm install --save-dev sqlite3 @types/sqlite3 ``` Then, head to your `tests/__helpers.ts` file to add the following imports and code diff --git a/docs/content/030-plugins/050-prisma/010-overview.mdx b/docs/content/030-plugins/050-prisma/010-overview.mdx index 3759215e..d6b978ef 100644 --- a/docs/content/030-plugins/050-prisma/010-overview.mdx +++ b/docs/content/030-plugins/050-prisma/010-overview.mdx @@ -11,8 +11,8 @@ This plugin integrates [Prisma](https://www.prisma.io/) into [Nexus](https://nex ## Installation ```bash-symbol -npm add nexus-plugin-prisma @prisma/client -npm add -D prisma +npm install nexus-plugin-prisma @prisma/client +npm install -D prisma ``` ## Usage diff --git a/docs/content/040-adoption-guides/020-nexus-framework-users.mdx b/docs/content/040-adoption-guides/020-nexus-framework-users.mdx index aa489ccd..f3f46201 100644 --- a/docs/content/040-adoption-guides/020-nexus-framework-users.mdx +++ b/docs/content/040-adoption-guides/020-nexus-framework-users.mdx @@ -27,7 +27,7 @@ You will need to manage the TypeScript toolchain yourself. 1. Install `typescript`, `ts-node`, and `ts-node-dev`. ```bash-symbol - npm add -D typescript ts-node ts-node-dev + npm install -D typescript ts-node ts-node-dev ``` 2. The following applies to VSCode but something like it might apply to other editors as well. You must also make sure your editor is set to use the local version of TypeScript rather than the one the editor ships with. Summon the command pallet `command+shift+p` and then enter and select `typescript: select TypeScript Version...`. Then select `Workspace Version`. @@ -205,13 +205,13 @@ Nexus framework comes bundled with Apollo Server and runs it for you. You will n 1. Install new dependencies ```tsx - npm add express apollo-server-express + npm install express apollo-server-express ``` 2. If using TypeScript then Install typings for Express ```tsx - npm add -D @types/express + npm install -D @types/express ``` 3. If using TypeScript then you [need to](https://github.com/apollographql/apollo-server/issues/1977#issuecomment-662946590) enable `esModuleInterop` to be able to use Apollo Server @@ -337,7 +337,7 @@ Nexus Framework has some builtin logging functionality. You can approximate it a 1. Install your logger ```tsx - npm add floggy + npm install floggy ``` 2. Create your application logger. The logger you export here should be used across your codebase. @@ -386,7 +386,7 @@ You need to explicitly setup all custom scalars yourself. To match what Nexus Fr 1. Install the `graphql-scalars` package ```json - npm add graphql-scalars + npm install graphql-scalars ``` 2. Setup the `Json` and `DateTime` scalars @@ -536,13 +536,13 @@ In Nexus Framework there was a testing module for system testing your app. You n 1. Install your test framework ```tsx - npm add jest + npm install jest ``` 2. If you are a TypeScript user then install and configure `ts-jest` ```bash - npm add ts-jest + npm install ts-jest ``` We will configure using a `jest.config.js` module in your project root. Do not use a JSON based configuration unless you know that you won't need the dynamic code used in some later steps here. @@ -639,7 +639,7 @@ In Nexus Framework there was a testing module for system testing your app. You n 6. You will need a way to run your app in tests. Here is one way [adapted from the tutorial](https://todo.com). ```tsx - npm add -D graphql-request + npm install -D graphql-request ``` ```tsx @@ -688,7 +688,7 @@ Nexus Framework had a CLI for scaffolding new projects. You can approximate this Nexus Framework has a gradual settings API with features such as automatic mapping of environment variables to settings. You can use the [`setset`](https://github.com/jasonkuhrt/setset) package manually to gain back this functionality. ```tsx -npm add setset +npm install setset ``` ```tsx diff --git a/docs/content/040-adoption-guides/030-neuxs-framework-prisma-users.mdx b/docs/content/040-adoption-guides/030-neuxs-framework-prisma-users.mdx index 4ee4d428..3606f433 100644 --- a/docs/content/040-adoption-guides/030-neuxs-framework-prisma-users.mdx +++ b/docs/content/040-adoption-guides/030-neuxs-framework-prisma-users.mdx @@ -13,8 +13,8 @@ If you're looking to migrate from the Nexus Framework over to Nexus and you're u You will need to install the Prisma dependencies yourself now. ``` -npm add -D @prisma/cli -npm add @prisma/client +npm install -D @prisma/cli +npm install @prisma/client ``` You must also make sure that you are using the version `0.20` or later of `nexus-plugin-prisma`. diff --git a/docs/content/index.mdx b/docs/content/index.mdx index 51c2e125..61423ed2 100644 --- a/docs/content/index.mdx +++ b/docs/content/index.mdx @@ -22,8 +22,8 @@ Check out the [example projects](https://github.com/graphql-nexus/nexus/tree/mai ## Installation ```sh -npm add nexus -npm add graphql # required as a peer dependency +npm install nexus +npm install graphql # required as a peer dependency ``` If you are using TypeScript version `4.1` is suggested. Nexus doesn't have a hard requirement for it yet but may in a future non-breaking release. From 5e3b837ec0d6e188fd557a14365bd55d158f39c2 Mon Sep 17 00:00:00 2001 From: safaure <57018448+safaure@users.noreply.github.com> Date: Wed, 27 Oct 2021 03:46:53 +0200 Subject: [PATCH 07/33] chore(docs): change package get-port ver in tutorial (#1000) See https://github.com/sindresorhus/get-port/releases get-port does not support commonJS anymore. --- .../03-tutorial/05-chapter-4-testing-your-api.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx b/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx index fdd5857e..cb3556bc 100644 --- a/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx +++ b/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx @@ -25,7 +25,7 @@ During this tutorial, you'll use the [Jest testing framework](https://jestjs.io/ First, install `jest` and accompanying tools. ```bash-symbol copy -npm install --save-dev jest @types/jest ts-jest graphql-request get-port +npm install --save-dev jest @types/jest ts-jest graphql-request get-port@5.1.1 ``` Then, configure jest and npm scripts in your `package.json` From 2934d6d38c914d52aef1f497920c21cfbb9fdfd8 Mon Sep 17 00:00:00 2001 From: Dani Guardiola Date: Wed, 27 Oct 2021 03:47:19 +0200 Subject: [PATCH 08/33] chore(docs): typo fix in docs (#999) --- docs/content/010-getting-started/04-why-nexus.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/010-getting-started/04-why-nexus.mdx b/docs/content/010-getting-started/04-why-nexus.mdx index 7af09a78..78da38bd 100644 --- a/docs/content/010-getting-started/04-why-nexus.mdx +++ b/docs/content/010-getting-started/04-why-nexus.mdx @@ -133,7 +133,7 @@ A downside of the schema-first approach is the need to repeat yourself in schema ### Defining enums -When defining an enum using the schema-first approach, the enum must first be defined in the schema definition languange: +When defining an enum using the schema-first approach, the enum must first be defined in the schema definition language: ```graphql enum UserRole { From 02015ede8434aca481f606f0f5564bdf31710777 Mon Sep 17 00:00:00 2001 From: Ella Nan <38847123+ellanan@users.noreply.github.com> Date: Tue, 26 Oct 2021 21:47:51 -0400 Subject: [PATCH 09/33] chore(docs): readme update -- fix code sample to include ".ts" in module path (#998) --- docs/content/040-adoption-guides/020-nexus-framework-users.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/040-adoption-guides/020-nexus-framework-users.mdx b/docs/content/040-adoption-guides/020-nexus-framework-users.mdx index f3f46201..fc8fdcb3 100644 --- a/docs/content/040-adoption-guides/020-nexus-framework-users.mdx +++ b/docs/content/040-adoption-guides/020-nexus-framework-users.mdx @@ -448,7 +448,7 @@ import * as Path from 'path' Nexus.makeSchema({ contextType: { - module: Path.join(__dirname, './path/to/contextModule'), + module: Path.join(__dirname, './path/to/contextModule.ts'), alias: 'ContextModule', export: 'Context' }, From 703d5595dabdc7b42e83c8c59ceeb1fe6b1fe1e7 Mon Sep 17 00:00:00 2001 From: lockedNLevered <50569571+lockedNLevered@users.noreply.github.com> Date: Tue, 26 Oct 2021 18:48:29 -0700 Subject: [PATCH 10/33] chore(docs): Nexus Getting started: missing type in queryType (#995) queryType is missing type field. TypeScript would throw error and not compile. --- docs/content/010-getting-started/04-why-nexus.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/content/010-getting-started/04-why-nexus.mdx b/docs/content/010-getting-started/04-why-nexus.mdx index 78da38bd..b13e87e3 100644 --- a/docs/content/010-getting-started/04-why-nexus.mdx +++ b/docs/content/010-getting-started/04-why-nexus.mdx @@ -63,6 +63,7 @@ const Post = objectType({ const Query = queryType({ definition(t) { t.list.field('posts', { + type: "Post", resolve: () => [ { id: '1', From a7c26ba587d0bf9827c977dcd0b68d734b6fd715 Mon Sep 17 00:00:00 2001 From: Johan Kim Date: Wed, 27 Oct 2021 10:49:26 +0900 Subject: [PATCH 11/33] chore(docs): Update Ordering section (#950) --- docs/content/030-plugins/050-prisma/030-api.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content/030-plugins/050-prisma/030-api.mdx b/docs/content/030-plugins/050-prisma/030-api.mdx index 98172d40..afe1bc23 100644 --- a/docs/content/030-plugins/050-prisma/030-api.mdx +++ b/docs/content/030-plugins/050-prisma/030-api.mdx @@ -1586,7 +1586,7 @@ queryType({ type Query { user(where: UserWhereUniqueInput!): User - users(orderBy: UserOrderByInput): [User!]! + users(orderBy: [UserOrderByInput!]): [User!]! } type Post { @@ -1598,7 +1598,7 @@ type Post { type User { id: Int! name: String! - posts(orderBy: UserPostsOrderByInput): [Post!]! + posts(orderBy: [UserPostsOrderByInput!]): [Post!]! } input UserOrderByInput { @@ -1625,7 +1625,7 @@ enum OrderByArg { ```graphql query entrypointOrdering { - users(orderBy: { name: asc }) { + users(orderBy: [{ name: asc }]) { id name } @@ -1633,7 +1633,7 @@ query entrypointOrdering { query relationOrdering { user(where: { id: 1643 }) { - posts(orderBy: { title: dsc }) { + posts(orderBy: [{ title: desc }]) { title body } From c0e55b53b45dfdc4a7e8aae69d1ed685389331e1 Mon Sep 17 00:00:00 2001 From: Johan Kim Date: Wed, 27 Oct 2021 10:50:03 +0900 Subject: [PATCH 12/33] chore(docs): add Example Code (#948) --- .../content/015-api/050-input-object-type.mdx | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/docs/content/015-api/050-input-object-type.mdx b/docs/content/015-api/050-input-object-type.mdx index 684cdcd8..3f4b28b7 100644 --- a/docs/content/015-api/050-input-object-type.mdx +++ b/docs/content/015-api/050-input-object-type.mdx @@ -10,11 +10,31 @@ codeStyle: true Defines a complex object which can be passed as an input value. ```ts -export const InputType = inputObjectType({ - name: 'InputType', +import { extendType, inputObjectType } from 'nexus' + +export const CommentInputType = inputObjectType({ + name: 'CommentInputType', + definition(t) { + t.nonNull.int('userId') + t.nonNull.string('body') + } +}) + +export const CommentMutation = extendType({ + type: 'Mutation', definition(t) { - t.nonNull.string('key') - t.int('answer') + t.field('createComment', { + type: 'Comment', + args: { data: CommentInputType }, + resolve(_root, args, ctx) { + return ctx.prisma.comment.create({ + data: { + user_id: args.userId, + body: args.body, + } + }) + } + }) }, }) ``` From 9ec3442539b77968f2de9f8f1bc44a1bf09b862e Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Thu, 18 Nov 2021 15:53:18 -0500 Subject: [PATCH 13/33] fix: Minimum GraphQL v16 support (#1017) --- src/builder.ts | 2 +- src/definitions/wrapping.ts | 4 ++-- tests/plugins/nullabilityGuardPlugin.spec.ts | 2 +- tests/wrapping.spec.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/builder.ts b/src/builder.ts index 8909366d..01f8649c 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -1200,7 +1200,7 @@ export class SchemaBuilder { name: 'Query', fields: { ok: { - type: GraphQLNonNull(GraphQLBoolean), + type: new GraphQLNonNull(GraphQLBoolean), resolve: () => true, }, }, diff --git a/src/definitions/wrapping.ts b/src/definitions/wrapping.ts index 5710a468..e414fd47 100644 --- a/src/definitions/wrapping.ts +++ b/src/definitions/wrapping.ts @@ -292,10 +292,10 @@ export function rewrapAsGraphQLType(baseType: GraphQLNamedType, wrapping: NexusF let finalType: GraphQLType = baseType wrapping.forEach((wrap) => { if (wrap === 'List') { - finalType = GraphQLList(finalType) + finalType = new GraphQLList(finalType) } else if (wrap === 'NonNull') { if (!isNonNullType(finalType)) { - finalType = GraphQLNonNull(finalType) + finalType = new GraphQLNonNull(finalType) } } else { throw new Unreachable(wrap) diff --git a/tests/plugins/nullabilityGuardPlugin.spec.ts b/tests/plugins/nullabilityGuardPlugin.spec.ts index 64cfd6af..7806a215 100644 --- a/tests/plugins/nullabilityGuardPlugin.spec.ts +++ b/tests/plugins/nullabilityGuardPlugin.spec.ts @@ -41,7 +41,7 @@ const types = [ description: 'Showing that the defaults works for all resolvers, not just Nexus ones', fields: () => ({ id: { - type: GraphQLNonNull(GraphQLID), + type: new GraphQLNonNull(GraphQLID), }, }), }), diff --git a/tests/wrapping.spec.ts b/tests/wrapping.spec.ts index bb640863..79dd9a77 100644 --- a/tests/wrapping.spec.ts +++ b/tests/wrapping.spec.ts @@ -24,7 +24,7 @@ describe('wrapping', () => { }) it('should wrap if the type is a GraphQL type', () => { - const x = normalizeArgWrapping(nonNull(list(GraphQLList(GraphQLString)))) + const x = normalizeArgWrapping(nonNull(list(new GraphQLList(GraphQLString)))) expect(x).toBeInstanceOf(NexusArgDef) }) }) From 4d035019a4fa73e57d7b4b4168654baa2c71073a Mon Sep 17 00:00:00 2001 From: ChengQing <73209378+chengqing97@users.noreply.github.com> Date: Wed, 15 Dec 2021 22:07:24 +0800 Subject: [PATCH 14/33] chore(docs): fix typo in 07-chapter-6-testing-with-prisma.mdx (#1024) --- .../03-tutorial/07-chapter-6-testing-with-prisma.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/010-getting-started/03-tutorial/07-chapter-6-testing-with-prisma.mdx b/docs/content/010-getting-started/03-tutorial/07-chapter-6-testing-with-prisma.mdx index ab8b0d7c..d307d7e1 100644 --- a/docs/content/010-getting-started/03-tutorial/07-chapter-6-testing-with-prisma.mdx +++ b/docs/content/010-getting-started/03-tutorial/07-chapter-6-testing-with-prisma.mdx @@ -220,7 +220,7 @@ function prismaTestContext() { The `prismaTestContext` is in charge of a couple of things: 1. Connect to an in-memory instance of the SQLite database -2. Pushes the Prisma Schema to the adatabase +2. Pushes the Prisma Schema to the database 3. Generates a new Prisma Client 4. Add an instance of a Prisma Client connected to the schema specifically for the test From b92545fe4f888796040ee03ee7d0c4dcff3a6c0e Mon Sep 17 00:00:00 2001 From: ChengQing <73209378+chengqing97@users.noreply.github.com> Date: Wed, 15 Dec 2021 22:08:03 +0800 Subject: [PATCH 15/33] chore(docs): fix typo 05-chapter-4-testing-your-api.mdx (#1023) Fix typo. --- .../03-tutorial/05-chapter-4-testing-your-api.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx b/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx index cb3556bc..c7ac4eb5 100644 --- a/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx +++ b/docs/content/010-getting-started/03-tutorial/05-chapter-4-testing-your-api.mdx @@ -88,7 +88,7 @@ mkdir tests && touch tests/Post.test.ts To ease testing, we'll create a small utility that we'll call `createTestContext`, which is designed for running integration tests. -When run, it will boot your app in the same process as the test suite and expose an interface for your tests to interact with it. Jest runs each test suite in its own process, so if you have have say eight test suites running in parallel that means you'll have eight app processes running too. +When run, it will boot your app in the same process as the test suite and expose an interface for your tests to interact with it. Jest runs each test suite in its own process, so if you have say eight test suites running in parallel that means you'll have eight app processes running too. Create a `tests/__helpers.ts` module with the following contents. From 45b9d5a92676a4aeb318a92ac71f8677899ca440 Mon Sep 17 00:00:00 2001 From: Tana M Berry Date: Wed, 15 Dec 2021 08:08:30 -0600 Subject: [PATCH 16/33] chore(docs): fix typo 030-neuxs-framework-prisma-users.mdx (#1016) --- .../040-adoption-guides/030-neuxs-framework-prisma-users.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/040-adoption-guides/030-neuxs-framework-prisma-users.mdx b/docs/content/040-adoption-guides/030-neuxs-framework-prisma-users.mdx index 3606f433..c5ea2459 100644 --- a/docs/content/040-adoption-guides/030-neuxs-framework-prisma-users.mdx +++ b/docs/content/040-adoption-guides/030-neuxs-framework-prisma-users.mdx @@ -82,7 +82,7 @@ export const schema = makeSchema({ ### Configuring Context Type -The framework used to automatically inject and type your context so that an instance of the client would be there for you. We know need to configure that manually. To do so, we'll first create a `context.ts` file where we'll export a type containing the Prisma Client. +The framework used to automatically inject and type your context so that an instance of the client would be there for you. We now need to configure that manually. To do so, we'll first create a `context.ts` file where we'll export a type containing the Prisma Client. ```tsx // context.ts @@ -128,7 +128,7 @@ If your Prisma Schema is using either the `Json` or `DateTime` type, the framewo ```bash npm install graphql-scalars - ``` + ```xf 2. Then, add the following configuration property to the Prisma plugin From 3de7f399c6a73e662af2f0ce3f1e91069c7ebfab Mon Sep 17 00:00:00 2001 From: Riccardo Scalco Date: Wed, 15 Dec 2021 15:09:02 +0100 Subject: [PATCH 17/33] chore(docs): fix typo 04-why-nexus.mdx (#1008) --- docs/content/010-getting-started/04-why-nexus.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/010-getting-started/04-why-nexus.mdx b/docs/content/010-getting-started/04-why-nexus.mdx index b13e87e3..3e9c206f 100644 --- a/docs/content/010-getting-started/04-why-nexus.mdx +++ b/docs/content/010-getting-started/04-why-nexus.mdx @@ -94,7 +94,7 @@ There are numerous benefits to taking a code-first approach with Nexus: When building a schema-first GraphQL API, it is common to start out by placing all type definitions and resolvers in a single file. When both the schema and the resolvers live next to one another, it's fairly straightforward to work in both at the same time. -As the application grows, however, it is most often desired to move parts of the schema into their own separate modules and files. It's at this point that working on a GraphQL API becomes a bit more tedious. With this modularization comes the need to switch back and forth between the Schema Definition Language and JavaScript/TypeScript to write the resolvers. Not only does one need to constantly switch between files, they also need to do a context switch mentally to work between the two langauges. +As the application grows, however, it is most often desired to move parts of the schema into their own separate modules and files. It's at this point that working on a GraphQL API becomes a bit more tedious. With this modularization comes the need to switch back and forth between the Schema Definition Language and JavaScript/TypeScript to write the resolvers. Not only does one need to constantly switch between files, they also need to do a context switch mentally to work between the two languages. With Nexus, our schema and its resolvers are always defined together. Nexus also allows us to write everything in a common language. This allows us to side-step the co-location/context switching issue altogether and helps us to be more productive, even as our applications grow to be quite large. From 87a82a28b1b1a17798c097709ff77c734e4f10c3 Mon Sep 17 00:00:00 2001 From: Riccardo Scalco Date: Wed, 15 Dec 2021 15:09:34 +0100 Subject: [PATCH 18/33] chore(docs): fix typo 06-chapter-5-persisting-data-via-prisma.mdx (#1007) --- .../03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx b/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx index 96a89297..fc8c3fb9 100644 --- a/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx +++ b/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx @@ -135,7 +135,7 @@ Now let's finally ditch our in-memory data! Let's replace it with the Prisma Cli // api/db.ts +import { PrismaClient } from '@prisma/client' -export const db = new PrismaClient() ++export const db = new PrismaClient() -export interface Post { - id: number From e901bebd517c691dbfa3a1487deb9bf4801e2b6f Mon Sep 17 00:00:00 2001 From: Aniruddh Mukherjee Date: Wed, 15 Dec 2021 19:40:02 +0530 Subject: [PATCH 19/33] chore(docs): fix typos (#1005) Fixed the typos where `draftToPublish` (used in the previous example) were mistakenly written as `postToPublish` which might lead to confusion for some readers. --- .../06-chapter-5-persisting-data-via-prisma.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx b/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx index fc8c3fb9..8490136e 100644 --- a/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx +++ b/docs/content/010-getting-started/03-tutorial/06-chapter-5-persisting-data-via-prisma.mdx @@ -266,15 +266,15 @@ export const PostMutation = extendType({ draftId: nonNull(intArg()), }, resolve(_root, args, ctx) { -- let postToPublish = ctx.db.posts.find((p) => p.id === args.draftId) +- let draftToPublish = ctx.db.posts.find((p) => p.id === args.draftId) -- if (!postToPublish) { +- if (!draftToPublish) { - throw new Error('Could not find draft with id ' + args.draftId) - } -- postToPublish.published = true +- draftToPublish.published = true -- return postToPublish +- return draftToPublish + return ctx.db.post.update({ + where: { id: args.draftId }, From 0d06f26b124b561ca8dec3123301125f9779b28f Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Thu, 17 Feb 2022 12:47:40 -0500 Subject: [PATCH 20/33] feat: add GraphQL 16 support (#977) --- .github/workflows/pr.yml | 14 +- examples/apollo-fullstack/package.json | 4 +- examples/apollo-fullstack/yarn.lock | 13 +- examples/ghost/package.json | 4 +- examples/ghost/yarn.lock | 2689 ++++++++++++----- examples/githunt-api/package.json | 4 +- examples/githunt-api/yarn.lock | 22 +- examples/kitchen-sink/package.json | 4 +- .../src/kitchen-sink-definitions.ts | 14 +- examples/kitchen-sink/yarn.lock | 13 +- examples/star-wars/package.json | 4 +- examples/star-wars/yarn.lock | 13 +- examples/ts-ast-reader/package.json | 4 +- examples/ts-ast-reader/src/types/typeNodes.ts | 2 +- examples/ts-ast-reader/yarn.lock | 13 +- examples/with-prisma/package.json | 4 +- examples/with-prisma/yarn.lock | 13 +- examples/zeit-typescript/package.json | 4 +- examples/zeit-typescript/yarn.lock | 16 +- package.json | 14 +- src/builder.ts | 65 +- src/definitions/_types.ts | 25 +- src/definitions/args.ts | 10 +- src/definitions/decorateType.ts | 2 +- src/definitions/definitionBlocks.ts | 115 +- src/definitions/mutationField.ts | 2 +- src/definitions/nexusMeta.ts | 6 +- src/definitions/objectType.ts | 18 +- src/definitions/queryField.ts | 2 +- src/definitions/wrapping.ts | 44 +- src/extensions.ts | 5 + src/plugin.ts | 2 +- src/plugins/nullabilityGuardPlugin.ts | 8 +- src/typegenAbstractTypes.ts | 108 +- src/typegenPrinter.ts | 14 +- src/utils.ts | 18 +- tests/__snapshots__/builder.spec.ts.snap | 22 +- tests/__snapshots__/definitions.spec.ts.snap | 3 +- tests/__snapshots__/makeSchema.spec.ts.snap | 5 +- .../nonNullDefaults.spec.ts.snap | 12 +- tests/__snapshots__/plugin.spec.ts.snap | 6 +- tests/__snapshots__/plugins.spec.ts.snap | 20 +- tests/_setup.ts | 6 +- tests/args.spec.ts | 8 +- tests/backingTypes.spec.ts | 16 +- tests/builder.spec.ts | 12 +- tests/definitions.spec.ts | 14 +- tests/definitions/nexusMeta.spec.ts | 16 +- tests/inputObjectType.spec.ts | 16 +- .../__schema.graphql | 1934 ++++++------ .../unionTooComplexToRepresent/__typegen.ts | 1104 +++---- tests/interfaceType.spec.ts | 24 +- tests/makeSchema.spec.ts | 2 +- tests/modify.spec.ts | 51 +- tests/nonNullDefaults.spec.ts | 8 +- tests/null-list.spec.ts | 1 + tests/objectType.spec.ts | 8 +- tests/plugin.spec.ts | 38 +- tests/plugins.spec.ts | 2 +- .../connectionPlugin.spec.ts.snap | 41 +- tests/plugins/connectionPlugin.spec.ts | 36 +- tests/plugins/fieldAuthorizePlugin.spec.ts | 9 +- tests/plugins/nullabilityGuardPlugin.spec.ts | 116 +- tests/resolveTypes.spec.ts | 6 +- tests/scalarType.spec.ts | 8 +- tests/subscriptionField.spec.ts | 10 +- tests/subscriptionType.spec.ts | 5 +- tests/typegen-globals/schema.gen.graphql | 4 +- tests/typegen/schema.gen.graphql | 4 +- tests/unionType.spec.ts | 8 +- .../interfaceType-v15.spec.ts.snap | 3 +- .../v15/__snapshots__/modify-v15.spec.ts.snap | 3 +- tests/v15/interfaceType-v15.spec.ts | 2 +- tests/v15/modify-v15.spec.ts | 2 +- tsconfig.json | 4 +- yarn.lock | 168 +- 76 files changed, 4153 insertions(+), 2916 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cd8ed35f..7f06dd0a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -4,21 +4,19 @@ on: - pull_request jobs: - graphql-14: + graphql-15: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v1 with: node-version: 12.x - name: Install Dependencies - run: yarn --frozen-lockfile || yarn --frozen-lockfile - - name: Check Formatting - run: yarn format:ci - - name: Install GraphQL@14.x - run: yarn add graphql@^14.5.8 + run: yarn --frozen-lockfile && yarn format:ci + - name: Install GraphQL@15.x + run: yarn add graphql@^15 - name: Test - run: yarn -s test:ci --testPathIgnorePatterns v15 + run: yarn -s test:ci test: strategy: diff --git a/examples/apollo-fullstack/package.json b/examples/apollo-fullstack/package.json index 92b4f50b..420189a9 100644 --- a/examples/apollo-fullstack/package.json +++ b/examples/apollo-fullstack/package.json @@ -22,7 +22,7 @@ "apollo-server-testing": "^2.18.1", "dedent": "^0.7.0", "fullstack-tutorial": "apollographql/fullstack-tutorial.git", - "graphql": "^15.3.0", + "graphql": "^16.3.0", "graphql-tools": "^4.0.7", "isemail": "^3.2.0", "nexus": "^1.0.0", @@ -39,6 +39,6 @@ "node-fetch": "^2.2.1", "prettier": "^1.19.1", "ts-node-dev": "^1.0.0-pre.30", - "typescript": "^3.9" + "typescript": "^4.5.5" } } diff --git a/examples/apollo-fullstack/yarn.lock b/examples/apollo-fullstack/yarn.lock index 578feb83..054ef043 100644 --- a/examples/apollo-fullstack/yarn.lock +++ b/examples/apollo-fullstack/yarn.lock @@ -3169,6 +3169,11 @@ graphql@^15.3.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" integrity sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w== +graphql@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05" + integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A== + growly@^1.2.0, growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -6799,10 +6804,10 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typescript@^3.9: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== uglify-js@^3.1.4: version "3.4.9" diff --git a/examples/ghost/package.json b/examples/ghost/package.json index dc9dc4e1..75ebe87e 100644 --- a/examples/ghost/package.json +++ b/examples/ghost/package.json @@ -9,7 +9,7 @@ "dataloader": "tgriesser/dataloader.git#ts-types", "express": "^4.16.4", "ghost": "^3.35.3", - "graphql": "^15.3.0", + "graphql": "^16.3.0", "graphql-scalars": "^1.2.6", "graphql-tools": "^4.0.7", "knex": "^0.19.5", @@ -27,6 +27,6 @@ "prettier": "^1.19.1", "ts-node": "^8.0.2", "ts-node-dev": "^1.0.0-pre.30", - "typescript": "^3.9" + "typescript": "^4.5.5" } } diff --git a/examples/ghost/yarn.lock b/examples/ghost/yarn.lock index dbf046fc..5781dceb 100644 --- a/examples/ghost/yarn.lock +++ b/examples/ghost/yarn.lock @@ -35,14 +35,23 @@ dependencies: xss "^1.0.6" -"@babel/polyfill@^7.4.4": - version "7.11.5" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.11.5.tgz#df550b2ec53abbc2ed599367ec59e64c7a707bb5" - integrity sha512-FunXnE0Sgpd61pKSj2OSOs1D44rKTD3pGOfGilZ6LGrrIH0QEtJlTjqOqdF8Bs98JmjfGhni2BBkTfv9KcKJ9g== +"@babel/runtime@^7.10.5", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4": + version "7.17.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941" + integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw== dependencies: - core-js "^2.6.5" regenerator-runtime "^0.13.4" +"@breejs/later@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@breejs/later/-/later-4.0.2.tgz#38c85cc98b717c7a196f87238090adaea01f8c9e" + integrity sha512-EN0SlbyYouBdtZis1htdsgGlwFePzkXPwdIeqaBaavxkJT1G2/bitc2LSixjv45z2njXslxlJI1mW2O/Gmrb+A== + +"@breejs/later@^4.0.2": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@breejs/later/-/later-4.1.0.tgz#9246907f46cc9e9c9af37d791ab468d98921bcc1" + integrity sha512-QgGnZ9b7o4k0Ai1ZbTJWwZpZcFK9d+Gb+DyNt4UT9x6IEIs5HVu0iIlmgzGqN+t9MoJSpSPo9S/Mm51UtHr3JA== + "@distributed-systems/callsite@^1.1.0", "@distributed-systems/callsite@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@distributed-systems/callsite/-/callsite-1.1.1.tgz#56a9e1a1d16ae6264ea3f51eea3782848fc27a88" @@ -51,36 +60,52 @@ ee-log "^3.0.0" section-tests "^1.3.0" +"@elastic/elasticsearch@^7.10.0": + version "7.17.0" + resolved "https://registry.yarnpkg.com/@elastic/elasticsearch/-/elasticsearch-7.17.0.tgz#589fb219234cf1b0da23744e82b1d25e2fe9a797" + integrity sha512-5QLPCjd0uLmLj1lSuKSThjNpq39f6NmlTy9ROLFwG5gjyTgpwSqufDeYG/Fm43Xs05uF7WcscoO7eguI3HuuYA== + dependencies: + debug "^4.3.1" + hpagent "^0.1.1" + ms "^2.1.3" + secure-json-parse "^2.4.0" + +"@gar/promisify@^1.0.1": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" + integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== + "@metascraper/helpers@^5.11.9": - version "5.14.14" - resolved "https://registry.yarnpkg.com/@metascraper/helpers/-/helpers-5.14.14.tgz#83054c5225cbfa5a0d537ff2db957434b99c17ae" - integrity sha512-sznekODvL+k5wTaU48Y8prdrPy/xTp3WxSAQrApBPeKPGEJTyfQWglkp+1W7xEDDrnJYzjOJDuq6EX3l9WYv1g== + version "5.25.8" + resolved "https://registry.yarnpkg.com/@metascraper/helpers/-/helpers-5.25.8.tgz#b13a533cfb541384501e7f93eb768db21bcc6f8a" + integrity sha512-sGxTVuKZBccJi9TKMT2mGhRhOTS/50ASAq4fGuCyu5tEQddmiFBb0dO4z3G8GghdgFK8FCbVCvTAC0+3lm3FDw== dependencies: audio-extensions "0.0.0" - chrono-node "2.1.8" + chrono-node "2.3.6" condense-whitespace "~2.0.0" - entities "~2.0.3" + entities "~3.0.1" file-extension "~4.0.5" has-values "~2.0.1" image-extensions "~1.1.0" is-relative-url "~3.0.0" is-uri "~1.2.0" - iso-639-3 "~2.1.0" + iso-639-3 "~2.2.0" isostring "0.0.1" - lodash "~4.17.20" - memoize-one "~5.1.1" - mime-types "~2.1.27" - normalize-url "~5.2.0" - smartquotes "~2.3.1" - title "~3.4.2" - truncate "~2.1.0" - url-regex-safe "~1.0.2" - video-extensions "~1.1.0" - -"@nexes/mongo-knex@0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@nexes/mongo-knex/-/mongo-knex-0.3.0.tgz#e0078f8ddf7fcd4d907fe5cf2390644218753cf0" - integrity sha512-LgPWH4mR+IWYh1/Y/ob22kVMYVBY2k/evE/QdXYifQcEOd2G0NRggRB7SQX8kLQ024FcjtIMfRXC3UjzFamUcw== + jsdom "~19.0.0" + lodash "~4.17.21" + memoize-one "~6.0.0" + microsoft-capitalize "~1.0.5" + mime-types "~2.1.34" + normalize-url "~6.1.0" + re2 "~1.17.2" + smartquotes "~2.3.2" + url-regex-safe "~3.0.0" + video-extensions "~1.2.0" + +"@nexes/mongo-knex@0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@nexes/mongo-knex/-/mongo-knex-0.4.0.tgz#bdaef8d8cefeb9935ab7e3a1f5d0bbcfb764722e" + integrity sha512-RyfcK1+WJQ0SM7r0D5fMhKwjggxyrDb8hMaQ1vqfcMe/SE2J/qoSra9+fAdwN8zYRdz6Lovd6fqCaRQ5zFv5ZA== dependencies: debug "^4.1.0" lodash "^4.17.10" @@ -99,16 +124,32 @@ resolved "https://registry.yarnpkg.com/@nexes/nql-lang/-/nql-lang-0.0.1.tgz#a13c023873f9bc11b9e4e284449c6cfbeccc8011" integrity sha1-oTwCOHP5vBG55OKERJxs++zMgBE= -"@nexes/nql@0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@nexes/nql/-/nql-0.4.0.tgz#5ae28f8d339d56812eb8452ead9a5e5996087efd" - integrity sha512-fEsV2aMiPpqBneZosamFLypLAQAp8M5SA5MgeeJKMpHF0dQiHn9ifD556RgaSSY5RgO0gbRGoKypgy0YmyE1KQ== +"@nexes/nql@0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@nexes/nql/-/nql-0.5.0.tgz#bff22dbd4e2aa697d5c33031675cb100b013a0a4" + integrity sha512-skn8cfr0OJFu6HdcLRgBL19bJ2S7pATrgR/RnZR3v4T4iHfAkZ8zzLDMGib+721eFaAURnpGfPittO+RyPAhiQ== dependencies: - "@nexes/mongo-knex" "0.3.0" + "@nexes/mongo-knex" "0.4.0" "@nexes/mongo-utils" "0.3.0" "@nexes/nql-lang" "0.0.1" mingo "2.2.2" +"@npmcli/fs@^1.0.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.1.1.tgz#72f719fe935e687c56a4faecf3c03d06ba593257" + integrity sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ== + dependencies: + "@gar/promisify" "^1.0.1" + semver "^7.3.5" + +"@npmcli/move-file@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" + integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== + dependencies: + mkdirp "^1.0.4" + rimraf "^3.0.2" + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -162,6 +203,13 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= +"@sam-lord/elasticsearch-bunyan@^0.0.5": + version "0.0.5" + resolved "https://registry.yarnpkg.com/@sam-lord/elasticsearch-bunyan/-/elasticsearch-bunyan-0.0.5.tgz#0e79654974b7c7f674c02ea0b3ff79adccea5c9a" + integrity sha512-dVRHMjtIdF90teoClns5Wc7ZNfKu55ykOmCfLKZeLAGGaNHnCrmaKAK2i0gL4C6XMNzJpzM+NqkW7u4ck9Dn6g== + dependencies: + "@elastic/elasticsearch" "^7.10.0" + "@segment/loosely-validate-event@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@segment/loosely-validate-event/-/loosely-validate-event-2.0.0.tgz#87dfc979e5b4e7b82c5f1d8b722dfd5d77644681" @@ -170,140 +218,140 @@ component-type "^1.2.1" join-component "^1.1.0" -"@sentry/core@5.22.3": - version "5.22.3" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.22.3.tgz#030f435f2b518f282ba8bd954dac90cd70888bd7" - integrity sha512-eGL5uUarw3o4i9QUb9JoFHnhriPpWCaqeaIBB06HUpdcvhrjoowcKZj1+WPec5lFg5XusE35vez7z/FPzmJUDw== +"@sentry/core@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.29.0.tgz#4410ca0dc5785abf3df02fa23c18e83ad90d7cda" + integrity sha512-a1sZBJ2u3NG0YDlGvOTwUCWiNjhfmDtAQiKK1o6RIIbcrWy9TlSps7CYDkBP239Y3A4pnvohjEEKEP3v3L3LZQ== dependencies: - "@sentry/hub" "5.22.3" - "@sentry/minimal" "5.22.3" - "@sentry/types" "5.22.3" - "@sentry/utils" "5.22.3" + "@sentry/hub" "5.29.0" + "@sentry/minimal" "5.29.0" + "@sentry/types" "5.29.0" + "@sentry/utils" "5.29.0" tslib "^1.9.3" -"@sentry/core@5.24.2": - version "5.24.2" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.24.2.tgz#1724652855c0887a690c3fc6acd2519d4072b511" - integrity sha512-nuAwCGU1l9hgMinl5P/8nIQGRXDP2FI9cJnq5h1qiP/XIOvJkJz2yzBR6nTyqr4vBth0tvxQJbIpDNGd7vHJLg== +"@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== dependencies: - "@sentry/hub" "5.24.2" - "@sentry/minimal" "5.24.2" - "@sentry/types" "5.24.2" - "@sentry/utils" "5.24.2" + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" tslib "^1.9.3" -"@sentry/hub@5.22.3": - version "5.22.3" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.22.3.tgz#08309a70d2ea8d5e313d05840c1711f34f2fffe5" - integrity sha512-INo47m6N5HFEs/7GMP9cqxOIt7rmRxdERunA3H2L37owjcr77MwHVeeJ9yawRS6FMtbWXplgWTyTIWIYOuqVbw== +"@sentry/hub@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.29.0.tgz#d018b978fdffc6c8261744b0d08e8d25a3f4dc58" + integrity sha512-kcDPQsRG4cFdmqDh+TzjeO7lWYxU8s1dZYAbbl1J4uGKmhNB0J7I4ak4SGwTsXLY6fhbierxr6PRaoNojCxjPw== dependencies: - "@sentry/types" "5.22.3" - "@sentry/utils" "5.22.3" + "@sentry/types" "5.29.0" + "@sentry/utils" "5.29.0" tslib "^1.9.3" -"@sentry/hub@5.24.2": - version "5.24.2" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.24.2.tgz#64a02fd487599945e488ae23aba4ce4df44ee79e" - integrity sha512-xmO1Ivvpb5Qr9WgekinuZZlpl9Iw7iPETUe84HQOhUrXf+2gKO+LaUYMMsYSVDwXQEmR6/tTMyOtS6iavldC6w== +"@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== dependencies: - "@sentry/types" "5.24.2" - "@sentry/utils" "5.24.2" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" tslib "^1.9.3" -"@sentry/minimal@5.22.3": - version "5.22.3" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.22.3.tgz#706e4029ae5494123d3875c658ba8911aa5cc440" - integrity sha512-HoINpYnVYCpNjn2XIPIlqH5o4BAITpTljXjtAftOx6Hzj+Opjg8tR8PWliyKDvkXPpc4kXK9D6TpEDw8MO0wZA== +"@sentry/minimal@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.29.0.tgz#bd8b52f388abcec2234dbbc6d6721ff65aa30e35" + integrity sha512-nhXofdjtO41/caiF1wk1oT3p/QuhOZDYdF/b29DoD2MiAMK9IjhhOXI/gqaRpDKkXlDvd95fDTcx4t/MqqcKXA== dependencies: - "@sentry/hub" "5.22.3" - "@sentry/types" "5.22.3" + "@sentry/hub" "5.29.0" + "@sentry/types" "5.29.0" tslib "^1.9.3" -"@sentry/minimal@5.24.2": - version "5.24.2" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.24.2.tgz#14e8b136842398a32987459f0574359b6dc57a1f" - integrity sha512-biFpux5bI3R8xiD/Zzvrk1kRE6bqPtfWXmZYAHRtaUMCAibprTKSY9Ta8QYHynOAEoJ5Akedy6HUsEkK5DoZfA== +"@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== dependencies: - "@sentry/hub" "5.24.2" - "@sentry/types" "5.24.2" + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" tslib "^1.9.3" -"@sentry/node@5.22.3": - version "5.22.3" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.22.3.tgz#adea622eae6811e11edc8f34209c912caed91336" - integrity sha512-TCCKO7hJKiQi1nGmJcQfvbbqv98P08LULh7pb/NaO5pV20t1FtICfGx8UMpORRDehbcAiYq/f7rPOF6X/Xl5iw== +"@sentry/node@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.29.0.tgz#409b5d8b8dc2be25c0c4ed20aadcf8a3bbe454bc" + integrity sha512-Jp32FsfkFSGVf81Hr26rGlgIwTg7Nx07mQ7rrnNuVasu6vD2aWBzUnohkkZDJ4gZRGjmk0MthukjX0RivDKcVQ== dependencies: - "@sentry/core" "5.22.3" - "@sentry/hub" "5.22.3" - "@sentry/tracing" "5.22.3" - "@sentry/types" "5.22.3" - "@sentry/utils" "5.22.3" + "@sentry/core" "5.29.0" + "@sentry/hub" "5.29.0" + "@sentry/tracing" "5.29.0" + "@sentry/types" "5.29.0" + "@sentry/utils" "5.29.0" cookie "^0.4.1" https-proxy-agent "^5.0.0" lru_map "^0.3.3" tslib "^1.9.3" -"@sentry/node@5.24.2": - version "5.24.2" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.24.2.tgz#6e06bf26f1e0b23e122a14f17aa57671d3428c4d" - integrity sha512-ddfU2tLTvhnY+NqzLIA/gxMt/uxq7R204Nb2J5qqE0WAgbh0dtylNAzfKZTizLdbZfRnpeISmd+CBILh3tavog== +"@sentry/node@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== dependencies: - "@sentry/core" "5.24.2" - "@sentry/hub" "5.24.2" - "@sentry/tracing" "5.24.2" - "@sentry/types" "5.24.2" - "@sentry/utils" "5.24.2" + "@sentry/core" "5.30.0" + "@sentry/hub" "5.30.0" + "@sentry/tracing" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" cookie "^0.4.1" https-proxy-agent "^5.0.0" lru_map "^0.3.3" tslib "^1.9.3" -"@sentry/tracing@5.22.3": - version "5.22.3" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.22.3.tgz#9b5a376e3164c007a22e8642ec094104468cac0c" - integrity sha512-Zp59kMCk5v56ZAyErqjv/QvGOWOQ5fRltzeVQVp8unIDTk6gEFXfhwPsYHOokJe1mfkmrgPDV6xAkYgtL3KCDQ== +"@sentry/tracing@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.29.0.tgz#8ed515b3f9d409137357c38c8622858f9e684e4a" + integrity sha512-2ZITUH7Eur7IkmRAd5gw8Xt2Sfc28btCnT7o2P2J8ZPD65e99ATqjxXPokx0+6zEkTsstIDD3mbyuwkpbuvuTA== dependencies: - "@sentry/hub" "5.22.3" - "@sentry/minimal" "5.22.3" - "@sentry/types" "5.22.3" - "@sentry/utils" "5.22.3" + "@sentry/hub" "5.29.0" + "@sentry/minimal" "5.29.0" + "@sentry/types" "5.29.0" + "@sentry/utils" "5.29.0" tslib "^1.9.3" -"@sentry/tracing@5.24.2": - version "5.24.2" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.24.2.tgz#a36b4f9bf699c5e07e99a148360091c8e727c51f" - integrity sha512-1uDgvGGVF8lb3hRXbhNnns+8DBUKjhRKOFR5Z3RExjrDFYTDbHmoNtV73Q12Ra+Iht9HTZnIBOqYD3oSZIbJ0w== +"@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== dependencies: - "@sentry/hub" "5.24.2" - "@sentry/minimal" "5.24.2" - "@sentry/types" "5.24.2" - "@sentry/utils" "5.24.2" + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" tslib "^1.9.3" -"@sentry/types@5.22.3": - version "5.22.3" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.22.3.tgz#d1d547b30ee8bd7771fa893af74c4f3d71f0fd18" - integrity sha512-cv+VWK0YFgCVDvD1/HrrBWOWYG3MLuCUJRBTkV/Opdy7nkdNjhCAJQrEyMM9zX0sac8FKWKOHT0sykNh8KgmYw== +"@sentry/types@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.29.0.tgz#af5cec98cde54316c14df3121f0e8106e56b578e" + integrity sha512-iDkxT/9sT3UF+Xb+JyLjZ5caMXsgLfRyV9VXQEiR2J6mgpMielj184d9jeF3bm/VMuAf/VFFqrHlcVsVgmrrMw== -"@sentry/types@5.24.2": - version "5.24.2" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.24.2.tgz#e2c25d1e75d8dbec5dbbd9a309a321425b61c2ca" - integrity sha512-HcOK00R0tQG5vzrIrqQ0jC28+z76jWSgQCzXiessJ5SH/9uc6NzdO7sR7K8vqMP2+nweCHckFohC8G0T1DLzuQ== +"@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== -"@sentry/utils@5.22.3": - version "5.22.3" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.22.3.tgz#e3bda3e789239eb16d436f768daa12829f33d18f" - integrity sha512-AHNryXMBvIkIE+GQxTlmhBXD0Ksh+5w1SwM5qi6AttH+1qjWLvV6WB4+4pvVvEoS8t5F+WaVUZPQLmCCWp6zKw== +"@sentry/utils@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.29.0.tgz#b4c1223ba362a94cf4850e9ca2cb24655b006b53" + integrity sha512-b2B1gshw2u3EHlAi84PuI5sfmLKXW1z9enMMhNuuNT/CoRp+g5kMAcUv/qYTws7UNnYSvTuVGuZG30v1e0hP9A== dependencies: - "@sentry/types" "5.22.3" + "@sentry/types" "5.29.0" tslib "^1.9.3" -"@sentry/utils@5.24.2": - version "5.24.2" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.24.2.tgz#90b7dff939bbbf4bb8edcac6aac2d04a0552af80" - integrity sha512-oPGde4tNEDHKk0Cg9q2p0qX649jLDUOwzJXHKpd0X65w3A6eJByDevMr8CSzKV9sesjrUpxqAv6f9WWlz185tA== +"@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== dependencies: - "@sentry/types" "5.24.2" + "@sentry/types" "5.30.0" tslib "^1.9.3" "@simple-dom/document@^1.4.0": @@ -355,9 +403,9 @@ defer-to-connect "^1.0.1" "@szmarczak/http-timer@^4.0.0": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.5.tgz#bfbd50211e9dfa51ba07da58a14cdfd333205152" - integrity sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ== + version "4.0.6" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" + integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== dependencies: defer-to-connect "^2.0.0" @@ -373,57 +421,105 @@ typescript "^3.9.7" yargs "^8.0.1" -"@tryghost/adapter-manager@0.1.11": - version "0.1.11" - resolved "https://registry.yarnpkg.com/@tryghost/adapter-manager/-/adapter-manager-0.1.11.tgz#105c90ea155cc7677899aa3790fc760ba7eb6cd0" - integrity sha512-pB2MKyi9MMFJWqPtLOmJUxo9ZXet5VZBNxOGo/r6kACU/YqeGaNiJz7E8yOJZog+8e5LdxQOeIlpUr/eT+usrA== +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + +"@tryghost/adapter-manager@0.2.7": + version "0.2.7" + resolved "https://registry.yarnpkg.com/@tryghost/adapter-manager/-/adapter-manager-0.2.7.tgz#a0220926f56a629bced4ae8ec266c0f9d2e55c8d" + integrity sha512-8rs1DhMQ3YNtLEQJYhEhEZhT8w4a5PNB9phutup/DYdUyhqHev4I+mNJkenqcxtgSU75+AuLs0WJBosUBSSZ6Q== dependencies: - "@tryghost/errors" "^0.2.4" + "@tryghost/errors" "^0.2.7" -"@tryghost/admin-api-schema@1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@tryghost/admin-api-schema/-/admin-api-schema-1.0.1.tgz#df5b736e7f217e070d643b4a5e46eba9e95be66f" - integrity sha512-AsaBPN3mdgu2dicFS82rdBhV8idz+nxy9Z7FNKaiv0jNRvHHSu9lQyAReio/JevBxnGsywp90CH3sJFUvgOSbw== +"@tryghost/admin-api-schema@1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@tryghost/admin-api-schema/-/admin-api-schema-1.4.3.tgz#9b042e2ccec9ac4ef69ac901a70ae01d8834cb97" + integrity sha512-1PPwLIVXXH1IsZ7Mvpb0Xn01JOak4WV6stFCgNlEFwd70F5hPUTQOAA0GuH+8bjCaSWc7IA1Mga2FfMKwcTPjg== dependencies: - "@tryghost/errors" "0.2.4" + "@tryghost/errors" "0.2.6" bluebird "^3.5.3" - ghost-ignition "4.2.2" + ghost-ignition "4.2.4" lodash "^4.17.11" -"@tryghost/bootstrap-socket@0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@tryghost/bootstrap-socket/-/bootstrap-socket-0.2.2.tgz#e365c75d7822394553077c3bf05a3bbfde986829" - integrity sha512-uuC1CiCc7MFzw6CVv+KKZY9w+foZlqGNYm1iLueUsIxc1V/22bAw9STb/lHHIcPWtkTnai1Dco2QpizYUoXrJQ== +"@tryghost/bootstrap-socket@0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@tryghost/bootstrap-socket/-/bootstrap-socket-0.2.5.tgz#9cb42e2287a57e6132b0a98b21ce36c034cffeb2" + integrity sha512-h4+rwCwszj5ozih57P0W8NjrN9rit6VuuMfLpSUrpbVmRpWcrvmg3JXhlSyqhe/HjHmPA3wNuqLiMLmN8H/VAA== -"@tryghost/constants@0.1.1": +"@tryghost/bunyan-rotating-filestream@0.0.7": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@tryghost/bunyan-rotating-filestream/-/bunyan-rotating-filestream-0.0.7.tgz#3957de91e4e9b58999f0bbe19242080543dcfc4a" + integrity sha512-dswM+dxG8J7WpVoSjzAdoWXqqB5Dg0C2T7Zh6eoUvl5hkA8yWWJi/fS4jNXlHF700lWQ0g8/t+leJ7SGSWd+aw== + dependencies: + long-timeout "^0.1.1" + +"@tryghost/constants@0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@tryghost/constants/-/constants-0.1.4.tgz#7b185227fcad0aaa33d02abc9ba629adc8190039" + integrity sha512-lFbfNU8jNPUxLQcxXXYzVFZMclJ4fcFoMuhed63xld/DoistWIRrI/dePEYNymG9nbYhDk/4szwdwGJE8ZURIg== + +"@tryghost/elasticsearch-bunyan@0.1.1", "@tryghost/elasticsearch-bunyan@^0.1.1": version "0.1.1" - resolved "https://registry.yarnpkg.com/@tryghost/constants/-/constants-0.1.1.tgz#f92f9e5938c3bc1839fbc16353009a106bbd19ee" - integrity sha512-CTLFnSz0XREKZqDUn7yoBWnsVoUa4dWOJrz/3Dk55IVSIaPAG/qcgKCOmroZ9f1IyJZFIrqCRfPOO9k0mUaWoA== + resolved "https://registry.yarnpkg.com/@tryghost/elasticsearch-bunyan/-/elasticsearch-bunyan-0.1.1.tgz#5a36d81dd020825dd563b1357ae6c249580c46f5" + integrity sha512-ILhumzdwJNoRG44S0FkgzZQlkCYioTKWEiY+FFFQpTFWwZ3Jd5a6us5k8tEsd+Wf2rZOvul/ehV45j2c2l1BMw== + dependencies: + "@elastic/elasticsearch" "^7.10.0" -"@tryghost/errors@0.2.4", "@tryghost/errors@^0.2.3", "@tryghost/errors@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@tryghost/errors/-/errors-0.2.4.tgz#873107f0915667852f86e616a8698eddf7b1f59e" - integrity sha512-U0S/oeRCvYDe2Uuzx+D7dKQDW91D24wGm0cP90wf3EOzJH82imYFYgRXT4FZ6ypnraSSC74IFPT/+2Kyp9CnFQ== +"@tryghost/errors@0.2.6": + version "0.2.6" + resolved "https://registry.yarnpkg.com/@tryghost/errors/-/errors-0.2.6.tgz#4554c97a1666e4db323d8c664a4df5a714f77452" + integrity sha512-hhCAijjK24jeuHbeT0KILSX+6nDOldgxvFfnIGJMdjThuWQGkwHhGaD9hkUXe7F8QgAvTL0J8FVG/f6fs5TwrA== dependencies: - ghost-ignition "4.2.2" + ghost-ignition "4.2.4" lodash "4.17.20" -"@tryghost/helpers@1.1.31": - version "1.1.31" - resolved "https://registry.yarnpkg.com/@tryghost/helpers/-/helpers-1.1.31.tgz#2a1ae5e2eb6b9175445e14949657ad17a5bcb5ac" - integrity sha512-PzW+H6sdHbVGa0lAw0zM6nRMlm+tSby0EqqIgN8+/NsolBTp4kZgu+kTs94kUzEwM8t3P5Ee3Le40pJH5kRpZw== +"@tryghost/errors@0.2.7": + version "0.2.7" + resolved "https://registry.yarnpkg.com/@tryghost/errors/-/errors-0.2.7.tgz#9c518d3656f5335c95912a5cbb5751a90964d96e" + integrity sha512-oonHLYJvwQoxKLjO57EWAQe4cIvqo6YtLOBt9Gz3oQFrDdxlLrqxVkt9X4v+IvOkcpW6Nw1lw9T4A0KLRcg4eA== + dependencies: + ghost-ignition "4.2.4" + lodash "4.17.20" + +"@tryghost/errors@^0.2.3", "@tryghost/errors@^0.2.7": + version "0.2.17" + resolved "https://registry.yarnpkg.com/@tryghost/errors/-/errors-0.2.17.tgz#9b89f3845256ace5650593f41cc86d64965b56ed" + integrity sha512-Mj+bedWOwfooNA8fQdp6gIcRvWcKhJ/hOyGzu6OLFDLgEosFEeuFgXE6SsAWkf9+9NTYX30w88qGIWZqOhEAmQ== + dependencies: + "@tryghost/ignition-errors" "^0.1.0" + lodash "^4.17.21" + +"@tryghost/helpers@1.1.37": + version "1.1.37" + resolved "https://registry.yarnpkg.com/@tryghost/helpers/-/helpers-1.1.37.tgz#116d3a971fbc889cc694882278c3248e03ec92bb" + integrity sha512-J1YOPlh09tRudPYmfeh0rBeQP1l646aBOWqwX+e9wELdu4Sxbw5ufH4UpkXu1sGWrxWTQfPjsrAK6EuKbOv4xA== dependencies: lodash-es "^4.17.11" -"@tryghost/html-to-mobiledoc@0.7.4": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@tryghost/html-to-mobiledoc/-/html-to-mobiledoc-0.7.4.tgz#06bb081a98690ded48a9b63e1cc397ad33dd03ae" - integrity sha512-UhIxISQbJ3g6qpgL55ZF0VDAgk5nmtzs3+R+jQJZW3aGJY3crDBmynApo4LujQafevdhvja0luUfZ6JiQ9f2mw== +"@tryghost/html-to-mobiledoc@0.7.9": + version "0.7.9" + resolved "https://registry.yarnpkg.com/@tryghost/html-to-mobiledoc/-/html-to-mobiledoc-0.7.9.tgz#a961a5b41716709fcdf4893f6e5b86a57e85ab92" + integrity sha512-jMHmFumHn7lan5+eTm5fMJjiYs4Nlw6vzzzgpH/gi2Q1YyPe9Fyc3nwI+uA4ZMccNSf5nP8QWuk6HZqV5zQKLw== dependencies: - "@tryghost/kg-parser-plugins" "1.0.8" + "@tryghost/kg-parser-plugins" "1.1.0" "@tryghost/mobiledoc-kit" "^0.12.4-ghost.1" jsdom "16.4.0" +"@tryghost/ignition-errors@^0.1.0": + version "0.1.8" + resolved "https://registry.yarnpkg.com/@tryghost/ignition-errors/-/ignition-errors-0.1.8.tgz#6d4c4d4e02d32403ca1e574eaa91b3c0d138d6f6" + integrity sha512-4KYU+kDXZyP7tmzyHiUkfDy9RWxKAtA/6xTGdxYHurE5ZlT++cDDfdUtF0v3308GGUzKlBzRc3jmLjDYpngcBQ== + dependencies: + lodash "^4.17.21" + uuid "^8.3.2" + "@tryghost/image-transform@1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@tryghost/image-transform/-/image-transform-1.0.3.tgz#41454d8040f9d62b3d55d3aadab75fd47bd7a77d" @@ -435,45 +531,48 @@ optionalDependencies: sharp "0.25.4" -"@tryghost/job-manager@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@tryghost/job-manager/-/job-manager-0.1.1.tgz#dee0b235f5576681f4c5bbece77e053af93b8820" - integrity sha512-z/sWG80vDWTy7o0quyQmDxV2IVQvqFzqYZ5R5+uHX3Sq9u4L42BMLfNpPI83ldY+W+0/fP1vMxjC3mI1vaj/Gg== +"@tryghost/job-manager@0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@tryghost/job-manager/-/job-manager-0.8.1.tgz#adb28f0922b3767fe9480cbb08a370fc51d1a5ae" + integrity sha512-nhty5xuDxQUYpCFV9HJTAc2N8TMCApRbDO1TZOBZW3mCNjg7BulSpk7KhHaEFoeOc+xYtBU9Dh/uIPST/3dwMg== dependencies: - fastq "1.8.0" - p-wait-for "3.1.0" + "@breejs/later" "4.0.2" + bree "6.2.0" + cron-validate "1.4.2" + fastq "1.10.1" + p-wait-for "3.2.0" -"@tryghost/kg-card-factory@2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@tryghost/kg-card-factory/-/kg-card-factory-2.1.2.tgz#36ea77165cb8ddaf676389b53ca66d66205a7cb6" - integrity sha512-G5vdMxUFe9YBC8vUZM81kn1R6Sb/Cv8wuwsAXhwTYg/W5cj8ZDHt6iCUV16z1bml5uY+xf4uQPIPzoI1rZP0mA== +"@tryghost/kg-card-factory@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@tryghost/kg-card-factory/-/kg-card-factory-2.1.5.tgz#1ceb953f7fb46424b46d6d5a7ffbe965bf57cc3c" + integrity sha512-lpr/eqvnsDrRp39v7p1j3Ehc6C9AD9ya84rmpi5/Cw5YrHjAT3EQsJ3Em0dSoGOH4dSYDHRNeu3lCg3r+a2QdQ== -"@tryghost/kg-clean-basic-html@^1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@tryghost/kg-clean-basic-html/-/kg-clean-basic-html-1.0.8.tgz#b00f0a04cc61859ee78d79d58ac6971114554cd7" - integrity sha512-10ioIrQyMkUE66xFcKUBt6/ejzr5LvmcFIHOwHsOZzxtjWMooNR06EVBjrPM98Pvc05+GAnK+4Lv4BaFgLfy5A== +"@tryghost/kg-clean-basic-html@^1.0.11": + version "1.0.18" + resolved "https://registry.yarnpkg.com/@tryghost/kg-clean-basic-html/-/kg-clean-basic-html-1.0.18.tgz#2d626c5da951551cf09c28a55ac23df801d2e880" + integrity sha512-5jUY/McF01hDi6BsdKOsBhtdhmuCv1djYYj7eVOFGFcdmLkxRHOJWqmRfJTCVdfeU5hnOu+D6XcNsDxmTJXLKQ== "@tryghost/kg-default-atoms@2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@tryghost/kg-default-atoms/-/kg-default-atoms-2.0.2.tgz#b8a1143bb0fa559cd46a96181c91771a35a3547b" integrity sha512-cV9FcTatyyf6QgOgNJ56sZmxu+rj3W105owcJatGuNtMx4hWrKupnvzxt7HXNBlAzwNrct7m9trrDFk+ghj1xw== -"@tryghost/kg-default-cards@2.6.1": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@tryghost/kg-default-cards/-/kg-default-cards-2.6.1.tgz#36a6b8f6bf68ec14e2d00848cd66faf2fbe06207" - integrity sha512-EsLqsW4b59M1B5PyAybVI6zaNY5EJQ/1IQBmw3eVLGY4yJURzkQbcNygZgQ/0xXtjC5zypHMJiYuvgalf63QMw== +"@tryghost/kg-default-cards@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@tryghost/kg-default-cards/-/kg-default-cards-3.1.0.tgz#0f653091d74934fc158f07db4f4740acf1a9624d" + integrity sha512-8hawNkB+oz5cO6Bm0MJ1Zir+8hBlCwJphLwfLx2cJ3OaWl61H4YqikN16Z2utnTBI7rtQC3SjzSW7Og1uGe5SA== dependencies: - "@tryghost/kg-markdown-html-renderer" "^2.0.2" + "@tryghost/kg-markdown-html-renderer" "^3.0.0" "@tryghost/url-utils" "^0.6.14" handlebars "^4.7.6" juice "^7.0.0" -"@tryghost/kg-markdown-html-renderer@2.0.2", "@tryghost/kg-markdown-html-renderer@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@tryghost/kg-markdown-html-renderer/-/kg-markdown-html-renderer-2.0.2.tgz#e52f44c02e1b9c3a7dfe2a4840f07a5af2e8717e" - integrity sha512-gqGUEMQq/ZOCNfF2oBu1mGrGYfsh32ueG5zYj2jsYkzzWFgRZkaW7+zIMFCMtxeW3xKopYDQcCcwbiwP6R1afw== +"@tryghost/kg-markdown-html-renderer@3.0.0", "@tryghost/kg-markdown-html-renderer@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@tryghost/kg-markdown-html-renderer/-/kg-markdown-html-renderer-3.0.0.tgz#f637d37fd6d0cd1aeed5a5e5d837139de53362a3" + integrity sha512-sEIDel9DuOM/zhqflB57mr8R07aGmPBNnvoG5Zu7nO5cwjS3vkTk7b+lnrbSSnc6zwH94RhjWEQ7SElo0EYIfw== dependencies: - markdown-it "^11.0.0" + markdown-it "^12.0.0" markdown-it-footnote "^3.0.2" markdown-it-lazy-headers "^0.1.3" markdown-it-mark "^3.0.0" @@ -486,34 +585,44 @@ mobiledoc-dom-renderer "^0.7.0" simple-dom "^1.4.0" -"@tryghost/kg-parser-plugins@1.0.8": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@tryghost/kg-parser-plugins/-/kg-parser-plugins-1.0.8.tgz#ffd1ed0b1ca1806ab643b3686ee214b02588661c" - integrity sha512-6FGmGqh8RRgfm6KhGu8hyEQ2lfhQ5yIOfvJydGBkaesSVQDiBqqRQGCybhZdvIIeNHGBkNMZgHcCqa4Q4+4EUQ== +"@tryghost/kg-parser-plugins@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@tryghost/kg-parser-plugins/-/kg-parser-plugins-1.1.0.tgz#8900e99e64706d97d7523b5df8f696308f613785" + integrity sha512-nfL2Mi74PE3C1zX4fJvQeI9kTPXUvCCsf94Xw8K07uaeuv2awQc+E0LpwesttNYD0WGNpIlYS1nkCKsJp/c7jg== dependencies: - "@tryghost/kg-clean-basic-html" "^1.0.8" + "@tryghost/kg-clean-basic-html" "^1.0.11" -"@tryghost/magic-link@0.6.0", "@tryghost/magic-link@^0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@tryghost/magic-link/-/magic-link-0.6.0.tgz#a656e30385b60f44e5678819d6184c65f0757794" - integrity sha512-KeE1dpCCAhZy34pjXirn1w1Oq4+dNsX9XqyZMvdruiYEB+88WkL/x//aNGCo84RoerTr1W8TGQF/1lh4ulrsZg== +"@tryghost/magic-link@0.6.4": + version "0.6.4" + resolved "https://registry.yarnpkg.com/@tryghost/magic-link/-/magic-link-0.6.4.tgz#d0c88d6ecf464e2c17e1d56bad0f0aeb6a92f8a3" + integrity sha512-n/VnMEpwkDrDPpw8AaQq6ACUua/aLz01dthaLhbYoshP+s4RINkF1/t+T+BA//O7qvimCQmi8nXM8eISdZciLw== dependencies: bluebird "^3.5.5" - ghost-ignition "4.2.2" + ghost-ignition "4.4.2" jsonwebtoken "^8.5.1" lodash "^4.17.15" -"@tryghost/members-api@0.32.0": - version "0.32.0" - resolved "https://registry.yarnpkg.com/@tryghost/members-api/-/members-api-0.32.0.tgz#f6697698a7da7ad4e06651971a94965badf4117e" - integrity sha512-645Yuhfa4SxVUr6i8GMnxMAzoFGDZTEKVHlwJ9NCRlohVU6JYwWV7rN60lWCzftoJtzYw/FZI7G0cBEJQs0YKw== +"@tryghost/magic-link@^0.6.7": + version "0.6.7" + resolved "https://registry.yarnpkg.com/@tryghost/magic-link/-/magic-link-0.6.7.tgz#9bdf76fa014f08a09cc38c308d659900626902c9" + integrity sha512-6sG0iqW+yUoBnJVKRhvOAc+dexHfFf0UJeVOmQXDL8/Ei5CSfyI4IsPV3i2yvYSLzmwqSKayG9dFkyjkvN6w8g== dependencies: - "@tryghost/magic-link" "^0.6.0" + bluebird "^3.5.5" + ghost-ignition "4.4.4" + jsonwebtoken "^8.5.1" + lodash "^4.17.15" + +"@tryghost/members-api@0.37.13": + version "0.37.13" + resolved "https://registry.yarnpkg.com/@tryghost/members-api/-/members-api-0.37.13.tgz#fa43449b64ceab645195649066b1fdb748d89f23" + integrity sha512-6d3QDbXaRW4eTnoX5FOqb7JlSiVmm99QHlaygsb3dNYcrT3/q75Ro0TA5KgoTp9x3vde1Gtwr+U76plwGExapQ== + dependencies: + "@tryghost/magic-link" "^0.6.7" bluebird "^3.5.4" body-parser "^1.19.0" cookies "^0.8.0" express "^4.16.4" - ghost-ignition "4.2.2" + ghost-ignition "4.4.4" got "^9.6.0" jsonwebtoken "^8.5.1" leaky-bucket "2.2.0" @@ -521,22 +630,22 @@ node-jose "^1.1.3" stripe "^7.4.0" -"@tryghost/members-csv@0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@tryghost/members-csv/-/members-csv-0.3.1.tgz#27b3e383ef53acba4043e9a06ac5e19796fe9789" - integrity sha512-znBsbBA5aZsf0jTPSboTROY3lNDXmBIf2YS134aqaZboEeHopbln7Ryr20Rt4lah+CXeCTOtzChe5ABcu9fzDA== +"@tryghost/members-csv@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@tryghost/members-csv/-/members-csv-0.4.2.tgz#af6189ea30a18b7ebe1f67c442d459ea8ef7aff9" + integrity sha512-r7cuO1dBMeOycEr5331qYickaSHgut9IkzbPeVOwWK3Labt75se9i4/6us4KkmfwMQisR2mV3ZBVvz0ps5h76g== dependencies: papaparse "5.3.0" -"@tryghost/members-ssr@0.8.5": - version "0.8.5" - resolved "https://registry.yarnpkg.com/@tryghost/members-ssr/-/members-ssr-0.8.5.tgz#47d9a2507e59170fcaff6b6331403e28ad93df5b" - integrity sha512-sMBPMHa6QrLJnLdsUqqxZMLilOLIQ23U0nEE6oCHP2QUdIwKstzaJPrpSva8PQ0/TFpVrnWtX39v3X1TjmPSUQ== +"@tryghost/members-ssr@0.8.8": + version "0.8.8" + resolved "https://registry.yarnpkg.com/@tryghost/members-ssr/-/members-ssr-0.8.8.tgz#64f7d83899e443b88e6b06ed36130fa28c09d8bd" + integrity sha512-nQJXIN41oYTX7lJ7+vvCsY3EyfANHA0UWYURRO/5I4bEReZa/bF1C6Bow9pWEZXixxfyIQm4ffAOixDUIIusaA== dependencies: bluebird "^3.5.3" concat-stream "^2.0.0" cookies "^0.8.0" - ghost-ignition "4.2.2" + ghost-ignition "4.4.2" jsonwebtoken "^8.5.1" lodash "^4.17.11" @@ -548,70 +657,70 @@ mobiledoc-dom-renderer "0.7.0" mobiledoc-text-renderer "0.4.0" -"@tryghost/mw-session-from-token@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@tryghost/mw-session-from-token/-/mw-session-from-token-0.1.8.tgz#4ee18ffe293ab5903f3c68641995dc6ea57dfd0b" - integrity sha512-QFpXGkCg9edYEIp4QGf2GAoLQF9CdYo84o+JfbrQWncs8umtMlBNSomc9PWbcLM0aOmN5m1bhU0XheoigMiv/g== +"@tryghost/mw-session-from-token@0.1.14": + version "0.1.14" + resolved "https://registry.yarnpkg.com/@tryghost/mw-session-from-token/-/mw-session-from-token-0.1.14.tgz#b6d2bb1b074fe12f0b83106b8669c6d4dbaf8728" + integrity sha512-UpESDzLdhbmwVrmcmbYyKr2JZb8jiwn5YmDzj13nYlsNMOO8CyshsNf1EhAQOlAzXFmm5PGtkRiKTTAqgooXVw== -"@tryghost/pretty-cli@1.2.9": - version "1.2.9" - resolved "https://registry.yarnpkg.com/@tryghost/pretty-cli/-/pretty-cli-1.2.9.tgz#1eb1fa48ab5cadcc5dba75454ff28cb59586c117" - integrity sha512-MmN9SPVLFOUBBSzowHZuODMurQ7hLatDpWMojmVQzH4DSW07yQcD+yogpld15c9A2CZhcNfuT/XzKzRWpk/rAQ== +"@tryghost/pretty-cli@1.2.11": + version "1.2.11" + resolved "https://registry.yarnpkg.com/@tryghost/pretty-cli/-/pretty-cli-1.2.11.tgz#feb98e176261c0e3e20039b8341cce8ade77383a" + integrity sha512-qQrKceGDIe/ab3gInnqD8zGz3PKaJIGc9a1/iHZrhhGZOCPmLtuY/o5pTh8g84U3PWJUpPkX3BFuypFidSrUXw== dependencies: chalk "4.1.0" sywac "1.3.0" -"@tryghost/promise@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@tryghost/promise/-/promise-0.1.1.tgz#ac2a227132dcc28c06aa64edccbaa36dae2c2cf8" - integrity sha512-Ag5ODphFAYWUHk2yb7FTZUZPghLP7Bnu2BqGOIsZEvAPUEbf13gPwL1QtdzBGQKMdTFDx8cL1UQsyWksEBNnRA== +"@tryghost/promise@0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@tryghost/promise/-/promise-0.1.4.tgz#14e4348961fab16f2e5df256d3e0ae0a09f6ae49" + integrity sha512-jHHP3sQrBt+TBxUxLI/bldJ700ZFsLY+u7XtnwX3+lbopOQCWOf8KWb6W2GIQCSm3JKUc1D8qWR3uN568grOkg== dependencies: bluebird "3.7.2" -"@tryghost/security@0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@tryghost/security/-/security-0.2.0.tgz#3f2ffa10bd933a21b19f659be9636146fb74a790" - integrity sha512-plCxkYWD22mCQowH6boGakc2svv6Xqc7W1gJL007baBHHFR4XvWigseTxit1sb6FsI+GpzV16lBLtUUNiYTQTA== +"@tryghost/security@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@tryghost/security/-/security-0.2.4.tgz#e5400f7034d697b3397573b825883fb81c135224" + integrity sha512-g0EJd6r5fVHqpD6Ihz/l8qQFV1QQ6WionOMOZQDzk3I7Xy/2GyX+yx0ejimxN0zYafX64A60jLPxjyXYMk3TrA== dependencies: - "@tryghost/string" "0.1.11" + "@tryghost/string" "0.1.14" bcryptjs "2.4.3" bluebird "3.7.2" lodash "4.17.20" -"@tryghost/session-service@0.1.9": - version "0.1.9" - resolved "https://registry.yarnpkg.com/@tryghost/session-service/-/session-service-0.1.9.tgz#ddc06aa70ffb527efc9aa0d4fcf82c7265cbe052" - integrity sha512-QyYyHmaOB80rU8Py1nN/NMcG+wlLbi02Uc6cShTUspHAZTNurMEjJvKHzHNZTJfIQF92gOVseOR++AoaOwjvQw== +"@tryghost/session-service@0.1.15": + version "0.1.15" + resolved "https://registry.yarnpkg.com/@tryghost/session-service/-/session-service-0.1.15.tgz#7d22262d7b34fcd084abcd64dcfc7481e2d275d2" + integrity sha512-9uKWbDaTBJ+smEDTofdJiSF6TQv3+Nay1qNNyHBCyQTPoCw36atMkwHrnpEJYfEM1lbY63QcJ089GXg9YC6plQ== dependencies: - "@tryghost/errors" "^0.2.4" + "@tryghost/errors" "^0.2.7" -"@tryghost/social-urls@0.1.13": - version "0.1.13" - resolved "https://registry.yarnpkg.com/@tryghost/social-urls/-/social-urls-0.1.13.tgz#99ca348be9aec59d35d6bc9593928f71fce5559f" - integrity sha512-NQxCafH79te4sA3o49TME4ZqInd692k2iETGD/CEA4mvAp5Pus5QdcwbhfgwIZfpwsKbVa0Ik1l3VtU4JjlgQA== +"@tryghost/social-urls@0.1.18": + version "0.1.18" + resolved "https://registry.yarnpkg.com/@tryghost/social-urls/-/social-urls-0.1.18.tgz#f4fcc85ed6fdef7ba80644aa6255684ab1db372e" + integrity sha512-s/pI61PHTc+bUm3+TrzpTiFTA23/tGzajbbpRfQ7zIp6bFbqfGyvzIgd8fzMjmOE2RyUFn3Ve6s5IDFf/LdkXQ== dependencies: bluebird "3.7.2" - ghost-ignition "4.2.2" + ghost-ignition "4.2.4" lodash "4.17.20" -"@tryghost/string@0.1.11": - version "0.1.11" - resolved "https://registry.yarnpkg.com/@tryghost/string/-/string-0.1.11.tgz#259e101a6fa7d08870e5c3b12091f62eb61c3725" - integrity sha512-k7Ix+Qd+oTVgFP45Y/EfU38HsJ1GLp04FU6ImlghsrA+3X4a+Prh+CJMTsDxISLjO5a4OCPFcmxCZBH8ueoOTw== +"@tryghost/string@0.1.14": + version "0.1.14" + resolved "https://registry.yarnpkg.com/@tryghost/string/-/string-0.1.14.tgz#e799151eb5af62b47634403e0c10c48709b2a118" + integrity sha512-lzZgGdLEOy2YY8mAebSkP4Y9MgzH/Ef5ADDW8Z31dv8PJILfRG7vuXWwr/SKUmV6mzETyxKTnO9CIbLExaC8VQ== dependencies: unidecode "^0.1.8" -"@tryghost/string@0.1.12": - version "0.1.12" - resolved "https://registry.yarnpkg.com/@tryghost/string/-/string-0.1.12.tgz#f9fe04e301dac3117d7924c3e0692f406f23c24b" - integrity sha512-HqMlCj4LzzEF/AQKojHwwfcA4Pnx8ZmVaXXH3W+iatSPzbSR6Gk8xkb0EhwRXWZogwOM1C6eRgKnbVFw8Oi1+g== +"@tryghost/string@0.1.16": + version "0.1.16" + resolved "https://registry.yarnpkg.com/@tryghost/string/-/string-0.1.16.tgz#815d8bbf62daffd6d4291145987f43f8ca98d5b2" + integrity sha512-+mRzCCp0LqTIugN6+NFrEfqlG05mMqyCzoLo1C/U4ApMX2HKvCo35A/mWY9vnA3eD99Ivo3Hsc3hfyTYQXOa6w== dependencies: unidecode "^0.1.8" -"@tryghost/url-utils@0.6.21", "@tryghost/url-utils@^0.6.14": - version "0.6.21" - resolved "https://registry.yarnpkg.com/@tryghost/url-utils/-/url-utils-0.6.21.tgz#01e64d4f934e04cd64529865d382550647aa7324" - integrity sha512-Ju0Mucu6DpWSU3Jmt3yGkI+7WYQJL9C/RrguBE8D3ji/GdSebbPxiqUPFuFlByxMIXV61k6mIOneL7ZA6eKW4g== +"@tryghost/url-utils@0.6.25": + version "0.6.25" + resolved "https://registry.yarnpkg.com/@tryghost/url-utils/-/url-utils-0.6.25.tgz#1f03e99985eb490d69d875bc0490f5aa563712a2" + integrity sha512-gSI1PzgSU83WWwtbET9GU2Aak1KceSe3Kxm57ePz1QDdMLwOlS8KWW853Q/LiBDcr+h04EFopzgmhMCzxUKAEw== dependencies: cheerio "0.22.0" moment "2.27.0" @@ -620,29 +729,37 @@ remark-footnotes "^1.0.0" unist-util-visit "^2.0.0" -"@tryghost/vhost-middleware@1.0.9": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tryghost/vhost-middleware/-/vhost-middleware-1.0.9.tgz#f4db3a8fbad98786eb69e8848c96d14197e6342f" - integrity sha512-E4CgU9DmVkoLcNzbeu9yfLg/vKHQXkw01om8MMTYV0LFhwDBXYWUoUSjJn+Il67+/zyjmDCL/l6hl+q+OsQBJg== +"@tryghost/url-utils@^0.6.14": + version "0.6.26" + resolved "https://registry.yarnpkg.com/@tryghost/url-utils/-/url-utils-0.6.26.tgz#a73ed9276cc380c180e8032c4b56e10adb6cd381" + integrity sha512-+uSUcb0o5mxd8G6lC0r0Dd14cMeboZRgV/Kl3Vp3sJx7UB3Bxa2gVHIE1EIAEw0FkJP5RsPVYrKOBYFHlbgRUQ== dependencies: - bluebird "3.7.2" - ghost-ignition "4.2.2" - lodash "4.17.20" + cheerio "0.22.0" + moment "2.27.0" + moment-timezone "0.5.31" + remark "^11.0.2" + remark-footnotes "^1.0.0" + unist-util-visit "^2.0.0" -"@tryghost/zip@1.1.3": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@tryghost/zip/-/zip-1.1.3.tgz#cea93483360c7748fb909c369e364976b8b484c8" - integrity sha512-LTUhgzelZWpM0n4PKv4/UiBi2Eervz1geF1dVAWNCBeyCg9Ev+KBzw5NkUgrj7Bk77vNp1rMw2KX8EhoB/vuwg== +"@tryghost/vhost-middleware@1.0.11": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tryghost/vhost-middleware/-/vhost-middleware-1.0.11.tgz#7ce184f2762d5d438f723169aa6c36dd6b284db3" + integrity sha512-k8w0nsGLoQULLiDE15GSlYA33zQT0CmTxwAC2QQC1eh73epCuZfPnBzq9BKkc+pbP1qQ7Ag2u9bm5eNiJ2rlMQ== + +"@tryghost/zip@1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@tryghost/zip/-/zip-1.1.6.tgz#95ad124d0d7313616043a6464f0dc5120fddd5a6" + integrity sha512-jWeqT+hmWy9A+xFBrBU618jUNe8V1KPQ3tQ0jvT7oup9zcvd7z+S31fRAm10S16LE09y8TFKs4HOskO+AumjGg== dependencies: archiver "4.0.1" bluebird "3.7.2" extract-zip "2.0.0" fs-extra "9.0.1" -"@tryghost/zip@1.1.4": - version "1.1.4" - resolved "https://registry.yarnpkg.com/@tryghost/zip/-/zip-1.1.4.tgz#1f196881ea35917bcbbdf8ad335f4b460f15178c" - integrity sha512-S/dYOsUxLzl6F7GqV10vmdPxO7TiAcnG6eSd1N9X7mJ4GQbwoSE3cB8alb7H5LRgaT9/jmNtvvysxzwCGsZEJw== +"@tryghost/zip@1.1.8": + version "1.1.8" + resolved "https://registry.yarnpkg.com/@tryghost/zip/-/zip-1.1.8.tgz#313240002192d773c3b9e74c66d84a76ed13f543" + integrity sha512-ahSg/eUjpgaRpuCGXhpcwogqd3xIXIxAwGn6fjogKXCBGyG7ffWf5G5M1I/BPnQt6E/8LKTEglZuHINRd72+Bw== dependencies: archiver "4.0.1" bluebird "3.7.2" @@ -656,11 +773,6 @@ dependencies: "@types/node" "*" -"@types/bluebird@^3.5.27": - version "3.5.32" - resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.32.tgz#381e7b59e39f010d20bbf7e044e48f5caf1ab620" - integrity sha512-dIOxFfI0C+jz89g6lQ+TqhGgPQ0MxSnh/E4xuC0blhFtyW269+mPG5QeLgbdwst/LvdP8o1y0o/Gz5EHXLec/g== - "@types/body-parser@*": version "1.17.0" resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.17.0.tgz#9f5c9d9bd04bb54be32d5eb9fc0d8c974e6cf58c" @@ -808,13 +920,20 @@ resolved "https://registry.yarnpkg.com/@types/keygrip/-/keygrip-1.0.2.tgz#513abfd256d7ad0bf1ee1873606317b33b1b2a72" integrity sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw== -"@types/keyv@*", "@types/keyv@^3.1.1": +"@types/keyv@*": version "3.1.1" resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" integrity sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw== dependencies: "@types/node" "*" +"@types/keyv@^3.1.1": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.3.tgz#1c9aae32872ec1f20dcdaee89a9f3ba88f465e41" + integrity sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg== + dependencies: + "@types/node" "*" + "@types/koa-compose@*": version "3.2.5" resolved "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.5.tgz#85eb2e80ac50be95f37ccf8c407c09bbe3468e9d" @@ -841,6 +960,11 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.120.tgz#cf265d06f6c7a710db087ed07523ab8c1a24047b" integrity sha512-jQ21kQ120mo+IrDs1nFNVm/AsdFxIx2+vZ347DbogHJPd/JzKNMOqU6HCYin1W6v8l5R9XSO2/e9cxmn7HAnVw== +"@types/lodash@^4.14.165": + version "4.14.178" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.178.tgz#341f6d2247db528d4a13ddbb374bcdc80406f4f8" + integrity sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw== + "@types/long@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.0.tgz#719551d2352d301ac8b81db732acb6bdc28dbdef" @@ -925,7 +1049,7 @@ dependencies: tslib "^1.9.3" -abab@^2.0.3: +abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== @@ -969,6 +1093,11 @@ acorn@^7.1.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== +acorn@^8.5.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" + integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== + addressparser@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-0.3.2.tgz#59873f35e8fcf6c7361c10239261d76e15348bb2" @@ -988,6 +1117,13 @@ agent-base@6: dependencies: debug "4" +agent-base@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + agent-base@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" @@ -995,7 +1131,34 @@ agent-base@~4.2.1: dependencies: es6-promisify "^5.0.0" -ajv@6.12.5, ajv@^6.12.3: +agentkeepalive@^4.1.3: + version "4.2.0" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.2.0.tgz#616ce94ccb41d1a39a45d203d8076fe98713062d" + integrity sha512-0PhAp58jZNw13UJv7NVdTGb0ZcghHUb3DrZ046JiiJY/BOaTTpbwdHq2VObPCBV8M2GPh7sgrJ3AQ8Ey468LJw== + dependencies: + debug "^4.1.0" + depd "^1.1.2" + humanize-ms "^1.2.1" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@6.12.6: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^6.12.3: version "6.12.5" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.5.tgz#19b0e8bae8f476e5ba666300387775fb1a00a4da" integrity sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag== @@ -1032,13 +1195,13 @@ amperize@0.6.1: uuid "^7.0.1" validator "^12.0.0" -analytics-node@3.4.0-beta.2: - version "3.4.0-beta.2" - resolved "https://registry.yarnpkg.com/analytics-node/-/analytics-node-3.4.0-beta.2.tgz#d4921927c2253dcc2fcbf18604dac2ee098a9b52" - integrity sha512-wjdCQQk412RBckuqGtyY7tdxaRpG7HLD0iBQrJBc7aUzHFNYyEbz3kepaUmNd5+ZbAGDqfnvKVsFO5DmzI1KNA== +analytics-node@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/analytics-node/-/analytics-node-3.5.0.tgz#b33ff92195f006b20f1c4e28af86d975c98e4636" + integrity sha512-XgQq6ejZHCehUSnZS4V7QJPLIP7S9OAWwQDYl4WTLtsRvc5fCxIwzK/yihzmIW51v9PnyBmrl9dMcqvwfOE8WA== dependencies: "@segment/loosely-validate-event" "^2.0.0" - axios "^0.19.0" + axios "^0.21.1" axios-retry "^3.0.2" lodash.isstring "^4.0.1" md5 "^2.2.1" @@ -1066,18 +1229,30 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= -ansi-styles@^3.1.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" +ansi-styles@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + ansi-styles@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" @@ -1278,10 +1453,10 @@ aproba@^1.0.3: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -arch@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.2.tgz#0c52bbe7344bb4fa260c443d2cbad9c00ff2f0bf" - integrity sha512-NTBIIbAfkJeIletyABbVtdPgeKfDafR+1mZV/AyyfC1UkVkp9iUjV+wwmqtUgphHYajbI86jejBJp5e+jkGTiQ== +"aproba@^1.0.3 || ^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== archiver-utils@^2.1.0: version "2.1.0" @@ -1312,6 +1487,14 @@ archiver@4.0.1: tar-stream "^2.1.2" zip-stream "^3.0.1" +are-we-there-yet@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.0.tgz#ba20bd6b553e31d62fc8c31bd23d22b95734390d" + integrity sha512-0GWpv50YSOcLXaN6/FAKY3vfRbllXWV2xvfA/oKJF8pzFhWXPV+yjhJXDBbjscDYowv7Yw1A3uigpzn5iEGTyw== + dependencies: + delegates "^1.0.0" + readable-stream "^3.6.0" + are-we-there-yet@~1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" @@ -1320,11 +1503,6 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" -arg@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/arg/-/arg-1.0.0.tgz#444d885a4e25b121640b55155ef7cd03975d6050" - integrity sha512-Wk7TEzl1KqvTGs/uyhmHO/3XLd3t1UeU4IstvPXVzGPM522cTjqjNZ99esCkcL52sjqjo8e8CTBcWhkxvGzoAw== - arg@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.0.tgz#583c518199419e0037abb74062c37f8519e575f0" @@ -1337,6 +1515,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" @@ -1475,18 +1658,19 @@ aws4@^1.8.0: integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== axios-retry@^3.0.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.1.2.tgz#4f4dcbefb0b434e22b72bd5e28a027d77b8a3458" - integrity sha512-+X0mtJ3S0mmia1kTVi1eA3DAC+oWnT2A29g3CpkzcBPMT6vJm+hn/WiV9wPt/KXLHVmg5zev9mWqkPx7bHMovg== + version "3.2.4" + resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.2.4.tgz#f447a53c3456f5bfeca18f20c3a3272207d082ae" + integrity sha512-Co3UXiv4npi6lM963mfnuH90/YFLKWWDmoBYfxkHT5xtkSSWNqK9zdG3fw5/CP/dsoKB5aMMJCsgab+tp1OxLQ== dependencies: - is-retry-allowed "^1.1.0" + "@babel/runtime" "^7.15.4" + is-retry-allowed "^2.2.0" -axios@^0.19.0: - version "0.19.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" - integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: - follow-redirects "1.5.10" + follow-redirects "^1.14.0" backo2@^1.0.2: version "1.0.2" @@ -1549,9 +1733,9 @@ bignumber.js@9.0.0: integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== bl@^1.0.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" - integrity sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA== + version "1.2.3" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" + integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== dependencies: readable-stream "^2.3.5" safe-buffer "^5.1.1" @@ -1565,12 +1749,12 @@ bl@^4.0.3: inherits "^2.0.4" readable-stream "^3.4.0" -bluebird@3.7.2, bluebird@^3.5.4, bluebird@^3.5.5: +bluebird@3.7.2, bluebird@^3.4.3, bluebird@^3.5.4, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bluebird@^3.4.3, bluebird@^3.5.0, bluebird@^3.5.3, bluebird@^3.7.0: +bluebird@^3.5.0, bluebird@^3.5.3, bluebird@^3.7.0: version "3.7.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.1.tgz#df70e302b471d7473489acf26a93d63b53f874de" integrity sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg== @@ -1607,10 +1791,10 @@ body-parser@1.19.0, body-parser@^1.19.0: raw-body "2.4.0" type-is "~1.6.17" -bookshelf-relations@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/bookshelf-relations/-/bookshelf-relations-1.3.2.tgz#bceb0ab3b172b01a48a81eed16cd68446975515a" - integrity sha512-LrsWiO3kKfYCTGWxCVzFuEi/hIfukRz6n3KIcQqCFaAO/PmYxFtxarMGeVKDpL/hm1BudksrK7S9vXmkfgv8eQ== +bookshelf-relations@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/bookshelf-relations/-/bookshelf-relations-1.4.1.tgz#10e651136193ec3edac8b30f380b66ec635634c7" + integrity sha512-CUmE7TiNh4BBYvJM05BJCT8e1XdPcClBHc6d3gIEvRlgciTx0hPAVj2zoOe4WdmzB7qU4ur/kcv/T4N4FSs3Jw== dependencies: bluebird "3.7.2" ghost-ignition "4.1.0" @@ -1626,11 +1810,16 @@ bookshelf@0.15.2: inflection "^1.5.1" lodash "^4.17.10" -boolbase@~1.0.0: +boolbase@^1.0.0, boolbase@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= +boolean@^3.0.2: + version "3.2.0" + resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.2.0.tgz#9e5294af4e98314494cbb17979fa54ca159f116b" + integrity sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1655,6 +1844,25 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" +bree@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/bree/-/bree-6.2.0.tgz#c785596d4a682148bc2fb708802c3f7eb1ef5d9d" + integrity sha512-8Ol69LQXeLUSgkRWiA1VXpK4+eYax6Qb6oL0Z2d3a57gJGuYRiJE0aqmprXOirlEdSyTKMDXys393u85XDlQfQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@breejs/later" "^4.0.2" + boolean "^3.0.2" + bthreads "^0.5.1" + combine-errors "^3.0.3" + cron-validate "^1.4.1" + debug "^4.3.1" + human-interval "^2.0.0" + is-string-and-not-blank "^0.0.2" + is-valid-path "^0.1.1" + ms "^2.1.2" + p-wait-for "3.1.0" + safe-timers "^1.1.0" + browser-process-hrtime@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" @@ -1667,19 +1875,26 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -brute-knex@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/brute-knex/-/brute-knex-4.0.0.tgz#bb23549017565983e5ed7858214d8d15b690c3bb" - integrity sha512-mMpMvCJjWasupvbcYVPIb6QSWT67U8zKzp+nG6NRsQUeXJHE2fS76EG5r+NSzoQO7xKZ7kONnNkylnivZ9ASmA== +brute-knex@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/brute-knex/-/brute-knex-4.0.1.tgz#7488bdc3fcc70f8a71f2224ab4747be94a08cc9c" + integrity sha512-rV2tY8amv+2ERYNNC7voCl1A4Mh+s2IvyyDo3DAMKhaR4ME8r+4t9MH0Fgqjpe1ievESYX9Pes7gf05LBBUCRA== dependencies: express-brute "^1.0.1" - knex "^0.17" + knex "^0.20" bson-objectid@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/bson-objectid/-/bson-objectid-1.3.1.tgz#11e4ce4c3419161fd388113781bb62c1dfbce34b" integrity sha512-eQBNQXsisEAXlwiSy8zRNZdW2xDBJaEVkTPbodYR9hGxxtE548Qq7ilYOd8WAQ86xF7NRUdiWSQ1pa/TkKiE2A== +bthreads@0.5.1, bthreads@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/bthreads/-/bthreads-0.5.1.tgz#c7a4dacc2d159c50de08b37b1e2a7da836171063" + integrity sha512-nK7Jo9ll+r1FRMNPWEFRTZMQrX6HhX8JjPAofxmbTNILHqWVIJPmWzCi9JlX/K0DL5AKZTFZg2Qser5C6gVs9A== + dependencies: + bufio "~1.0.5" + buffer-crc32@^0.2.1, buffer-crc32@^0.2.13, buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" @@ -1711,12 +1926,17 @@ buffer@^5.5.0: base64-js "^1.0.2" ieee754 "^1.1.4" +bufio@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/bufio/-/bufio-1.0.7.tgz#b7f63a1369a0829ed64cc14edf0573b3e382a33e" + integrity sha512-bd1dDQhiC+bEbEfg56IdBv7faWa6OipMs/AFFFvtFnB3wAYjlwQpQRZ0pm6ZkgtfL0pILRXhKxOiQj6UzoMR7A== + builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= -bunyan-loggly@1.4.2: +bunyan-loggly@1.4.2, bunyan-loggly@^1.3.1: version "1.4.2" resolved "https://registry.yarnpkg.com/bunyan-loggly/-/bunyan-loggly-1.4.2.tgz#dda0fb18f487fa150a79728e906d83e871d235e9" integrity sha512-/fwAO+NPogiPziEk4bQKZhwYo+POrbdAlatpW5r+BQSTHqYyxGFHMtLMp4uSjIdPetXDxvG5qffAePB3hc/6NA== @@ -1724,14 +1944,6 @@ bunyan-loggly@1.4.2: json-stringify-safe "^5.0.1" node-loggly-bulk "^2.2.4" -bunyan-loggly@^1.3.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/bunyan-loggly/-/bunyan-loggly-1.4.1.tgz#b6c806fb34bfcde2ce0d98878cf3534620b969e7" - integrity sha512-D2NGeqz94bWWa8gTgEXLtSNGuKprpAhUroGv2gFJeJ1cwhGEkwQJBgshrNUfW/zMuaI5rKCmxMo0G47ob4BemQ== - dependencies: - json-stringify-safe "^5.0.1" - node-loggly-bulk "^2.2.4" - bunyan@1.8.12: version "1.8.12" resolved "https://registry.yarnpkg.com/bunyan/-/bunyan-1.8.12.tgz#f150f0f6748abdd72aeae84f04403be2ef113797" @@ -1752,6 +1964,16 @@ bunyan@1.8.14: mv "~2" safe-json-stringify "~1" +bunyan@1.8.15: + version "1.8.15" + resolved "https://registry.yarnpkg.com/bunyan/-/bunyan-1.8.15.tgz#8ce34ca908a17d0776576ca1b2f6cbd916e93b46" + integrity sha512-0tECWShh6wUysgucJcBAoYegf3JJoZWibxdqhTm7OHPeT42qdjkZ29QCMcKwbgU1kiH+auSIasNRXMLWXafXig== + optionalDependencies: + dtrace-provider "~0.8" + moment "^2.19.3" + mv "~2" + safe-json-stringify "~1" + busboy@^0.2.11: version "0.2.14" resolved "https://registry.yarnpkg.com/busboy/-/busboy-0.2.14.tgz#6c2a622efcf47c57bbbe1e2a9c37ad36c7925453" @@ -1777,6 +1999,30 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== +cacache@^15.2.0: + version "15.3.0" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" + integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== + dependencies: + "@npmcli/fs" "^1.0.0" + "@npmcli/move-file" "^1.0.1" + chownr "^2.0.0" + fs-minipass "^2.0.0" + glob "^7.1.4" + infer-owner "^1.0.4" + lru-cache "^6.0.0" + minipass "^3.1.1" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" + mkdirp "^1.0.3" + p-map "^4.0.0" + promise-inflight "^1.0.1" + rimraf "^3.0.2" + ssri "^8.0.1" + tar "^6.0.2" + unique-filename "^1.1.1" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -1814,16 +2060,16 @@ cacheable-request@^6.0.0: responselike "^1.0.2" cacheable-request@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.1.tgz#062031c2856232782ed694a257fa35da93942a58" - integrity sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw== + version "7.0.2" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" + integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== dependencies: clone-response "^1.0.2" get-stream "^5.1.0" http-cache-semantics "^4.0.0" keyv "^4.0.0" lowercase-keys "^2.0.0" - normalize-url "^4.1.0" + normalize-url "^6.0.1" responselike "^2.0.0" caller@1.0.1: @@ -1867,15 +2113,6 @@ ccount@^1.0.0: resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.5.tgz#ac82a944905a65ce204eb03023157edf29425c17" integrity sha512-MOli1W+nfbPLlKEhInaxhRdp7KVLFxLN5ykwzHgLsLI3H3gs5jjFAK4Eoj3OzzcxCtumDaI8onoVDeQyWaNTkw== -chalk@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" - integrity sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q== - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - chalk@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" @@ -1895,7 +2132,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1934,6 +2171,17 @@ cheerio-advanced-selectors@~2.0.1: resolved "https://registry.yarnpkg.com/cheerio-advanced-selectors/-/cheerio-advanced-selectors-2.0.1.tgz#fb5ec70a4599e8cec1cf669c6d9b90a3fa969c48" integrity sha512-5wHR8bpiD5pdUtaS81A6hnJezzoDzL1TLWfK6bxnLkIgEKPV26BlOdMCcvuj3fTE7JSalsTUeNU7AOD/u6bYhw== +cheerio-select@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.5.0.tgz#faf3daeb31b17c5e1a9dabcee288aaf8aafa5823" + integrity sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg== + dependencies: + css-select "^4.1.3" + css-what "^5.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + domutils "^2.7.0" + cheerio@0.22.0: version "0.22.0" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" @@ -1956,7 +2204,7 @@ cheerio@0.22.0: lodash.reject "^4.4.0" lodash.some "^4.4.0" -cheerio@^1.0.0-rc.3, cheerio@~1.0.0-rc.3: +cheerio@^1.0.0-rc.3: version "1.0.0-rc.3" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.3.tgz#094636d425b2e9c0f4eb91a46c05630c9a1a8bf6" integrity sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA== @@ -1968,6 +2216,19 @@ cheerio@^1.0.0-rc.3, cheerio@~1.0.0-rc.3: lodash "^4.15.0" parse5 "^3.0.1" +cheerio@~1.0.0-rc.3: + version "1.0.0-rc.10" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.10.tgz#2ba3dcdfcc26e7956fc1f440e61d51c643379f3e" + integrity sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw== + dependencies: + cheerio-select "^1.5.0" + dom-serializer "^1.3.2" + domhandler "^4.2.0" + htmlparser2 "^6.1.0" + parse5 "^6.0.1" + parse5-htmlparser2-tree-adapter "^6.0.1" + tslib "^2.2.0" + chownr@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" @@ -1978,12 +2239,12 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -chrono-node@2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chrono-node/-/chrono-node-2.1.8.tgz#5180afb086639d13777079163aa8dd84a596c8c0" - integrity sha512-Bn54l+yEX4yA+/8dYIz/tITSWcPFwy1N5KpUEndPngwUCr7hTDKqVAdBjiqPrbvgOeSvcOhe3yIBH+HsmzM3GA== +chrono-node@2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/chrono-node/-/chrono-node-2.3.6.tgz#4fab8996f480f37e6ad646c8c9c7e40fe70f8d63" + integrity sha512-nWvpNZJXCfxHs5IfQEXqSYKiLFpz2PHB7SUdc8La2sjoG0S4ifDYLrpICrs/PsSCkZxN+AfVQq11Vd2ex5umjw== dependencies: - dayjs "^1.8.29" + dayjs "^1.10.0" class-utils@^0.3.5: version "0.3.6" @@ -1995,7 +2256,7 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -clean-stack@~2.2.0: +clean-stack@^2.0.0, clean-stack@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== @@ -2015,14 +2276,6 @@ cli-usage@^0.1.1: marked "^0.5.0" marked-terminal "^3.0.0" -clipboardy@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.2.tgz#2ce320b9ed9be1514f79878b53ff9765420903e2" - integrity sha512-16KrBOV7bHmHdxcQiCvfUFYVFyEah4FI8vYT1Fr7CGSA4G+xBWMEfUEQJS1hxeHGtI9ju1Bzs9uXSbj5HZKArw== - dependencies: - arch "^2.1.0" - execa "^0.8.0" - cliui@^3.0.3, cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -2032,6 +2285,15 @@ cliui@^3.0.3, cliui@^3.2.0: strip-ansi "^3.0.1" wrap-ansi "^2.0.0" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -2062,7 +2324,7 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0, color-convert@^1.9.1: +color-convert@^1.9.0, color-convert@^1.9.3: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== @@ -2086,26 +2348,26 @@ color-name@^1.0.0, color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-string@^1.5.2: - version "1.5.3" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" - integrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw== +color-string@^1.6.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.0.tgz#63b6ebd1bec11999d1df3a79a7569451ac2be8aa" + integrity sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ== dependencies: color-name "^1.0.0" simple-swizzle "^0.2.2" +color-support@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + color@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" - integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg== + version "3.2.1" + resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164" + integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA== dependencies: - color-convert "^1.9.1" - color-string "^1.5.2" - -colorette@1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.0.8.tgz#421ff11c80b7414027ebed922396bc1833d1903c" - integrity sha512-X6Ck90ReaF+EfKdVGB7vdIQ3dr651BbIrBwY5YBKg13fjH+940sTtp7/Pkx33C6ntYfQcRumOs/aUQhaRPpbTQ== + color-convert "^1.9.3" + color-string "^1.6.0" colorette@1.1.0: version "1.1.0" @@ -2122,11 +2384,24 @@ colors@1.0.3: resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= +colors@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + colors@^1.1.2: version "1.3.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== +combine-errors@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/combine-errors/-/combine-errors-3.0.3.tgz#f4df6740083e5703a3181110c2b10551f003da86" + integrity sha1-9N9nQAg+VwOjGBEQwrEFUfAD2oY= + dependencies: + custom-error-instance "2.1.1" + lodash.uniqby "4.5.0" + combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" @@ -2151,7 +2426,7 @@ commander@^2.19.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== -commander@^2.20.0, commander@^2.20.3: +commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -2161,6 +2436,11 @@ commander@^3.0.2: resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== +commander@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + common-tags@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" @@ -2254,7 +2534,7 @@ connect-slashes@1.4.0: resolved "https://registry.yarnpkg.com/connect-slashes/-/connect-slashes-1.4.0.tgz#fe884e9d130e9bd0a40d8ee502c1dfa269f94373" integrity sha512-BJRbgSczzlsRwyF64DxGNIizBTxUf7f/tAsDzq2Nq8eLrm2160vVfm/4vQcjrT4qVFu6qDCqPK+vDaEWJsnSzA== -console-control-strings@^1.0.0, console-control-strings@~1.1.0: +console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= @@ -2318,11 +2598,6 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -core-js@^2.6.5: - version "2.6.11" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" - integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== - core-js@^3.0.1: version "3.6.5" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" @@ -2361,6 +2636,20 @@ create-error@~0.3.1: resolved "https://registry.yarnpkg.com/create-error/-/create-error-0.3.1.tgz#69810245a629e654432bf04377360003a5351a23" integrity sha1-aYECRaYp5lRDK/BDdzYAA6U1GiM= +cron-validate@1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/cron-validate/-/cron-validate-1.4.2.tgz#1ecf9a5689e5697d17c2337bbfd8606bed7d441e" + integrity sha512-GdjNeiZjNA9u6BItfhnd1MFPbT86wmJ2/2BwDQyXZY0mb9nhLSeh3PVKk7G185qfUSwbtGNtCLrKI/9pclvGrg== + dependencies: + yup "0.32.8" + +cron-validate@^1.4.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/cron-validate/-/cron-validate-1.4.3.tgz#d4ad8fb5b559a7df73b81e79c95c21b87bb4c5f4" + integrity sha512-N+qKw019oQBEPIP5Qwi8Z5XelQ00ThN6Maahwv+9UGu2u/b/MPb35zngMQI0T8pBoNiBrIXGlhvsmspNSYae/w== + dependencies: + yup "0.32.9" + cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -2375,6 +2664,17 @@ crypt@~0.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= +css-select@^4.1.3: + version "4.2.1" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.2.1.tgz#9e665d6ae4c7f9d65dbe69d0316e3221fb274cdd" + integrity sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ== + dependencies: + boolbase "^1.0.0" + css-what "^5.1.0" + domhandler "^4.3.0" + domutils "^2.8.0" + nth-check "^2.0.1" + css-select@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" @@ -2390,6 +2690,11 @@ css-what@2.1: resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.2.tgz#c0876d9d0480927d7d4920dcd72af3595649554d" integrity sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ== +css-what@^5.0.1, css-what@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.1.0.tgz#3f7b707aadf633baf62c2ceb8579b545bb40f7fe" + integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw== + cssfilter@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" @@ -2400,12 +2705,17 @@ cssom@^0.4.4: resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== +cssom@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" + integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== + cssom@~0.3.6: version "0.3.8" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== -cssstyle@^2.2.0: +cssstyle@^2.2.0, cssstyle@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== @@ -2419,6 +2729,11 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" +custom-error-instance@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/custom-error-instance/-/custom-error-instance-2.1.1.tgz#3cf6391487a6629a6247eb0ca0ce00081b7e361a" + integrity sha1-PPY5FIemYppiR+sMoM4ACBt+Nho= + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -2440,6 +2755,15 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" +data-urls@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.1.tgz#597fc2ae30f8bc4dbcf731fcd1b1954353afc6f8" + integrity sha512-Ds554NeT5Gennfoo9KN50Vh6tpgtvYEwraYjejXnyTpu1C7oXKxdFk75REooENHE8ndTVOJuv+BEs4/J/xcozw== + dependencies: + abab "^2.0.3" + whatwg-mimetype "^3.0.0" + whatwg-url "^10.0.0" + dataloader@tgriesser/dataloader.git#ts-types: version "1.4.1" resolved "https://codeload.github.com/tgriesser/dataloader/tar.gz/4acfc3f96fa9e3ff7428d8db26c2e60afb960e63" @@ -2452,10 +2776,10 @@ dateformat@~1.0.4-1.2.3: get-stdin "^4.0.1" meow "^3.3.0" -dayjs@^1.8.29: - version "1.9.1" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.9.1.tgz#201a755f7db5103ed6de63ba93a984141c754541" - integrity sha512-01NCTBg8cuMJG1OQc6PR7T66+AFYiPwgDvdJmvJBn29NGzIG+DIFxPLNjHzwz3cpFIvG+NcwIjP9hSaPVoOaDg== +dayjs@^1.10.0: + version "1.10.7" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.7.tgz#2cf5f91add28116748440866a0a1d26f3a6ce468" + integrity sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig== debounce@^1.0.0: version "1.2.0" @@ -2469,14 +2793,14 @@ debug@2, debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@3.1.0, debug@=3.1.0: +debug@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" -debug@4, debug@^4.0.0: +debug@4, debug@4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== @@ -2490,6 +2814,13 @@ debug@4.1.1, debug@^4.1.0, debug@^4.1.1: dependencies: ms "^2.1.1" +debug@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -2497,15 +2828,22 @@ debug@^3.1.0: dependencies: ms "^2.1.1" +debug@^4.0.0, debug@^4.3.1: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + dependencies: + ms "2.1.2" + decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decimal.js@^10.2.0: - version "10.2.1" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.1.tgz#238ae7b0f0c793d3e3cea410108b35a2c01426a3" - integrity sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw== +decimal.js@^10.2.0, decimal.js@^10.3.1: + version "10.3.1" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" + integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== decode-uri-component@^0.2.0: version "0.2.0" @@ -2519,6 +2857,13 @@ decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" +decompress-response@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" + integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== + dependencies: + mimic-response "^2.0.0" + decompress-response@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-5.0.0.tgz#7849396e80e3d1eba8cb2f75ef4930f76461cb0f" @@ -2543,7 +2888,7 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepmerge@^4.0.0: +deepmerge@^4.0.0, deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== @@ -2606,7 +2951,7 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -depd@~1.1.2: +depd@^1.1.2, depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= @@ -2688,6 +3033,15 @@ dom-serializer@^1.0.1: domhandler "^3.0.0" entities "^2.0.0" +dom-serializer@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" + integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" + dom-serializer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" @@ -2706,6 +3060,11 @@ domelementtype@^2.0.1: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.2.tgz#f3b6e549201e46f588b59463dd77187131fe6971" integrity sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA== +domelementtype@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" + integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== + domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" @@ -2718,6 +3077,13 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" +domexception@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" + integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== + dependencies: + webidl-conversions "^7.0.0" + domhandler@^2.3.0: version "2.4.2" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" @@ -2732,6 +3098,13 @@ domhandler@^3.0.0, domhandler@^3.2.0: dependencies: domelementtype "^2.0.1" +domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.0.tgz#16c658c626cf966967e306f966b431f77d4a5626" + integrity sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g== + dependencies: + domelementtype "^2.2.0" + domutils@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" @@ -2757,6 +3130,15 @@ domutils@^2.0.0: domelementtype "^2.0.1" domhandler "^3.2.0" +domutils@^2.5.2, domutils@^2.7.0, domutils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + downsize@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/downsize/-/downsize-0.0.8.tgz#21435a610c8c68220f5cc31474979b4d025f038e" @@ -2858,17 +3240,22 @@ emits@^3.0.0: resolved "https://registry.yarnpkg.com/emits/-/emits-3.0.0.tgz#32752bba95e1707b219562384ab9bb8b1fd62f70" integrity sha1-MnUrupXhcHshlWI4Srm7ix/WL3A= +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@~0.1.7: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= +encoding@^0.1.12, encoding@~0.1.7: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== dependencies: - iconv-lite "~0.4.13" + iconv-lite "^0.6.2" end-of-stream@^1.1.0: version "1.4.1" @@ -2889,16 +3276,31 @@ entities@^1.1.1, entities@~1.1.1: resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== -entities@^2.0.0, entities@~2.0.0, entities@~2.0.3: +entities@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== +entities@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== + +entities@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4" + integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q== + env-paths@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== + error-ex@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -2939,6 +3341,11 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-goat@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-3.0.0.tgz#e8b5fb658553fe8a3c4959c316c6ebb8c842b19c" @@ -2954,6 +3361,11 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@1.x.x, escodegen@^1.14.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" @@ -2978,6 +3390,18 @@ escodegen@^1.8.1: optionalDependencies: source-map "~0.6.1" +escodegen@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" + integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + esm@^3.2.25: version "3.2.25" resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" @@ -3003,6 +3427,11 @@ estraverse@^4.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -3031,19 +3460,6 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" - integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" @@ -3270,10 +3686,10 @@ fast-levenshtein@~2.0.4: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fastq@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" - integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q== +fastq@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.10.1.tgz#8b8f2ac8bf3632d67afcd65dac248d5fdc45385e" + integrity sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA== dependencies: reusify "^1.0.4" @@ -3390,12 +3806,10 @@ follow-redirects@0.0.3: dependencies: underscore "" -follow-redirects@1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" +follow-redirects@^1.14.0: + version "1.14.8" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" + integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" @@ -3432,6 +3846,15 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + forwarded@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" @@ -3469,6 +3892,16 @@ fs-extra@9.0.1: jsonfile "^6.0.1" universalify "^1.0.0" +fs-extra@9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" @@ -3519,6 +3952,21 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +gauge@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.1.tgz#82984bc08c90357d60b0a46c03a296beb1affec4" + integrity sha512-zJ4jePUHR8cceduZ53b6temRalyGpkC2Kc2r3ecNphmL+uWNoJ3YcOcUjpbG6WwoE/Ef6/+aEZz63neI2WIa1Q== + dependencies: + ansi-regex "^5.0.1" + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" + has-unicode "^2.0.1" + signal-exit "^3.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.2" + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -3550,6 +3998,11 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" @@ -3591,11 +4044,6 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= -getopts@2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.4.tgz#3137fe8a5fddf304904059a851bdc1c22f0f54fb" - integrity sha512-Rz7DGyomZjrenu9Jx4qmzdlvJgvrEFHXHvjK0FcZtcTC1U5FmES7OdZHUwMuSnEE6QvBvwse1JODKj7TgbSEjQ== - getopts@2.2.5: version "2.2.5" resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" @@ -3646,6 +4094,86 @@ ghost-ignition@4.2.2: prettyjson "1.2.1" uuid "8.3.0" +ghost-ignition@4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/ghost-ignition/-/ghost-ignition-4.2.4.tgz#df0e3817174d4f8a938243ade50ac6f1a9e0c2bb" + integrity sha512-Y03+dM27Lc3yRhQY1PSbL3f9NWZLFZ31tW36h+QkwM4BJ/uo88keh8AZ+pVIHLOYfTU2wLt5Io2+hVJj5tkelw== + dependencies: + bunyan "1.8.14" + bunyan-loggly "1.4.2" + caller "1.0.1" + debug "4.2.0" + find-root "1.1.0" + fs-extra "9.0.1" + gelf-stream "1.1.1" + json-stringify-safe "5.0.1" + lodash "4.17.20" + moment "2.27.0" + nconf "0.10.0" + prettyjson "1.2.1" + uuid "8.3.1" + +ghost-ignition@4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/ghost-ignition/-/ghost-ignition-4.4.2.tgz#80abad2ec6cf881105d33f38ce1826e8620a54d2" + integrity sha512-y/+U8GYBr3XzjzhKiIZh2IUf6oiOUrtW48PTUR+ZwmFYajd0Ej/xpKEKq0JY5Bv1gBBqjCKInSr/LPwcK4zr7Q== + dependencies: + "@sam-lord/elasticsearch-bunyan" "^0.0.5" + bunyan "1.8.15" + bunyan-loggly "1.4.2" + caller "1.0.1" + debug "4.3.1" + find-root "1.1.0" + fs-extra "9.1.0" + gelf-stream "1.1.1" + json-stringify-safe "5.0.1" + lodash "4.17.20" + moment "2.27.0" + nconf "0.10.0" + prettyjson "1.2.1" + uuid "8.3.2" + +ghost-ignition@4.4.4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/ghost-ignition/-/ghost-ignition-4.4.4.tgz#6d16912a733a21582680d859de3a1dff868d4c67" + integrity sha512-tYWDirmtBtTq2etRr2co7n1PPhyoeVIHZhPfG7NDIH5GUDZ8QYlCmxC8nlhy3nnDve5ZunDAg0FlA3Rjqa0kug== + dependencies: + "@tryghost/elasticsearch-bunyan" "^0.1.1" + bunyan "1.8.15" + bunyan-loggly "1.4.2" + caller "1.0.1" + debug "4.3.1" + find-root "1.1.0" + fs-extra "9.1.0" + gelf-stream "1.1.1" + json-stringify-safe "5.0.1" + lodash "4.17.20" + moment "2.27.0" + nconf "0.10.0" + prettyjson "1.2.1" + uuid "8.3.2" + +ghost-ignition@4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/ghost-ignition/-/ghost-ignition-4.5.4.tgz#09e90721b6df04af048f89f696a7af92e0ab4dfe" + integrity sha512-Ab9r4zFNqqWmcYoF3sFAY7IJCi5LUTz1KrwfpOEL4BVZEBF2HfzZ8Px2JVxDpmSRMmyHKmN1h/xjXfj+IT2hxA== + dependencies: + "@tryghost/bunyan-rotating-filestream" "0.0.7" + "@tryghost/elasticsearch-bunyan" "0.1.1" + bunyan "1.8.15" + bunyan-loggly "1.4.2" + caller "1.0.1" + debug "4.3.1" + find-root "1.1.0" + fs-extra "9.1.0" + gelf-stream "1.1.1" + json-stringify-safe "5.0.1" + lodash "4.17.21" + moment "2.27.0" + nconf "0.10.0" + prettyjson "1.2.1" + uuid "8.3.2" + ghost-ignition@^2.9.6: version "2.9.6" resolved "https://registry.yarnpkg.com/ghost-ignition/-/ghost-ignition-2.9.6.tgz#cc8358f0a356bae490e5abeca3c3bda8383352fe" @@ -3672,47 +4200,48 @@ ghost-storage-base@0.0.4: moment "2.24.0" ghost@^3.35.3: - version "3.35.3" - resolved "https://registry.yarnpkg.com/ghost/-/ghost-3.35.3.tgz#5b84031e7d977ec28fb3c5b6a7d4a058dc1d40bc" - integrity sha512-tAOFEgQ2WKmlVxtsL9qx4HVokCQlogxKMBt5RmW3eMnTVuMeGs684hf4kp3XM0bzg8gSBJBO+QF40NmYg1ruEA== - dependencies: - "@nexes/nql" "0.4.0" - "@sentry/node" "5.24.2" - "@tryghost/adapter-manager" "0.1.11" - "@tryghost/admin-api-schema" "1.0.1" - "@tryghost/bootstrap-socket" "0.2.2" - "@tryghost/constants" "0.1.1" - "@tryghost/errors" "0.2.4" - "@tryghost/helpers" "1.1.31" + version "3.42.9" + resolved "https://registry.yarnpkg.com/ghost/-/ghost-3.42.9.tgz#9bc6618d02954995819bc3b14707a56d758eeba7" + integrity sha512-44MFZXswojNkexw1eO4/4V/chkE3yZufWwIXqsOi09FfrrInNmtQCyOFbgCnw/Ecs87hb2xVJk4BxdvennNuaw== + dependencies: + "@nexes/nql" "0.5.0" + "@sentry/node" "5.30.0" + "@tryghost/adapter-manager" "0.2.7" + "@tryghost/admin-api-schema" "1.4.3" + "@tryghost/bootstrap-socket" "0.2.5" + "@tryghost/constants" "0.1.4" + "@tryghost/errors" "0.2.7" + "@tryghost/helpers" "1.1.37" "@tryghost/image-transform" "1.0.3" - "@tryghost/job-manager" "0.1.1" - "@tryghost/kg-card-factory" "2.1.2" + "@tryghost/job-manager" "0.8.1" + "@tryghost/kg-card-factory" "2.1.5" "@tryghost/kg-default-atoms" "2.0.2" - "@tryghost/kg-default-cards" "2.6.1" - "@tryghost/kg-markdown-html-renderer" "2.0.2" + "@tryghost/kg-default-cards" "3.1.0" + "@tryghost/kg-markdown-html-renderer" "3.0.0" "@tryghost/kg-mobiledoc-html-renderer" "3.0.1" - "@tryghost/magic-link" "0.6.0" - "@tryghost/members-api" "0.32.0" - "@tryghost/members-csv" "0.3.1" - "@tryghost/members-ssr" "0.8.5" - "@tryghost/mw-session-from-token" "0.1.8" - "@tryghost/promise" "0.1.1" - "@tryghost/security" "0.2.0" - "@tryghost/session-service" "0.1.9" - "@tryghost/social-urls" "0.1.13" - "@tryghost/string" "0.1.12" - "@tryghost/url-utils" "0.6.21" - "@tryghost/vhost-middleware" "1.0.9" - "@tryghost/zip" "1.1.4" - ajv "6.12.5" + "@tryghost/magic-link" "0.6.4" + "@tryghost/members-api" "0.37.13" + "@tryghost/members-csv" "0.4.2" + "@tryghost/members-ssr" "0.8.8" + "@tryghost/mw-session-from-token" "0.1.14" + "@tryghost/promise" "0.1.4" + "@tryghost/security" "0.2.4" + "@tryghost/session-service" "0.1.15" + "@tryghost/social-urls" "0.1.18" + "@tryghost/string" "0.1.16" + "@tryghost/url-utils" "0.6.25" + "@tryghost/vhost-middleware" "1.0.11" + "@tryghost/zip" "1.1.8" + ajv "6.12.6" amperize "0.6.1" - analytics-node "3.4.0-beta.2" + analytics-node "3.5.0" bluebird "3.7.2" body-parser "1.19.0" bookshelf "0.15.2" - bookshelf-relations "1.3.2" - brute-knex "4.0.0" + bookshelf-relations "1.4.1" + brute-knex "4.0.1" bson-objectid "1.3.1" + bthreads "0.5.1" cheerio "0.22.0" compression "1.7.4" connect-slashes "1.4.0" @@ -3725,23 +4254,23 @@ ghost@^3.35.3: express-jwt "6.0.0" express-query-boolean "2.0.0" express-session "1.17.1" - fs-extra "9.0.1" - ghost-ignition "4.2.2" + fs-extra "9.1.0" + ghost-ignition "4.5.4" ghost-storage-base "0.0.4" glob "7.1.6" got "9.6.0" - gscan "3.5.7" + gscan "3.6.1" html-to-text "5.1.1" image-size "0.8.3" intl "1.2.5" intl-messageformat "5.4.3" - js-yaml "3.14.0" - jsonpath "1.0.2" + js-yaml "3.14.1" + jsonpath "1.1.0" jsonwebtoken "8.5.1" juice "7.0.0" - keypair "1.0.1" - knex "0.21.6" - knex-migrator "3.4.7" + keypair "1.0.2" + knex "0.21.12" + knex-migrator "3.5.0" lodash "4.17.20" mailgun-js "0.22.0" metascraper "5.11.9" @@ -3757,7 +4286,7 @@ ghost@^3.35.3: moment-timezone "0.5.23" multer "1.4.2" mysql "2.18.1" - nconf "0.10.0" + nconf "0.11.1" netjet "1.4.0" node-jose "2.0.0" nodemailer "0.7.1" @@ -3765,15 +4294,15 @@ ghost@^3.35.3: path-match "1.2.4" probe-image-size "5.0.0" rss "1.2.2" - sanitize-html "1.27.4" - semver "7.3.2" + sanitize-html "2.3.2" + semver "7.3.4" stoppable "1.1.0" tough-cookie "4.0.0" - uuid "8.3.0" + uuid "8.3.2" validator "6.3.0" xml "1.0.1" optionalDependencies: - "@tryghost/html-to-mobiledoc" "0.7.4" + "@tryghost/html-to-mobiledoc" "0.7.9" sqlite3 "4.2.0" github-from-package@0.0.0: @@ -3879,11 +4408,16 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== -graceful-fs@^4.2.0, graceful-fs@^4.2.3: +graceful-fs@^4.2.0: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== +graceful-fs@^4.2.6: + version "4.2.9" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" + integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== + graphql-extensions@^0.12.5: version "0.12.5" resolved "https://registry.yarnpkg.com/graphql-extensions/-/graphql-extensions-0.12.5.tgz#b0e6b218f26f5aafe9dd73642410fec6beac0575" @@ -3943,34 +4477,39 @@ graphql@^15.3.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" integrity sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w== +graphql@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05" + integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A== + growly@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -gscan@3.5.7: - version "3.5.7" - resolved "https://registry.yarnpkg.com/gscan/-/gscan-3.5.7.tgz#d90b303c0c6e6a7a85230898a3ce2a3b3151955c" - integrity sha512-KG0h2rOfDI1z18nbK101bfd1AREKYG3L5EO4YjYNlr8rqzhT+0QyTJErR9ZtX+pnVvmRKqHGdrbtIlgK3y1MhQ== +gscan@3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/gscan/-/gscan-3.6.1.tgz#fb8a2caae25203fd2524a0c1371f7c62ebebb052" + integrity sha512-quWlziqqfkRptngIf8oT2SU95oNwzwAhaXtpkEEa17qIV9OOta5SKXM7JmHGN6fN+aiI2xcPIfpyt70ydu/OLA== dependencies: - "@sentry/node" "5.22.3" - "@tryghost/pretty-cli" "1.2.9" - "@tryghost/zip" "1.1.3" + "@sentry/node" "5.29.0" + "@tryghost/pretty-cli" "1.2.11" + "@tryghost/zip" "1.1.6" bluebird "3.7.2" chalk "4.1.0" common-tags "1.8.0" express "4.17.1" express-hbs "2.3.4" fs-extra "9.0.1" - ghost-ignition "4.2.2" + ghost-ignition "4.2.4" glob "7.1.6" lodash "4.17.20" multer "1.4.2" pluralize "8.0.0" require-dir "1.2.0" - semver "7.3.2" + semver "7.3.4" upath "1.2.0" - uuid "8.3.0" + uuid "8.3.2" validator "13.0.0" handlebars@4.7.6, handlebars@^4.7.6: @@ -4033,7 +4572,7 @@ has-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= -has-unicode@^2.0.0: +has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= @@ -4110,6 +4649,11 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== +hpagent@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/hpagent/-/hpagent-0.1.2.tgz#cab39c66d4df2d4377dbd212295d878deb9bdaa9" + integrity sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ== + html-encoding-sniffer@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" @@ -4117,6 +4661,13 @@ html-encoding-sniffer@^2.0.1: dependencies: whatwg-encoding "^1.0.5" +html-encoding-sniffer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" + integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== + dependencies: + whatwg-encoding "^2.0.0" + html-to-text@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/html-to-text/-/html-to-text-5.1.1.tgz#2d89db7bf34bc7bcb7d546b1b228991a16926e87" @@ -4127,7 +4678,7 @@ html-to-text@5.1.1: lodash "^4.17.11" minimist "^1.2.0" -htmlparser2@^3.10.1: +htmlparser2@^3.10.1, htmlparser2@^3.8.3: version "3.10.1" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== @@ -4139,7 +4690,7 @@ htmlparser2@^3.10.1: inherits "^2.0.1" readable-stream "^3.1.1" -htmlparser2@^3.8.3, htmlparser2@^3.9.1: +htmlparser2@^3.9.1: version "3.10.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.0.tgz#5f5e422dcf6119c0d983ed36260ce9ded0bee464" integrity sha512-J1nEUGv+MkXS0weHNWVKJJ+UrLfePxRWpN3C9bEi9fLxL2+ggW94DQvgYVXsaT30PGwYRIZKNZXuyMhp3Di4bQ== @@ -4151,7 +4702,7 @@ htmlparser2@^3.8.3, htmlparser2@^3.9.1: inherits "^2.0.1" readable-stream "^3.0.6" -htmlparser2@^4.0.0, htmlparser2@^4.1.0: +htmlparser2@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-4.1.0.tgz#9a4ef161f2e4625ebf7dfbe6c0a2f52d18a59e78" integrity sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q== @@ -4161,7 +4712,17 @@ htmlparser2@^4.0.0, htmlparser2@^4.1.0: domutils "^2.0.0" entities "^2.0.0" -http-cache-semantics@^4.0.0: +htmlparser2@^6.0.0, htmlparser2@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + +http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== @@ -4225,6 +4786,24 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -4250,6 +4829,20 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +human-interval@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/human-interval/-/human-interval-2.0.1.tgz#655baf606c7067bb26042dcae14ec777b099af15" + integrity sha512-r4Aotzf+OtKIGQCB3odUowy4GfUDTy3aTWTfLd7ZF2gBCy3XW3v/dJLRefZnOFFnjqs5B1TypvS8WarpBkYUNQ== + dependencies: + numbered "^1.1.0" + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= + dependencies: + ms "^2.0.0" + iconv-lite@0.4.23: version "0.4.23" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" @@ -4257,13 +4850,20 @@ iconv-lite@0.4.23: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@0.6.3, iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + ieee754@^1.1.4: version "1.1.12" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" @@ -4288,6 +4888,11 @@ image-size@0.8.3, image-size@^0.8.1: dependencies: queue "6.0.1" +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + indent-string@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" @@ -4295,7 +4900,22 @@ indent-string@^2.1.0: dependencies: repeating "^2.0.0" -inflection@^1.5.1, inflection@~1.12.0: +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +infer-owner@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + +inflection@^1.5.1: + version "1.13.2" + resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.13.2.tgz#15e8c797c6c3dadf31aa658f8df8a4ea024798b0" + integrity sha512-cmZlljCRTBFouT8UzMzrGcVEvkv6D/wBdcdKG7J1QH5cXjtU75Dm+P27v9EKu/Y43UYyCJd1WC4zLebRrC8NBw== + +inflection@~1.12.0: version "1.12.0" resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416" integrity sha1-ogCTVlbW9fa8TcdQLhrstwMihBY= @@ -4328,22 +4948,27 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.0, ini@^1.3.4, ini@~1.3.0: +ini@^1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +ini@^1.3.4, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -install-artifact-from-github@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/install-artifact-from-github/-/install-artifact-from-github-1.0.2.tgz#e1e478dd29880b9112ecd684a84029603e234a9d" - integrity sha512-yuMFBSVIP3vD0SDBGUqeIpgOAIlFx8eQFknQObpkYEM5gsl9hy6R9Ms3aV+Vw9MMyYsoPMeex0XDnfgY7uzc+Q== +install-artifact-from-github@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/install-artifact-from-github/-/install-artifact-from-github-1.3.0.tgz#cab6ff821976b8a35b0c079da19a727c90381a40" + integrity sha512-iT8v1GwOAX0pPXifF/5ihnMhHOCo3OeK7z3TQa4CtSNCIg8k0UxqBEk9jRwz8OP68hHXvJ2gxRa89KYHtBkqGA== interpret@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== -interpret@^2.2.0: +interpret@^2.0.0, interpret@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== @@ -4376,16 +5001,16 @@ invert-kv@^1.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= +ip-regex@4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" + integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== + ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= -ip-regex@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.2.0.tgz#a03f5eb661d9a154e3973a03de8b23dd0ad6892e" - integrity sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A== - ip@1.1.5, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" @@ -4478,6 +5103,13 @@ is-callable@^1.1.4: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== +is-core-module@^2.0.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" + integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -4532,6 +5164,11 @@ is-extendable@^1.0.1: dependencies: is-plain-object "^2.0.4" +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -4556,6 +5193,18 @@ is-fullwidth-code-point@^2.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= + dependencies: + is-extglob "^1.0.0" + is-glob@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" @@ -4568,6 +5217,18 @@ is-hexadecimal@^1.0.0: resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== +is-invalid-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-invalid-path/-/is-invalid-path-0.1.0.tgz#307a855b3cf1a938b44ea70d2c61106053714f34" + integrity sha1-MHqFWzzxqTi0TqcNLGEQYFNxTzQ= + dependencies: + is-glob "^2.0.0" + +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU= + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -4587,10 +5248,15 @@ is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-potential-custom-element-name@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" - integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + +is-potential-custom-element-name@^1.0.0, is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== is-regex@^1.0.4: version "1.0.4" @@ -4613,16 +5279,28 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" -is-retry-allowed@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= +is-retry-allowed@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz#88f34cbd236e043e71b6932d09b0c65fb7b4d71d" + integrity sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg== is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= +is-string-and-not-blank@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/is-string-and-not-blank/-/is-string-and-not-blank-0.0.2.tgz#cd19eded2ca4a514f79ca528915f1fb28e5dd38a" + integrity sha512-FyPGAbNVyZpTeDCTXnzuwbu9/WpNXbCfbHXLpCRpN4GANhS00eEIP5Ef+k5HYSNIzIhdN9zRDoBj6unscECvtQ== + dependencies: + is-string-blank "^1.0.1" + +is-string-blank@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-string-blank/-/is-string-blank-1.0.1.tgz#866dca066d41d2894ebdfd2d8fe93e586e583a03" + integrity sha512-9H+ZBCVs3L9OYqv8nuUAzpcT9OTgMD1yAWrG7ihlnibdkbtB850heAmYWxHuXc4CHy4lKeK69tN+ny1K7gBIrw== + is-symbol@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" @@ -4655,6 +5333,13 @@ is-utf8@^0.2.0: resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= +is-valid-path@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-valid-path/-/is-valid-path-0.1.1.tgz#110f9ff74c37f663e1ec7915eb451f2db93ac9df" + integrity sha1-EQ+f90w39mPh7HkV60UfLbk6yd8= + dependencies: + is-invalid-path "^0.1.0" + is-whitespace-character@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz#0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7" @@ -4685,10 +5370,10 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -iso-639-3@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/iso-639-3/-/iso-639-3-2.1.0.tgz#f3733c7f2754c1bde34a8960b2a17146a4b41053" - integrity sha512-NYcq+YfrCFVGw/xWhRB9mhCSWxlOxYv3eK3WzWzc86P8huEZ7UDQq8Bu0zKqpZFOdq221Gy8VWWLr1aaYc+FJA== +iso-639-3@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/iso-639-3/-/iso-639-3-2.2.0.tgz#eb01d7734d61396efec934979e8b0806550837f1" + integrity sha512-v9w/U4XDSfXCrXxf4E6ertGC/lTRX8MLLv7XC1j6N5oL3ympe38jp77zgeyMsn3MbufuAAoGeVzDJbOXnPTMhQ== isobject@^2.0.0, isobject@^2.1.0: version "2.1.0" @@ -4738,10 +5423,10 @@ js-beautify@1.11.0: mkdirp "~1.0.3" nopt "^4.0.3" -js-yaml@3.14.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== +js-yaml@3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -4783,6 +5468,39 @@ jsdom@16.4.0: ws "^7.2.3" xml-name-validator "^3.0.0" +jsdom@~19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-19.0.0.tgz#93e67c149fe26816d38a849ea30ac93677e16b6a" + integrity sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A== + dependencies: + abab "^2.0.5" + acorn "^8.5.0" + acorn-globals "^6.0.0" + cssom "^0.5.0" + cssstyle "^2.3.0" + data-urls "^3.0.1" + decimal.js "^10.3.1" + domexception "^4.0.0" + escodegen "^2.0.0" + form-data "^4.0.0" + html-encoding-sniffer "^3.0.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.0" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.0" + parse5 "6.0.1" + saxes "^5.0.1" + symbol-tree "^3.2.4" + tough-cookie "^4.0.0" + w3c-hr-time "^1.0.2" + w3c-xmlserializer "^3.0.0" + webidl-conversions "^7.0.0" + whatwg-encoding "^2.0.0" + whatwg-mimetype "^3.0.0" + whatwg-url "^10.0.0" + ws "^8.2.3" + xml-name-validator "^4.0.0" + json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" @@ -4831,10 +5549,10 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -jsonpath@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/jsonpath/-/jsonpath-1.0.2.tgz#e6aae681d03e9a77b4651d5d96eac5fc63b1fd13" - integrity sha512-rmzlgFZiQPc6q4HDyK8s9Qb4oxBnI5sF61y/Co5PV0lc3q2bIuRsNdueVbhoSHdKM4fxeimphOAtfz47yjCfeA== +jsonpath@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsonpath/-/jsonpath-1.1.0.tgz#ff3e9e4746eae77c11bc09d542e7219333c28055" + integrity sha512-CZHwa1sZOf42qkIyK7evwToFXeTB4iplbl6Z9CVwU0wmBQPffL6gtYJXCoeciJoZENMuzaidPjhp2iOLRei4wQ== dependencies: esprima "1.2.2" static-eval "2.0.2" @@ -4933,10 +5651,10 @@ keygrip@~1.1.0: dependencies: tsscmp "1.0.6" -keypair@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/keypair/-/keypair-1.0.1.tgz#7603719270afb6564ed38a22087a06fc9aa4ea1b" - integrity sha1-dgNxknCvtlZO04oiCHoG/Jqk6hs= +keypair@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/keypair/-/keypair-1.0.2.tgz#9aab2dea3355d22364e0156ef6a4282487c8fdee" + integrity sha512-7zRr8fKOWp/N8xfZyZV6WG1CUvKNiNahSDI4vjJnPJD60lHtIg62dpv60yCgcM2PP8QKv4S2UkZl+8MsYmQRpw== keyv@^3.0.0: version "3.1.0" @@ -4976,44 +5694,46 @@ kind-of@^6.0.0, kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== -knex-migrator@3.4.7: - version "3.4.7" - resolved "https://registry.yarnpkg.com/knex-migrator/-/knex-migrator-3.4.7.tgz#ec98d5b78659e619314c2f1e3ae7515768e2629a" - integrity sha512-ihcodeD/OZ4MwCkKwEWMY4mNQyoxhqCydo3LNL54+6TVdFTR3fg2aHNWqlv7Arbdi3Jj96UjYk+jVHCMhMSrjQ== +klona@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.5.tgz#d166574d90076395d9963aa7a928fabb8d76afbc" + integrity sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ== + +knex-migrator@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/knex-migrator/-/knex-migrator-3.5.0.tgz#8fbf7757d550f24ee8fb95750d56893afd6cc1cd" + integrity sha512-AwyUg0dm+diLZi2gbSThMQDVP+Bwf2foBisBc3u52fsPzCtLdsQp4W9vJ+7DSmNctvAh4T8hxq2Mkj75ayN94w== dependencies: bluebird "3.7.2" commander "5.1.0" compare-ver "2.0.2" - debug "4.1.1" + debug "4.2.0" ghost-ignition "4.2.2" - knex "0.21.3" - lodash "4.17.19" + knex "0.21.6" + lodash "4.17.20" moment "2.24.0" nconf "0.10.0" - resolve "1.17.0" + resolve "1.18.1" optionalDependencies: mysql "2.18.1" sqlite3 "4.2.0" -knex@0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/knex/-/knex-0.21.3.tgz#e9de972d290c96419ecaa792a0cd308aca9e4564" - integrity sha512-XENKsDdeKmn5yBENTRoik5AOlrxhjTUbDuML6iX7TtOtFHQ5rTfuUce7jk9UVKKmxgbzyA0wsSKWs6xfRgAwfA== +knex@0.21.12: + version "0.21.12" + resolved "https://registry.yarnpkg.com/knex/-/knex-0.21.12.tgz#961bdb484311eb853030f6f49bd5bf9eca89dc51" + integrity sha512-AEyyiTM9p/x/Pb38TPZkvphKPmn8UWxP7MdIphzjAOielOfFFeU6pjP6y3M7UJ7rxrQsCrAYHwdonLQ3l1JCDw== dependencies: colorette "1.2.1" commander "^5.1.0" debug "4.1.1" esm "^3.2.25" getopts "2.2.5" - inherits "~2.0.4" interpret "^2.2.0" liftoff "3.1.0" - lodash "^4.17.19" - mkdirp "^1.0.4" + lodash "^4.17.20" pg-connection-string "2.3.0" - tarn "^3.0.0" + tarn "^3.0.1" tildify "2.0.0" - uuid "^7.0.3" v8flags "^3.2.0" knex@0.21.6: @@ -5037,48 +5757,46 @@ knex@0.21.6: uuid "^7.0.3" v8flags "^3.2.0" -knex@^0.17: - version "0.17.6" - resolved "https://registry.yarnpkg.com/knex/-/knex-0.17.6.tgz#80220cf159cd52768d5b29118c70b18aaf5138fe" - integrity sha512-4SKp8jaBxqlEoaveenmpfnHEv5Kzo6/vhIj8UhW1srGw/FKqARTr+7Fv8C1C1qeVHDjv0coQWuUzN5eermHUsw== +knex@^0.19.5: + version "0.19.5" + resolved "https://registry.yarnpkg.com/knex/-/knex-0.19.5.tgz#3597ebecf88a5942f18c3e6d91af53bda59eeb5d" + integrity sha512-Hy258avCVircQq+oj3WBqPzl8jDIte438Qlq+8pt1i/TyLYVA4zPh2uKc7Bx0t+qOpa6D42HJ2jjtl2vagzilw== dependencies: - "@babel/polyfill" "^7.4.4" - "@types/bluebird" "^3.5.27" - bluebird "^3.5.5" - colorette "1.0.8" - commander "^2.20.0" + bluebird "^3.7.0" + colorette "1.1.0" + commander "^3.0.2" debug "4.1.1" - getopts "2.2.4" - inherits "~2.0.3" + getopts "2.2.5" + inherits "~2.0.4" interpret "^1.2.0" liftoff "3.1.0" - lodash "^4.17.11" + lodash "^4.17.15" mkdirp "^0.5.1" - pg-connection-string "2.0.0" - tarn "^1.1.5" - tildify "1.2.0" - uuid "^3.3.2" + pg-connection-string "2.1.0" + tarn "^2.0.0" + tildify "2.0.0" + uuid "^3.3.3" v8flags "^3.1.3" -knex@^0.19.5: - version "0.19.5" - resolved "https://registry.yarnpkg.com/knex/-/knex-0.19.5.tgz#3597ebecf88a5942f18c3e6d91af53bda59eeb5d" - integrity sha512-Hy258avCVircQq+oj3WBqPzl8jDIte438Qlq+8pt1i/TyLYVA4zPh2uKc7Bx0t+qOpa6D42HJ2jjtl2vagzilw== +knex@^0.20: + version "0.20.15" + resolved "https://registry.yarnpkg.com/knex/-/knex-0.20.15.tgz#b7e9e1efd9cf35d214440d9439ed21153574679d" + integrity sha512-WHmvgfQfxA5v8pyb9zbskxCS1L1WmYgUbwBhHojlkmdouUOazvroUWlCr6KIKMQ8anXZh1NXOOtIUMnxENZG5Q== dependencies: - bluebird "^3.7.0" colorette "1.1.0" - commander "^3.0.2" + commander "^4.1.1" debug "4.1.1" + esm "^3.2.25" getopts "2.2.5" inherits "~2.0.4" - interpret "^1.2.0" + interpret "^2.0.0" liftoff "3.1.0" lodash "^4.17.15" mkdirp "^0.5.1" pg-connection-string "2.1.0" tarn "^2.0.0" tildify "2.0.0" - uuid "^3.3.3" + uuid "^7.0.1" v8flags "^3.1.3" lazystream@^1.0.0: @@ -5168,6 +5886,11 @@ lodash-es@^4.17.11: resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== +lodash-es@^4.17.15: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" + integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== + lodash._arraycopy@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" @@ -5208,16 +5931,53 @@ lodash._basefor@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" integrity sha1-dVC06SGO8J+tJDQ7YSAhx5tMIMI= +lodash._baseiteratee@~4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash._baseiteratee/-/lodash._baseiteratee-4.7.0.tgz#34a9b5543572727c3db2e78edae3c0e9e66bd102" + integrity sha1-NKm1VDVycnw9sueO2uPA6eZr0QI= + dependencies: + lodash._stringtopath "~4.8.0" + +lodash._basetostring@~4.12.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz#9327c9dc5158866b7fa4b9d42f4638e5766dd9df" + integrity sha1-kyfJ3FFYhmt/pLnUL0Y45XZt2d8= + +lodash._baseuniq@~4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" + integrity sha1-DrtE5FaBSveQXGIS+iybLVG4Qeg= + dependencies: + lodash._createset "~4.0.0" + lodash._root "~3.0.0" + lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4= +lodash._createset@~4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" + integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= + lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= +lodash._root@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + integrity sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI= + +lodash._stringtopath@~4.8.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/lodash._stringtopath/-/lodash._stringtopath-4.8.0.tgz#941bcf0e64266e5fc1d66fed0a6959544c576824" + integrity sha1-lBvPDmQmbl/B1m/tCmlZVExXaCQ= + dependencies: + lodash._basetostring "~4.12.0" + lodash.assignin@^4.0.9: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" @@ -5370,7 +6130,15 @@ lodash.union@^4.6.0: resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" integrity sha1-SLtQiECfFvGCFmZkHETdGqrjzYg= -lodash@4.17.15, lodash@^4.16.4, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.4: +lodash.uniqby@4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.5.0.tgz#a3a17bbf62eeb6240f491846e97c1c4e2a5e1e21" + integrity sha1-o6F7v2LutiQPSRhG6XwcTipeHiE= + dependencies: + lodash._baseiteratee "~4.7.0" + lodash._baseuniq "~4.6.0" + +lodash@4.17.15, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.4: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -5380,11 +6148,16 @@ lodash@4.17.19: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== -lodash@4.17.20, lodash@^4.15.0, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.20, lodash@~4.17.15, lodash@~4.17.20: +lodash@4.17.20, lodash@^4.15.0, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.20: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== +lodash@4.17.21, lodash@^4.16.4, lodash@^4.17.10, lodash@^4.17.21, lodash@^4.7.0, lodash@~4.17.15, lodash@~4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + logd-console-output@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/logd-console-output/-/logd-console-output-1.3.0.tgz#a49eb7a2ca25ce3b3e726b6e49d6639304241bae" @@ -5400,7 +6173,7 @@ loglevel@^1.6.7: resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.0.tgz#728166855a740d59d38db01cf46f042caa041bb0" integrity sha512-i2sY04nal5jDcagM3FMfG++T69GEEM8CYuOfeOIvmXzOIcwE9a/CJPR0MFM97pYMj/u10lzz7/zd7+qwhrBTqQ== -long-timeout@~0.1.1: +long-timeout@^0.1.1, long-timeout@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/long-timeout/-/long-timeout-0.1.1.tgz#9721d788b47e0bcb5a24c2e2bee1a0da55dab514" integrity sha1-lyHXiLR+C8taJMLivuGg2lXatRQ= @@ -5448,6 +6221,13 @@ lru-cache@^5.0.0, lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + lru_map@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" @@ -5484,6 +6264,28 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== +make-fetch-happen@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" + integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== + dependencies: + agentkeepalive "^4.1.3" + cacache "^15.2.0" + http-cache-semantics "^4.1.0" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^6.0.0" + minipass "^3.1.3" + minipass-collect "^1.0.2" + minipass-fetch "^1.3.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.2" + promise-retry "^2.0.1" + socks-proxy-agent "^6.0.0" + ssri "^8.0.0" + make-iterator@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" @@ -5514,9 +6316,9 @@ markdown-escapes@^1.0.0: integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== markdown-it-footnote@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/markdown-it-footnote/-/markdown-it-footnote-3.0.2.tgz#1575ee7a093648d4e096aa33386b058d92ac8bc1" - integrity sha512-JVW6fCmZWjvMdDQSbOT3nnOQtd9iAXmw7hTSh26+v42BnvXeVyGMDBm5b/EZocMed2MbCAHiTX632vY0FyGB8A== + version "3.0.3" + resolved "https://registry.yarnpkg.com/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz#e0e4c0d67390a4c5f0c75f73be605c7c190ca4d8" + integrity sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w== markdown-it-lazy-headers@^0.1.3: version "0.1.3" @@ -5528,13 +6330,13 @@ markdown-it-mark@^3.0.0: resolved "https://registry.yarnpkg.com/markdown-it-mark/-/markdown-it-mark-3.0.0.tgz#27c3e39ef3cc310b2dde5375082c9fa912983cda" integrity sha512-HqMWeKfMMOu4zBO0emmxsoMWmbf2cPKZY1wP6FsTbKmicFfp5y4L3KXAsNeO1rM6NTJVOrNlLKMPjWzriBGspw== -markdown-it@^11.0.0: - version "11.0.1" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-11.0.1.tgz#b54f15ec2a2193efa66dda1eb4173baea08993d6" - integrity sha512-aU1TzmBKcWNNYvH9pjq6u92BML+Hz3h5S/QpfTFwiQF852pLT+9qHsrhM9JYipkOXZxGn+sGH8oyJE9FD9WezQ== +markdown-it@^12.0.0: + version "12.3.2" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.3.2.tgz#bf92ac92283fe983fe4de8ff8abfb5ad72cd0c90" + integrity sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg== dependencies: - argparse "^1.0.7" - entities "~2.0.0" + argparse "^2.0.1" + entities "~2.1.0" linkify-it "^3.0.1" mdurl "^1.0.1" uc.micro "^1.0.5" @@ -5594,10 +6396,10 @@ mem@^1.1.0: dependencies: mimic-fn "^1.0.0" -memoize-one@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" - integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== +memoize-one@~6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" + integrity sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw== mensch@^0.3.4: version "0.3.4" @@ -5720,11 +6522,21 @@ micromatch@^3.0.4: snapdragon "^0.8.1" to-regex "^3.0.2" +microsoft-capitalize@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/microsoft-capitalize/-/microsoft-capitalize-1.0.5.tgz#bcaf915039f14224c8cfd74c31cea42fecacbb31" + integrity sha512-iqDMU9J643BHg8Zp7EMZNLTp6Pgs2f1S2SMnCW2VlUqMs17xCZ5vwVjalBJEGVcUfG+/1ePqeEGcMW3VfzHK5A== + mime-db@1.44.0: version "1.44.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== +mime-db@1.51.0: + version "1.51.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" + integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== + "mime-db@>= 1.43.0 < 2": version "1.45.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" @@ -5754,13 +6566,20 @@ mime-types@^2.1.12, mime-types@~2.1.18, mime-types@~2.1.19: dependencies: mime-db "~1.37.0" -mime-types@~2.1.24, mime-types@~2.1.27: +mime-types@~2.1.24: version "2.1.27" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== dependencies: mime-db "1.44.0" +mime-types@~2.1.34: + version "2.1.34" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" + integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== + dependencies: + mime-db "1.51.0" + mime@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" @@ -5841,6 +6660,45 @@ minimist@^1.2.3, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== + dependencies: + minipass "^3.0.0" + +minipass-fetch@^1.3.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.4.1.tgz#d75e0091daac1b0ffd7e9d41629faff7d0c1f1b6" + integrity sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw== + dependencies: + minipass "^3.1.0" + minipass-sized "^1.0.3" + minizlib "^2.0.0" + optionalDependencies: + encoding "^0.1.12" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== + dependencies: + minipass "^3.0.0" + +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + minipass@^2.2.1, minipass@^2.3.4: version "2.3.5" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" @@ -5856,6 +6714,13 @@ minipass@^3.0.0: dependencies: yallist "^4.0.0" +minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: + version "3.1.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" + integrity sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ== + dependencies: + yallist "^4.0.0" + minizlib@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" @@ -5863,7 +6728,7 @@ minizlib@^1.1.1: dependencies: minipass "^2.2.1" -minizlib@^2.1.1: +minizlib@^2.0.0, minizlib@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== @@ -5879,7 +6744,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp-classic@^0.5.2: +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== @@ -5920,7 +6785,7 @@ moment-timezone@0.5.31: dependencies: moment ">= 2.9.0" -moment@2.24.0, "moment@>= 2.9.0", moment@^2.10.6, moment@^2.15.2, moment@^2.18.1, moment@^2.19.3: +moment@2.24.0, "moment@>= 2.9.0", moment@^2.18.1, moment@^2.19.3: version "2.24.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== @@ -5930,6 +6795,11 @@ moment@2.27.0: resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d" integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ== +moment@^2.10.6, moment@^2.15.2: + version "2.29.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" + integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -5945,6 +6815,11 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.2, ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + multer@1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/multer/-/multer-1.4.2.tgz#2f1f4d12dbaeeba74cb37e623f234bf4d3d2057a" @@ -5997,15 +6872,25 @@ mz@^2.6.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nan@^2.10.0, nan@^2.12.1: +nan@^2.10.0: version "2.12.1" resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552" integrity sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw== -nan@^2.14.1: - version "2.14.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" - integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== +nan@^2.12.1, nan@^2.15.0: + version "2.15.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" + integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== + +nanoclone@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/nanoclone/-/nanoclone-0.2.1.tgz#dd4090f8f1a110d26bb32c49ed2f5b9235209ed4" + integrity sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA== + +nanoid@^3.2.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" + integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== nanomatch@^1.2.9: version "1.2.13" @@ -6039,6 +6924,16 @@ nconf@0.10.0, nconf@^0.10.0: secure-keys "^1.0.0" yargs "^3.19.0" +nconf@0.11.1: + version "0.11.1" + resolved "https://registry.yarnpkg.com/nconf/-/nconf-0.11.1.tgz#9eba51b342f16b424d483c97923abec993f84cbf" + integrity sha512-2XY+7x3GwkkTnmkEVxsKykg0GUqCAtBZUA87FwbcUSaYBfaGCeVSf+82zap16j93B21J2AhpxrsF57jio36t0w== + dependencies: + async "^1.4.0" + ini "^1.3.0" + secure-keys "^1.0.0" + yargs "^16.1.1" + ncp@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" @@ -6063,6 +6958,11 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +negotiator@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + neo-async@^2.6.0: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -6099,9 +6999,9 @@ nexus@^1.0.0: tslib "^2.0.3" node-abi@^2.7.0: - version "2.19.1" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.19.1.tgz#6aa32561d0a5e2fdb6810d8c25641b657a8cea85" - integrity sha512-HbtmIuByq44yhAzK7b9j/FelKlHYISKQn0mtvcBrU5QBkhoCMp5bu8Hv5AI34DcKfOAcJBcOEMwLlwO62FFu9A== + version "2.30.1" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf" + integrity sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w== dependencies: semver "^5.4.1" @@ -6137,20 +7037,20 @@ node-forge@^0.8.5: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.5.tgz#57906f07614dc72762c84cef442f427c0e1b86ee" integrity sha512-vFMQIWt+J/7FLNyKouZ9TazT74PRV3wgv9UT4cRjC8BffxFbKXkgIWR42URCPSnHm/QDz6BOlb2Q0U4+VQT67Q== -node-gyp@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-7.1.0.tgz#cb8aed7ab772e73ad592ae0c71b0e3741099fe39" - integrity sha512-rjlHQlnl1dqiDZxZYiKqQdrjias7V+81OVR5PTzZioCBtWkNdrKy06M05HLKxy/pcKikKRCabeDRoZaEc6nIjw== +node-gyp@^8.4.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937" + integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== dependencies: env-paths "^2.2.0" glob "^7.1.4" - graceful-fs "^4.2.3" - nopt "^4.0.3" - npmlog "^4.1.2" - request "^2.88.2" - rimraf "^2.6.3" - semver "^7.3.2" - tar "^6.0.1" + graceful-fs "^4.2.6" + make-fetch-happen "^9.1.0" + nopt "^5.0.0" + npmlog "^6.0.0" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.2" which "^2.0.2" node-jose@2.0.0: @@ -6257,6 +7157,13 @@ nopt@^4.0.3: abbrev "1" osenv "^0.1.4" +nopt@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" + integrity sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ== + dependencies: + abbrev "1" + normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: version "2.4.2" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.2.tgz#6b2abd85774e51f7936f1395e45acb905dc849b2" @@ -6277,10 +7184,10 @@ normalize-url@^4.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== -normalize-url@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-5.2.1.tgz#492a22a8443e604b13cef4b3a97983d66f08bf65" - integrity sha512-bFT2ilr7p37ZPEQ9LO9HP/tdFIAE7Q4UoeojXNKeLjs0vXxZetM+C2K9jdbVS7b6ut66CflVLgk1yqHJVrXmiw== +normalize-url@^6.0.1, normalize-url@~6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== npm-bundled@^1.0.1: version "1.0.5" @@ -6312,6 +7219,23 @@ npmlog@^4.0.1, npmlog@^4.0.2, npmlog@^4.1.2: gauge "~2.7.3" set-blocking "~2.0.0" +npmlog@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.1.tgz#06f1344a174c06e8de9c6c70834cfba2964bba17" + integrity sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg== + dependencies: + are-we-there-yet "^3.0.0" + console-control-strings "^1.1.0" + gauge "^4.0.0" + set-blocking "^2.0.0" + +nth-check@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.1.tgz#2efe162f5c3da06a28959fbd3db75dbeea9f0fc2" + integrity sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w== + dependencies: + boolbase "^1.0.0" + nth-check@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" @@ -6324,6 +7248,11 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= +numbered@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/numbered/-/numbered-1.1.0.tgz#9fcd79564c73a84b9574e8370c3d8e58fe3c133c" + integrity sha512-pv/ue2Odr7IfYOO0byC1KgBI10wo5YDauLhxY6/saNzAdAs0r1SotGCPzzCLNPL0xtrAwWRialLu23AAu9xO1g== + nwsapi@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" @@ -6506,6 +7435,13 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + p-timeout@^3.0.0, p-timeout@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" @@ -6525,6 +7461,13 @@ p-wait-for@3.1.0: dependencies: p-timeout "^3.0.0" +p-wait-for@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/p-wait-for/-/p-wait-for-3.2.0.tgz#640429bcabf3b0dd9f492c31539c5718cb6a3f1f" + integrity sha512-wpgERjNkLrBiFmkMEjuZJEWKKDrNfHCKA1OhyN1wg1FrLkULbviEy6py1AyJUgZ72YWFbZ38FIpnqvVqAlDUwA== + dependencies: + p-timeout "^3.0.0" + pac-proxy-agent@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-3.0.1.tgz#115b1e58f92576cac2eba718593ca7b0e37de2ad" @@ -6603,11 +7546,23 @@ parse-uri@~1.0.0: resolved "https://registry.yarnpkg.com/parse-uri/-/parse-uri-1.0.3.tgz#f3c24a74907a4e357c1741e96ca9faadecfd6db5" integrity sha512-upMnGxNcm+45So85HoguwZTVZI9u11i36DdxJfGF2HYWS2eh3TIx7+/tTi7qrEq15qzGkVhsKjesau+kCk48pA== +parse5-htmlparser2-tree-adapter@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== + dependencies: + parse5 "^6.0.1" + parse5@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== +parse5@6.0.1, parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + parse5@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" @@ -6722,11 +7677,6 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -pg-connection-string@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.0.0.tgz#3eefe5997e06d94821e4d502e42b6a1c73f8df82" - integrity sha1-Pu/lmX4G2Ugh5NUC5CtqHHP434I= - pg-connection-string@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.1.0.tgz#e07258f280476540b24818ebb5dca29e101ca502" @@ -6737,6 +7687,11 @@ pg-connection-string@2.3.0: resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.3.0.tgz#c13fcb84c298d0bfa9ba12b40dd6c23d946f55d6" integrity sha512-ukMTJXLI7/hZIwTW7hGMZJ0Lj0S2XQBCJ4Shv4y1zgQ/vqVea+FLhzywvPj0ujSuofu+yA4MYHGZPTsgjBgJ+w== +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + picomatch@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" @@ -6769,14 +7724,14 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postcss@^7.0.27: - version "7.0.35" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24" - integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== +postcss@^8.0.2: + version "8.4.6" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.6.tgz#c5ff3c3c457a23864f32cb45ac9b741498a09ae1" + integrity sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA== dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" + nanoid "^3.2.0" + picocolors "^1.0.0" + source-map-js "^1.0.2" posthtml-parser@^0.2.0: version "0.2.1" @@ -6787,9 +7742,9 @@ posthtml-parser@^0.2.0: isobject "^2.1.0" posthtml-render@^1.0.5: - version "1.1.4" - resolved "https://registry.yarnpkg.com/posthtml-render/-/posthtml-render-1.1.4.tgz#95dac09892f4f183fad5ac823f08f42c0256551e" - integrity sha512-jL6eFIzoN3xUEvbo33OAkSDE2VIKU4JQ1wENOows1DpfnrdapR/K3Q1/fB43Mq7wQlcSgRm23nFrvoioufM7eA== + version "1.4.0" + resolved "https://registry.yarnpkg.com/posthtml-render/-/posthtml-render-1.4.0.tgz#40114070c45881cacb93347dae3eff53afbcff13" + integrity sha512-W1779iVHGfq0Fvh2PROhCe2QhB8mEErgqzo1wpIt36tCgChafP+hbXIhLDOM8ePJrZcFs0vkNEtdibEWVqChqw== posthtml@^0.9.0: version "0.9.2" @@ -6800,15 +7755,15 @@ posthtml@^0.9.0: posthtml-render "^1.0.5" prebuild-install@^5.3.4: - version "5.3.5" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.5.tgz#e7e71e425298785ea9d22d4f958dbaccf8bb0e1b" - integrity sha512-YmMO7dph9CYKi5IR/BzjOJlRzpxGGVo1EsLSUZ0mt/Mq0HWZIHOKHHcHdT69yG54C9m6i45GpItwRHpk0Py7Uw== + version "5.3.6" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.6.tgz#7c225568d864c71d89d07f8796042733a3f54291" + integrity sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg== dependencies: detect-libc "^1.0.3" expand-template "^2.0.3" github-from-package "0.0.0" minimist "^1.2.3" - mkdirp "^0.5.1" + mkdirp-classic "^0.5.3" napi-build-utils "^1.0.1" node-abi "^2.7.0" noop-logger "^0.1.1" @@ -6835,7 +7790,7 @@ prettier@^1.19.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== -prettyjson@1.2.1, prettyjson@^1.1.3: +prettyjson@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prettyjson/-/prettyjson-1.2.1.tgz#fcffab41d19cab4dfae5e575e64246619b12d289" integrity sha1-/P+rQdGcq0365eV15kJGYZsS0ok= @@ -6843,6 +7798,14 @@ prettyjson@1.2.1, prettyjson@^1.1.3: colors "^1.1.2" minimist "^1.2.0" +prettyjson@^1.1.3: + version "1.2.5" + resolved "https://registry.yarnpkg.com/prettyjson/-/prettyjson-1.2.5.tgz#ef3cfffcc70505c032abc59785884b4027031835" + integrity sha512-rksPWtoZb2ZpT5OVgtmy0KHVM+Dca3iVwWY9ifwhcexfjebtgjg3wmrUt9PvJ59XIYBcknQeYHD8IAnVlh9lAw== + dependencies: + colors "1.4.0" + minimist "^1.2.0" + probe-image-size@5.0.0, probe-image-size@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/probe-image-size/-/probe-image-size-5.0.0.tgz#1b87d20340ab8fcdb4324ec77fbc8a5f53419878" @@ -6864,6 +7827,19 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + promisify-call@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/promisify-call/-/promisify-call-2.0.4.tgz#d48c2d45652ccccd52801ddecbd533a6d4bd5fba" @@ -6871,6 +7847,11 @@ promisify-call@^2.0.2: dependencies: with-callback "^1.0.2" +property-expr@^2.0.4: + version "2.0.5" + resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-2.0.5.tgz#278bdb15308ae16af3e3b9640024524f4dc02cb4" + integrity sha512-IJUkICM5dP5znhCckHSv30Q4b5/JA5enCtkRHYaOVOAocnH/1BQEYTC5NMfT3AVl/iXKdr3aqQbQn9DxyWknwA== + proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" @@ -7041,14 +8022,14 @@ rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -re2@^1.15.4: - version "1.15.4" - resolved "https://registry.yarnpkg.com/re2/-/re2-1.15.4.tgz#2ffc3e4894fb60430393459978197648be01a0a9" - integrity sha512-7w3K+Daq/JjbX/dz5voMt7B9wlprVBQnMiypyCojAZ99kcAL+3LiJ5uBoX/u47l8eFTVq3Wj+V0pmvU+CT8tOg== +re2@~1.17.2: + version "1.17.3" + resolved "https://registry.yarnpkg.com/re2/-/re2-1.17.3.tgz#8cceb48f52c45b860b1f67cee8a44726f7d05e9a" + integrity sha512-Dp5iWVR8W3C7Nm9DziMY4BleMPRb/pe6kvfbzLv80dVYaXRc9jRnwwNqU0oE/taRm0qYR1+Qrtzk9rPjS9ecaQ== dependencies: - install-artifact-from-github "^1.0.2" - nan "^2.14.1" - node-gyp "^7.0.0" + install-artifact-from-github "^1.3.0" + nan "^2.15.0" + node-gyp "^8.4.1" react-zlib-js@^1.0.4: version "1.0.5" @@ -7099,7 +8080,7 @@ readable-stream@1.1.x, readable-stream@~1.1.9: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@2, readable-stream@2.3.7, readable-stream@^2.3.7: +readable-stream@2, readable-stream@2.3.7, readable-stream@^2.3.5, readable-stream@^2.3.7: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -7112,7 +8093,7 @@ readable-stream@2, readable-stream@2.3.7, readable-stream@^2.3.7: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@2.3.6, readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.3.5: +readable-stream@2.3.6, readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.2.2: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== @@ -7373,11 +8354,12 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== +resolve@1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" + integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== dependencies: + is-core-module "^2.0.0" path-parse "^1.0.6" resolve@^1.0.0, resolve@^1.1.6, resolve@^1.1.7: @@ -7406,7 +8388,7 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -retry@0.12.0: +retry@0.12.0, retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= @@ -7423,10 +8405,10 @@ rimraf@^2.6.1: dependencies: glob "^7.1.3" -rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" @@ -7445,7 +8427,7 @@ rss@1.2.2: mime-types "2.1.13" xml "1.0.1" -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -7455,6 +8437,11 @@ safe-buffer@5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== +safe-buffer@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + safe-json-stringify@~1: version "1.2.0" resolved "https://registry.yarnpkg.com/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz#356e44bc98f1f93ce45df14bcd7c01cda86e0afd" @@ -7467,20 +8454,28 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +safe-timers@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-timers/-/safe-timers-1.1.0.tgz#c58ae8325db8d3b067322f0a4ef3a0cad67aad83" + integrity sha1-xYroMl2407BnMi8KTvOgytZ6rYM= + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sanitize-html@1.27.4: - version "1.27.4" - resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-1.27.4.tgz#3864e7562fc708cefabcb0d51bbacde3411504cb" - integrity sha512-VvY1hxVvMXzSos/LzqeBl9/KYu3mkEOtl5NMwz6jER318dSHDCig0AOjZOtnoCwAC3HMs9LhfWkPCmQGttb4ng== - dependencies: - htmlparser2 "^4.1.0" - lodash "^4.17.15" +sanitize-html@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.3.2.tgz#a1954aea877a096c408aca7b0c260bef6e4fc402" + integrity sha512-p7neuskvC8pSurUjdVmbWPXmc9A4+QpOXIL+4gwFC+av5h+lYCXFT8uEneqsFQg/wEA1IH+cKQA60AaQI6p3cg== + dependencies: + deepmerge "^4.2.2" + escape-string-regexp "^4.0.0" + htmlparser2 "^6.0.0" + is-plain-object "^5.0.0" + klona "^2.0.3" parse-srcset "^1.0.2" - postcss "^7.0.27" + postcss "^8.0.2" sax@0.4.2: version "0.4.2" @@ -7492,7 +8487,7 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -saxes@^5.0.0: +saxes@^5.0.0, saxes@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== @@ -7510,20 +8505,39 @@ section-tests@^1.3.0: ee-types "^2.1.4" glob "^7.1.2" +secure-json-parse@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.4.0.tgz#5aaeaaef85c7a417f76271a4f5b0cc3315ddca85" + integrity sha512-Q5Z/97nbON5t/L/sH6mY2EacfjVGwrCcSi5D3btRO2GZ8pf1K1UN7Z9H5J57hjVU2Qzxr1xO+FmBhOvEkzCMmg== + secure-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/secure-keys/-/secure-keys-1.0.0.tgz#f0c82d98a3b139a8776a8808050b824431087fca" integrity sha1-8MgtmKOxOah3aogIBQuCRDEIf8o= -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== -semver@7.3.2, semver@^7.3.2: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== +semver@7.3.4: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + +semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^7.3.2, semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" send@0.16.2: version "0.16.2" @@ -7685,11 +8699,11 @@ simple-dom@^1.4.0: "@simple-dom/void-map" "^1.4.0" simple-get@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.0.3.tgz#924528ac3f9d7718ce5e9ec1b1a69c0be4d62efa" - integrity sha512-Wvre/Jq5vgoz31Z9stYWPLn0PqRqmBDpFSdypAnHu5AvRVCYPRYGnvryNLiXu8GOBNDH82J2FRHUGMjjHUpXFw== + version "3.1.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55" + integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA== dependencies: - decompress-response "^3.3.0" + decompress-response "^4.2.0" once "^1.3.1" simple-concat "^1.0.0" @@ -7727,10 +8741,15 @@ smart-buffer@^4.1.0: resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== -smartquotes@~2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/smartquotes/-/smartquotes-2.3.1.tgz#01ebb595d6c7a9e24d90e8cb95c17d0e1af49407" - integrity sha1-Aeu1ldbHqeJNkOjLlcF9Dhr0lAc= +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +smartquotes@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/smartquotes/-/smartquotes-2.3.2.tgz#fb1630c49ba04e57446e1a97dc10d590072af4a6" + integrity sha512-0R6YJ5hLpDH4mZR7N5eZ12oCMLspvGOHL9A9SEm2e3b/CQmQidekW4SWSKEmor/3x6m3NCBBEqLzikcZC9VJNQ== snapdragon-node@^2.0.1: version "2.1.1" @@ -7770,6 +8789,23 @@ socks-proxy-agent@^4.0.1: agent-base "~4.2.1" socks "~2.3.2" +socks-proxy-agent@^6.0.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz#e664e8f1aaf4e1fb3df945f09e3d94f911137f87" + integrity sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew== + dependencies: + agent-base "^6.0.2" + debug "^4.3.1" + socks "^2.6.1" + +socks@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" + integrity sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA== + dependencies: + ip "^1.1.5" + smart-buffer "^4.2.0" + socks@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" @@ -7778,6 +8814,11 @@ socks@~2.3.2: ip "1.1.5" smart-buffer "^4.1.0" +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + source-map-resolve@^0.5.0: version "0.5.2" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" @@ -7878,6 +8919,13 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +ssri@^8.0.0, ssri@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" + integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== + dependencies: + minipass "^3.1.1" + state-toggle@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.3.tgz#e123b16a88e143139b09c6852221bc9815917dfe" @@ -7947,6 +8995,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string_decoder@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" @@ -7991,6 +9048,13 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -8021,9 +9085,9 @@ strip-json-comments@^2.0.0, strip-json-comments@~2.0.1: integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= stripe@^7.4.0: - version "7.15.0" - resolved "https://registry.yarnpkg.com/stripe/-/stripe-7.15.0.tgz#03593caec169b698997c091b07d21da701eeee18" - integrity sha512-TmouNGv1rIU7cgw7iFKjdQueJSwYKdPRPBuO7eNjrRliZUnsf2bpJqYe+n6ByarUJr38KmhLheVUxDyRawByPQ== + version "7.63.1" + resolved "https://registry.yarnpkg.com/stripe/-/stripe-7.63.1.tgz#356081b7a06d24d86fd8931298a21b4a6f2be561" + integrity sha512-W6R2CzMF87DeWVtxrAD8E9As62VIu2M9Ece+YKVw2P4oOBgvj5M2F2xH8R5VMmnDtmx4RJtg8PIJ4DmijpLU6g== dependencies: qs "^6.6.0" @@ -8054,13 +9118,6 @@ supports-color@^2.0.0: resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - integrity sha1-vnoN5ITexcXN34s9WRJQRJEvY1s= - dependencies: - has-flag "^2.0.0" - supports-color@^5.0.0, supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -8068,13 +9125,6 @@ supports-color@^5.0.0, supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -8139,7 +9189,7 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.2" -tar@^6.0.1, tar@^6.0.2: +tar@^6.0.2: version "6.0.5" resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.5.tgz#bde815086e10b39f1dcd298e89d596e1535e200f" integrity sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg== @@ -8151,20 +9201,27 @@ tar@^6.0.1, tar@^6.0.2: mkdirp "^1.0.3" yallist "^4.0.0" -tarn@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/tarn/-/tarn-1.1.5.tgz#7be88622e951738b9fa3fb77477309242cdddc2d" - integrity sha512-PMtJ3HCLAZeedWjJPgGnCvcphbCOMbtZpjKgLq3qM5Qq9aQud+XHrL0WlrlgnTyS8U+jrjGbEXprFcQrxPy52g== +tar@^6.1.2: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" tarn@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/tarn/-/tarn-2.0.0.tgz#c68499f69881f99ae955b4317ca7d212d942fdee" integrity sha512-7rNMCZd3s9bhQh47ksAQd92ADFcJUjjbyOvyFjNLwTPpGieFHMC84S+LOzw0fx1uh6hnDz/19r8CPMnIjJlMMA== -tarn@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.0.tgz#a4082405216c0cce182b8b4cb2639c52c1e870d4" - integrity sha512-PKUnlDFODZueoA8owLehl8vLcgtA8u4dRuVbZc92tspDYZixjJL6TqYOmryf/PfP/EBX+2rgNcrj96NO+RPkdQ== +tarn@^3.0.0, tarn@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.2.tgz#73b6140fbb881b71559c4f8bfde3d9a4b3d27693" + integrity sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ== thenify-all@^1.0.0: version "1.6.0" @@ -8185,37 +9242,15 @@ thunkify@^2.1.2: resolved "https://registry.yarnpkg.com/thunkify/-/thunkify-2.1.2.tgz#faa0e9d230c51acc95ca13a361ac05ca7e04553d" integrity sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0= -tildify@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" - integrity sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo= - dependencies: - os-homedir "^1.0.0" - tildify@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/tildify/-/tildify-2.0.0.tgz#f205f3674d677ce698b7067a99e949ce03b4754a" integrity sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw== -title@~3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/title/-/title-3.4.2.tgz#1c0acd159c6437296cc73ec743a4b9f7510c6a6f" - integrity sha512-cSNFZ/ChKlX2SfF+k9XvvXkjVa1JrzdGt6v/hoxVig5VaDGRmNHANfawcAdW2mfkd7y+uBHH6n9EHAxJmkO5Hw== - dependencies: - arg "1.0.0" - chalk "2.3.0" - clipboardy "1.2.2" - titleize "1.0.0" - -titleize@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/titleize/-/titleize-1.0.0.tgz#7d350722061830ba6617631e0cfd3ea08398d95a" - integrity sha1-fTUHIgYYMLpmF2MeDP0+oIOY2Vo= - -tlds@^1.209.0: - version "1.210.0" - resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.210.0.tgz#bf9a73cd0c16720e48158abc542311c511ac6fe8" - integrity sha512-5bzt4JE+NlnwiKpVW9yzWxuc44m+t2opmPG+eSKDp5V5qdyGvjMngKgBb5ZK8GiheQMbRTCKpRwFJeIEO6pV7Q== +tlds@^1.228.0: + version "1.229.0" + resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.229.0.tgz#fd02585a234669d47a7f1752c87f100a34feba60" + integrity sha512-yZCodKInN+BPGUyYgKHsodJ2FVWRjW/fYx6rKCAT/e24BBJd8FcxWgKD0aBgk+7uQ/88h/fmRTd4Nvzxf3313A== to-object-path@^0.3.0: version "0.3.0" @@ -8257,7 +9292,12 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -tough-cookie@4.0.0: +toposort@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330" + integrity sha1-riF2gXXRVZ1IvvNUILL0li8JwzA= + +tough-cookie@4.0.0, tough-cookie@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== @@ -8291,10 +9331,17 @@ tough-cookie@~2.4.3: psl "^1.1.24" punycode "^1.4.1" -tr46@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479" - integrity sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg== +tr46@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" + integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== + dependencies: + punycode "^2.1.1" + +tr46@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" + integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== dependencies: punycode "^2.1.1" @@ -8318,11 +9365,6 @@ trough@^1.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== -truncate@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/truncate/-/truncate-2.1.0.tgz#391183563a25cffbd4d613a1d00ae5844c9e55d3" - integrity sha512-em3E3SUDONOjTBcZ36DTm3RvDded3IRU9rX32oHwwXNt3rJD5MVaFlJTQvs8tJoHRoeYP36OuQ1eL/Q7bNEWIQ== - ts-invariant@^0.4.0: version "0.4.4" resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86" @@ -8387,6 +9429,11 @@ tslib@^2.0.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== +tslib@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tsscmp@1.0.6, tsscmp@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" @@ -8437,11 +9484,16 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.9, typescript@^3.9.7: +typescript@^3.9.7: version "3.9.7" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== + uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" @@ -8465,9 +9517,9 @@ unc-path-regex@^0.1.2: integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= underscore@: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + version "1.13.2" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.2.tgz#276cea1e8b9722a8dbed0100a407dda572125881" + integrity sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g== underscore@1.7.0: version "1.7.0" @@ -8513,6 +9565,20 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^0.4.3" +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== + dependencies: + imurmurhash "^0.1.4" + unist-util-is@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-3.0.0.tgz#d9e84381c2468e82629e4a5be9d7d05a2dd324cd" @@ -8578,6 +9644,11 @@ universalify@^1.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -8615,14 +9686,13 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-regex-safe@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/url-regex-safe/-/url-regex-safe-1.0.2.tgz#822cbab107d7f4f80342f0f0798acf63cac9fd1d" - integrity sha512-t1doIKbYDBRyqXZz7A98AXH/zimKmYapxFjBZwcz3BmqjB921rUPEUokAaShKyenaX3McOM8FbkWLvFvX3Jsyw== +url-regex-safe@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/url-regex-safe/-/url-regex-safe-3.0.0.tgz#102a38f74a1a731973fa42690c6a56656fddff12" + integrity sha512-+2U40NrcmtWFVjuxXVt9bGRw6c7/MgkGKN9xIfPrT/2RX0LTkkae6CCEDp93xqUN0UKm/rr821QnHd2dHQmN3A== dependencies: - ip-regex "^4.1.0" - re2 "^1.15.4" - tlds "^1.209.0" + ip-regex "4.3.0" + tlds "^1.228.0" use@^3.1.0: version "3.1.1" @@ -8652,7 +9722,22 @@ uuid@8.3.0, uuid@^8.0.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea" integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ== -uuid@^3.0.0, uuid@^3.1.0, uuid@^3.2.1, uuid@^3.3.2, uuid@^3.3.3: +uuid@8.3.1: + version "8.3.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" + integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== + +uuid@8.3.2, uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +uuid@^3.0.0, uuid@^3.2.1: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +uuid@^3.1.0, uuid@^3.3.2, uuid@^3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== @@ -8742,10 +9827,10 @@ vfile@^4.0.0: unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" -video-extensions@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/video-extensions/-/video-extensions-1.1.0.tgz#eaa86b45f29a853c2b873e9d8e23b513712997d6" - integrity sha1-6qhrRfKahTwrhz6djiO1E3Epl9Y= +video-extensions@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/video-extensions/-/video-extensions-1.2.0.tgz#62f449f403b853f02da40964cbf34143f7d96731" + integrity sha512-TriMl18BHEsh2KuuSA065tbu4SNAC9fge7k8uKoTTofTq89+Xsg4K1BGbmSVETwUZhqSjd9KwRCNwXAW/buXMg== w3c-hr-time@^1.0.2: version "1.0.2" @@ -8761,6 +9846,13 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" +w3c-xmlserializer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz#06cdc3eefb7e4d0b20a560a5a3aeb0d2d9a65923" + integrity sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg== + dependencies: + xml-name-validator "^4.0.0" + web-resource-inliner@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/web-resource-inliner/-/web-resource-inliner-5.0.0.tgz#ac30db8096931f20a7c1b3ade54ff444e2e20f7b" @@ -8783,6 +9875,11 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== +webidl-conversions@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== + whatwg-encoding@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" @@ -8790,18 +9887,38 @@ whatwg-encoding@^1.0.5: dependencies: iconv-lite "0.4.24" +whatwg-encoding@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" + integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== + dependencies: + iconv-lite "0.6.3" + whatwg-mimetype@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-mimetype@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" + integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== + +whatwg-url@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-10.0.0.tgz#37264f720b575b4a311bd4094ed8c760caaa05da" + integrity sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w== + dependencies: + tr46 "^3.0.0" + webidl-conversions "^7.0.0" + whatwg-url@^8.0.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.3.0.tgz#d1e11e565334486cdb280d3101b9c3fd1c867582" - integrity sha512-BQRf/ej5Rp3+n7k0grQXZj9a1cHtsp4lqj01p59xBWFKdezR8sO37XnpafwNqiFac/v2Il12EIMjX/Y4VZtT8Q== + version "8.7.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" + integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== dependencies: - lodash.sortby "^4.7.0" - tr46 "^2.0.2" + lodash "^4.7.0" + tr46 "^2.1.0" webidl-conversions "^6.1.0" which-module@^2.0.0: @@ -8843,6 +9960,13 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" +wide-align@^1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + window-size@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" @@ -8866,6 +9990,15 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -8886,15 +10019,25 @@ ws@^6.0.0: async-limiter "~1.0.0" ws@^7.2.3: - version "7.3.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8" - integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA== + version "7.5.7" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" + integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== + +ws@^8.2.3: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" + integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== +xml-name-validator@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" + integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== + xml2js@0.2.6: version "0.2.6" resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.2.6.tgz#d209c4e4dda1fc9c452141ef41c077f5adfdf6c4" @@ -8940,11 +10083,21 @@ xtend@^4.0.0, xtend@^4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= -y18n@^3.2.0, y18n@^3.2.1: +y18n@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== + +y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -8960,6 +10113,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + yargs-parser@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" @@ -8967,6 +10125,19 @@ yargs-parser@^7.0.0: dependencies: camelcase "^4.1.0" +yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^3.19.0: version "3.32.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" @@ -9012,6 +10183,32 @@ yn@^3.0.0: resolved "https://registry.yarnpkg.com/yn/-/yn-3.0.0.tgz#0073c6b56e92aed652fbdfd62431f2d6b9a7a091" integrity sha512-+Wo/p5VRfxUgBUGy2j/6KX2mj9AYJWOHuhMjMcbBFc3y54o9/4buK1ksBvuiK01C3kby8DH9lSmJdSxw+4G/2Q== +yup@0.32.8: + version "0.32.8" + resolved "https://registry.yarnpkg.com/yup/-/yup-0.32.8.tgz#16e4a949a86a69505abf99fd0941305ac9adfc39" + integrity sha512-SZulv5FIZ9d5H99EN5tRCRPXL0eyoYxWIP1AacCrjC9d4DfP13J1dROdKGfpfRHT3eQB6/ikBl5jG21smAfCkA== + dependencies: + "@babel/runtime" "^7.10.5" + "@types/lodash" "^4.14.165" + lodash "^4.17.20" + lodash-es "^4.17.11" + nanoclone "^0.2.1" + property-expr "^2.0.4" + toposort "^2.0.2" + +yup@0.32.9: + version "0.32.9" + resolved "https://registry.yarnpkg.com/yup/-/yup-0.32.9.tgz#9367bec6b1b0e39211ecbca598702e106019d872" + integrity sha512-Ci1qN+i2H0XpY7syDQ0k5zKQ/DoxO0LzPg8PAR/X4Mpj6DqaeCoIYEEjDJwhArh3Fa7GWbQQVDZKeXYlSH4JMg== + dependencies: + "@babel/runtime" "^7.10.5" + "@types/lodash" "^4.14.165" + lodash "^4.17.20" + lodash-es "^4.17.15" + nanoclone "^0.2.1" + property-expr "^2.0.4" + toposort "^2.0.2" + zen-observable-ts@^0.8.21: version "0.8.21" resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz#85d0031fbbde1eba3cd07d3ba90da241215f421d" diff --git a/examples/githunt-api/package.json b/examples/githunt-api/package.json index 25da1675..de034963 100644 --- a/examples/githunt-api/package.json +++ b/examples/githunt-api/package.json @@ -6,7 +6,7 @@ "dependencies": { "apollo-server": "^2.18.1", "githunt-api": "peggyrayzis/GitHunt-API", - "graphql": "^14.5.8", + "graphql": "^16.3.0", "graphql-tools": "^4.0.7", "nexus": "^1.0.0" }, @@ -14,6 +14,6 @@ "nodemon": "^1.18.6", "prettier": "^1.19.1", "sqlite3": "^4.1.0", - "typescript": "^3.9" + "typescript": "^4.5.5" } } diff --git a/examples/githunt-api/yarn.lock b/examples/githunt-api/yarn.lock index e4fea53e..e32e4eaf 100644 --- a/examples/githunt-api/yarn.lock +++ b/examples/githunt-api/yarn.lock @@ -2962,18 +2962,16 @@ graphql-upload@^8.0.2: dependencies: iterall "^1.1.0" -graphql@^14.5.8: - version "14.5.8" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.5.8.tgz#504f3d3114cb9a0a3f359bbbcf38d9e5bf6a6b3c" - integrity sha512-MMwmi0zlVLQKLdGiMfWkgQD7dY/TUKt4L+zgJ/aR0Howebod3aNgP5JkgvAULiR2HPVZaP2VEElqtdidHweLkg== - dependencies: - iterall "^1.2.2" - graphql@^15.3.0: version "15.3.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" integrity sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w== +graphql@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05" + integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A== + har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -3516,7 +3514,7 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -iterall@^1.1.0, iterall@^1.1.3, iterall@^1.2.1, iterall@^1.2.2: +iterall@^1.1.0, iterall@^1.1.3, iterall@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.2.2.tgz#92d70deb8028e0c39ff3164fdbf4d8b088130cd7" integrity sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA== @@ -5588,10 +5586,10 @@ type-is@~1.6.14, type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typescript@^3.9: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== uid-safe@~2.1.4: version "2.1.5" diff --git a/examples/kitchen-sink/package.json b/examples/kitchen-sink/package.json index 2bc5ef2b..8825b21f 100644 --- a/examples/kitchen-sink/package.json +++ b/examples/kitchen-sink/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "apollo-server": "^2.18.1", - "graphql": "^15.3.0", + "graphql": "^16.3.0", "graphql-query-complexity": "^0.4.1", "graphql-relay": "^0.6.0", "graphql-subscriptions": "^1.0.0", @@ -19,7 +19,7 @@ "nexus": "^1.0.0", "subscriptions-transport-ws": "^0.9.15", "ts-node": "^8.5.4", - "typescript": "^3.9" + "typescript": "^4.5.5" }, "devDependencies": { "@types/graphql-relay": "^0.4.11", diff --git a/examples/kitchen-sink/src/kitchen-sink-definitions.ts b/examples/kitchen-sink/src/kitchen-sink-definitions.ts index e8dd6da4..f0d22b76 100644 --- a/examples/kitchen-sink/src/kitchen-sink-definitions.ts +++ b/examples/kitchen-sink/src/kitchen-sink-definitions.ts @@ -391,9 +391,17 @@ export const MoreQueryFields = extendType({ export const DateScalar = scalarType({ name: 'Date', - serialize: (value) => value.getTime(), - parseValue: (value) => new Date(value), - parseLiteral: (ast) => (ast.kind === 'IntValue' ? new Date(ast.value) : null), + serialize: (value) => (value as Date).toISOString(), + parseValue: (value) => new Date(value as string | number), + parseLiteral: (ast) => { + if (ast.kind === 'IntValue' || ast.kind === 'StringValue') { + const d = new Date(ast.value) + if (!isNaN(d.valueOf())) { + return d + } + } + throw new Error('Invalid date') + }, asNexusMethod: 'date', sourceType: 'Date', }) diff --git a/examples/kitchen-sink/yarn.lock b/examples/kitchen-sink/yarn.lock index 49101ffa..c0fbd1db 100644 --- a/examples/kitchen-sink/yarn.lock +++ b/examples/kitchen-sink/yarn.lock @@ -2140,6 +2140,11 @@ graphql@^15.3.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" integrity sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w== +graphql@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05" + integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A== + growly@^1.2.0, growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -5070,10 +5075,10 @@ type-is@~1.6.16: media-typer "0.3.0" mime-types "~2.1.18" -typescript@^3.9: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== uglify-js@^3.1.4: version "3.4.9" diff --git a/examples/star-wars/package.json b/examples/star-wars/package.json index 39acb474..ecb274bf 100644 --- a/examples/star-wars/package.json +++ b/examples/star-wars/package.json @@ -6,7 +6,7 @@ }, "dependencies": { "apollo-server": "^2.18.1", - "graphql": "^15.3.0", + "graphql": "^16.3.0", "graphql-tools": "^4.0.7", "nexus": "^1.0.0", "ts-node-dev": "^1.0.0-pre.30" @@ -15,6 +15,6 @@ "jest": "^23.6.0", "prettier": "^1.19.1", "ts-jest": "^24.1.0", - "typescript": "^3.9" + "typescript": "^4.5.5" } } diff --git a/examples/star-wars/yarn.lock b/examples/star-wars/yarn.lock index e3cb57c7..7261b1e8 100644 --- a/examples/star-wars/yarn.lock +++ b/examples/star-wars/yarn.lock @@ -2097,6 +2097,11 @@ graphql@^15.3.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" integrity sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w== +graphql@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05" + integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A== + growly@^1.2.0, growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -5006,10 +5011,10 @@ type-is@~1.6.16: media-typer "0.3.0" mime-types "~2.1.18" -typescript@^3.9: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== uglify-js@^3.1.4: version "3.4.9" diff --git a/examples/ts-ast-reader/package.json b/examples/ts-ast-reader/package.json index f459c6c5..1da3fc54 100644 --- a/examples/ts-ast-reader/package.json +++ b/examples/ts-ast-reader/package.json @@ -8,11 +8,11 @@ "dependencies": { "apollo-server": "^2.18.1", "fs-extra": "^7.0.1", - "graphql": "^15.3.0", + "graphql": "^16.3.0", "graphql-tools": "^4.0.7", "nexus": "^1.0.0", "ts-node-dev": "1.0.0-pre.31", - "typescript": "^3.9" + "typescript": "^4.5.5" }, "devDependencies": { "@types/fs-extra": "^5.0.4" diff --git a/examples/ts-ast-reader/src/types/typeNodes.ts b/examples/ts-ast-reader/src/types/typeNodes.ts index 1403f2dd..ac541418 100644 --- a/examples/ts-ast-reader/src/types/typeNodes.ts +++ b/examples/ts-ast-reader/src/types/typeNodes.ts @@ -50,7 +50,7 @@ export const TupleTypeNode = objectType({ name: 'TupleTypeNode', definition(t) { nodeType(t) - t.list.field('elementTypes', { type: 'Node' }) + t.list.field('elements', { type: 'Node' }) }, }) diff --git a/examples/ts-ast-reader/yarn.lock b/examples/ts-ast-reader/yarn.lock index 7ce8c9b6..b52866ee 100644 --- a/examples/ts-ast-reader/yarn.lock +++ b/examples/ts-ast-reader/yarn.lock @@ -1113,6 +1113,11 @@ graphql@^15.3.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" integrity sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w== +graphql@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05" + integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A== + growly@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -2164,10 +2169,10 @@ type-is@~1.6.16: media-typer "0.3.0" mime-types "~2.1.18" -typescript@^3.9: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== universalify@^0.1.0: version "0.1.2" diff --git a/examples/with-prisma/package.json b/examples/with-prisma/package.json index e5180cbc..dee6ecf5 100644 --- a/examples/with-prisma/package.json +++ b/examples/with-prisma/package.json @@ -20,13 +20,13 @@ "@prisma/client": "2.14.0", "apollo-server-express": "^2.19.1", "express": "^4.17.1", - "graphql": "^15.3.0", + "graphql": "^16.3.0", "nexus": "^1.0.0" }, "devDependencies": { "@prisma/cli": "^2.14.0", "prettier": "2.2.1", "ts-node-dev": "^1.0.0-pre.62", - "typescript": "^4.0.2" + "typescript": "^4.5.5" } } diff --git a/examples/with-prisma/yarn.lock b/examples/with-prisma/yarn.lock index cb0a1093..90a44ef3 100644 --- a/examples/with-prisma/yarn.lock +++ b/examples/with-prisma/yarn.lock @@ -1015,6 +1015,11 @@ graphql@^15.3.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.4.0.tgz#e459dea1150da5a106486ba7276518b5295a4347" integrity sha512-EB3zgGchcabbsU9cFe1j+yxdzKQKAbGUWRb13DsrsMN1yyfmmIq+2+L5MqVWcDCE4V89R5AyUOi7sMOGxdsYtA== +graphql@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05" + integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A== + has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" @@ -1814,10 +1819,10 @@ type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typescript@^4.0.2: - version "4.1.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" - integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== +typescript@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" diff --git a/examples/zeit-typescript/package.json b/examples/zeit-typescript/package.json index cd178351..df7fa875 100644 --- a/examples/zeit-typescript/package.json +++ b/examples/zeit-typescript/package.json @@ -13,13 +13,13 @@ "trailingComma": "all" }, "dependencies": { - "graphql": "^15.3.0", + "graphql": "^16.3.0", "nexus": "^1.0.0" }, "devDependencies": { "@now/node": "^1.0.1", "@types/node": "^12.11.1", "ts-node": "^8.4.1", - "typescript": "^3.9" + "typescript": "^4.5.5" } } diff --git a/examples/zeit-typescript/yarn.lock b/examples/zeit-typescript/yarn.lock index bb157726..534ba0ba 100644 --- a/examples/zeit-typescript/yarn.lock +++ b/examples/zeit-typescript/yarn.lock @@ -29,10 +29,10 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.1.tgz#0c667cb467ebbb5cea7f14f135cc2dba7780a8ff" integrity sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q== -graphql@^15.3.0: - version "15.3.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" - integrity sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w== +graphql@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05" + integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A== iterall@^1.3.0: version "1.3.0" @@ -81,10 +81,10 @@ tslib@^2.0.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== -typescript@^3.9: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== yn@^3.0.0: version "3.1.1" diff --git a/package.json b/package.json index 99add613..b987ade9 100644 --- a/package.json +++ b/package.json @@ -83,25 +83,25 @@ "dripip": "^0.10.0", "eslint": "^6.6.0", "get-port": "^5.1.1", - "graphql": "^15.3.0", - "graphql-relay": "^0.6.0", - "graphql-scalars": "^1.2.6", + "graphql": "^16.3.0", + "graphql-relay": "^0.10.0", + "graphql-scalars": "^1.14.1", "gulp": "4.0.2", "husky": "^1.1.2", "jest": "^26.6.3", "jest-watch-typeahead": "^0.6.1", "lint-staged": "^7.3.0", - "prettier": "^2.3.1", + "prettier": "^2.5.1", "sort-package-json": "^1.22.1", "ts-jest": "^26.4.4", - "ts-morph": "^8.2.0", + "ts-morph": "^13.0.3", "ts-node": "^9.0.0", "tsd": "^0.13.1", "tslint": "^5.11.0", "tslint-config-prettier": "^1.15.0", - "typescript": "^4.1.2" + "typescript": "^4.5.5" }, "peerDependencies": { - "graphql": "^14.5.8 || 15.x" + "graphql": "15.x || 16.x" } } diff --git a/src/builder.ts b/src/builder.ts index 01f8649c..ec360a7a 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -105,6 +105,7 @@ import type { import type { DynamicInputMethodDef, DynamicOutputMethodDef } from './dynamicMethod' import type { DynamicOutputPropertyDef } from './dynamicProperty' import { + hasNexusExtension, NexusFieldExtension, NexusInputObjectTypeExtension, NexusInterfaceTypeExtension, @@ -198,8 +199,8 @@ export interface MergeSchemaConfig { /** * GraphQL Schema to merge into the Nexus type definitions. * - * We unwrap each type, preserve the "nullable/nonNull" status of any fields & - * arguments, and then combine with the local Nexus GraphQL types. + * We unwrap each type, preserve the "nullable/nonNull" status of any fields & arguments, and then combine + * with the local Nexus GraphQL types. * * If you have multiple schemas */ @@ -207,22 +208,22 @@ export interface MergeSchemaConfig { /** * If we want to "merge" specific types, provide a list of the types you wish to merge here. * - * @default ['Query', 'Mutation'] + * @default 'Query', 'Mutation' */ mergeTypes?: string[] | true /** - * If there are types that we don't want to include from the external schema in our final - * Nexus generated schema, provide them here. + * If there are types that we don't want to include from the external schema in our final Nexus generated + * schema, provide them here. */ skipTypes?: string[] /** - * If there are certain "fields" that we want to skip, we can specify - * the fields here and we'll ensure they don't get merged into the schema + * If there are certain "fields" that we want to skip, we can specify the fields here and we'll ensure they + * don't get merged into the schema */ skipFields?: Record /** - * If there are certain arguments for any type fields that we want to skip, we can specify - * the fields here & ensure they don't get merged into the final schema. + * If there are certain arguments for any type fields that we want to skip, we can specify the fields here & + * ensure they don't get merged into the final schema. * * @example * skipArgs: { @@ -236,11 +237,11 @@ export interface MergeSchemaConfig { export interface BuilderConfigInput { /** - * If we have an external schema that we want to "merge into" our local Nexus schema definitions, - * we can configure it here. + * If we have an external schema that we want to "merge into" our local Nexus schema definitions, we can + * configure it here. * - * If you have more than one schema that needs merging, you can look into using - * graphql-tools to pre-merge into a single schema: https://www.graphql-tools.com/docs/schema-merging + * If you have more than one schema that needs merging, you can look into using graphql-tools to pre-merge + * into a single schema: https://www.graphql-tools.com/docs/schema-merging */ mergeSchema?: MergeSchemaConfig /** @@ -423,24 +424,20 @@ export class SchemaBuilder { * processed into concrete types yet. */ private pendingTypeMap: Record = {} - /** - * All "extensions" to types (adding fields on types from many locations) - */ + /** All "extensions" to types (adding fields on types from many locations) */ private typeExtendMap: Record[] | null> = {} - /** - * All "extensions" to input types (adding fields on types from many locations) - */ + /** All "extensions" to input types (adding fields on types from many locations) */ private inputTypeExtendMap: Record[] | null> = {} /** - * When we encounter "named" types from graphql-js, we keep them separate from Nexus definitions. - * This way we can have Nexus definitions take precedence without worrying about conflicts, - * particularly when we're looking to override behavior from inherited types. + * When we encounter "named" types from graphql-js, we keep them separate from Nexus definitions. This way + * we can have Nexus definitions take precedence without worrying about conflicts, particularly when we're + * looking to override behavior from inherited types. */ private graphqlNamedTypeMap: Record = {} /** - * If we're merging against a remote schema, the types from the schema are kept here, - * for fallbacks / merging when we're building the actual Schema + * If we're merging against a remote schema, the types from the schema are kept here, for fallbacks / + * merging when we're building the actual Schema */ private graphqlMergeSchemaMap: Record = {} @@ -552,8 +549,8 @@ export class SchemaBuilder { /** * Add type takes a Nexus type, or a GraphQL type and pulls it into an internal "type registry". It also - * does an initial pass on any types that are referenced on the "types" field and pulls those in too, so you - * can define types anonymously, without exporting them. + * does an initial pass on any types that are referenced on the "types" field and pulls those in too, so + * you can define types anonymously, without exporting them. */ private addType = (typeDef: NexusAcceptedTypeDef) => { if (isNexusDynamicInputMethod(typeDef)) { @@ -630,7 +627,7 @@ export class SchemaBuilder { // If we've used decorateType to wrap, then we can grab the types off if (typeDef.extensions?.nexus) { - const { asNexusMethod, sourceType } = typeDef.extensions.nexus + const { asNexusMethod, sourceType } = Object(typeDef.extensions.nexus) if (asNexusMethod) { if (isInputType(typeDef)) { this.dynamicInputFields[asNexusMethod] = typeDef.name @@ -1257,16 +1254,18 @@ export class SchemaBuilder { if (modifications[field]) { // TODO(tim): Refactor this whole mess const { type, field: _field, args, extensions, ...rest } = modifications[field] - const extensionConfig: NexusOutputFieldConfig = extensions?.nexus?.config ?? {} + const extensionConfig: NexusOutputFieldConfig = hasNexusExtension(extensions?.nexus) + ? extensions?.nexus?.config ?? {} + : {} interfaceFieldsMap[field] = { ...interfaceFieldsMap[field], ...rest, extensions: { ...interfaceField.extensions, ...extensions, - nexus: - interfaceField.extensions?.nexus?.modify(extensionConfig) ?? - new NexusFieldExtension(extensionConfig), + nexus: hasNexusExtension(interfaceField.extensions?.nexus) + ? interfaceField.extensions?.nexus?.modify(extensionConfig) + : new NexusFieldExtension(extensionConfig), }, } if (typeof type !== 'undefined') { @@ -1708,8 +1707,8 @@ export class SchemaBuilder { } /** - * Given a "mergeSchema", gathers all of the types and constructs them - * into a map of types that we keep as a "merge schema" + * Given a "mergeSchema", gathers all of the types and constructs them into a map of types that we keep as a + * "merge schema" * * @param config */ diff --git a/src/definitions/_types.ts b/src/definitions/_types.ts index 459e76b9..d7480821 100644 --- a/src/definitions/_types.ts +++ b/src/definitions/_types.ts @@ -25,7 +25,8 @@ import type { RequiredDeeply } from '../typeHelpersInternal' export type { AbstractTypes } -export type Maybe = T | null +/** Conveniently represents flow's "Maybe" type https://flow.org/en/docs/types/maybe/ */ +export type Maybe = null | undefined | T export type Omit = Pick> @@ -154,7 +155,7 @@ export type NexusGraphQLInterfaceTypeConfig = WithExt< NexusInterfaceTypeExtension > & { interfaces: () => GraphQLInterfaceType[] } -export type NexusGraphQLSchema = Omit & { +export interface NexusGraphQLSchema extends GraphQLSchema { extensions: { nexus: NexusSchemaExtension } } @@ -175,8 +176,8 @@ export type NexusFeaturesInput = { * types guide](https://nxs.li/guides/abstract-types). * * If you plan on enabling multiple strategies and you've never done so then please [read the guide about - * using multiple strategies](https://nxs.li/guides/abstract-types/using-multiple-strategies) as there are a - * few quirks to be aware of. + * using multiple strategies](https://nxs.li/guides/abstract-types/using-multiple-strategies) as there are + * a few quirks to be aware of. * * @default {resolveType: true, * __typename: false @@ -203,16 +204,16 @@ export type NexusFeaturesInput = { * the [Discriminant Model Field Strategy](https://nxs.li/guides/abstract-types/discriminant-model-field-strategy). * * Warning :: When this strategy is enabled in conjunction with other strategies the - * "abstractTypeRuntimeChecks" feature will automatically be disabled. This is because it is not practical - * at runtime to find out if resolvers will return objects that include the "__typename" field. This - * trade-off can be acceptable since the runtime checks are a redundant safety measure over the static - * typing. So as long as you are not ignoring static errors related to Nexus' abstract type type checks - * then you then you should still have a safe implementation. + * "abstractTypeRuntimeChecks" feature will automatically be disabled. This is because it is not + * practical at runtime to find out if resolvers will return objects that include the "__typename" field. + * This trade-off can be acceptable since the runtime checks are a redundant safety measure over the + * static typing. So as long as you are not ignoring static errors related to Nexus' abstract type type + * checks then you then you should still have a safe implementation. * * Furthermore another effect is that statically the other strategies will not appear to be *required*, - * but instead *optional*, while only this one will appear required. However, upon implementing any of the - * other strategies, this one will not longer be required. This quirk is explained in the guide section - * about [using multiple strategies](https://nxs.li/guides/abstract-types/using-multiple-strategies). + * but instead *optional*, while only this one will appear required. However, upon implementing any of + * the other strategies, this one will not longer be required. This quirk is explained in the guide + * section about [using multiple strategies](https://nxs.li/guides/abstract-types/using-multiple-strategies). */ __typename?: boolean } diff --git a/src/definitions/args.ts b/src/definitions/args.ts index 4761bdb9..6745ca07 100644 --- a/src/definitions/args.ts +++ b/src/definitions/args.ts @@ -86,10 +86,10 @@ export interface NexusArgConfig extends NexusAsArgConfig { * * Types may be expressed in one of three ways: * - * 1. As string literals matching the name of a builtin scalar. - * 2. As string literals matching the name of another type. Thanks to [Nexus' reflection - * system](https://nxs.li/guides/reflection) this is typesafe and autocompletable. - * 3. As references to other enums or input object type definitions. + * 1. As string literals matching the name of a builtin scalar. 2. As string literals matching the name of + * another type. Thanks to [Nexus' reflection + * system](https://nxs.li/guides/reflection) this is typesafe and autocompletable. 3. As references to other + * enums or input object type definitions. * * Type modifier helpers like list() may also be used and in turn accept one of the three methods listed above. * @@ -157,7 +157,7 @@ withNexusSymbol(NexusArgDef, NexusTypes.Arg) * }) * * @param config Configuration for the argument like its type and description. See jsdoc on each config field - * for details. + * for details. */ export function arg(config: NexusArgConfig) { if (!config.type) { diff --git a/src/definitions/decorateType.ts b/src/definitions/decorateType.ts index 3a67cec4..f6b493dd 100644 --- a/src/definitions/decorateType.ts +++ b/src/definitions/decorateType.ts @@ -10,7 +10,7 @@ export function decorateType(type: T, config: TypeEx type.extensions = { ...type.extensions, nexus: { - ...type.extensions?.nexus, + ...Object(type.extensions?.nexus), ...config, }, } diff --git a/src/definitions/definitionBlocks.ts b/src/definitions/definitionBlocks.ts index 2369515e..45228be7 100644 --- a/src/definitions/definitionBlocks.ts +++ b/src/definitions/definitionBlocks.ts @@ -126,9 +126,7 @@ export interface OutputScalarConfig } @@ -486,17 +484,15 @@ export class OutputDefinitionBlock { * * @param name The name of this field. Must conform to the regex pattern: [_A-Za-z][_0-9A-Za-z]* * @param config The configuration for things like the field's type, its description, its arguments, its - * resolver, and more. See jsdoc on each field within for details. + * resolver, and more. See jsdoc on each field within for details. * - * This parameter is optional if no resolver is required. No resolver is required if the [source - * typing](https://nxs.li/guides/backing-types): + * This parameter is optional if no resolver is required. No resolver is required if the [source + * typing](https://nxs.li/guides/backing-types): * - * 1. Has a field whose name matches this one - * 2. And whose type is compatible - * 3. And is a scalar + * 1. Has a field whose name matches this one 2. And whose type is compatible 3. And is a scalar * - * ...in which case the default resolver will be available whose behaviour is to simply return that field - * from the received source type. + * ...in which case the default resolver will be available whose behaviour is to simply return that field + * from the received source type. */ boolean(name: FieldName, ...config: ScalarOutSpread) { this.addScalarField(name, 'Boolean', config) @@ -526,17 +522,15 @@ export class OutputDefinitionBlock { * * @param name The name of this field. Must conform to the regex pattern: [_A-Za-z][_0-9A-Za-z]* * @param config The configuration for things like the field's type, its description, its arguments, its - * resolver, and more. See jsdoc on each field within for details. + * resolver, and more. See jsdoc on each field within for details. * - * This parameter is optional if no resolver is required. No resolver is required if the [source - * typing](https://nxs.li/guides/backing-types): + * This parameter is optional if no resolver is required. No resolver is required if the [source + * typing](https://nxs.li/guides/backing-types): * - * 1. Has a field whose name matches this one - * 2. And whose type is compatible - * 3. And is a scalar + * 1. Has a field whose name matches this one 2. And whose type is compatible 3. And is a scalar * - * ...in which case the default resolver will be available whose behaviour is to simply return that field - * from the received source type. + * ...in which case the default resolver will be available whose behaviour is to simply return that field + * from the received source type. */ string(name: FieldName, ...config: ScalarOutSpread) { this.addScalarField(name, 'String', config) @@ -567,17 +561,15 @@ export class OutputDefinitionBlock { * * @param name The name of this field. Must conform to the regex pattern: [_A-Za-z][_0-9A-Za-z]* * @param config The configuration for things like the field's type, its description, its arguments, its - * resolver, and more. See jsdoc on each field within for details. + * resolver, and more. See jsdoc on each field within for details. * - * This parameter is optional if no resolver is required. No resolver is required if the [source - * typing](https://nxs.li/guides/backing-types): + * This parameter is optional if no resolver is required. No resolver is required if the [source + * typing](https://nxs.li/guides/backing-types): * - * 1. Has a field whose name matches this one - * 2. And whose type is compatible - * 3. And is a scalar + * 1. Has a field whose name matches this one 2. And whose type is compatible 3. And is a scalar * - * ...in which case the default resolver will be available whose behaviour is to simply return that field - * from the received source type. + * ...in which case the default resolver will be available whose behaviour is to simply return that field + * from the received source type. */ id(name: FieldName, ...config: ScalarOutSpread) { this.addScalarField(name, 'ID', config) @@ -606,17 +598,15 @@ export class OutputDefinitionBlock { * * @param name The name of this field. Must conform to the regex pattern: [_A-Za-z][_0-9A-Za-z]* * @param config The configuration for things like the field's type, its description, its arguments, its - * resolver, and more. See jsdoc on each field within for details. + * resolver, and more. See jsdoc on each field within for details. * - * This parameter is optional if no resolver is required. No resolver is required if the [source - * typing](https://nxs.li/guides/backing-types): + * This parameter is optional if no resolver is required. No resolver is required if the [source + * typing](https://nxs.li/guides/backing-types): * - * 1. Has a field whose name matches this one - * 2. And whose type is compatible - * 3. And is a scalar + * 1. Has a field whose name matches this one 2. And whose type is compatible 3. And is a scalar * - * ...in which case the default resolver will be available whose behaviour is to simply return that field - * from the received source type. + * ...in which case the default resolver will be available whose behaviour is to simply return that field + * from the received source type. */ int(name: FieldName, ...config: ScalarOutSpread) { this.addScalarField(name, 'Int', config) @@ -628,8 +618,9 @@ export class OutputDefinitionBlock { * Define a field whose type is Float. * * Float types are [scalars](https://spec.graphql.org/June2018/#sec-Scalars) representing signed - * double‐precision fractional values as specified by IEEE 754. They are represented in JavaScript using the - * [number primitive type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number). + * double‐precision fractional values as specified by IEEE 754. They are represented in JavaScript using + * the [number primitive + * type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number). * * This is a shorthand, equivalent to: * @@ -645,17 +636,15 @@ export class OutputDefinitionBlock { * * @param name The name of this field. Must conform to the regex pattern: [_A-Za-z][_0-9A-Za-z]* * @param config The configuration for things like the field's type, its description, its arguments, its - * resolver, and more. See jsdoc on each field within for details. + * resolver, and more. See jsdoc on each field within for details. * - * This parameter is optional if no resolver is required. No resolver is required if the [source - * typing](https://nxs.li/guides/backing-types): + * This parameter is optional if no resolver is required. No resolver is required if the [source + * typing](https://nxs.li/guides/backing-types): * - * 1. Has a field whose name matches this one - * 2. And whose type is compatible - * 3. And is a scalar + * 1. Has a field whose name matches this one 2. And whose type is compatible 3. And is a scalar * - * ...in which case the default resolver will be available whose behaviour is to simply return that field - * from the received source type. + * ...in which case the default resolver will be available whose behaviour is to simply return that field + * from the received source type. */ float(name: FieldName, ...config: ScalarOutSpread) { this.addScalarField(name, 'Float', config) @@ -684,7 +673,7 @@ export class OutputDefinitionBlock { * * @param name The name of this field. Must conform to the regex pattern: [_A-Za-z][_0-9A-Za-z]* * @param config The configuration for things like the field's type, its description, its arguments, its - * resolver, and more. See jsdoc on each field within for details. + * resolver, and more. See jsdoc on each field within for details. */ field(name: FieldName, config: FieldOutConfig): void /** @@ -710,7 +699,7 @@ export class OutputDefinitionBlock { * }) * * @param config The configuration for things like the field's type, its description, its arguments, its - * resolver, and more. See jsdoc on each field within for details. + * resolver, and more. See jsdoc on each field within for details. */ field(config: FieldOutConfigWithName): void field( diff --git a/src/definitions/mutationField.ts b/src/definitions/mutationField.ts index 07693856..83a919d1 100644 --- a/src/definitions/mutationField.ts +++ b/src/definitions/mutationField.ts @@ -115,7 +115,7 @@ export function mutationField( * }) * * @param name The name of the field on the Mutation type. Names are case‐sensitive and must conform to - * pattern: `[_A-Za-z][_0-9A-Za-z]*` + * pattern: `[_A-Za-z][_0-9A-Za-z]*` * @param config The same type of configuration you would pass to t.field("...", config) */ export function mutationField( diff --git a/src/definitions/nexusMeta.ts b/src/definitions/nexusMeta.ts index d56b99aa..fa7dd02c 100644 --- a/src/definitions/nexusMeta.ts +++ b/src/definitions/nexusMeta.ts @@ -28,7 +28,7 @@ export type NexusMetaBuild = { export type NexusMeta = NexusMetaType | NexusMetaBuild export function isNexusMetaBuild(obj: any): obj is NexusMetaBuild { - return obj && typeof ownProp.get(obj, NEXUS_BUILD) === 'function' + return Boolean(obj && typeof ownProp.get(obj, NEXUS_BUILD) === 'function') } export function isNexusMetaType(obj: any): obj is NexusMetaType { @@ -36,11 +36,11 @@ export function isNexusMetaType(obj: any): obj is NexusMetaType { } export function isNexusMetaTypeProp(obj: any): obj is NexusMetaTypeProp { - return ownProp.has(obj, NEXUS_TYPE) && isNexusStruct(ownProp.get(obj, NEXUS_TYPE)) + return Boolean(obj && ownProp.has(obj, NEXUS_TYPE) && isNexusStruct(ownProp.get(obj, NEXUS_TYPE))) } export function isNexusMetaTypeFn(obj: any): obj is NexusMetaTypeFn { - return ownProp.has(obj, NEXUS_TYPE) && typeof ownProp.get(obj, NEXUS_TYPE) === 'function' + return Boolean(obj && ownProp.has(obj, NEXUS_TYPE) && typeof ownProp.get(obj, NEXUS_TYPE) === 'function') } export function isNexusMeta(obj: any): obj is NexusMetaBuild | NexusMetaTypeFn | NexusMetaType { diff --git a/src/definitions/objectType.ts b/src/definitions/objectType.ts index 2c7833b8..618bb87c 100644 --- a/src/definitions/objectType.ts +++ b/src/definitions/objectType.ts @@ -118,8 +118,8 @@ export type NexusObjectTypeConfig = { * * @example * { - * "module": "some-package", - * "export": "User" + * "module": "some-package", + * "export": "User" * } * * @example @@ -162,12 +162,12 @@ export type NexusObjectTypeConfig = { * Define the fields of your object type. * * This method receives a type builder api that you will use to define the fields of your object type - * within. You can leverage conditionals, loops, other functions (that take the builder api as an argument), - * pull in variables from higher scopes, and so on, to help define your fields. However avoid two things: + * within. You can leverage conditionals, loops, other functions (that take the builder api as an + * argument), pull in variables from higher scopes, and so on, to help define your fields. However avoid two things: * - * 1. Doing asynchronous work when defining fields. - * 2. Triggering side-effects that you would NOT want run at *build* time––as this code will run during build - * to support [Nexus' reflection system](https://nxs.li/guides/reflection). + * 1. Doing asynchronous work when defining fields. 2. Triggering side-effects that you would NOT want run + * at *build* time––as this code will run during build + * to support [Nexus' reflection system](https://nxs.li/guides/reflection). * * @example * objectType({ @@ -185,8 +185,8 @@ export type NexusObjectTypeConfig = { * }) * * @param t The type builder API for object types. The primary method you'll find is "t.field" but there are - * many convenient shorthands available as well, plus anything plugins have added. Explore each one's - * jsDoc for more detail. + * many convenient shorthands available as well, plus anything plugins have added. Explore each one's + * jsDoc for more detail. */ definition(t: ObjectDefinitionBlock): void /** Adds this type as a method on the Object/Interface definition blocks */ diff --git a/src/definitions/queryField.ts b/src/definitions/queryField.ts index f98f6e6c..c23fc149 100644 --- a/src/definitions/queryField.ts +++ b/src/definitions/queryField.ts @@ -101,7 +101,7 @@ export function queryField( * }) * * @param name The name of the field on the Query type. Names are case‐sensitive and must conform to pattern: - * `[_A-Za-z][_0-9A-Za-z]*` + * `[_A-Za-z][_0-9A-Za-z]*` * @param config The same type of configuration you would pass to t.field("...", config) */ export function queryField( diff --git a/src/definitions/wrapping.ts b/src/definitions/wrapping.ts index e414fd47..b99e51b8 100644 --- a/src/definitions/wrapping.ts +++ b/src/definitions/wrapping.ts @@ -28,24 +28,18 @@ import { isNexusMetaType, NexusMetaType, resolveNexusMetaType } from './nexusMet import type { NexusUnionTypeDef } from './unionType' import { NexusTypes, NexusWrappedSymbol } from './_types' -/** - * input(named): Nexus only - */ +/** Input(named): Nexus only */ export type AllNexusNamedInputTypeDefs = | NexusInputObjectTypeDef | NexusEnumTypeDef | NexusScalarTypeDef -/** - * input(named): Nexus + GraphQLInput - */ +/** Input(named): Nexus + GraphQLInput */ export type AllNamedInputTypeDefs = | AllNexusNamedInputTypeDefs | Exclude | GraphQLNonNull> -/** - * input(all): Nexus + GraphQL - */ +/** Input(all): Nexus + GraphQL */ export type AllNexusInputTypeDefs = | AllNamedInputTypeDefs | NexusListDef @@ -54,9 +48,7 @@ export type AllNexusInputTypeDefs = | GraphQLList | GraphQLNonNull -/** - * output(named): Nexus only - */ +/** Output(named): Nexus only */ export type AllNexusNamedOutputTypeDefs = | NexusObjectTypeDef | NexusInterfaceTypeDef @@ -64,33 +56,23 @@ export type AllNexusNamedOutputTypeDefs = | NexusEnumTypeDef | NexusScalarTypeDef -/** - * output(all): Nexus only - */ +/** Output(all): Nexus only */ export type AllNexusOutputTypeDefs = | AllNexusNamedOutputTypeDefs | NexusListDef | NexusNonNullDef | NexusNullDef -/** - * input + output(named): Nexus only - */ +/** Input + output(named): Nexus only */ export type AllNexusNamedTypeDefs = AllNexusNamedInputTypeDefs | AllNexusNamedOutputTypeDefs -/** - * input + output(all): Nexus only - */ +/** Input + output(all): Nexus only */ export type AllNexusTypeDefs = AllNexusOutputTypeDefs | AllNexusInputTypeDefs -/** - * input + output(all): Nexus only + Name - */ +/** Input + output(all): Nexus only + Name */ export type AllNamedTypeDefs = AllNexusNamedTypeDefs | GraphQLNamedType -/** - * All inputs to list(...) - */ +/** All inputs to list(...) */ export type NexusListableTypes = | GetGen<'allNamedTypes', string> | AllNamedTypeDefs @@ -101,9 +83,7 @@ export type NexusListableTypes = | GraphQLType | NexusMetaType -/** - * All inputs to nonNull(...) - */ +/** All inputs to nonNull(...) */ export type NexusNonNullableTypes = | GetGen<'allNamedTypes', string> | AllNamedTypeDefs @@ -111,9 +91,7 @@ export type NexusNonNullableTypes = | NexusArgDef | NexusMetaType -/** - * All inputs to nullable(...) - */ +/** All inputs to nullable(...) */ export type NexusNullableTypes = | GetGen<'allNamedTypes', string> | AllNamedTypeDefs diff --git a/src/extensions.ts b/src/extensions.ts index 7e7d16d2..453204af 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -6,6 +6,11 @@ import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType' import type { NexusInterfaceTypeConfig } from './definitions/interfaceType' import type { NexusObjectTypeConfig } from './definitions/objectType' +/** @internal */ +export function hasNexusExtension(val: any): val is any { + return Boolean(val) +} + export type NexusGraphQLNamedType = GraphQLNamedType & { extensions?: { nexus?: { diff --git a/src/plugin.ts b/src/plugin.ts index 52518da4..32a42ba6 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -34,7 +34,7 @@ export type CreateFieldResolverInfo = { parentTypeConfig: ( | Omit | (Omit & { - interfaces: GraphQLInterfaceType[] + interfaces: readonly GraphQLInterfaceType[] }) ) & { extensions?: Maybe<{ nexus?: { config: TypeExt } }> diff --git a/src/plugins/nullabilityGuardPlugin.ts b/src/plugins/nullabilityGuardPlugin.ts index 7f4a7ccb..509ca267 100644 --- a/src/plugins/nullabilityGuardPlugin.ts +++ b/src/plugins/nullabilityGuardPlugin.ts @@ -31,11 +31,9 @@ export interface NullabilityPluginOnGuardedConfig { type: GraphQLNullableType } -export type NullFallbackValues = Partial< - { - [K in AllOutputTypes]: (obj: NullabilityPluginFallbackFn) => GetGen2<'rootTypes', K> - } -> +export type NullFallbackValues = Partial<{ + [K in AllOutputTypes]: (obj: NullabilityPluginFallbackFn) => GetGen2<'rootTypes', K> +}> export type NullabilityGuardConfig = { /** Whether we should guard against non-null values. Defaults to "true" if NODE_ENV === "production", false otherwise. */ diff --git a/src/typegenAbstractTypes.ts b/src/typegenAbstractTypes.ts index 4e8a2ff0..10ce49a0 100644 --- a/src/typegenAbstractTypes.ts +++ b/src/typegenAbstractTypes.ts @@ -64,7 +64,7 @@ export type IsTypeOfHandler = ( * Get an object with the `isTypeOf` field if applicable for the given object Type. * * @remarks - * Intersect the result of this with other things to build up the final options for a type def. + * Intersect the result of this with other things to build up the final options for a type def. */ export type MaybeTypeDefConfigFieldIsTypeOf = // is isTypeOf strategy disabled ? @@ -122,24 +122,24 @@ export type MaybeTypeDefConfigFieldIsTypeOf = * }) * * @param source The [source data](https://nxs.li/guides/source-types) for the GraphQL objects that - * are members of the abstract types that this type is a member of. For example for some type A in - * two union types whose members are A,B.C and A,D,E respectively then isTypeOf method for A would - * receive source data from A, B, C, D, & E at runtime. + * are members of the abstract types that this type is a member of. For example for some type A + * in two union types whose members are A,B.C and A,D,E respectively then isTypeOf method for A + * would receive source data from A, B, C, D, & E at runtime. * @param context The context data for this request. * - * The context data is typically a singleton scoped to the lifecycle of the request. This means - * created at the beginning of a request and then passed to all the resolvers that execute while - * resolving the request. It is often used to store information like the current user making the - * request. Nexus is not responsible for this however. That is typically something you'll do with - * e.g. [Mercurius](https://mercurius.dev) or [Apollo - * Server](https://apollographql.com/docs/apollo-server/api/apollo-server). + * The context data is typically a singleton scoped to the lifecycle of the request. This means + * created at the beginning of a request and then passed to all the resolvers that execute while + * resolving the request. It is often used to store information like the current user making the + * request. Nexus is not responsible for this however. That is typically something you'll do with + * e.g. [Mercurius](https://mercurius.dev) or [Apollo + * Server](https://apollographql.com/docs/apollo-server/api/apollo-server). * - * Note that the type here will be whatever you have specified for "contextType" in your makeSchema - * configuration. + * Note that the type here will be whatever you have specified for "contextType" in your makeSchema + * configuration. * @param info The GraphQL resolve info. * - * This is an advanced parameter seldom used. It includes things like the AST of the [GraphQL - * document](https://spec.graphql.org/June2018/#sec-Language.Document) sent by the client. + * This is an advanced parameter seldom used. It includes things like the AST of the [GraphQL + * document](https://spec.graphql.org/June2018/#sec-Language.Document) sent by the client. * @returns A boolean indicating if the received source data is of this type or not. */ isTypeOf?: IsTypeOfHandler @@ -201,24 +201,24 @@ export type MaybeTypeDefConfigFieldIsTypeOf = * }) * * @param source The [source data](https://nxs.li/guides/source-types) for the GraphQL objects that - * are members of the abstract types that this type is a member of. For example for some type A in - * two union types whose members are A,B.C and A,D,E respectively then isTypeOf method for A would - * receive source data from A, B, C, D, & E at runtime. + * are members of the abstract types that this type is a member of. For example for some type A + * in two union types whose members are A,B.C and A,D,E respectively then isTypeOf method for A + * would receive source data from A, B, C, D, & E at runtime. * @param context The context data for this request. * - * The context data is typically a singleton scoped to the lifecycle of the request. This means - * created at the beginning of a request and then passed to all the resolvers that execute while - * resolving the request. It is often used to store information like the current user making the - * request. Nexus is not responsible for this however. That is typically something you'll do with - * e.g. [Mercurius](https://mercurius.dev) or [Apollo - * Server](https://apollographql.com/docs/apollo-server/api/apollo-server). + * The context data is typically a singleton scoped to the lifecycle of the request. This means + * created at the beginning of a request and then passed to all the resolvers that execute while + * resolving the request. It is often used to store information like the current user making the + * request. Nexus is not responsible for this however. That is typically something you'll do with + * e.g. [Mercurius](https://mercurius.dev) or [Apollo + * Server](https://apollographql.com/docs/apollo-server/api/apollo-server). * - * Note that the type here will be whatever you have specified for "contextType" in your makeSchema - * configuration. + * Note that the type here will be whatever you have specified for "contextType" in your makeSchema + * configuration. * @param info The GraphQL resolve info. * - * This is an advanced parameter seldom used. It includes things like the AST of the [GraphQL - * document](https://spec.graphql.org/June2018/#sec-Language.Document) sent by the client. + * This is an advanced parameter seldom used. It includes things like the AST of the [GraphQL + * document](https://spec.graphql.org/June2018/#sec-Language.Document) sent by the client. * @returns A boolean indicating if the received source data is of this type or not. */ isTypeOf?: IsTypeOfHandler @@ -279,24 +279,24 @@ export type MaybeTypeDefConfigFieldIsTypeOf = * }) * * @param source The [source data](https://nxs.li/guides/source-types) for the GraphQL objects that - * are members of the abstract types that this type is a member of. For example for some type A in - * two union types whose members are A,B.C and A,D,E respectively then isTypeOf method for A would - * receive source data from A, B, C, D, & E at runtime. + * are members of the abstract types that this type is a member of. For example for some type A + * in two union types whose members are A,B.C and A,D,E respectively then isTypeOf method for A + * would receive source data from A, B, C, D, & E at runtime. * @param context The context data for this request. * - * The context data is typically a singleton scoped to the lifecycle of the request. This means - * created at the beginning of a request and then passed to all the resolvers that execute while - * resolving the request. It is often used to store information like the current user making the - * request. Nexus is not responsible for this however. That is typically something you'll do with - * e.g. [Mercurius](https://mercurius.dev) or [Apollo - * Server](https://apollographql.com/docs/apollo-server/api/apollo-server). + * The context data is typically a singleton scoped to the lifecycle of the request. This means + * created at the beginning of a request and then passed to all the resolvers that execute while + * resolving the request. It is often used to store information like the current user making the + * request. Nexus is not responsible for this however. That is typically something you'll do with + * e.g. [Mercurius](https://mercurius.dev) or [Apollo + * Server](https://apollographql.com/docs/apollo-server/api/apollo-server). * - * Note that the type here will be whatever you have specified for "contextType" in your makeSchema - * configuration. + * Note that the type here will be whatever you have specified for "contextType" in your makeSchema + * configuration. * @param info The GraphQL resolve info. * - * This is an advanced parameter seldom used. It includes things like the AST of the [GraphQL - * document](https://spec.graphql.org/June2018/#sec-Language.Document) sent by the client. + * This is an advanced parameter seldom used. It includes things like the AST of the [GraphQL + * document](https://spec.graphql.org/June2018/#sec-Language.Document) sent by the client. * @returns A boolean indicating if the received source data is of this type or not. */ isTypeOf?: IsTypeOfHandler @@ -347,24 +347,24 @@ export type MaybeTypeDefConfigFieldIsTypeOf = * }) * * @param source The [source data](https://nxs.li/guides/source-types) for the GraphQL objects that - * are members of the abstract types that this type is a member of. For example for some type A in - * two union types whose members are A,B.C and A,D,E respectively then isTypeOf method for A would - * receive source data from A, B, C, D, & E at runtime. + * are members of the abstract types that this type is a member of. For example for some type A + * in two union types whose members are A,B.C and A,D,E respectively then isTypeOf method for A + * would receive source data from A, B, C, D, & E at runtime. * @param context The context data for this request. * - * The context data is typically a singleton scoped to the lifecycle of the request. This means - * created at the beginning of a request and then passed to all the resolvers that execute while - * resolving the request. It is often used to store information like the current user making the - * request. Nexus is not responsible for this however. That is typically something you'll do with - * e.g. [Mercurius](https://mercurius.dev) or [Apollo - * Server](https://apollographql.com/docs/apollo-server/api/apollo-server). + * The context data is typically a singleton scoped to the lifecycle of the request. This means + * created at the beginning of a request and then passed to all the resolvers that execute while + * resolving the request. It is often used to store information like the current user making the + * request. Nexus is not responsible for this however. That is typically something you'll do with + * e.g. [Mercurius](https://mercurius.dev) or [Apollo + * Server](https://apollographql.com/docs/apollo-server/api/apollo-server). * - * Note that the type here will be whatever you have specified for "contextType" in your makeSchema - * configuration. + * Note that the type here will be whatever you have specified for "contextType" in your makeSchema + * configuration. * @param info The GraphQL resolve info. * - * This is an advanced parameter seldom used. It includes things like the AST of the [GraphQL - * document](https://spec.graphql.org/June2018/#sec-Language.Document) sent by the client. + * This is an advanced parameter seldom used. It includes things like the AST of the [GraphQL + * document](https://spec.graphql.org/June2018/#sec-Language.Document) sent by the client. * @returns A boolean indicating if the received source data is of this type or not. */ isTypeOf: IsTypeOfHandler @@ -374,7 +374,7 @@ export type MaybeTypeDefConfigFieldIsTypeOf = * Get an object with the `resolveType` field if applicable for the given abstract Type. * * @remarks - * Intersect the result of this with other things to build up the final options for a type def. + * Intersect the result of this with other things to build up the final options for a type def. */ export type MaybeTypeDefConfigFieldResolveType = IsFeatureEnabled2< 'abstractTypeStrategies', diff --git a/src/typegenPrinter.ts b/src/typegenPrinter.ts index 83798544..5e0b2ba2 100644 --- a/src/typegenPrinter.ts +++ b/src/typegenPrinter.ts @@ -26,6 +26,7 @@ import { isNexusPrintedGenTyping, isNexusPrintedGenTypingImport } from './defini import type { NexusGraphQLSchema } from './definitions/_types' import { TYPEGEN_HEADER } from './lang' import type { StringLike } from './plugin' +import { hasNexusExtension } from './extensions' import { eachObj, getOwnPackage, @@ -62,11 +63,10 @@ interface TypegenInfoWithFile extends TypegenInfo { /** * We track and output a few main things: * - * 1. "root" types, or the values that fill the first argument for a given object type - * 2. "arg" types, the values that are arguments to output fields. - * 3. "return" types, the values returned from the resolvers... usually just list/nullable variations on the - * "root" types for other types - * 4. The names of all types, grouped by type. + * 1. "root" types, or the values that fill the first argument for a given object type 2. "arg" types, the + * values that are arguments to output fields. 3. "return" types, the values returned from the resolvers... + * usually just list/nullable variations on the + * "root" types for other types 4. The names of all types, grouped by type. * * - Non-scalar types will get a dedicated "Root" type associated with it */ @@ -368,7 +368,7 @@ export class TypegenPrinter { private printInheritedFieldMap() { const hasInterfaces: ( - | (GraphQLInterfaceType & { getInterfaces(): GraphQLInterfaceType[] }) + | (GraphQLInterfaceType & { getInterfaces(): ReadonlyArray }) | GraphQLObjectType )[] = [] const withInterfaces = hasInterfaces @@ -619,7 +619,7 @@ export class TypegenPrinter { // Used in test mocking _type: GraphQLObjectType ) { - if (field.extensions && field.extensions.nexus) { + if (field.extensions && hasNexusExtension(field.extensions.nexus)) { return field.extensions.nexus.hasDefinedResolver } return Boolean(field.resolve) diff --git a/src/utils.ts b/src/utils.ts index 60880e27..73895fc8 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -234,7 +234,7 @@ function nixifyPathSlashes(path: string): string { * Format a path so it is suitable to be used as a module import. * * - Implicitly relative is made explicitly relative - TypeScript file extension is stripped - Windows slashes - * converted into *nix slashes + * converted into *nix slashes * * Do not pass Node module IDs here as they will be treated as relative paths e.g. "react" "@types/react" etc. */ @@ -553,7 +553,7 @@ export function getNexusNamedType( namedType = resolveNexusMetaType(namedType) } } - return namedType + return namedType as AllNexusNamedTypeDefs | GraphQLNamedType | string } /** Assertion utility with nexus-aware feedback for users. */ @@ -598,12 +598,20 @@ export function graphql15InterfaceConfig( - type: T & { getInterfaces?: () => GraphQLInterfaceType[] } -): T & { getInterfaces(): GraphQLInterfaceType[] } { + type: T & { getInterfaces?: () => ReadonlyArray } +): T & { getInterfaces(): ReadonlyArray } { if (typeof type.getInterfaces !== 'function') { type.getInterfaces = () => [] } - return type as T & { getInterfaces(): GraphQLInterfaceType[] } + return type as T & { getInterfaces(): ReadonlyArray } +} + +/** @internal */ +export function unpack(val: T | (() => T)): T { + if (val instanceof Function) { + return val() + } + return val } /** diff --git a/tests/__snapshots__/builder.spec.ts.snap b/tests/__snapshots__/builder.spec.ts.snap index 7ad71a6b..f0c59b99 100644 --- a/tests/__snapshots__/builder.spec.ts.snap +++ b/tests/__snapshots__/builder.spec.ts.snap @@ -16,8 +16,7 @@ type Query { type RootMutation { name: String -} -" +}" `; exports[`builder can replace the Query root type with an alternate type 1`] = ` @@ -31,8 +30,7 @@ type Query { type RootQuery { name: String -} -" +}" `; exports[`builder can replace the Subscription root type with an alternate type 1`] = ` @@ -51,8 +49,7 @@ type RootSubscription { type Subscription { ok: String -} -" +}" `; exports[`builder does not add a placeholder Query type when an alternate queryRoot has been defined 1`] = ` @@ -62,8 +59,7 @@ exports[`builder does not add a placeholder Query type when an alternate queryRo type RootQuery { name: String -} -" +}" `; exports[`builder.mergeSchema Merges Mutation & Query types by default: merged mutation 1`] = ` @@ -125,13 +121,12 @@ type Query { userByUuids(uuid: UUID): User } +scalar UUID + type User implements ExternalNode & Node { id: ID! name: String -} - -scalar UUID -" +}" `; exports[`builder.mergeSchema can merge with local types: merged 1`] = ` @@ -156,6 +151,5 @@ exports[`graphql-js interop extend types works with GraphQLNamedType (#88) 1`] = type Viewer { name: String age: Int -} -" +}" `; diff --git a/tests/__snapshots__/definitions.spec.ts.snap b/tests/__snapshots__/definitions.spec.ts.snap index 66aa8a2a..1add7ffa 100644 --- a/tests/__snapshots__/definitions.spec.ts.snap +++ b/tests/__snapshots__/definitions.spec.ts.snap @@ -17,8 +17,7 @@ type Out { type Query { ok: Boolean! -} -" +}" `; exports[`extendInputType should allow extending input objects 1`] = ` diff --git a/tests/__snapshots__/makeSchema.spec.ts.snap b/tests/__snapshots__/makeSchema.spec.ts.snap index 07fc5111..835160e3 100644 --- a/tests/__snapshots__/makeSchema.spec.ts.snap +++ b/tests/__snapshots__/makeSchema.spec.ts.snap @@ -6,8 +6,7 @@ exports[`makeSchema shouldExitAfterGenerateArtifacts accepts a customPrintSchema type Query { - # Example boolean field + \\"\\"\\"Example boolean field\\"\\"\\" ok: Boolean -} -" +}" `; diff --git a/tests/__snapshots__/nonNullDefaults.spec.ts.snap b/tests/__snapshots__/nonNullDefaults.spec.ts.snap index c4138e48..67934329 100644 --- a/tests/__snapshots__/nonNullDefaults.spec.ts.snap +++ b/tests/__snapshots__/nonNullDefaults.spec.ts.snap @@ -4,30 +4,26 @@ exports[`nonNullDefaults false/false on schema 1`] = ` "type Query { stringList: [String] test(test: Int): Boolean -} -" +}" `; exports[`nonNullDefaults false/false on type 1`] = ` "type Query { stringList: [String] test(test: Int): Boolean -} -" +}" `; exports[`nonNullDefaults true/true on schema 1`] = ` "type Query { stringList: [String!]! test(test: Int!): Boolean! -} -" +}" `; exports[`nonNullDefaults true/true on type 1`] = ` "type Query { stringList: [String!]! test(test: Int!): Boolean! -} -" +}" `; diff --git a/tests/__snapshots__/plugin.spec.ts.snap b/tests/__snapshots__/plugin.spec.ts.snap index 41462891..a8ef8469 100644 --- a/tests/__snapshots__/plugin.spec.ts.snap +++ b/tests/__snapshots__/plugin.spec.ts.snap @@ -31,8 +31,7 @@ exports[`plugin has an onAddOutputField / onAddInputField / onAddArg option, whi input SomeType { inputField: [Boolean] -} -" +}" `; exports[`plugin has an onMissingType, which will be called in order when we encounter a missing type 1`] = ` @@ -57,8 +56,7 @@ type UserConnection { type UserEdge { cursor: String node: User -} -" +}" `; exports[`plugin is applied to the resolver for every field in the schema 1`] = ` diff --git a/tests/__snapshots__/plugins.spec.ts.snap b/tests/__snapshots__/plugins.spec.ts.snap index dd46dfbe..9cf01d39 100644 --- a/tests/__snapshots__/plugins.spec.ts.snap +++ b/tests/__snapshots__/plugins.spec.ts.snap @@ -7,33 +7,29 @@ exports[`onInstall plugins does not have access to inline types 1`] = ` type Query { bar(inline: Inline): String -} -" +}" `; exports[`onInstall plugins does not see fallback ok-query 1`] = ` "type Query { ok: Boolean! -} -" +}" `; exports[`onInstall plugins has access to top-level types 1`] = ` -"type foo { - bar: String -} - -type Query { +"type Query { ok: Boolean! } -" + +type foo { + bar: String +}" `; exports[`onInstall plugins may contribute types 1`] = ` "type Query { something: String -} -" +}" `; exports[`runtime config validation checks name is not empty 1`] = `"Plugin \\"\\" is giving an invalid value for property name: empty string"`; diff --git a/tests/_setup.ts b/tests/_setup.ts index ba3fc884..1ae8ef70 100644 --- a/tests/_setup.ts +++ b/tests/_setup.ts @@ -27,8 +27,10 @@ export function typeCheck( const project = new tsm.Project({ tsConfigFilePath, - compilerOptions, - addFilesFromTsConfig: true, + compilerOptions: { + ...compilerOptions, + useUnknownInCatchVariables: false, + }, }) if (fileNames.length) { diff --git a/tests/args.spec.ts b/tests/args.spec.ts index 7e51349a..61b69557 100644 --- a/tests/args.spec.ts +++ b/tests/args.spec.ts @@ -44,17 +44,17 @@ beforeAll(() => { it('can be implemented by object types', async () => { expect( - await graphql( + await graphql({ schema, - ` + source: ` { user(int: 1, bool: true, float: 123.45, str: "Test") { id name } } - ` - ) + `, + }) ).toMatchSnapshot() }) diff --git a/tests/backingTypes.spec.ts b/tests/backingTypes.spec.ts index 8ecaf0e8..6af4aea1 100644 --- a/tests/backingTypes.spec.ts +++ b/tests/backingTypes.spec.ts @@ -1,5 +1,6 @@ import * as path from 'path' import { core, enumType, makeSchema, objectType, queryType } from '../src' +import type { NexusGraphQLSchema } from '../src/core' import { A, B } from './_types' const { TypegenPrinter, TypegenMetadata } = core @@ -31,7 +32,10 @@ function getSchemaWithConstEnums() { types: [ enumType({ name: 'B', - members: [B.NINE, B.TEN], + members: { + NINE: B.NINE, + TEN: B.TEN, + }, }), queryType({ definition(t) { @@ -72,7 +76,7 @@ describe('sourceTypes', () => { it('can match source types to regular enums', async () => { const schema = getSchemaWithNormalEnums() const typegenInfo = await metadata.getTypegenInfo(schema) - const typegen = new TypegenPrinter(schema, { + const typegen = new TypegenPrinter(schema as NexusGraphQLSchema, { ...typegenInfo, typegenPath: '', }) @@ -84,7 +88,7 @@ describe('sourceTypes', () => { it('can match source types for const enums', async () => { const schema = getSchemaWithConstEnums() const typegenInfo = await metadata.getTypegenInfo(schema) - const typegen = new TypegenPrinter(schema, { + const typegen = new TypegenPrinter(schema as NexusGraphQLSchema, { ...typegenInfo, typegenPath: '', }) @@ -113,7 +117,7 @@ describe('sourceTypings', () => { outputs: false, }) const typegenInfo = await metadata.getTypegenInfo(schema) - const typegen = new TypegenPrinter(schema, { + const typegen = new TypegenPrinter(schema as NexusGraphQLSchema, { ...typegenInfo, typegenPath: '', }) @@ -141,7 +145,7 @@ describe('sourceTypings', () => { }) const typegenInfo = await metadata.getTypegenInfo(schema) - const typegen = new TypegenPrinter(schema, { + const typegen = new TypegenPrinter(schema as NexusGraphQLSchema, { ...typegenInfo, typegenPath: '', }) @@ -172,7 +176,7 @@ describe('sourceTypings', () => { }) const typegenInfo = await metadata.getTypegenInfo(schema) - const typegen = new TypegenPrinter(schema, { + const typegen = new TypegenPrinter(schema as NexusGraphQLSchema, { ...typegenInfo, typegenPath: '', }) diff --git a/tests/builder.spec.ts b/tests/builder.spec.ts index 7a04d407..563701a2 100644 --- a/tests/builder.spec.ts +++ b/tests/builder.spec.ts @@ -39,7 +39,7 @@ describe('builder', () => { query: OtherQuery, }, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) it('does not add a placeholder Query type when an alternate queryRoot has been defined', () => { @@ -56,7 +56,7 @@ describe('builder', () => { query: OtherQuery, }, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) it('can replace the Mutation root type with an alternate type', () => { @@ -80,7 +80,7 @@ describe('builder', () => { mutation: OtherMutation, }, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) it('can replace the Subscription root type with an alternate type', () => { @@ -104,7 +104,7 @@ describe('builder', () => { subscription: OtherSubscription, }, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) }) @@ -186,7 +186,7 @@ describe('builder.mergeSchema', () => { schema, }, }) - expect(printSchema(lexicographicSortSchema(finalSchema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(finalSchema)).trim()).toMatchSnapshot() }) it('can exclude types from the output schema', () => { @@ -330,6 +330,6 @@ describe('graphql-js interop', () => { types: [Query, NexusViewer], }) - expect(printSchema(schema)).toMatchSnapshot() + expect(printSchema(schema).trim()).toMatchSnapshot() }) }) diff --git a/tests/definitions.spec.ts b/tests/definitions.spec.ts index 9d1dcfd7..e8604dac 100644 --- a/tests/definitions.spec.ts +++ b/tests/definitions.spec.ts @@ -1,11 +1,19 @@ /// -import { GraphQLEnumType, GraphQLObjectType, lexicographicSortSchema, printSchema, printType } from 'graphql' -import type { TypeMap } from 'graphql/type/schema' +import { + GraphQLEnumType, + GraphQLSchema, + GraphQLObjectType, + lexicographicSortSchema, + printSchema, + printType, +} from 'graphql' import { enumType, extendInputType, extendType, idArg, inputObjectType, makeSchema, objectType } from '../src' import { list } from '../src/definitions/list' import { nonNull } from '../src/definitions/nonNull' import { PostObject, UserObject } from './__helpers' +type TypeMap = ReturnType + enum NativeColors { RED = 'RED', BLUE = 'BLUE', @@ -154,7 +162,7 @@ describe('enumType', () => { }), ], }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) }) diff --git a/tests/definitions/nexusMeta.spec.ts b/tests/definitions/nexusMeta.spec.ts index 5ef1c7fa..bdeb2d43 100644 --- a/tests/definitions/nexusMeta.spec.ts +++ b/tests/definitions/nexusMeta.spec.ts @@ -124,9 +124,9 @@ describe('nexusMeta', () => { shouldGenerateArtifacts: false, }) expect( - await graphql( + await graphql({ schema, - ` + source: ` query UserToNexus { user { id @@ -140,8 +140,8 @@ describe('nexusMeta', () => { } } } - ` - ) + `, + }) ).toMatchSnapshot() }) @@ -155,9 +155,9 @@ describe('nexusMeta', () => { shouldGenerateArtifacts: false, }) expect( - await graphql( + await graphql({ schema, - ` + source: ` query UserToNexus { user { id @@ -167,8 +167,8 @@ describe('nexusMeta', () => { } } } - ` - ) + `, + }) ).toMatchSnapshot() }) }) diff --git a/tests/inputObjectType.spec.ts b/tests/inputObjectType.spec.ts index 42aaafd3..9e58679e 100644 --- a/tests/inputObjectType.spec.ts +++ b/tests/inputObjectType.spec.ts @@ -45,16 +45,16 @@ describe('inputObject', () => { outputs: false, shouldGenerateArtifacts: false, }) - const result = await graphql( + const result = await graphql({ schema, - ` + source: ` { user(input: { boolInput: true, floatInput: 123.4, intInput: 1 }) { id } } - ` - ) + `, + }) expect(result).toMatchSnapshot() }) it('has asArg for using one-off inputObjects inline', async () => { @@ -87,16 +87,16 @@ describe('inputObject', () => { outputs: false, shouldGenerateArtifacts: false, }) - const result = await graphql( + const result = await graphql({ schema, - ` + source: ` { user(input: { boolInput: true, floatInput: 123.4, intInput: 1 }) { id } } - ` - ) + `, + }) expect(result).toMatchSnapshot() }) }) diff --git a/tests/integrations/unionTooComplexToRepresent/__schema.graphql b/tests/integrations/unionTooComplexToRepresent/__schema.graphql index 9abff816..579674d7 100644 --- a/tests/integrations/unionTooComplexToRepresent/__schema.graphql +++ b/tests/integrations/unionTooComplexToRepresent/__schema.graphql @@ -1,18 +1,6 @@ ### This file was generated by Nexus Schema ### Do not make changes to this file directly -type aEOOAAKG { - id166: ID -} - -type ahctkrlN { - id222: ID -} - -type aKYfIihK { - id212: ID -} - type ALXAXBKq { id41: ID } @@ -21,474 +9,390 @@ type AOogKhAD { id53: ID } -type ApAniugk { - id51: ID -} - type AQDzZPsI { id193: ID } -type arOfyZvi { - id194: ID +type ApAniugk { + id51: ID } type AuMxHAoX { id146: ID } -type awDoUlrM { - id119: ID -} - type BAzfAeMR { id191: ID } -type bdmjhrZP { - id36: ID -} - type BFohGIGQ { id286: ID } -type bGRbQdGF { - id143: ID +type BTIsXTrL { + id250: ID +} + +type BWwxnXpM { + id294: ID +} + +type BXowGvwZ { + id63: ID +} + +type BYPWzETJ { + id266: ID +} + +type BiZjyuaY { + id25: ID } union BigUnion = - aEOOAAKG - | ahctkrlN - | aKYfIihK - | ALXAXBKq + ALXAXBKq | AOogKhAD - | ApAniugk | AQDzZPsI - | arOfyZvi + | ApAniugk | AuMxHAoX - | awDoUlrM | BAzfAeMR - | bdmjhrZP | BFohGIGQ - | bGRbQdGF - | BiZjyuaY - | Bjgguvhd - | bLcHZPpX - | bNaHPVhI - | bndWrLAg - | bpcReAKs - | bsuhpkhX | BTIsXTrL | BWwxnXpM | BXowGvwZ | BYPWzETJ + | BiZjyuaY + | Bjgguvhd | CCXSFsMn - | cEORMlXC - | CgAQHanX - | cGxDWUGD - | cMxjKIfV - | ctfzshTJ - | cXAmxvqv | CXumheDD - | dAmPEeQn - | dbFplbat - | DbgPTfDo + | CgAQHanX | DBZLsxpr - | deqJYjdv | DGxuhtpo - | dHKrfYNo | DKEJFUiy - | DkoAlvGn | DMggicLd - | dnjGpfIS | DNohRdIN - | dnutiEie - | dOWdqEud + | DbgPTfDo + | DkoAlvGn | DpnWHIJW | ECChhDfK - | eemljdwg - | eggnlUYr + | ETUiuOHD | EhpNnQJw | EjIQIfmv - | eJSSQaaC | EqEZXLCy - | eROeesVg | EtPHwkkm - | ETUiuOHD - | euCWAGET - | eWlLfMzi | EzcWBhIv - | FaJAYKqm - | faKaQEBn - | FcFlCNAk - | fDAloqko | FDouQoXO - | fFyvwcxZ | FHLtgKoA - | fPXYtcbT + | FaJAYKqm + | FcFlCNAk | FvftqquW - | fvXQFkRb - | fXnweaVk - | GcpbGXTn | GDATeumz + | GYbaqoRT + | GcpbGXTn | GdxXCAak - | gfyuMPLk | GhHKLcZe - | gQDQWruj - | gqhvwsiF | GsbHZkLK - | gvxFkejN | GwkBnXKj - | GYbaqoRT | GzglazdH - | hAfKmdaD - | hBCadJbD - | HdiyXGxs - | hDsbddpo | HENcJewx - | hEyyqHvv - | hgsVEiUk - | HgYVPDgm - | hIjYlIps | HIPZQFdS | HJmsvtgX - | HjRDJhnX - | hLptFSis | HLRWzsTU | HNLQTErw - | hOqSbuBE - | hQiYNmDV - | hqweSGgf - | hTNuohNQ - | HwkXtjRP | HWMyawvm - | HxCkBUxv | HXZUTyvG | HZbsVdoX + | HdiyXGxs + | HgYVPDgm + | HjRDJhnX + | HwkXtjRP + | HxCkBUxv | IAOEaBfb | IBZxPcZb | ICrkovFe | IGibGxHO + | ISayJMYD + | IWhegzTM + | IZERvBgk | IhSGxaNc | IhtaZNUi - | iqXgPwiC | IqZAiUKE - | ISayJMYD | IuVQPFJN - | iVjcPoMw - | IWhegzTM - | iWpPsvNV - | ixwjWVvf | Iypygftg - | IZERvBgk - | iZJAoMWm - | jAUaKDuu + | JXAbemqC + | JZMQpjQv | JbsCxxcE - | jciWswYD - | jCnSiJOq | JjkgZKrV - | jkcwiNhe - | jmnxoYAy - | jnFMLyxL - | jrmLpsfT | JsAPYbRs | JuaucwDY - | JXAbemqC - | JZMQpjQv - | kAFbqgpE - | kAqRlGFR - | KbTYPbTr - | kEhnOaCH | KGbJMfhO - | kHLLmfcE - | kkQiMyOg - | kKQNulhi - | klkPkaYU + | KVIgujkc + | KbTYPbTr | KoKtAqbt - | kQUqAggO | KsPfaUFr | KvHHVcPa - | KVIgujkc - | kXMItaoE - | laqqtHJN | LBePcCkW - | ldqzvWyd - | lFbOnWGE - | lhdysNNV | LHxWkxKq - | lifwEmKz | LMnZbpCI - | lPtHeBuR - | lsDifAmH | LtvKCzwe - | lVumUBIa - | mFSUfTPi - | mKbKQhyO - | mooFGlVS | MPQLFUho - | mQIYoGzu - | mtikMWMb - | muuoinyp | MvpRfuhb - | mZmlDoBs + | NETQHyFQ | NbTtwcUU | NczZcGdE | NefQmhqG - | NETQHyFQ - | newdlmuf | NlMnyCgu | NrrBYDim | NwPaWUGr | OBnGIgyZ + | OZfGULVa | OehdOjXt | OfyEZrPd - | ogOIrhgb | OjwpvBGH - | oLLKSNvK | OwZeKGSU - | OZfGULVa | PBGQfXYx | PGcwRfdb - | phBMkPER | PHltFHbS | PNeiVzWR - | pnfpWCgc | PNgZWWwo - | PpTuFbFz - | ptQOpnjR | PTtcHGFZ | PVCfSccj | PWOXDRzE - | PwzFJfRE | PYCDIQQc - | qBIjdcrW - | qCzvlwRD - | QelISHAj + | PpTuFbFz + | PwzFJfRE | QKdnhgbW | QMkOOMdT + | QXSXwpMN + | QelISHAj | QmPQoOZh | QxHzTNGy - | qXlhbRwq - | QXSXwpMN | RCZmHSOp - | rDLkvRXw - | rKZaCTrp | RMBiaCdu | RNSfiIOi - | rsrjXXbp | RTcWEgoC | RVbkKVjJ | RydRYmBj | SBNNVkRr | ShqdAPLQ - | sOPJOCHV | SsKBGyvg | Stydvxig - | sYmZSZhS - | TbgzaUgu - | tBRvILTt | TDURJGny | TDztrYLm - | TeZWMTzw - | tfdcstkI - | tgBSTWuP - | tHuINsQQ | TKzetlpb - | tndtDdZP - | TppFHtyg | TWLZYGzk - | tWYLhGmP | TZHgNTAO - | uaVbWYYy - | ubXmVvgH + | TbgzaUgu + | TeZWMTzw + | TppFHtyg | UGJqdGDT - | unjJMyow - | uqAoXisC | UuNFAnQg - | uxqOEIwV | VAvPoGEb - | vKNwRocJ - | vmWUXlxn - | vveXjotS - | vWCRSMfI | VynhbqCL + | WMsrUAGp | WaVLDFqC | WhUVndTD - | WMsrUAGp | WoCNZkWp - | WsneBHrs | WsNuPHEi - | wtjYwstX + | WsneBHrs | WurxotQy - | wvbxCjzQ - | wYUTmKCU - | XdzKjpVP | XFYbFCkA - | xHmRwgeG | XHvdKJbC - | xnxcQfWx + | XdzKjpVP | Xqkpjqni - | xUqWuwDO | XvyULguR | XwweqpQZ | YBZmfmWn - | yJNnsHEj - | yJubHpPP - | yMjEoECr | YNnosqXJ - | yNNQUmqa - | yNumRBxd - | yPDuKVOh - | yrGYxJeE - | yvlysvTB + | YZpErVkH | YwFARARB | YxNVEAVR - | YZpErVkH - | ZbrxBPat | ZElcDXRS - | ZeyczKBv | ZEyINaeG - | zjnLruIQ - | zlPOFwWi - | zLwooCNa - | zpZvbHAk + | ZVaYkAdb + | ZbrxBPat + | ZeyczKBv | ZrPlFevQ + | ZzRSmAyf + | aEOOAAKG + | aKYfIihK + | ahctkrlN + | arOfyZvi + | awDoUlrM + | bGRbQdGF + | bLcHZPpX + | bNaHPVhI + | bdmjhrZP + | bndWrLAg + | bpcReAKs + | bsuhpkhX + | cEORMlXC + | cGxDWUGD + | cMxjKIfV + | cXAmxvqv + | ctfzshTJ + | dAmPEeQn + | dHKrfYNo + | dOWdqEud + | dbFplbat + | deqJYjdv + | dnjGpfIS + | dnutiEie + | eJSSQaaC + | eROeesVg + | eWlLfMzi + | eemljdwg + | eggnlUYr + | euCWAGET + | fDAloqko + | fFyvwcxZ + | fPXYtcbT + | fXnweaVk + | faKaQEBn + | fvXQFkRb + | gQDQWruj + | gfyuMPLk + | gqhvwsiF + | gvxFkejN + | hAfKmdaD + | hBCadJbD + | hDsbddpo + | hEyyqHvv + | hIjYlIps + | hLptFSis + | hOqSbuBE + | hQiYNmDV + | hTNuohNQ + | hgsVEiUk + | hqweSGgf + | iVjcPoMw + | iWpPsvNV + | iZJAoMWm + | iqXgPwiC + | ixwjWVvf + | jAUaKDuu + | jCnSiJOq + | jciWswYD + | jkcwiNhe + | jmnxoYAy + | jnFMLyxL + | jrmLpsfT + | kAFbqgpE + | kAqRlGFR + | kEhnOaCH + | kHLLmfcE + | kKQNulhi + | kQUqAggO + | kXMItaoE + | kkQiMyOg + | klkPkaYU + | lFbOnWGE + | lPtHeBuR + | lVumUBIa + | laqqtHJN + | ldqzvWyd + | lhdysNNV + | lifwEmKz + | lsDifAmH + | mFSUfTPi + | mKbKQhyO + | mQIYoGzu + | mZmlDoBs + | mooFGlVS + | mtikMWMb + | muuoinyp + | newdlmuf + | oLLKSNvK + | ogOIrhgb + | phBMkPER + | pnfpWCgc + | ptQOpnjR + | qBIjdcrW + | qCzvlwRD + | qXlhbRwq + | rDLkvRXw + | rKZaCTrp + | rsrjXXbp + | sOPJOCHV + | sYmZSZhS + | tBRvILTt + | tHuINsQQ + | tWYLhGmP + | tfdcstkI + | tgBSTWuP + | tndtDdZP + | uaVbWYYy + | ubXmVvgH + | unjJMyow + | uqAoXisC + | uxqOEIwV + | vKNwRocJ + | vWCRSMfI + | vmWUXlxn + | vveXjotS + | wYUTmKCU + | wtjYwstX + | wvbxCjzQ + | xHmRwgeG + | xUqWuwDO + | xnxcQfWx + | yJNnsHEj + | yJubHpPP + | yMjEoECr + | yNNQUmqa + | yNumRBxd + | yPDuKVOh + | yrGYxJeE + | yvlysvTB + | zLwooCNa | zUQFahzk - | ZVaYkAdb + | zjnLruIQ + | zlPOFwWi + | zpZvbHAk | zvGUhtyF - | ZzRSmAyf - -type BiZjyuaY { - id25: ID -} type Bjgguvhd { id170: ID } -type bLcHZPpX { - id230: ID -} - -type bNaHPVhI { - id234: ID -} - -type bndWrLAg { - id180: ID -} - -type bpcReAKs { - id48: ID -} - -type bsuhpkhX { - id67: ID -} - -type BTIsXTrL { - id250: ID -} - -type BWwxnXpM { - id294: ID -} - -type BXowGvwZ { - id63: ID -} - -type BYPWzETJ { - id266: ID -} - type CCXSFsMn { id268: ID } -type cEORMlXC { - id169: ID -} - -type CgAQHanX { - id96: ID -} - -type cGxDWUGD { - id247: ID -} - -type cMxjKIfV { - id132: ID -} - -type ctfzshTJ { - id197: ID -} - -type cXAmxvqv { - id81: ID -} - type CXumheDD { id172: ID } -type dAmPEeQn { - id98: ID -} - -type dbFplbat { - id184: ID -} - -type DbgPTfDo { - id254: ID +type CgAQHanX { + id96: ID } type DBZLsxpr { id137: ID } -type deqJYjdv { - id107: ID -} - type DGxuhtpo { id219: ID } -type dHKrfYNo { - id29: ID -} - type DKEJFUiy { id295: ID } -type DkoAlvGn { - id282: ID -} - type DMggicLd { id239: ID } -type dnjGpfIS { - id118: ID -} - type DNohRdIN { id203: ID } -type dnutiEie { - id60: ID +type DbgPTfDo { + id254: ID } -type dOWdqEud { - id66: ID +type DkoAlvGn { + id282: ID } type DpnWHIJW { @@ -499,12 +403,8 @@ type ECChhDfK { id79: ID } -type eemljdwg { - id1: ID -} - -type eggnlUYr { - id109: ID +type ETUiuOHD { + id35: ID } type EhpNnQJw { @@ -515,166 +415,74 @@ type EjIQIfmv { id126: ID } -type eJSSQaaC { - id140: ID -} - type EqEZXLCy { id30: ID } -type eROeesVg { - id38: ID -} - type EtPHwkkm { id57: ID } -type ETUiuOHD { - id35: ID -} - -type euCWAGET { - id158: ID -} - -type eWlLfMzi { - id270: ID -} - type EzcWBhIv { id214: ID } -type FaJAYKqm { - id93: ID -} - -type faKaQEBn { - id284: ID -} - -type FcFlCNAk { - id228: ID -} - -type fDAloqko { - id16: ID -} - type FDouQoXO { id173: ID } -type fFyvwcxZ { - id274: ID -} - type FHLtgKoA { id258: ID } -type fPXYtcbT { - id276: ID +type FaJAYKqm { + id93: ID +} + +type FcFlCNAk { + id228: ID } type FvftqquW { id281: ID } -type fvXQFkRb { - id115: ID +type GDATeumz { + id256: ID } -type fXnweaVk { - id52: ID +type GYbaqoRT { + id105: ID } type GcpbGXTn { id218: ID } -type GDATeumz { - id256: ID -} - type GdxXCAak { id13: ID } -type gfyuMPLk { - id189: ID -} - type GhHKLcZe { id199: ID } -type gQDQWruj { - id22: ID -} - -type gqhvwsiF { - id23: ID -} - type GsbHZkLK { id34: ID } -type gvxFkejN { - id290: ID -} - type GwkBnXKj { id207: ID } -type GYbaqoRT { - id105: ID -} - type GzglazdH { id95: ID } -type hAfKmdaD { - id168: ID -} - -type hBCadJbD { - id138: ID -} - -type HdiyXGxs { - id178: ID -} - -type hDsbddpo { - id237: ID -} - type HENcJewx { id185: ID } -type hEyyqHvv { - id252: ID -} - -type hgsVEiUk { - id240: ID -} - -type HgYVPDgm { - id87: ID -} - -type hIjYlIps { - id210: ID -} - type HIPZQFdS { id251: ID } @@ -683,14 +491,6 @@ type HJmsvtgX { id151: ID } -type HjRDJhnX { - id133: ID -} - -type hLptFSis { - id91: ID -} - type HLRWzsTU { id182: ID } @@ -699,40 +499,36 @@ type HNLQTErw { id155: ID } -type hOqSbuBE { - id27: ID -} - -type hQiYNmDV { - id127: ID +type HWMyawvm { + id187: ID } -type hqweSGgf { - id65: ID +type HXZUTyvG { + id46: ID } -type hTNuohNQ { - id271: ID +type HZbsVdoX { + id68: ID } -type HwkXtjRP { - id84: ID +type HdiyXGxs { + id178: ID } -type HWMyawvm { - id187: ID +type HgYVPDgm { + id87: ID } -type HxCkBUxv { - id192: ID +type HjRDJhnX { + id133: ID } -type HXZUTyvG { - id46: ID +type HwkXtjRP { + id84: ID } -type HZbsVdoX { - id68: ID +type HxCkBUxv { + id192: ID } type IAOEaBfb { @@ -751,6 +547,18 @@ type IGibGxHO { id204: ID } +type ISayJMYD { + id129: ID +} + +type IWhegzTM { + id43: ID +} + +type IZERvBgk { + id32: ID +} + type IhSGxaNc { id103: ID } @@ -759,86 +567,34 @@ type IhtaZNUi { id238: ID } -type iqXgPwiC { - id293: ID -} - type IqZAiUKE { id223: ID } -type ISayJMYD { - id129: ID -} - type IuVQPFJN { id152: ID } -type iVjcPoMw { - id100: ID -} - -type IWhegzTM { - id43: ID -} - -type iWpPsvNV { - id259: ID -} - -type ixwjWVvf { - id97: ID -} - type Iypygftg { id77: ID } -type IZERvBgk { - id32: ID -} - -type iZJAoMWm { - id141: ID +type JXAbemqC { + id153: ID } -type jAUaKDuu { - id260: ID +type JZMQpjQv { + id125: ID } type JbsCxxcE { id8: ID } -type jciWswYD { - id208: ID -} - -type jCnSiJOq { - id188: ID -} - type JjkgZKrV { id202: ID } -type jkcwiNhe { - id74: ID -} - -type jmnxoYAy { - id287: ID -} - -type jnFMLyxL { - id277: ID -} - -type jrmLpsfT { - id201: ID -} - type JsAPYbRs { id156: ID } @@ -847,600 +603,984 @@ type JuaucwDY { id134: ID } -type JXAbemqC { - id153: ID -} - -type JZMQpjQv { - id125: ID -} - -type kAFbqgpE { - id102: ID +type KGbJMfhO { + id159: ID } -type kAqRlGFR { - id299: ID +type KVIgujkc { + id157: ID } type KbTYPbTr { id92: ID } -type kEhnOaCH { - id111: ID +type KoKtAqbt { + id213: ID } -type KGbJMfhO { - id159: ID +type KsPfaUFr { + id86: ID } -type kHLLmfcE { - id164: ID +type KvHHVcPa { + id147: ID } -type kkQiMyOg { - id33: ID +type LBePcCkW { + id112: ID } -type kKQNulhi { - id5: ID -} - -type klkPkaYU { - id272: ID -} - -type KoKtAqbt { - id213: ID -} - -type kQUqAggO { - id17: ID -} - -type KsPfaUFr { - id86: ID -} - -type KvHHVcPa { - id147: ID -} - -type KVIgujkc { - id157: ID -} - -type kXMItaoE { - id154: ID -} - -type laqqtHJN { - id206: ID -} - -type LBePcCkW { - id112: ID -} - -type ldqzvWyd { - id235: ID -} - -type lFbOnWGE { - id280: ID -} - -type lhdysNNV { - id71: ID -} - -type LHxWkxKq { - id64: ID -} - -type lifwEmKz { - id246: ID +type LHxWkxKq { + id64: ID } type LMnZbpCI { id106: ID } -type lPtHeBuR { - id160: ID -} - -type lsDifAmH { - id298: ID -} - type LtvKCzwe { id19: ID } -type lVumUBIa { - id174: ID +type MPQLFUho { + id31: ID } union MediumUnionType = AOogKhAD | ApAniugk | AuMxHAoX - | awDoUlrM - | bGRbQdGF - | bsuhpkhX | BXowGvwZ | CgAQHanX - | cMxjKIfV - | cXAmxvqv - | dAmPEeQn | DBZLsxpr - | deqJYjdv - | dnjGpfIS - | dnutiEie - | dOWdqEud | ECChhDfK - | eggnlUYr | EhpNnQJw | EjIQIfmv - | eJSSQaaC | EtPHwkkm | FaJAYKqm - | fvXQFkRb - | fXnweaVk | GYbaqoRT | GzglazdH - | hBCadJbD + | HZbsVdoX | HgYVPDgm | HjRDJhnX - | hLptFSis - | hQiYNmDV - | hqweSGgf | HwkXtjRP - | HZbsVdoX | IAOEaBfb | ICrkovFe - | IhSGxaNc | ISayJMYD - | iVjcPoMw - | ixwjWVvf + | IhSGxaNc | Iypygftg - | iZJAoMWm - | jkcwiNhe - | JuaucwDY | JZMQpjQv - | kAFbqgpE + | JuaucwDY | KbTYPbTr - | kEhnOaCH | KsPfaUFr | KvHHVcPa | LBePcCkW - | lhdysNNV | LHxWkxKq | LMnZbpCI - | mFSUfTPi - | muuoinyp - | NefQmhqG | NETQHyFQ + | NefQmhqG | OwZeKGSU | PBGQfXYx | PGcwRfdb | PNeiVzWR - | pnfpWCgc | PNgZWWwo | PTtcHGFZ | PWOXDRzE | PwzFJfRE - | qBIjdcrW - | qCzvlwRD - | QelISHAj | QMkOOMdT - | qXlhbRwq - | rKZaCTrp + | QelISHAj | RMBiaCdu | RNSfiIOi - | sOPJOCHV | SsKBGyvg + | TWLZYGzk | TbgzaUgu - | tHuINsQQ | TppFHtyg - | TWLZYGzk - | uaVbWYYy - | ubXmVvgH | UGJqdGDT | WaVLDFqC | WhUVndTD | WoCNZkWp | WsneBHrs - | wtjYwstX | WurxotQy - | wvbxCjzQ | XFYbFCkA - | xnxcQfWx | XvyULguR | YBZmfmWn + | ZEyINaeG + | awDoUlrM + | bGRbQdGF + | bsuhpkhX + | cMxjKIfV + | cXAmxvqv + | dAmPEeQn + | dOWdqEud + | deqJYjdv + | dnjGpfIS + | dnutiEie + | eJSSQaaC + | eggnlUYr + | fXnweaVk + | fvXQFkRb + | hBCadJbD + | hLptFSis + | hQiYNmDV + | hqweSGgf + | iVjcPoMw + | iZJAoMWm + | ixwjWVvf + | jkcwiNhe + | kAFbqgpE + | kEhnOaCH + | lhdysNNV + | mFSUfTPi + | muuoinyp + | pnfpWCgc + | qBIjdcrW + | qCzvlwRD + | qXlhbRwq + | rKZaCTrp + | sOPJOCHV + | tHuINsQQ + | uaVbWYYy + | ubXmVvgH + | wtjYwstX + | wvbxCjzQ + | xnxcQfWx | yJNnsHEj | yrGYxJeE - | ZEyINaeG | zpZvbHAk union MediumUnionTypes = ALXAXBKq | AOogKhAD | ApAniugk - | bdmjhrZP - | BiZjyuaY - | bpcReAKs - | bsuhpkhX | BXowGvwZ + | BiZjyuaY | CgAQHanX - | cXAmxvqv - | dAmPEeQn - | dHKrfYNo - | dnutiEie - | dOWdqEud | DpnWHIJW | ECChhDfK - | eemljdwg + | ETUiuOHD | EqEZXLCy - | eROeesVg | EtPHwkkm - | ETUiuOHD | FaJAYKqm - | fDAloqko - | fXnweaVk | GdxXCAak - | gQDQWruj - | gqhvwsiF | GsbHZkLK | GzglazdH - | HgYVPDgm - | hLptFSis - | hOqSbuBE - | hqweSGgf - | HwkXtjRP | HXZUTyvG | HZbsVdoX + | HgYVPDgm + | HwkXtjRP | ICrkovFe | IWhegzTM - | ixwjWVvf - | Iypygftg | IZERvBgk + | Iypygftg | JbsCxxcE - | jkcwiNhe | KbTYPbTr - | kkQiMyOg - | kKQNulhi - | kQUqAggO | KsPfaUFr - | lhdysNNV | LHxWkxKq | LtvKCzwe - | mooFGlVS | MPQLFUho - | mQIYoGzu - | muuoinyp - | NbTtwcUU | NETQHyFQ - | newdlmuf + | NbTtwcUU | OfyEZrPd - | ogOIrhgb | PBGQfXYx | PGcwRfdb - | pnfpWCgc - | PpTuFbFz | PWOXDRzE - | PwzFJfRE | PYCDIQQc - | qCzvlwRD - | QelISHAj + | PpTuFbFz + | PwzFJfRE | QKdnhgbW - | qXlhbRwq + | QelISHAj | RCZmHSOp - | rKZaCTrp | RMBiaCdu | RNSfiIOi | RTcWEgoC | SsKBGyvg - | sYmZSZhS | TDURJGny | TDztrYLm - | tgBSTWuP - | tndtDdZP - | TppFHtyg | TWLZYGzk - | uaVbWYYy + | TppFHtyg | UGJqdGDT - | uqAoXisC - | uxqOEIwV - | vveXjotS - | vWCRSMfI | VynhbqCL | WurxotQy - | XdzKjpVP | XFYbFCkA - | xHmRwgeG - | xnxcQfWx + | XdzKjpVP | Xqkpjqni | YBZmfmWn - | ZeyczKBv | ZEyINaeG + | ZeyczKBv + | bdmjhrZP + | bpcReAKs + | bsuhpkhX + | cXAmxvqv + | dAmPEeQn + | dHKrfYNo + | dOWdqEud + | dnutiEie + | eROeesVg + | eemljdwg + | fDAloqko + | fXnweaVk + | gQDQWruj + | gqhvwsiF + | hLptFSis + | hOqSbuBE + | hqweSGgf + | ixwjWVvf + | jkcwiNhe + | kKQNulhi + | kQUqAggO + | kkQiMyOg + | lhdysNNV + | mQIYoGzu + | mooFGlVS + | muuoinyp + | newdlmuf + | ogOIrhgb + | pnfpWCgc + | qCzvlwRD + | qXlhbRwq + | rKZaCTrp + | sYmZSZhS + | tgBSTWuP + | tndtDdZP + | uaVbWYYy + | uqAoXisC + | uxqOEIwV + | vWCRSMfI + | vveXjotS + | xHmRwgeG + | xnxcQfWx + +type MvpRfuhb { + id198: ID +} + +type NETQHyFQ { + id55: ID +} + +type NbTtwcUU { + id0: ID +} + +type NczZcGdE { + id209: ID +} + +type NefQmhqG { + id149: ID +} + +type NlMnyCgu { + id162: ID +} + +type NrrBYDim { + id163: ID +} + +type NwPaWUGr { + id292: ID +} + +type OBnGIgyZ { + id242: ID +} + +type OZfGULVa { + id195: ID +} + +type OehdOjXt { + id278: ID +} + +type OfyEZrPd { + id21: ID +} + +type OjwpvBGH { + id227: ID +} + +type OwZeKGSU { + id128: ID +} + +type PBGQfXYx { + id83: ID +} + +type PGcwRfdb { + id62: ID +} + +type PHltFHbS { + id226: ID +} + +type PNeiVzWR { + id113: ID +} + +type PNgZWWwo { + id148: ID +} + +type PTtcHGFZ { + id114: ID +} + +type PVCfSccj { + id224: ID +} + +type PWOXDRzE { + id56: ID +} + +type PYCDIQQc { + id24: ID +} + +type PpTuFbFz { + id6: ID +} + +type PwzFJfRE { + id90: ID +} + +type QKdnhgbW { + id3: ID +} + +type QMkOOMdT { + id122: ID +} + +type QXSXwpMN { + id211: ID +} + +type QelISHAj { + id58: ID +} + +type QmPQoOZh { + id220: ID +} + +type Query { + ok: Boolean! +} + +type QxHzTNGy { + id265: ID +} + +type RCZmHSOp { + id10: ID +} + +type RMBiaCdu { + id75: ID +} + +type RNSfiIOi { + id61: ID +} + +type RTcWEgoC { + id44: ID +} + +type RVbkKVjJ { + id231: ID +} + +type RydRYmBj { + id255: ID +} + +type SBNNVkRr { + id257: ID +} + +type ShqdAPLQ { + id297: ID +} + +type SsKBGyvg { + id50: ID +} + +type Stydvxig { + id245: ID +} + +type TDURJGny { + id2: ID +} + +type TDztrYLm { + id20: ID +} + +type TKzetlpb { + id171: ID +} + +type TWLZYGzk { + id59: ID +} + +type TZHgNTAO { + id215: ID +} + +type TbgzaUgu { + id123: ID +} + +type TeZWMTzw { + id175: ID +} + +type TppFHtyg { + id82: ID +} + +type UGJqdGDT { + id54: ID +} + +type UuNFAnQg { + id263: ID +} + +type VAvPoGEb { + id217: ID +} + +type VynhbqCL { + id26: ID +} + +type WMsrUAGp { + id181: ID +} + +type WaVLDFqC { + id136: ID +} + +type WhUVndTD { + id145: ID +} + +type WoCNZkWp { + id144: ID +} + +type WsNuPHEi { + id225: ID +} + +type WsneBHrs { + id101: ID +} + +type WurxotQy { + id72: ID +} + +type XFYbFCkA { + id69: ID +} + +type XHvdKJbC { + id285: ID +} + +type XdzKjpVP { + id4: ID +} + +type Xqkpjqni { + id15: ID +} + +type XvyULguR { + id104: ID +} + +type XwweqpQZ { + id275: ID +} + +type YBZmfmWn { + id88: ID +} + +type YNnosqXJ { + id244: ID +} + +type YZpErVkH { + id264: ID +} + +type YwFARARB { + id216: ID +} + +type YxNVEAVR { + id221: ID +} + +type ZElcDXRS { + id165: ID +} + +type ZEyINaeG { + id85: ID +} + +type ZVaYkAdb { + id279: ID +} + +type ZbrxBPat { + id232: ID +} + +type ZeyczKBv { + id12: ID +} + +type ZrPlFevQ { + id248: ID +} + +type ZzRSmAyf { + id161: ID +} + +type aEOOAAKG { + id166: ID +} + +type aKYfIihK { + id212: ID +} + +type ahctkrlN { + id222: ID +} + +type arOfyZvi { + id194: ID +} + +type awDoUlrM { + id119: ID +} + +type bGRbQdGF { + id143: ID +} + +type bLcHZPpX { + id230: ID +} + +type bNaHPVhI { + id234: ID +} + +type bdmjhrZP { + id36: ID +} + +type bndWrLAg { + id180: ID +} + +type bpcReAKs { + id48: ID +} + +type bsuhpkhX { + id67: ID +} + +type cEORMlXC { + id169: ID +} + +type cGxDWUGD { + id247: ID +} + +type cMxjKIfV { + id132: ID +} + +type cXAmxvqv { + id81: ID +} + +type ctfzshTJ { + id197: ID +} -type mFSUfTPi { - id116: ID +type dAmPEeQn { + id98: ID } -type mKbKQhyO { - id167: ID +type dHKrfYNo { + id29: ID } -type mooFGlVS { - id14: ID +type dOWdqEud { + id66: ID } -type MPQLFUho { - id31: ID +type dbFplbat { + id184: ID } -type mQIYoGzu { - id28: ID +type deqJYjdv { + id107: ID } -type mtikMWMb { - id261: ID +type dnjGpfIS { + id118: ID } -type muuoinyp { - id70: ID +type dnutiEie { + id60: ID } -type MvpRfuhb { - id198: ID +type eJSSQaaC { + id140: ID } -type mZmlDoBs { - id273: ID +type eROeesVg { + id38: ID } -type NbTtwcUU { - id0: ID +type eWlLfMzi { + id270: ID } -type NczZcGdE { - id209: ID +type eemljdwg { + id1: ID } -type NefQmhqG { - id149: ID +type eggnlUYr { + id109: ID } -type NETQHyFQ { - id55: ID +type euCWAGET { + id158: ID } -type newdlmuf { - id39: ID +type fDAloqko { + id16: ID } -type NlMnyCgu { - id162: ID +type fFyvwcxZ { + id274: ID } -type NrrBYDim { - id163: ID +type fPXYtcbT { + id276: ID } -type NwPaWUGr { - id292: ID +type fXnweaVk { + id52: ID } -type OBnGIgyZ { - id242: ID +type faKaQEBn { + id284: ID } -type OehdOjXt { - id278: ID +type fvXQFkRb { + id115: ID } -type OfyEZrPd { - id21: ID +type gQDQWruj { + id22: ID } -type ogOIrhgb { - id47: ID +type gfyuMPLk { + id189: ID } -type OjwpvBGH { - id227: ID +type gqhvwsiF { + id23: ID } -type oLLKSNvK { - id176: ID +type gvxFkejN { + id290: ID } -type OwZeKGSU { - id128: ID +type hAfKmdaD { + id168: ID } -type OZfGULVa { - id195: ID +type hBCadJbD { + id138: ID } -type PBGQfXYx { - id83: ID +type hDsbddpo { + id237: ID } -type PGcwRfdb { - id62: ID +type hEyyqHvv { + id252: ID } -type phBMkPER { - id236: ID +type hIjYlIps { + id210: ID } -type PHltFHbS { - id226: ID +type hLptFSis { + id91: ID } -type PNeiVzWR { - id113: ID +type hOqSbuBE { + id27: ID } -type pnfpWCgc { - id99: ID +type hQiYNmDV { + id127: ID } -type PNgZWWwo { - id148: ID +type hTNuohNQ { + id271: ID } -type PpTuFbFz { - id6: ID +type hgsVEiUk { + id240: ID } -type ptQOpnjR { - id190: ID +type hqweSGgf { + id65: ID } -type PTtcHGFZ { - id114: ID +type iVjcPoMw { + id100: ID } -type PVCfSccj { - id224: ID +type iWpPsvNV { + id259: ID } -type PWOXDRzE { - id56: ID +type iZJAoMWm { + id141: ID } -type PwzFJfRE { - id90: ID +type iqXgPwiC { + id293: ID } -type PYCDIQQc { - id24: ID +type ixwjWVvf { + id97: ID } -type qBIjdcrW { - id142: ID +type jAUaKDuu { + id260: ID } -type qCzvlwRD { - id80: ID +type jCnSiJOq { + id188: ID } -type QelISHAj { - id58: ID +type jciWswYD { + id208: ID } -type QKdnhgbW { - id3: ID +type jkcwiNhe { + id74: ID } -type QMkOOMdT { - id122: ID +type jmnxoYAy { + id287: ID +} + +type jnFMLyxL { + id277: ID +} + +type jrmLpsfT { + id201: ID +} + +type kAFbqgpE { + id102: ID +} + +type kAqRlGFR { + id299: ID +} + +type kEhnOaCH { + id111: ID +} + +type kHLLmfcE { + id164: ID +} + +type kKQNulhi { + id5: ID +} + +type kQUqAggO { + id17: ID +} + +type kXMItaoE { + id154: ID +} + +type kkQiMyOg { + id33: ID +} + +type klkPkaYU { + id272: ID +} + +type lFbOnWGE { + id280: ID +} + +type lPtHeBuR { + id160: ID +} + +type lVumUBIa { + id174: ID +} + +type laqqtHJN { + id206: ID +} + +type ldqzvWyd { + id235: ID +} + +type lhdysNNV { + id71: ID +} + +type lifwEmKz { + id246: ID +} + +type lsDifAmH { + id298: ID +} + +type mFSUfTPi { + id116: ID } -type QmPQoOZh { - id220: ID +type mKbKQhyO { + id167: ID } -type Query { - ok: Boolean! +type mQIYoGzu { + id28: ID } -type QxHzTNGy { - id265: ID +type mZmlDoBs { + id273: ID } -type qXlhbRwq { - id78: ID +type mooFGlVS { + id14: ID } -type QXSXwpMN { - id211: ID +type mtikMWMb { + id261: ID } -type RCZmHSOp { - id10: ID +type muuoinyp { + id70: ID } -type rDLkvRXw { - id296: ID +type newdlmuf { + id39: ID } -type rKZaCTrp { - id89: ID +type oLLKSNvK { + id176: ID } -type RMBiaCdu { - id75: ID +type ogOIrhgb { + id47: ID } -type RNSfiIOi { - id61: ID +type phBMkPER { + id236: ID } -type rsrjXXbp { - id267: ID +type pnfpWCgc { + id99: ID } -type RTcWEgoC { - id44: ID +type ptQOpnjR { + id190: ID } -type RVbkKVjJ { - id231: ID +type qBIjdcrW { + id142: ID } -type RydRYmBj { - id255: ID +type qCzvlwRD { + id80: ID } -type SBNNVkRr { - id257: ID +type qXlhbRwq { + id78: ID } -type ShqdAPLQ { - id297: ID +type rDLkvRXw { + id296: ID } -type sOPJOCHV { - id108: ID +type rKZaCTrp { + id89: ID } -type SsKBGyvg { - id50: ID +type rsrjXXbp { + id267: ID } -type Stydvxig { - id245: ID +type sOPJOCHV { + id108: ID } type sYmZSZhS { id45: ID } -type TbgzaUgu { - id123: ID -} - type tBRvILTt { id177: ID } -type TDURJGny { - id2: ID -} - -type TDztrYLm { - id20: ID +type tHuINsQQ { + id117: ID } -type TeZWMTzw { - id175: ID +type tWYLhGmP { + id253: ID } type tfdcstkI { @@ -1451,34 +1591,10 @@ type tgBSTWuP { id40: ID } -type tHuINsQQ { - id117: ID -} - -type TKzetlpb { - id171: ID -} - type tndtDdZP { id18: ID } -type TppFHtyg { - id82: ID -} - -type TWLZYGzk { - id59: ID -} - -type tWYLhGmP { - id253: ID -} - -type TZHgNTAO { - id215: ID -} - type uaVbWYYy { id94: ID } @@ -1487,10 +1603,6 @@ type ubXmVvgH { id139: ID } -type UGJqdGDT { - id54: ID -} - type unjJMyow { id249: ID } @@ -1499,116 +1611,48 @@ type uqAoXisC { id9: ID } -type UuNFAnQg { - id263: ID -} - type uxqOEIwV { id49: ID } -type VAvPoGEb { - id217: ID -} - type vKNwRocJ { id229: ID } -type vmWUXlxn { - id233: ID -} - -type vveXjotS { - id11: ID -} - type vWCRSMfI { id37: ID } -type VynhbqCL { - id26: ID -} - -type WaVLDFqC { - id136: ID -} - -type WhUVndTD { - id145: ID -} - -type WMsrUAGp { - id181: ID -} - -type WoCNZkWp { - id144: ID +type vmWUXlxn { + id233: ID } -type WsneBHrs { - id101: ID +type vveXjotS { + id11: ID } -type WsNuPHEi { - id225: ID +type wYUTmKCU { + id291: ID } type wtjYwstX { id110: ID } -type WurxotQy { - id72: ID -} - type wvbxCjzQ { id131: ID } -type wYUTmKCU { - id291: ID -} - -type XdzKjpVP { - id4: ID -} - -type XFYbFCkA { - id69: ID -} - type xHmRwgeG { id42: ID } -type XHvdKJbC { - id285: ID -} - -type xnxcQfWx { - id76: ID -} - -type Xqkpjqni { - id15: ID -} - type xUqWuwDO { id288: ID } -type XvyULguR { - id104: ID -} - -type XwweqpQZ { - id275: ID -} - -type YBZmfmWn { - id88: ID +type xnxcQfWx { + id76: ID } type yJNnsHEj { @@ -1623,10 +1667,6 @@ type yMjEoECr { id196: ID } -type YNnosqXJ { - id244: ID -} - type yNNQUmqa { id150: ID } @@ -1647,32 +1687,12 @@ type yvlysvTB { id269: ID } -type YwFARARB { - id216: ID -} - -type YxNVEAVR { - id221: ID -} - -type YZpErVkH { - id264: ID -} - -type ZbrxBPat { - id232: ID -} - -type ZElcDXRS { - id165: ID -} - -type ZeyczKBv { - id12: ID +type zLwooCNa { + id179: ID } -type ZEyINaeG { - id85: ID +type zUQFahzk { + id283: ID } type zjnLruIQ { @@ -1683,30 +1703,10 @@ type zlPOFwWi { id183: ID } -type zLwooCNa { - id179: ID -} - type zpZvbHAk { id124: ID } -type ZrPlFevQ { - id248: ID -} - -type zUQFahzk { - id283: ID -} - -type ZVaYkAdb { - id279: ID -} - type zvGUhtyF { id186: ID } - -type ZzRSmAyf { - id161: ID -} diff --git a/tests/integrations/unionTooComplexToRepresent/__typegen.ts b/tests/integrations/unionTooComplexToRepresent/__typegen.ts index b74fba92..03db7ec9 100644 --- a/tests/integrations/unionTooComplexToRepresent/__typegen.ts +++ b/tests/integrations/unionTooComplexToRepresent/__typegen.ts @@ -1227,509 +1227,509 @@ export interface NexusGenInterfaces {} export interface NexusGenUnions { BigUnion: - | NexusGenRootTypes['aEOOAAKG'] - | NexusGenRootTypes['ahctkrlN'] - | NexusGenRootTypes['aKYfIihK'] | NexusGenRootTypes['ALXAXBKq'] | NexusGenRootTypes['AOogKhAD'] - | NexusGenRootTypes['ApAniugk'] | NexusGenRootTypes['AQDzZPsI'] - | NexusGenRootTypes['arOfyZvi'] + | NexusGenRootTypes['ApAniugk'] | NexusGenRootTypes['AuMxHAoX'] - | NexusGenRootTypes['awDoUlrM'] | NexusGenRootTypes['BAzfAeMR'] - | NexusGenRootTypes['bdmjhrZP'] | NexusGenRootTypes['BFohGIGQ'] - | NexusGenRootTypes['bGRbQdGF'] - | NexusGenRootTypes['BiZjyuaY'] - | NexusGenRootTypes['Bjgguvhd'] - | NexusGenRootTypes['bLcHZPpX'] - | NexusGenRootTypes['bNaHPVhI'] - | NexusGenRootTypes['bndWrLAg'] - | NexusGenRootTypes['bpcReAKs'] - | NexusGenRootTypes['bsuhpkhX'] | NexusGenRootTypes['BTIsXTrL'] | NexusGenRootTypes['BWwxnXpM'] | NexusGenRootTypes['BXowGvwZ'] | NexusGenRootTypes['BYPWzETJ'] + | NexusGenRootTypes['BiZjyuaY'] + | NexusGenRootTypes['Bjgguvhd'] | NexusGenRootTypes['CCXSFsMn'] - | NexusGenRootTypes['cEORMlXC'] - | NexusGenRootTypes['CgAQHanX'] - | NexusGenRootTypes['cGxDWUGD'] - | NexusGenRootTypes['cMxjKIfV'] - | NexusGenRootTypes['ctfzshTJ'] - | NexusGenRootTypes['cXAmxvqv'] | NexusGenRootTypes['CXumheDD'] - | NexusGenRootTypes['dAmPEeQn'] - | NexusGenRootTypes['dbFplbat'] - | NexusGenRootTypes['DbgPTfDo'] + | NexusGenRootTypes['CgAQHanX'] | NexusGenRootTypes['DBZLsxpr'] - | NexusGenRootTypes['deqJYjdv'] | NexusGenRootTypes['DGxuhtpo'] - | NexusGenRootTypes['dHKrfYNo'] | NexusGenRootTypes['DKEJFUiy'] - | NexusGenRootTypes['DkoAlvGn'] | NexusGenRootTypes['DMggicLd'] - | NexusGenRootTypes['dnjGpfIS'] | NexusGenRootTypes['DNohRdIN'] - | NexusGenRootTypes['dnutiEie'] - | NexusGenRootTypes['dOWdqEud'] + | NexusGenRootTypes['DbgPTfDo'] + | NexusGenRootTypes['DkoAlvGn'] | NexusGenRootTypes['DpnWHIJW'] | NexusGenRootTypes['ECChhDfK'] - | NexusGenRootTypes['eemljdwg'] - | NexusGenRootTypes['eggnlUYr'] + | NexusGenRootTypes['ETUiuOHD'] | NexusGenRootTypes['EhpNnQJw'] | NexusGenRootTypes['EjIQIfmv'] - | NexusGenRootTypes['eJSSQaaC'] | NexusGenRootTypes['EqEZXLCy'] - | NexusGenRootTypes['eROeesVg'] | NexusGenRootTypes['EtPHwkkm'] - | NexusGenRootTypes['ETUiuOHD'] - | NexusGenRootTypes['euCWAGET'] - | NexusGenRootTypes['eWlLfMzi'] | NexusGenRootTypes['EzcWBhIv'] - | NexusGenRootTypes['FaJAYKqm'] - | NexusGenRootTypes['faKaQEBn'] - | NexusGenRootTypes['FcFlCNAk'] - | NexusGenRootTypes['fDAloqko'] | NexusGenRootTypes['FDouQoXO'] - | NexusGenRootTypes['fFyvwcxZ'] | NexusGenRootTypes['FHLtgKoA'] - | NexusGenRootTypes['fPXYtcbT'] + | NexusGenRootTypes['FaJAYKqm'] + | NexusGenRootTypes['FcFlCNAk'] | NexusGenRootTypes['FvftqquW'] - | NexusGenRootTypes['fvXQFkRb'] - | NexusGenRootTypes['fXnweaVk'] - | NexusGenRootTypes['GcpbGXTn'] | NexusGenRootTypes['GDATeumz'] + | NexusGenRootTypes['GYbaqoRT'] + | NexusGenRootTypes['GcpbGXTn'] | NexusGenRootTypes['GdxXCAak'] - | NexusGenRootTypes['gfyuMPLk'] | NexusGenRootTypes['GhHKLcZe'] - | NexusGenRootTypes['gQDQWruj'] - | NexusGenRootTypes['gqhvwsiF'] | NexusGenRootTypes['GsbHZkLK'] - | NexusGenRootTypes['gvxFkejN'] | NexusGenRootTypes['GwkBnXKj'] - | NexusGenRootTypes['GYbaqoRT'] | NexusGenRootTypes['GzglazdH'] - | NexusGenRootTypes['hAfKmdaD'] - | NexusGenRootTypes['hBCadJbD'] - | NexusGenRootTypes['HdiyXGxs'] - | NexusGenRootTypes['hDsbddpo'] | NexusGenRootTypes['HENcJewx'] - | NexusGenRootTypes['hEyyqHvv'] - | NexusGenRootTypes['hgsVEiUk'] - | NexusGenRootTypes['HgYVPDgm'] - | NexusGenRootTypes['hIjYlIps'] | NexusGenRootTypes['HIPZQFdS'] | NexusGenRootTypes['HJmsvtgX'] - | NexusGenRootTypes['HjRDJhnX'] - | NexusGenRootTypes['hLptFSis'] | NexusGenRootTypes['HLRWzsTU'] | NexusGenRootTypes['HNLQTErw'] - | NexusGenRootTypes['hOqSbuBE'] - | NexusGenRootTypes['hQiYNmDV'] - | NexusGenRootTypes['hqweSGgf'] - | NexusGenRootTypes['hTNuohNQ'] - | NexusGenRootTypes['HwkXtjRP'] | NexusGenRootTypes['HWMyawvm'] - | NexusGenRootTypes['HxCkBUxv'] | NexusGenRootTypes['HXZUTyvG'] | NexusGenRootTypes['HZbsVdoX'] + | NexusGenRootTypes['HdiyXGxs'] + | NexusGenRootTypes['HgYVPDgm'] + | NexusGenRootTypes['HjRDJhnX'] + | NexusGenRootTypes['HwkXtjRP'] + | NexusGenRootTypes['HxCkBUxv'] | NexusGenRootTypes['IAOEaBfb'] | NexusGenRootTypes['IBZxPcZb'] | NexusGenRootTypes['ICrkovFe'] | NexusGenRootTypes['IGibGxHO'] + | NexusGenRootTypes['ISayJMYD'] + | NexusGenRootTypes['IWhegzTM'] + | NexusGenRootTypes['IZERvBgk'] | NexusGenRootTypes['IhSGxaNc'] | NexusGenRootTypes['IhtaZNUi'] - | NexusGenRootTypes['iqXgPwiC'] | NexusGenRootTypes['IqZAiUKE'] - | NexusGenRootTypes['ISayJMYD'] | NexusGenRootTypes['IuVQPFJN'] - | NexusGenRootTypes['iVjcPoMw'] - | NexusGenRootTypes['IWhegzTM'] - | NexusGenRootTypes['iWpPsvNV'] - | NexusGenRootTypes['ixwjWVvf'] | NexusGenRootTypes['Iypygftg'] - | NexusGenRootTypes['IZERvBgk'] - | NexusGenRootTypes['iZJAoMWm'] - | NexusGenRootTypes['jAUaKDuu'] + | NexusGenRootTypes['JXAbemqC'] + | NexusGenRootTypes['JZMQpjQv'] | NexusGenRootTypes['JbsCxxcE'] - | NexusGenRootTypes['jciWswYD'] - | NexusGenRootTypes['jCnSiJOq'] | NexusGenRootTypes['JjkgZKrV'] - | NexusGenRootTypes['jkcwiNhe'] - | NexusGenRootTypes['jmnxoYAy'] - | NexusGenRootTypes['jnFMLyxL'] - | NexusGenRootTypes['jrmLpsfT'] | NexusGenRootTypes['JsAPYbRs'] | NexusGenRootTypes['JuaucwDY'] - | NexusGenRootTypes['JXAbemqC'] - | NexusGenRootTypes['JZMQpjQv'] - | NexusGenRootTypes['kAFbqgpE'] - | NexusGenRootTypes['kAqRlGFR'] - | NexusGenRootTypes['KbTYPbTr'] - | NexusGenRootTypes['kEhnOaCH'] | NexusGenRootTypes['KGbJMfhO'] - | NexusGenRootTypes['kHLLmfcE'] - | NexusGenRootTypes['kkQiMyOg'] - | NexusGenRootTypes['kKQNulhi'] - | NexusGenRootTypes['klkPkaYU'] + | NexusGenRootTypes['KVIgujkc'] + | NexusGenRootTypes['KbTYPbTr'] | NexusGenRootTypes['KoKtAqbt'] - | NexusGenRootTypes['kQUqAggO'] | NexusGenRootTypes['KsPfaUFr'] | NexusGenRootTypes['KvHHVcPa'] - | NexusGenRootTypes['KVIgujkc'] - | NexusGenRootTypes['kXMItaoE'] - | NexusGenRootTypes['laqqtHJN'] | NexusGenRootTypes['LBePcCkW'] - | NexusGenRootTypes['ldqzvWyd'] - | NexusGenRootTypes['lFbOnWGE'] - | NexusGenRootTypes['lhdysNNV'] | NexusGenRootTypes['LHxWkxKq'] - | NexusGenRootTypes['lifwEmKz'] | NexusGenRootTypes['LMnZbpCI'] - | NexusGenRootTypes['lPtHeBuR'] - | NexusGenRootTypes['lsDifAmH'] | NexusGenRootTypes['LtvKCzwe'] - | NexusGenRootTypes['lVumUBIa'] - | NexusGenRootTypes['mFSUfTPi'] - | NexusGenRootTypes['mKbKQhyO'] - | NexusGenRootTypes['mooFGlVS'] | NexusGenRootTypes['MPQLFUho'] - | NexusGenRootTypes['mQIYoGzu'] - | NexusGenRootTypes['mtikMWMb'] - | NexusGenRootTypes['muuoinyp'] | NexusGenRootTypes['MvpRfuhb'] - | NexusGenRootTypes['mZmlDoBs'] + | NexusGenRootTypes['NETQHyFQ'] | NexusGenRootTypes['NbTtwcUU'] | NexusGenRootTypes['NczZcGdE'] | NexusGenRootTypes['NefQmhqG'] - | NexusGenRootTypes['NETQHyFQ'] - | NexusGenRootTypes['newdlmuf'] | NexusGenRootTypes['NlMnyCgu'] | NexusGenRootTypes['NrrBYDim'] | NexusGenRootTypes['NwPaWUGr'] | NexusGenRootTypes['OBnGIgyZ'] + | NexusGenRootTypes['OZfGULVa'] | NexusGenRootTypes['OehdOjXt'] | NexusGenRootTypes['OfyEZrPd'] - | NexusGenRootTypes['ogOIrhgb'] | NexusGenRootTypes['OjwpvBGH'] - | NexusGenRootTypes['oLLKSNvK'] | NexusGenRootTypes['OwZeKGSU'] - | NexusGenRootTypes['OZfGULVa'] | NexusGenRootTypes['PBGQfXYx'] | NexusGenRootTypes['PGcwRfdb'] - | NexusGenRootTypes['phBMkPER'] | NexusGenRootTypes['PHltFHbS'] | NexusGenRootTypes['PNeiVzWR'] - | NexusGenRootTypes['pnfpWCgc'] | NexusGenRootTypes['PNgZWWwo'] - | NexusGenRootTypes['PpTuFbFz'] - | NexusGenRootTypes['ptQOpnjR'] | NexusGenRootTypes['PTtcHGFZ'] | NexusGenRootTypes['PVCfSccj'] | NexusGenRootTypes['PWOXDRzE'] - | NexusGenRootTypes['PwzFJfRE'] | NexusGenRootTypes['PYCDIQQc'] - | NexusGenRootTypes['qBIjdcrW'] - | NexusGenRootTypes['qCzvlwRD'] - | NexusGenRootTypes['QelISHAj'] + | NexusGenRootTypes['PpTuFbFz'] + | NexusGenRootTypes['PwzFJfRE'] | NexusGenRootTypes['QKdnhgbW'] | NexusGenRootTypes['QMkOOMdT'] + | NexusGenRootTypes['QXSXwpMN'] + | NexusGenRootTypes['QelISHAj'] | NexusGenRootTypes['QmPQoOZh'] | NexusGenRootTypes['QxHzTNGy'] - | NexusGenRootTypes['qXlhbRwq'] - | NexusGenRootTypes['QXSXwpMN'] | NexusGenRootTypes['RCZmHSOp'] - | NexusGenRootTypes['rDLkvRXw'] - | NexusGenRootTypes['rKZaCTrp'] | NexusGenRootTypes['RMBiaCdu'] | NexusGenRootTypes['RNSfiIOi'] - | NexusGenRootTypes['rsrjXXbp'] | NexusGenRootTypes['RTcWEgoC'] | NexusGenRootTypes['RVbkKVjJ'] | NexusGenRootTypes['RydRYmBj'] | NexusGenRootTypes['SBNNVkRr'] | NexusGenRootTypes['ShqdAPLQ'] - | NexusGenRootTypes['sOPJOCHV'] | NexusGenRootTypes['SsKBGyvg'] | NexusGenRootTypes['Stydvxig'] - | NexusGenRootTypes['sYmZSZhS'] - | NexusGenRootTypes['TbgzaUgu'] - | NexusGenRootTypes['tBRvILTt'] | NexusGenRootTypes['TDURJGny'] | NexusGenRootTypes['TDztrYLm'] - | NexusGenRootTypes['TeZWMTzw'] - | NexusGenRootTypes['tfdcstkI'] - | NexusGenRootTypes['tgBSTWuP'] - | NexusGenRootTypes['tHuINsQQ'] | NexusGenRootTypes['TKzetlpb'] - | NexusGenRootTypes['tndtDdZP'] - | NexusGenRootTypes['TppFHtyg'] | NexusGenRootTypes['TWLZYGzk'] - | NexusGenRootTypes['tWYLhGmP'] | NexusGenRootTypes['TZHgNTAO'] - | NexusGenRootTypes['uaVbWYYy'] - | NexusGenRootTypes['ubXmVvgH'] + | NexusGenRootTypes['TbgzaUgu'] + | NexusGenRootTypes['TeZWMTzw'] + | NexusGenRootTypes['TppFHtyg'] | NexusGenRootTypes['UGJqdGDT'] - | NexusGenRootTypes['unjJMyow'] - | NexusGenRootTypes['uqAoXisC'] | NexusGenRootTypes['UuNFAnQg'] - | NexusGenRootTypes['uxqOEIwV'] | NexusGenRootTypes['VAvPoGEb'] - | NexusGenRootTypes['vKNwRocJ'] - | NexusGenRootTypes['vmWUXlxn'] - | NexusGenRootTypes['vveXjotS'] - | NexusGenRootTypes['vWCRSMfI'] | NexusGenRootTypes['VynhbqCL'] + | NexusGenRootTypes['WMsrUAGp'] | NexusGenRootTypes['WaVLDFqC'] | NexusGenRootTypes['WhUVndTD'] - | NexusGenRootTypes['WMsrUAGp'] | NexusGenRootTypes['WoCNZkWp'] - | NexusGenRootTypes['WsneBHrs'] | NexusGenRootTypes['WsNuPHEi'] - | NexusGenRootTypes['wtjYwstX'] + | NexusGenRootTypes['WsneBHrs'] | NexusGenRootTypes['WurxotQy'] - | NexusGenRootTypes['wvbxCjzQ'] - | NexusGenRootTypes['wYUTmKCU'] - | NexusGenRootTypes['XdzKjpVP'] | NexusGenRootTypes['XFYbFCkA'] - | NexusGenRootTypes['xHmRwgeG'] | NexusGenRootTypes['XHvdKJbC'] - | NexusGenRootTypes['xnxcQfWx'] + | NexusGenRootTypes['XdzKjpVP'] | NexusGenRootTypes['Xqkpjqni'] - | NexusGenRootTypes['xUqWuwDO'] | NexusGenRootTypes['XvyULguR'] | NexusGenRootTypes['XwweqpQZ'] | NexusGenRootTypes['YBZmfmWn'] - | NexusGenRootTypes['yJNnsHEj'] - | NexusGenRootTypes['yJubHpPP'] - | NexusGenRootTypes['yMjEoECr'] | NexusGenRootTypes['YNnosqXJ'] - | NexusGenRootTypes['yNNQUmqa'] - | NexusGenRootTypes['yNumRBxd'] - | NexusGenRootTypes['yPDuKVOh'] - | NexusGenRootTypes['yrGYxJeE'] - | NexusGenRootTypes['yvlysvTB'] + | NexusGenRootTypes['YZpErVkH'] | NexusGenRootTypes['YwFARARB'] | NexusGenRootTypes['YxNVEAVR'] - | NexusGenRootTypes['YZpErVkH'] - | NexusGenRootTypes['ZbrxBPat'] | NexusGenRootTypes['ZElcDXRS'] - | NexusGenRootTypes['ZeyczKBv'] | NexusGenRootTypes['ZEyINaeG'] - | NexusGenRootTypes['zjnLruIQ'] - | NexusGenRootTypes['zlPOFwWi'] - | NexusGenRootTypes['zLwooCNa'] - | NexusGenRootTypes['zpZvbHAk'] - | NexusGenRootTypes['ZrPlFevQ'] - | NexusGenRootTypes['zUQFahzk'] | NexusGenRootTypes['ZVaYkAdb'] - | NexusGenRootTypes['zvGUhtyF'] + | NexusGenRootTypes['ZbrxBPat'] + | NexusGenRootTypes['ZeyczKBv'] + | NexusGenRootTypes['ZrPlFevQ'] | NexusGenRootTypes['ZzRSmAyf'] - MediumUnionType: - | NexusGenRootTypes['AOogKhAD'] - | NexusGenRootTypes['ApAniugk'] - | NexusGenRootTypes['AuMxHAoX'] + | NexusGenRootTypes['aEOOAAKG'] + | NexusGenRootTypes['aKYfIihK'] + | NexusGenRootTypes['ahctkrlN'] + | NexusGenRootTypes['arOfyZvi'] | NexusGenRootTypes['awDoUlrM'] | NexusGenRootTypes['bGRbQdGF'] + | NexusGenRootTypes['bLcHZPpX'] + | NexusGenRootTypes['bNaHPVhI'] + | NexusGenRootTypes['bdmjhrZP'] + | NexusGenRootTypes['bndWrLAg'] + | NexusGenRootTypes['bpcReAKs'] | NexusGenRootTypes['bsuhpkhX'] - | NexusGenRootTypes['BXowGvwZ'] - | NexusGenRootTypes['CgAQHanX'] + | NexusGenRootTypes['cEORMlXC'] + | NexusGenRootTypes['cGxDWUGD'] | NexusGenRootTypes['cMxjKIfV'] | NexusGenRootTypes['cXAmxvqv'] + | NexusGenRootTypes['ctfzshTJ'] | NexusGenRootTypes['dAmPEeQn'] - | NexusGenRootTypes['DBZLsxpr'] + | NexusGenRootTypes['dHKrfYNo'] + | NexusGenRootTypes['dOWdqEud'] + | NexusGenRootTypes['dbFplbat'] | NexusGenRootTypes['deqJYjdv'] | NexusGenRootTypes['dnjGpfIS'] | NexusGenRootTypes['dnutiEie'] - | NexusGenRootTypes['dOWdqEud'] - | NexusGenRootTypes['ECChhDfK'] - | NexusGenRootTypes['eggnlUYr'] - | NexusGenRootTypes['EhpNnQJw'] - | NexusGenRootTypes['EjIQIfmv'] | NexusGenRootTypes['eJSSQaaC'] - | NexusGenRootTypes['EtPHwkkm'] - | NexusGenRootTypes['FaJAYKqm'] - | NexusGenRootTypes['fvXQFkRb'] + | NexusGenRootTypes['eROeesVg'] + | NexusGenRootTypes['eWlLfMzi'] + | NexusGenRootTypes['eemljdwg'] + | NexusGenRootTypes['eggnlUYr'] + | NexusGenRootTypes['euCWAGET'] + | NexusGenRootTypes['fDAloqko'] + | NexusGenRootTypes['fFyvwcxZ'] + | NexusGenRootTypes['fPXYtcbT'] | NexusGenRootTypes['fXnweaVk'] - | NexusGenRootTypes['GYbaqoRT'] - | NexusGenRootTypes['GzglazdH'] - | NexusGenRootTypes['hBCadJbD'] - | NexusGenRootTypes['HgYVPDgm'] - | NexusGenRootTypes['HjRDJhnX'] + | NexusGenRootTypes['faKaQEBn'] + | NexusGenRootTypes['fvXQFkRb'] + | NexusGenRootTypes['gQDQWruj'] + | NexusGenRootTypes['gfyuMPLk'] + | NexusGenRootTypes['gqhvwsiF'] + | NexusGenRootTypes['gvxFkejN'] + | NexusGenRootTypes['hAfKmdaD'] + | NexusGenRootTypes['hBCadJbD'] + | NexusGenRootTypes['hDsbddpo'] + | NexusGenRootTypes['hEyyqHvv'] + | NexusGenRootTypes['hIjYlIps'] | NexusGenRootTypes['hLptFSis'] + | NexusGenRootTypes['hOqSbuBE'] | NexusGenRootTypes['hQiYNmDV'] + | NexusGenRootTypes['hTNuohNQ'] + | NexusGenRootTypes['hgsVEiUk'] | NexusGenRootTypes['hqweSGgf'] - | NexusGenRootTypes['HwkXtjRP'] + | NexusGenRootTypes['iVjcPoMw'] + | NexusGenRootTypes['iWpPsvNV'] + | NexusGenRootTypes['iZJAoMWm'] + | NexusGenRootTypes['iqXgPwiC'] + | NexusGenRootTypes['ixwjWVvf'] + | NexusGenRootTypes['jAUaKDuu'] + | NexusGenRootTypes['jCnSiJOq'] + | NexusGenRootTypes['jciWswYD'] + | NexusGenRootTypes['jkcwiNhe'] + | NexusGenRootTypes['jmnxoYAy'] + | NexusGenRootTypes['jnFMLyxL'] + | NexusGenRootTypes['jrmLpsfT'] + | NexusGenRootTypes['kAFbqgpE'] + | NexusGenRootTypes['kAqRlGFR'] + | NexusGenRootTypes['kEhnOaCH'] + | NexusGenRootTypes['kHLLmfcE'] + | NexusGenRootTypes['kKQNulhi'] + | NexusGenRootTypes['kQUqAggO'] + | NexusGenRootTypes['kXMItaoE'] + | NexusGenRootTypes['kkQiMyOg'] + | NexusGenRootTypes['klkPkaYU'] + | NexusGenRootTypes['lFbOnWGE'] + | NexusGenRootTypes['lPtHeBuR'] + | NexusGenRootTypes['lVumUBIa'] + | NexusGenRootTypes['laqqtHJN'] + | NexusGenRootTypes['ldqzvWyd'] + | NexusGenRootTypes['lhdysNNV'] + | NexusGenRootTypes['lifwEmKz'] + | NexusGenRootTypes['lsDifAmH'] + | NexusGenRootTypes['mFSUfTPi'] + | NexusGenRootTypes['mKbKQhyO'] + | NexusGenRootTypes['mQIYoGzu'] + | NexusGenRootTypes['mZmlDoBs'] + | NexusGenRootTypes['mooFGlVS'] + | NexusGenRootTypes['mtikMWMb'] + | NexusGenRootTypes['muuoinyp'] + | NexusGenRootTypes['newdlmuf'] + | NexusGenRootTypes['oLLKSNvK'] + | NexusGenRootTypes['ogOIrhgb'] + | NexusGenRootTypes['phBMkPER'] + | NexusGenRootTypes['pnfpWCgc'] + | NexusGenRootTypes['ptQOpnjR'] + | NexusGenRootTypes['qBIjdcrW'] + | NexusGenRootTypes['qCzvlwRD'] + | NexusGenRootTypes['qXlhbRwq'] + | NexusGenRootTypes['rDLkvRXw'] + | NexusGenRootTypes['rKZaCTrp'] + | NexusGenRootTypes['rsrjXXbp'] + | NexusGenRootTypes['sOPJOCHV'] + | NexusGenRootTypes['sYmZSZhS'] + | NexusGenRootTypes['tBRvILTt'] + | NexusGenRootTypes['tHuINsQQ'] + | NexusGenRootTypes['tWYLhGmP'] + | NexusGenRootTypes['tfdcstkI'] + | NexusGenRootTypes['tgBSTWuP'] + | NexusGenRootTypes['tndtDdZP'] + | NexusGenRootTypes['uaVbWYYy'] + | NexusGenRootTypes['ubXmVvgH'] + | NexusGenRootTypes['unjJMyow'] + | NexusGenRootTypes['uqAoXisC'] + | NexusGenRootTypes['uxqOEIwV'] + | NexusGenRootTypes['vKNwRocJ'] + | NexusGenRootTypes['vWCRSMfI'] + | NexusGenRootTypes['vmWUXlxn'] + | NexusGenRootTypes['vveXjotS'] + | NexusGenRootTypes['wYUTmKCU'] + | NexusGenRootTypes['wtjYwstX'] + | NexusGenRootTypes['wvbxCjzQ'] + | NexusGenRootTypes['xHmRwgeG'] + | NexusGenRootTypes['xUqWuwDO'] + | NexusGenRootTypes['xnxcQfWx'] + | NexusGenRootTypes['yJNnsHEj'] + | NexusGenRootTypes['yJubHpPP'] + | NexusGenRootTypes['yMjEoECr'] + | NexusGenRootTypes['yNNQUmqa'] + | NexusGenRootTypes['yNumRBxd'] + | NexusGenRootTypes['yPDuKVOh'] + | NexusGenRootTypes['yrGYxJeE'] + | NexusGenRootTypes['yvlysvTB'] + | NexusGenRootTypes['zLwooCNa'] + | NexusGenRootTypes['zUQFahzk'] + | NexusGenRootTypes['zjnLruIQ'] + | NexusGenRootTypes['zlPOFwWi'] + | NexusGenRootTypes['zpZvbHAk'] + | NexusGenRootTypes['zvGUhtyF'] + MediumUnionType: + | NexusGenRootTypes['AOogKhAD'] + | NexusGenRootTypes['ApAniugk'] + | NexusGenRootTypes['AuMxHAoX'] + | NexusGenRootTypes['BXowGvwZ'] + | NexusGenRootTypes['CgAQHanX'] + | NexusGenRootTypes['DBZLsxpr'] + | NexusGenRootTypes['ECChhDfK'] + | NexusGenRootTypes['EhpNnQJw'] + | NexusGenRootTypes['EjIQIfmv'] + | NexusGenRootTypes['EtPHwkkm'] + | NexusGenRootTypes['FaJAYKqm'] + | NexusGenRootTypes['GYbaqoRT'] + | NexusGenRootTypes['GzglazdH'] | NexusGenRootTypes['HZbsVdoX'] + | NexusGenRootTypes['HgYVPDgm'] + | NexusGenRootTypes['HjRDJhnX'] + | NexusGenRootTypes['HwkXtjRP'] | NexusGenRootTypes['IAOEaBfb'] | NexusGenRootTypes['ICrkovFe'] - | NexusGenRootTypes['IhSGxaNc'] | NexusGenRootTypes['ISayJMYD'] - | NexusGenRootTypes['iVjcPoMw'] - | NexusGenRootTypes['ixwjWVvf'] + | NexusGenRootTypes['IhSGxaNc'] | NexusGenRootTypes['Iypygftg'] - | NexusGenRootTypes['iZJAoMWm'] - | NexusGenRootTypes['jkcwiNhe'] - | NexusGenRootTypes['JuaucwDY'] | NexusGenRootTypes['JZMQpjQv'] - | NexusGenRootTypes['kAFbqgpE'] + | NexusGenRootTypes['JuaucwDY'] | NexusGenRootTypes['KbTYPbTr'] - | NexusGenRootTypes['kEhnOaCH'] | NexusGenRootTypes['KsPfaUFr'] | NexusGenRootTypes['KvHHVcPa'] | NexusGenRootTypes['LBePcCkW'] - | NexusGenRootTypes['lhdysNNV'] | NexusGenRootTypes['LHxWkxKq'] | NexusGenRootTypes['LMnZbpCI'] - | NexusGenRootTypes['mFSUfTPi'] - | NexusGenRootTypes['muuoinyp'] - | NexusGenRootTypes['NefQmhqG'] | NexusGenRootTypes['NETQHyFQ'] + | NexusGenRootTypes['NefQmhqG'] | NexusGenRootTypes['OwZeKGSU'] | NexusGenRootTypes['PBGQfXYx'] | NexusGenRootTypes['PGcwRfdb'] | NexusGenRootTypes['PNeiVzWR'] - | NexusGenRootTypes['pnfpWCgc'] | NexusGenRootTypes['PNgZWWwo'] | NexusGenRootTypes['PTtcHGFZ'] | NexusGenRootTypes['PWOXDRzE'] | NexusGenRootTypes['PwzFJfRE'] - | NexusGenRootTypes['qBIjdcrW'] - | NexusGenRootTypes['qCzvlwRD'] - | NexusGenRootTypes['QelISHAj'] | NexusGenRootTypes['QMkOOMdT'] - | NexusGenRootTypes['qXlhbRwq'] - | NexusGenRootTypes['rKZaCTrp'] + | NexusGenRootTypes['QelISHAj'] | NexusGenRootTypes['RMBiaCdu'] | NexusGenRootTypes['RNSfiIOi'] - | NexusGenRootTypes['sOPJOCHV'] | NexusGenRootTypes['SsKBGyvg'] + | NexusGenRootTypes['TWLZYGzk'] | NexusGenRootTypes['TbgzaUgu'] - | NexusGenRootTypes['tHuINsQQ'] | NexusGenRootTypes['TppFHtyg'] - | NexusGenRootTypes['TWLZYGzk'] - | NexusGenRootTypes['uaVbWYYy'] - | NexusGenRootTypes['ubXmVvgH'] | NexusGenRootTypes['UGJqdGDT'] | NexusGenRootTypes['WaVLDFqC'] | NexusGenRootTypes['WhUVndTD'] | NexusGenRootTypes['WoCNZkWp'] | NexusGenRootTypes['WsneBHrs'] - | NexusGenRootTypes['wtjYwstX'] | NexusGenRootTypes['WurxotQy'] - | NexusGenRootTypes['wvbxCjzQ'] | NexusGenRootTypes['XFYbFCkA'] - | NexusGenRootTypes['xnxcQfWx'] | NexusGenRootTypes['XvyULguR'] | NexusGenRootTypes['YBZmfmWn'] + | NexusGenRootTypes['ZEyINaeG'] + | NexusGenRootTypes['awDoUlrM'] + | NexusGenRootTypes['bGRbQdGF'] + | NexusGenRootTypes['bsuhpkhX'] + | NexusGenRootTypes['cMxjKIfV'] + | NexusGenRootTypes['cXAmxvqv'] + | NexusGenRootTypes['dAmPEeQn'] + | NexusGenRootTypes['dOWdqEud'] + | NexusGenRootTypes['deqJYjdv'] + | NexusGenRootTypes['dnjGpfIS'] + | NexusGenRootTypes['dnutiEie'] + | NexusGenRootTypes['eJSSQaaC'] + | NexusGenRootTypes['eggnlUYr'] + | NexusGenRootTypes['fXnweaVk'] + | NexusGenRootTypes['fvXQFkRb'] + | NexusGenRootTypes['hBCadJbD'] + | NexusGenRootTypes['hLptFSis'] + | NexusGenRootTypes['hQiYNmDV'] + | NexusGenRootTypes['hqweSGgf'] + | NexusGenRootTypes['iVjcPoMw'] + | NexusGenRootTypes['iZJAoMWm'] + | NexusGenRootTypes['ixwjWVvf'] + | NexusGenRootTypes['jkcwiNhe'] + | NexusGenRootTypes['kAFbqgpE'] + | NexusGenRootTypes['kEhnOaCH'] + | NexusGenRootTypes['lhdysNNV'] + | NexusGenRootTypes['mFSUfTPi'] + | NexusGenRootTypes['muuoinyp'] + | NexusGenRootTypes['pnfpWCgc'] + | NexusGenRootTypes['qBIjdcrW'] + | NexusGenRootTypes['qCzvlwRD'] + | NexusGenRootTypes['qXlhbRwq'] + | NexusGenRootTypes['rKZaCTrp'] + | NexusGenRootTypes['sOPJOCHV'] + | NexusGenRootTypes['tHuINsQQ'] + | NexusGenRootTypes['uaVbWYYy'] + | NexusGenRootTypes['ubXmVvgH'] + | NexusGenRootTypes['wtjYwstX'] + | NexusGenRootTypes['wvbxCjzQ'] + | NexusGenRootTypes['xnxcQfWx'] | NexusGenRootTypes['yJNnsHEj'] | NexusGenRootTypes['yrGYxJeE'] - | NexusGenRootTypes['ZEyINaeG'] | NexusGenRootTypes['zpZvbHAk'] MediumUnionTypes: | NexusGenRootTypes['ALXAXBKq'] | NexusGenRootTypes['AOogKhAD'] | NexusGenRootTypes['ApAniugk'] - | NexusGenRootTypes['bdmjhrZP'] - | NexusGenRootTypes['BiZjyuaY'] - | NexusGenRootTypes['bpcReAKs'] - | NexusGenRootTypes['bsuhpkhX'] | NexusGenRootTypes['BXowGvwZ'] + | NexusGenRootTypes['BiZjyuaY'] | NexusGenRootTypes['CgAQHanX'] - | NexusGenRootTypes['cXAmxvqv'] - | NexusGenRootTypes['dAmPEeQn'] - | NexusGenRootTypes['dHKrfYNo'] - | NexusGenRootTypes['dnutiEie'] - | NexusGenRootTypes['dOWdqEud'] | NexusGenRootTypes['DpnWHIJW'] | NexusGenRootTypes['ECChhDfK'] - | NexusGenRootTypes['eemljdwg'] + | NexusGenRootTypes['ETUiuOHD'] | NexusGenRootTypes['EqEZXLCy'] - | NexusGenRootTypes['eROeesVg'] | NexusGenRootTypes['EtPHwkkm'] - | NexusGenRootTypes['ETUiuOHD'] | NexusGenRootTypes['FaJAYKqm'] - | NexusGenRootTypes['fDAloqko'] - | NexusGenRootTypes['fXnweaVk'] | NexusGenRootTypes['GdxXCAak'] - | NexusGenRootTypes['gQDQWruj'] - | NexusGenRootTypes['gqhvwsiF'] | NexusGenRootTypes['GsbHZkLK'] | NexusGenRootTypes['GzglazdH'] - | NexusGenRootTypes['HgYVPDgm'] - | NexusGenRootTypes['hLptFSis'] - | NexusGenRootTypes['hOqSbuBE'] - | NexusGenRootTypes['hqweSGgf'] - | NexusGenRootTypes['HwkXtjRP'] | NexusGenRootTypes['HXZUTyvG'] | NexusGenRootTypes['HZbsVdoX'] + | NexusGenRootTypes['HgYVPDgm'] + | NexusGenRootTypes['HwkXtjRP'] | NexusGenRootTypes['ICrkovFe'] | NexusGenRootTypes['IWhegzTM'] - | NexusGenRootTypes['ixwjWVvf'] - | NexusGenRootTypes['Iypygftg'] | NexusGenRootTypes['IZERvBgk'] + | NexusGenRootTypes['Iypygftg'] | NexusGenRootTypes['JbsCxxcE'] - | NexusGenRootTypes['jkcwiNhe'] | NexusGenRootTypes['KbTYPbTr'] - | NexusGenRootTypes['kkQiMyOg'] - | NexusGenRootTypes['kKQNulhi'] - | NexusGenRootTypes['kQUqAggO'] | NexusGenRootTypes['KsPfaUFr'] - | NexusGenRootTypes['lhdysNNV'] | NexusGenRootTypes['LHxWkxKq'] | NexusGenRootTypes['LtvKCzwe'] - | NexusGenRootTypes['mooFGlVS'] | NexusGenRootTypes['MPQLFUho'] - | NexusGenRootTypes['mQIYoGzu'] - | NexusGenRootTypes['muuoinyp'] - | NexusGenRootTypes['NbTtwcUU'] | NexusGenRootTypes['NETQHyFQ'] - | NexusGenRootTypes['newdlmuf'] + | NexusGenRootTypes['NbTtwcUU'] | NexusGenRootTypes['OfyEZrPd'] - | NexusGenRootTypes['ogOIrhgb'] | NexusGenRootTypes['PBGQfXYx'] | NexusGenRootTypes['PGcwRfdb'] - | NexusGenRootTypes['pnfpWCgc'] - | NexusGenRootTypes['PpTuFbFz'] | NexusGenRootTypes['PWOXDRzE'] - | NexusGenRootTypes['PwzFJfRE'] | NexusGenRootTypes['PYCDIQQc'] - | NexusGenRootTypes['qCzvlwRD'] - | NexusGenRootTypes['QelISHAj'] + | NexusGenRootTypes['PpTuFbFz'] + | NexusGenRootTypes['PwzFJfRE'] | NexusGenRootTypes['QKdnhgbW'] - | NexusGenRootTypes['qXlhbRwq'] + | NexusGenRootTypes['QelISHAj'] | NexusGenRootTypes['RCZmHSOp'] - | NexusGenRootTypes['rKZaCTrp'] | NexusGenRootTypes['RMBiaCdu'] | NexusGenRootTypes['RNSfiIOi'] | NexusGenRootTypes['RTcWEgoC'] | NexusGenRootTypes['SsKBGyvg'] - | NexusGenRootTypes['sYmZSZhS'] | NexusGenRootTypes['TDURJGny'] | NexusGenRootTypes['TDztrYLm'] - | NexusGenRootTypes['tgBSTWuP'] - | NexusGenRootTypes['tndtDdZP'] - | NexusGenRootTypes['TppFHtyg'] | NexusGenRootTypes['TWLZYGzk'] - | NexusGenRootTypes['uaVbWYYy'] + | NexusGenRootTypes['TppFHtyg'] | NexusGenRootTypes['UGJqdGDT'] - | NexusGenRootTypes['uqAoXisC'] - | NexusGenRootTypes['uxqOEIwV'] - | NexusGenRootTypes['vveXjotS'] - | NexusGenRootTypes['vWCRSMfI'] | NexusGenRootTypes['VynhbqCL'] | NexusGenRootTypes['WurxotQy'] - | NexusGenRootTypes['XdzKjpVP'] | NexusGenRootTypes['XFYbFCkA'] - | NexusGenRootTypes['xHmRwgeG'] - | NexusGenRootTypes['xnxcQfWx'] + | NexusGenRootTypes['XdzKjpVP'] | NexusGenRootTypes['Xqkpjqni'] | NexusGenRootTypes['YBZmfmWn'] - | NexusGenRootTypes['ZeyczKBv'] | NexusGenRootTypes['ZEyINaeG'] -} + | NexusGenRootTypes['ZeyczKBv'] + | NexusGenRootTypes['bdmjhrZP'] + | NexusGenRootTypes['bpcReAKs'] + | NexusGenRootTypes['bsuhpkhX'] + | NexusGenRootTypes['cXAmxvqv'] + | NexusGenRootTypes['dAmPEeQn'] + | NexusGenRootTypes['dHKrfYNo'] + | NexusGenRootTypes['dOWdqEud'] + | NexusGenRootTypes['dnutiEie'] + | NexusGenRootTypes['eROeesVg'] + | NexusGenRootTypes['eemljdwg'] + | NexusGenRootTypes['fDAloqko'] + | NexusGenRootTypes['fXnweaVk'] + | NexusGenRootTypes['gQDQWruj'] + | NexusGenRootTypes['gqhvwsiF'] + | NexusGenRootTypes['hLptFSis'] + | NexusGenRootTypes['hOqSbuBE'] + | NexusGenRootTypes['hqweSGgf'] + | NexusGenRootTypes['ixwjWVvf'] + | NexusGenRootTypes['jkcwiNhe'] + | NexusGenRootTypes['kKQNulhi'] + | NexusGenRootTypes['kQUqAggO'] + | NexusGenRootTypes['kkQiMyOg'] + | NexusGenRootTypes['lhdysNNV'] + | NexusGenRootTypes['mQIYoGzu'] + | NexusGenRootTypes['mooFGlVS'] + | NexusGenRootTypes['muuoinyp'] + | NexusGenRootTypes['newdlmuf'] + | NexusGenRootTypes['ogOIrhgb'] + | NexusGenRootTypes['pnfpWCgc'] + | NexusGenRootTypes['qCzvlwRD'] + | NexusGenRootTypes['qXlhbRwq'] + | NexusGenRootTypes['rKZaCTrp'] + | NexusGenRootTypes['sYmZSZhS'] + | NexusGenRootTypes['tgBSTWuP'] + | NexusGenRootTypes['tndtDdZP'] + | NexusGenRootTypes['uaVbWYYy'] + | NexusGenRootTypes['uqAoXisC'] + | NexusGenRootTypes['uxqOEIwV'] + | NexusGenRootTypes['vWCRSMfI'] + | NexusGenRootTypes['vveXjotS'] + | NexusGenRootTypes['xHmRwgeG'] + | NexusGenRootTypes['xnxcQfWx'] +} export type NexusGenRootTypes = NexusGenObjects & NexusGenUnions @@ -4153,508 +4153,508 @@ export interface NexusGenArgTypes {} export interface NexusGenAbstractTypeMembers { BigUnion: - | 'aEOOAAKG' - | 'ahctkrlN' - | 'aKYfIihK' | 'ALXAXBKq' | 'AOogKhAD' - | 'ApAniugk' | 'AQDzZPsI' - | 'arOfyZvi' + | 'ApAniugk' | 'AuMxHAoX' - | 'awDoUlrM' | 'BAzfAeMR' - | 'bdmjhrZP' | 'BFohGIGQ' - | 'bGRbQdGF' - | 'BiZjyuaY' - | 'Bjgguvhd' - | 'bLcHZPpX' - | 'bNaHPVhI' - | 'bndWrLAg' - | 'bpcReAKs' - | 'bsuhpkhX' | 'BTIsXTrL' | 'BWwxnXpM' | 'BXowGvwZ' | 'BYPWzETJ' + | 'BiZjyuaY' + | 'Bjgguvhd' | 'CCXSFsMn' - | 'cEORMlXC' - | 'CgAQHanX' - | 'cGxDWUGD' - | 'cMxjKIfV' - | 'ctfzshTJ' - | 'cXAmxvqv' | 'CXumheDD' - | 'dAmPEeQn' - | 'dbFplbat' - | 'DbgPTfDo' + | 'CgAQHanX' | 'DBZLsxpr' - | 'deqJYjdv' | 'DGxuhtpo' - | 'dHKrfYNo' | 'DKEJFUiy' - | 'DkoAlvGn' | 'DMggicLd' - | 'dnjGpfIS' | 'DNohRdIN' - | 'dnutiEie' - | 'dOWdqEud' + | 'DbgPTfDo' + | 'DkoAlvGn' | 'DpnWHIJW' | 'ECChhDfK' - | 'eemljdwg' - | 'eggnlUYr' + | 'ETUiuOHD' | 'EhpNnQJw' | 'EjIQIfmv' - | 'eJSSQaaC' | 'EqEZXLCy' - | 'eROeesVg' | 'EtPHwkkm' - | 'ETUiuOHD' - | 'euCWAGET' - | 'eWlLfMzi' | 'EzcWBhIv' - | 'FaJAYKqm' - | 'faKaQEBn' - | 'FcFlCNAk' - | 'fDAloqko' | 'FDouQoXO' - | 'fFyvwcxZ' | 'FHLtgKoA' - | 'fPXYtcbT' + | 'FaJAYKqm' + | 'FcFlCNAk' | 'FvftqquW' - | 'fvXQFkRb' - | 'fXnweaVk' - | 'GcpbGXTn' | 'GDATeumz' + | 'GYbaqoRT' + | 'GcpbGXTn' | 'GdxXCAak' - | 'gfyuMPLk' | 'GhHKLcZe' - | 'gQDQWruj' - | 'gqhvwsiF' | 'GsbHZkLK' - | 'gvxFkejN' | 'GwkBnXKj' - | 'GYbaqoRT' | 'GzglazdH' - | 'hAfKmdaD' - | 'hBCadJbD' - | 'HdiyXGxs' - | 'hDsbddpo' | 'HENcJewx' - | 'hEyyqHvv' - | 'hgsVEiUk' - | 'HgYVPDgm' - | 'hIjYlIps' | 'HIPZQFdS' | 'HJmsvtgX' - | 'HjRDJhnX' - | 'hLptFSis' | 'HLRWzsTU' | 'HNLQTErw' - | 'hOqSbuBE' - | 'hQiYNmDV' - | 'hqweSGgf' - | 'hTNuohNQ' - | 'HwkXtjRP' | 'HWMyawvm' - | 'HxCkBUxv' | 'HXZUTyvG' | 'HZbsVdoX' + | 'HdiyXGxs' + | 'HgYVPDgm' + | 'HjRDJhnX' + | 'HwkXtjRP' + | 'HxCkBUxv' | 'IAOEaBfb' | 'IBZxPcZb' | 'ICrkovFe' | 'IGibGxHO' + | 'ISayJMYD' + | 'IWhegzTM' + | 'IZERvBgk' | 'IhSGxaNc' | 'IhtaZNUi' - | 'iqXgPwiC' | 'IqZAiUKE' - | 'ISayJMYD' | 'IuVQPFJN' - | 'iVjcPoMw' - | 'IWhegzTM' - | 'iWpPsvNV' - | 'ixwjWVvf' | 'Iypygftg' - | 'IZERvBgk' - | 'iZJAoMWm' - | 'jAUaKDuu' + | 'JXAbemqC' + | 'JZMQpjQv' | 'JbsCxxcE' - | 'jciWswYD' - | 'jCnSiJOq' | 'JjkgZKrV' - | 'jkcwiNhe' - | 'jmnxoYAy' - | 'jnFMLyxL' - | 'jrmLpsfT' | 'JsAPYbRs' | 'JuaucwDY' - | 'JXAbemqC' - | 'JZMQpjQv' - | 'kAFbqgpE' - | 'kAqRlGFR' - | 'KbTYPbTr' - | 'kEhnOaCH' | 'KGbJMfhO' - | 'kHLLmfcE' - | 'kkQiMyOg' - | 'kKQNulhi' - | 'klkPkaYU' + | 'KVIgujkc' + | 'KbTYPbTr' | 'KoKtAqbt' - | 'kQUqAggO' | 'KsPfaUFr' | 'KvHHVcPa' - | 'KVIgujkc' - | 'kXMItaoE' - | 'laqqtHJN' | 'LBePcCkW' - | 'ldqzvWyd' - | 'lFbOnWGE' - | 'lhdysNNV' | 'LHxWkxKq' - | 'lifwEmKz' | 'LMnZbpCI' - | 'lPtHeBuR' - | 'lsDifAmH' | 'LtvKCzwe' - | 'lVumUBIa' - | 'mFSUfTPi' - | 'mKbKQhyO' - | 'mooFGlVS' | 'MPQLFUho' - | 'mQIYoGzu' - | 'mtikMWMb' - | 'muuoinyp' | 'MvpRfuhb' - | 'mZmlDoBs' + | 'NETQHyFQ' | 'NbTtwcUU' | 'NczZcGdE' | 'NefQmhqG' - | 'NETQHyFQ' - | 'newdlmuf' | 'NlMnyCgu' | 'NrrBYDim' | 'NwPaWUGr' | 'OBnGIgyZ' + | 'OZfGULVa' | 'OehdOjXt' | 'OfyEZrPd' - | 'ogOIrhgb' | 'OjwpvBGH' - | 'oLLKSNvK' | 'OwZeKGSU' - | 'OZfGULVa' | 'PBGQfXYx' | 'PGcwRfdb' - | 'phBMkPER' | 'PHltFHbS' | 'PNeiVzWR' - | 'pnfpWCgc' | 'PNgZWWwo' - | 'PpTuFbFz' - | 'ptQOpnjR' | 'PTtcHGFZ' | 'PVCfSccj' | 'PWOXDRzE' - | 'PwzFJfRE' | 'PYCDIQQc' - | 'qBIjdcrW' - | 'qCzvlwRD' - | 'QelISHAj' + | 'PpTuFbFz' + | 'PwzFJfRE' | 'QKdnhgbW' | 'QMkOOMdT' + | 'QXSXwpMN' + | 'QelISHAj' | 'QmPQoOZh' | 'QxHzTNGy' - | 'qXlhbRwq' - | 'QXSXwpMN' | 'RCZmHSOp' - | 'rDLkvRXw' - | 'rKZaCTrp' | 'RMBiaCdu' | 'RNSfiIOi' - | 'rsrjXXbp' | 'RTcWEgoC' | 'RVbkKVjJ' | 'RydRYmBj' | 'SBNNVkRr' | 'ShqdAPLQ' + | 'SsKBGyvg' + | 'Stydvxig' + | 'TDURJGny' + | 'TDztrYLm' + | 'TKzetlpb' + | 'TWLZYGzk' + | 'TZHgNTAO' + | 'TbgzaUgu' + | 'TeZWMTzw' + | 'TppFHtyg' + | 'UGJqdGDT' + | 'UuNFAnQg' + | 'VAvPoGEb' + | 'VynhbqCL' + | 'WMsrUAGp' + | 'WaVLDFqC' + | 'WhUVndTD' + | 'WoCNZkWp' + | 'WsNuPHEi' + | 'WsneBHrs' + | 'WurxotQy' + | 'XFYbFCkA' + | 'XHvdKJbC' + | 'XdzKjpVP' + | 'Xqkpjqni' + | 'XvyULguR' + | 'XwweqpQZ' + | 'YBZmfmWn' + | 'YNnosqXJ' + | 'YZpErVkH' + | 'YwFARARB' + | 'YxNVEAVR' + | 'ZElcDXRS' + | 'ZEyINaeG' + | 'ZVaYkAdb' + | 'ZbrxBPat' + | 'ZeyczKBv' + | 'ZrPlFevQ' + | 'ZzRSmAyf' + | 'aEOOAAKG' + | 'aKYfIihK' + | 'ahctkrlN' + | 'arOfyZvi' + | 'awDoUlrM' + | 'bGRbQdGF' + | 'bLcHZPpX' + | 'bNaHPVhI' + | 'bdmjhrZP' + | 'bndWrLAg' + | 'bpcReAKs' + | 'bsuhpkhX' + | 'cEORMlXC' + | 'cGxDWUGD' + | 'cMxjKIfV' + | 'cXAmxvqv' + | 'ctfzshTJ' + | 'dAmPEeQn' + | 'dHKrfYNo' + | 'dOWdqEud' + | 'dbFplbat' + | 'deqJYjdv' + | 'dnjGpfIS' + | 'dnutiEie' + | 'eJSSQaaC' + | 'eROeesVg' + | 'eWlLfMzi' + | 'eemljdwg' + | 'eggnlUYr' + | 'euCWAGET' + | 'fDAloqko' + | 'fFyvwcxZ' + | 'fPXYtcbT' + | 'fXnweaVk' + | 'faKaQEBn' + | 'fvXQFkRb' + | 'gQDQWruj' + | 'gfyuMPLk' + | 'gqhvwsiF' + | 'gvxFkejN' + | 'hAfKmdaD' + | 'hBCadJbD' + | 'hDsbddpo' + | 'hEyyqHvv' + | 'hIjYlIps' + | 'hLptFSis' + | 'hOqSbuBE' + | 'hQiYNmDV' + | 'hTNuohNQ' + | 'hgsVEiUk' + | 'hqweSGgf' + | 'iVjcPoMw' + | 'iWpPsvNV' + | 'iZJAoMWm' + | 'iqXgPwiC' + | 'ixwjWVvf' + | 'jAUaKDuu' + | 'jCnSiJOq' + | 'jciWswYD' + | 'jkcwiNhe' + | 'jmnxoYAy' + | 'jnFMLyxL' + | 'jrmLpsfT' + | 'kAFbqgpE' + | 'kAqRlGFR' + | 'kEhnOaCH' + | 'kHLLmfcE' + | 'kKQNulhi' + | 'kQUqAggO' + | 'kXMItaoE' + | 'kkQiMyOg' + | 'klkPkaYU' + | 'lFbOnWGE' + | 'lPtHeBuR' + | 'lVumUBIa' + | 'laqqtHJN' + | 'ldqzvWyd' + | 'lhdysNNV' + | 'lifwEmKz' + | 'lsDifAmH' + | 'mFSUfTPi' + | 'mKbKQhyO' + | 'mQIYoGzu' + | 'mZmlDoBs' + | 'mooFGlVS' + | 'mtikMWMb' + | 'muuoinyp' + | 'newdlmuf' + | 'oLLKSNvK' + | 'ogOIrhgb' + | 'phBMkPER' + | 'pnfpWCgc' + | 'ptQOpnjR' + | 'qBIjdcrW' + | 'qCzvlwRD' + | 'qXlhbRwq' + | 'rDLkvRXw' + | 'rKZaCTrp' + | 'rsrjXXbp' | 'sOPJOCHV' - | 'SsKBGyvg' - | 'Stydvxig' | 'sYmZSZhS' - | 'TbgzaUgu' | 'tBRvILTt' - | 'TDURJGny' - | 'TDztrYLm' - | 'TeZWMTzw' + | 'tHuINsQQ' + | 'tWYLhGmP' | 'tfdcstkI' | 'tgBSTWuP' - | 'tHuINsQQ' - | 'TKzetlpb' | 'tndtDdZP' - | 'TppFHtyg' - | 'TWLZYGzk' - | 'tWYLhGmP' - | 'TZHgNTAO' | 'uaVbWYYy' | 'ubXmVvgH' - | 'UGJqdGDT' | 'unjJMyow' | 'uqAoXisC' - | 'UuNFAnQg' | 'uxqOEIwV' - | 'VAvPoGEb' | 'vKNwRocJ' + | 'vWCRSMfI' | 'vmWUXlxn' | 'vveXjotS' - | 'vWCRSMfI' - | 'VynhbqCL' - | 'WaVLDFqC' - | 'WhUVndTD' - | 'WMsrUAGp' - | 'WoCNZkWp' - | 'WsneBHrs' - | 'WsNuPHEi' + | 'wYUTmKCU' | 'wtjYwstX' - | 'WurxotQy' | 'wvbxCjzQ' - | 'wYUTmKCU' - | 'XdzKjpVP' - | 'XFYbFCkA' | 'xHmRwgeG' - | 'XHvdKJbC' - | 'xnxcQfWx' - | 'Xqkpjqni' | 'xUqWuwDO' - | 'XvyULguR' - | 'XwweqpQZ' - | 'YBZmfmWn' + | 'xnxcQfWx' | 'yJNnsHEj' | 'yJubHpPP' | 'yMjEoECr' - | 'YNnosqXJ' | 'yNNQUmqa' | 'yNumRBxd' | 'yPDuKVOh' | 'yrGYxJeE' | 'yvlysvTB' - | 'YwFARARB' - | 'YxNVEAVR' - | 'YZpErVkH' - | 'ZbrxBPat' - | 'ZElcDXRS' - | 'ZeyczKBv' - | 'ZEyINaeG' + | 'zLwooCNa' + | 'zUQFahzk' | 'zjnLruIQ' | 'zlPOFwWi' - | 'zLwooCNa' | 'zpZvbHAk' - | 'ZrPlFevQ' - | 'zUQFahzk' - | 'ZVaYkAdb' | 'zvGUhtyF' - | 'ZzRSmAyf' MediumUnionType: | 'AOogKhAD' | 'ApAniugk' | 'AuMxHAoX' - | 'awDoUlrM' - | 'bGRbQdGF' - | 'bsuhpkhX' | 'BXowGvwZ' | 'CgAQHanX' - | 'cMxjKIfV' - | 'cXAmxvqv' - | 'dAmPEeQn' | 'DBZLsxpr' - | 'deqJYjdv' - | 'dnjGpfIS' - | 'dnutiEie' - | 'dOWdqEud' | 'ECChhDfK' - | 'eggnlUYr' | 'EhpNnQJw' | 'EjIQIfmv' - | 'eJSSQaaC' | 'EtPHwkkm' | 'FaJAYKqm' - | 'fvXQFkRb' - | 'fXnweaVk' | 'GYbaqoRT' | 'GzglazdH' - | 'hBCadJbD' + | 'HZbsVdoX' | 'HgYVPDgm' | 'HjRDJhnX' - | 'hLptFSis' - | 'hQiYNmDV' - | 'hqweSGgf' | 'HwkXtjRP' - | 'HZbsVdoX' | 'IAOEaBfb' | 'ICrkovFe' - | 'IhSGxaNc' | 'ISayJMYD' - | 'iVjcPoMw' - | 'ixwjWVvf' + | 'IhSGxaNc' | 'Iypygftg' - | 'iZJAoMWm' - | 'jkcwiNhe' - | 'JuaucwDY' | 'JZMQpjQv' - | 'kAFbqgpE' + | 'JuaucwDY' | 'KbTYPbTr' - | 'kEhnOaCH' | 'KsPfaUFr' | 'KvHHVcPa' | 'LBePcCkW' - | 'lhdysNNV' | 'LHxWkxKq' | 'LMnZbpCI' - | 'mFSUfTPi' - | 'muuoinyp' - | 'NefQmhqG' | 'NETQHyFQ' + | 'NefQmhqG' | 'OwZeKGSU' | 'PBGQfXYx' | 'PGcwRfdb' | 'PNeiVzWR' - | 'pnfpWCgc' | 'PNgZWWwo' | 'PTtcHGFZ' | 'PWOXDRzE' | 'PwzFJfRE' - | 'qBIjdcrW' - | 'qCzvlwRD' - | 'QelISHAj' | 'QMkOOMdT' - | 'qXlhbRwq' - | 'rKZaCTrp' + | 'QelISHAj' | 'RMBiaCdu' | 'RNSfiIOi' - | 'sOPJOCHV' | 'SsKBGyvg' + | 'TWLZYGzk' | 'TbgzaUgu' - | 'tHuINsQQ' | 'TppFHtyg' - | 'TWLZYGzk' - | 'uaVbWYYy' - | 'ubXmVvgH' | 'UGJqdGDT' | 'WaVLDFqC' | 'WhUVndTD' | 'WoCNZkWp' | 'WsneBHrs' - | 'wtjYwstX' | 'WurxotQy' - | 'wvbxCjzQ' | 'XFYbFCkA' - | 'xnxcQfWx' | 'XvyULguR' | 'YBZmfmWn' + | 'ZEyINaeG' + | 'awDoUlrM' + | 'bGRbQdGF' + | 'bsuhpkhX' + | 'cMxjKIfV' + | 'cXAmxvqv' + | 'dAmPEeQn' + | 'dOWdqEud' + | 'deqJYjdv' + | 'dnjGpfIS' + | 'dnutiEie' + | 'eJSSQaaC' + | 'eggnlUYr' + | 'fXnweaVk' + | 'fvXQFkRb' + | 'hBCadJbD' + | 'hLptFSis' + | 'hQiYNmDV' + | 'hqweSGgf' + | 'iVjcPoMw' + | 'iZJAoMWm' + | 'ixwjWVvf' + | 'jkcwiNhe' + | 'kAFbqgpE' + | 'kEhnOaCH' + | 'lhdysNNV' + | 'mFSUfTPi' + | 'muuoinyp' + | 'pnfpWCgc' + | 'qBIjdcrW' + | 'qCzvlwRD' + | 'qXlhbRwq' + | 'rKZaCTrp' + | 'sOPJOCHV' + | 'tHuINsQQ' + | 'uaVbWYYy' + | 'ubXmVvgH' + | 'wtjYwstX' + | 'wvbxCjzQ' + | 'xnxcQfWx' | 'yJNnsHEj' | 'yrGYxJeE' - | 'ZEyINaeG' | 'zpZvbHAk' MediumUnionTypes: | 'ALXAXBKq' | 'AOogKhAD' | 'ApAniugk' - | 'bdmjhrZP' - | 'BiZjyuaY' - | 'bpcReAKs' - | 'bsuhpkhX' | 'BXowGvwZ' + | 'BiZjyuaY' | 'CgAQHanX' - | 'cXAmxvqv' - | 'dAmPEeQn' - | 'dHKrfYNo' - | 'dnutiEie' - | 'dOWdqEud' | 'DpnWHIJW' | 'ECChhDfK' - | 'eemljdwg' + | 'ETUiuOHD' | 'EqEZXLCy' - | 'eROeesVg' | 'EtPHwkkm' - | 'ETUiuOHD' | 'FaJAYKqm' - | 'fDAloqko' - | 'fXnweaVk' | 'GdxXCAak' - | 'gQDQWruj' - | 'gqhvwsiF' | 'GsbHZkLK' | 'GzglazdH' - | 'HgYVPDgm' - | 'hLptFSis' - | 'hOqSbuBE' - | 'hqweSGgf' - | 'HwkXtjRP' | 'HXZUTyvG' | 'HZbsVdoX' + | 'HgYVPDgm' + | 'HwkXtjRP' | 'ICrkovFe' | 'IWhegzTM' - | 'ixwjWVvf' - | 'Iypygftg' | 'IZERvBgk' + | 'Iypygftg' | 'JbsCxxcE' - | 'jkcwiNhe' | 'KbTYPbTr' - | 'kkQiMyOg' - | 'kKQNulhi' - | 'kQUqAggO' | 'KsPfaUFr' - | 'lhdysNNV' | 'LHxWkxKq' | 'LtvKCzwe' - | 'mooFGlVS' | 'MPQLFUho' - | 'mQIYoGzu' - | 'muuoinyp' - | 'NbTtwcUU' | 'NETQHyFQ' - | 'newdlmuf' + | 'NbTtwcUU' | 'OfyEZrPd' - | 'ogOIrhgb' | 'PBGQfXYx' | 'PGcwRfdb' - | 'pnfpWCgc' - | 'PpTuFbFz' | 'PWOXDRzE' - | 'PwzFJfRE' | 'PYCDIQQc' - | 'qCzvlwRD' - | 'QelISHAj' + | 'PpTuFbFz' + | 'PwzFJfRE' | 'QKdnhgbW' - | 'qXlhbRwq' + | 'QelISHAj' | 'RCZmHSOp' - | 'rKZaCTrp' | 'RMBiaCdu' | 'RNSfiIOi' | 'RTcWEgoC' | 'SsKBGyvg' - | 'sYmZSZhS' | 'TDURJGny' | 'TDztrYLm' - | 'tgBSTWuP' - | 'tndtDdZP' - | 'TppFHtyg' | 'TWLZYGzk' - | 'uaVbWYYy' + | 'TppFHtyg' | 'UGJqdGDT' - | 'uqAoXisC' - | 'uxqOEIwV' - | 'vveXjotS' - | 'vWCRSMfI' | 'VynhbqCL' | 'WurxotQy' - | 'XdzKjpVP' | 'XFYbFCkA' - | 'xHmRwgeG' - | 'xnxcQfWx' + | 'XdzKjpVP' | 'Xqkpjqni' | 'YBZmfmWn' - | 'ZeyczKBv' | 'ZEyINaeG' + | 'ZeyczKBv' + | 'bdmjhrZP' + | 'bpcReAKs' + | 'bsuhpkhX' + | 'cXAmxvqv' + | 'dAmPEeQn' + | 'dHKrfYNo' + | 'dOWdqEud' + | 'dnutiEie' + | 'eROeesVg' + | 'eemljdwg' + | 'fDAloqko' + | 'fXnweaVk' + | 'gQDQWruj' + | 'gqhvwsiF' + | 'hLptFSis' + | 'hOqSbuBE' + | 'hqweSGgf' + | 'ixwjWVvf' + | 'jkcwiNhe' + | 'kKQNulhi' + | 'kQUqAggO' + | 'kkQiMyOg' + | 'lhdysNNV' + | 'mQIYoGzu' + | 'mooFGlVS' + | 'muuoinyp' + | 'newdlmuf' + | 'ogOIrhgb' + | 'pnfpWCgc' + | 'qCzvlwRD' + | 'qXlhbRwq' + | 'rKZaCTrp' + | 'sYmZSZhS' + | 'tgBSTWuP' + | 'tndtDdZP' + | 'uaVbWYYy' + | 'uqAoXisC' + | 'uxqOEIwV' + | 'vWCRSMfI' + | 'vveXjotS' + | 'xHmRwgeG' + | 'xnxcQfWx' } export interface NexusGenTypeInterfaces {} diff --git a/tests/interfaceType.spec.ts b/tests/interfaceType.spec.ts index f186eb40..67f9cb67 100644 --- a/tests/interfaceType.spec.ts +++ b/tests/interfaceType.spec.ts @@ -39,17 +39,17 @@ describe('interfaceType', () => { shouldGenerateArtifacts: false, }) expect( - await graphql( + await graphql({ schema, - ` + source: ` { user { id name } } - ` - ) + `, + }) ).toMatchSnapshot() }) it('can extend other interfaces', async () => { @@ -108,9 +108,9 @@ describe('interfaceType', () => { }, }) expect( - await graphql( + await graphql({ schema, - ` + source: ` { dog { type @@ -119,8 +119,8 @@ describe('interfaceType', () => { breed } } - ` - ) + `, + }) ).toMatchSnapshot() }) it('can implement interfaces in extend types', async () => { @@ -163,17 +163,17 @@ describe('interfaceType', () => { shouldGenerateArtifacts: false, }) expect( - await graphql( + await graphql({ schema, - ` + source: ` { user { id name } } - ` - ) + `, + }) ).toMatchSnapshot() }) it('can not implement itself', async () => { diff --git a/tests/makeSchema.spec.ts b/tests/makeSchema.spec.ts index 61f12902..59de9750 100644 --- a/tests/makeSchema.spec.ts +++ b/tests/makeSchema.spec.ts @@ -82,7 +82,7 @@ describe('makeSchema', () => { ], outputs: {}, customPrintSchemaFn: (schema) => { - return printSchema(schema, { commentDescriptions: true }) + return printSchema(schema).trim() }, }, null diff --git a/tests/modify.spec.ts b/tests/modify.spec.ts index ca58cd86..0cbea7f6 100644 --- a/tests/modify.spec.ts +++ b/tests/modify.spec.ts @@ -86,9 +86,9 @@ describe('modify', () => { }) it('can modify an existing interface field description', async () => { - const result = await graphql( + const result = await graphql({ schema, - ` + source: ` { node: __type(name: "Node") { fields { @@ -103,20 +103,22 @@ describe('modify', () => { } } } - ` - ) + `, + }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.node.fields.find((f: { name: string }) => f.name === 'id').description).toEqual( 'Some Node ID Description' ) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.user.fields.find((f: { name: string }) => f.name === 'id').description).toEqual( 'Some User ID Description' ) }) it('can modify an existing interface field resolve', async () => { - const result = await graphql( + const result = await graphql({ schema, - ` + source: ` { user: node(id: "User:1") { id @@ -125,17 +127,19 @@ describe('modify', () => { id } } - ` - ) + `, + }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.user.id).toEqual('User:1') + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.throws.id).toEqual(null) expect(result.errors?.[0].message).toEqual('Abstract') }) it('can add additional field args to an interface field', async () => { - const result = await graphql( + const result = await graphql({ schema, - ` + source: ` { withArg: node(id: "AddArg:1") { ... on AddArg { @@ -148,17 +152,19 @@ describe('modify', () => { } } } - ` - ) + `, + }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.withArg.id).toEqual('SomeArg!') + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.withoutArg.id).toEqual('AddArg:1') }) it('can replace an abstract type field inherited from an interface', async () => { - const result = await graphql( + const result = await graphql({ schema, - ` + source: ` { node: __type(name: "Node") { fields { @@ -179,20 +185,22 @@ describe('modify', () => { } } } - ` - ) + `, + }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.node.fields.find((f: { name: string }) => f.name === 'subNode').type.name).toEqual( 'Node' ) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.user.fields.find((f: { name: string }) => f.name === 'subNode').type.name).toEqual( 'User' ) }) it('can modify nullability of an abstract type field inherited from an interface', async () => { - const result = await graphql( + const result = await graphql({ schema, - ` + source: ` { node: __type(name: "Node") { fields { @@ -216,16 +224,19 @@ describe('modify', () => { } } } - ` - ) + `, + }) expect( + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support result.data?.node.fields.find((f: { name: string }) => f.name === 'requiredInSubtype').type.name ).toEqual('String') expect( + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support result.data?.user.fields.find((f: { name: string }) => f.name === 'requiredInSubtype').type.kind ).toEqual('NON_NULL') expect( + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support result.data?.user.fields.find((f: { name: string }) => f.name === 'requiredInSubtype').type.ofType.name ).toEqual('String') }) diff --git a/tests/nonNullDefaults.spec.ts b/tests/nonNullDefaults.spec.ts index 98effe9f..03ca625b 100644 --- a/tests/nonNullDefaults.spec.ts +++ b/tests/nonNullDefaults.spec.ts @@ -11,14 +11,14 @@ describe('nonNullDefaults', () => { output: true, }, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) test('true/true on type', () => { const schema = makeSchema({ types: [makeQuery({ nonNullDefaults: { input: true, output: true } })], outputs: false, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) test('false/false on schema', () => { const schema = makeSchema({ @@ -29,14 +29,14 @@ describe('nonNullDefaults', () => { output: false, }, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) test('false/false on type', () => { const schema = makeSchema({ types: [makeQuery({ nonNullDefaults: { input: false, output: false } })], outputs: false, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) }) diff --git a/tests/null-list.spec.ts b/tests/null-list.spec.ts index 76db6fd4..38f9ba53 100644 --- a/tests/null-list.spec.ts +++ b/tests/null-list.spec.ts @@ -430,6 +430,7 @@ describe('edges cases', () => { Object { "astNode": undefined, "defaultValue": "Au revoir!", + "deprecationReason": undefined, "description": "Bonjour !", "extensions": Object { "nexus": Object {}, diff --git a/tests/objectType.spec.ts b/tests/objectType.spec.ts index 3e80fc73..644f541e 100644 --- a/tests/objectType.spec.ts +++ b/tests/objectType.spec.ts @@ -26,9 +26,9 @@ describe('objectType', () => { shouldGenerateArtifacts: false, }) expect( - await graphql( + await graphql({ schema, - ` + source: ` { user { id @@ -36,8 +36,8 @@ describe('objectType', () => { floatField } } - ` - ) + `, + }) ).toMatchSnapshot() }) }) diff --git a/tests/plugin.spec.ts b/tests/plugin.spec.ts index 7a57d991..306ce427 100644 --- a/tests/plugin.spec.ts +++ b/tests/plugin.spec.ts @@ -62,9 +62,9 @@ describe('plugin', () => { }, }, }) - const result = await graphql( + const result = await graphql({ schema, - ` + source: ` { user { id @@ -80,8 +80,8 @@ describe('plugin', () => { } } } - ` - ) + `, + }) expect(lifecycleCalls).toMatchSnapshot() expect(beforeCalls).toMatchSnapshot() expect(afterCalls).toMatchSnapshot() @@ -175,7 +175,7 @@ describe('plugin', () => { }), ], }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) it('composes the onCreateFieldResolve fns', async () => { @@ -184,6 +184,7 @@ describe('plugin', () => { calls.push(`Before:${name}`) return plugin.completeValue(next(root, args, ctx, info), (val) => { calls.push(`After:${name} ${val}`) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support return val + 1 }) } @@ -213,14 +214,14 @@ describe('plugin', () => { }), ], }) - await graphql( + await graphql({ schema, - ` + source: ` { testCompose } - ` - ) + `, + }) expect(calls).toMatchSnapshot() }) @@ -277,9 +278,9 @@ describe('plugin', () => { }), ], }) - const result = await graphql( + const result = await graphql({ schema, - ` + source: ` { getNode { __typename @@ -289,8 +290,8 @@ describe('plugin', () => { } } } - ` - ) + `, + }) expect(result.data?.getNode).toEqual({ __typename: 'AddsNode', id: 'AddsNode:abc', name: 'test' }) }) @@ -346,7 +347,7 @@ describe('plugin', () => { }), ], }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) it('has an plugin.inputObjectTypeDefTypes field where extra properties for inputObjectType can be added', async () => { @@ -396,6 +397,7 @@ describe('plugin', () => { calls.push(`Before:${name}`) return plugin.completeValue(next(root, args, ctx, info), (val) => { calls.push(`After:${name} ${val}`) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support return val + 1 }) } @@ -425,14 +427,14 @@ describe('plugin', () => { }), ], }) - await graphql( + await graphql({ schema, - ` + source: ` { testCompose } - ` - ) + `, + }) expect(calls).toMatchSnapshot() }) }) diff --git a/tests/plugins.spec.ts b/tests/plugins.spec.ts index 19239fe0..a5f83d0c 100644 --- a/tests/plugins.spec.ts +++ b/tests/plugins.spec.ts @@ -79,7 +79,7 @@ describe('onInstall plugins', () => { plugins: [createPlugin({ name: 'x', ...xPluginConfig })], }) ) - ) + ).trim() } it('is an optional hook', () => { diff --git a/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap b/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap index 17aef4bc..620eb2ef 100644 --- a/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap +++ b/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap @@ -299,11 +299,11 @@ type Query { ): UserConnection! } -type QueryFieldLevel_Connection { +type QueryFieldLevel2_Connection { \\"\\"\\" https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types \\"\\"\\" - edges: [QueryFieldLevel_Edge!]! + edges: [QueryFieldLevel2_Edge!]! \\"\\"\\" https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo @@ -311,20 +311,20 @@ type QueryFieldLevel_Connection { pageInfo: PageInfo! } -type QueryFieldLevel_Edge { +type QueryFieldLevel2_Edge { \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" - cursor: UUID! + cursor: UUID4! delta: Int! \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" node: User! } -type QueryFieldLevel2_Connection { +type QueryFieldLevel_Connection { \\"\\"\\" https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types \\"\\"\\" - edges: [QueryFieldLevel2_Edge!]! + edges: [QueryFieldLevel_Edge!]! \\"\\"\\" https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo @@ -332,15 +332,19 @@ type QueryFieldLevel2_Connection { pageInfo: PageInfo! } -type QueryFieldLevel2_Edge { +type QueryFieldLevel_Edge { \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" - cursor: UUID4! + cursor: UUID! delta: Int! \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" node: User! } +scalar UUID + +scalar UUID4 + type User { id: ID! name: String! @@ -365,12 +369,7 @@ type UserEdge { \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" node: User! -} - -scalar UUID - -scalar UUID4 -" +}" `; exports[`field level configuration #670 should explicitly state nullability for connectionPlugin args & fields 1`] = ` @@ -438,8 +437,7 @@ type UserEdge { \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" node: User! -} -" +}" `; exports[`field level configuration can configure connection names per-instance 1`] = `"QueryUsersTestFieldConnection"`; @@ -536,7 +534,7 @@ type PageInfo { } type Query { - users( + userStats( \\"\\"\\"Returns the elements in the list that come after the specified cursor\\"\\"\\" after: String @@ -548,8 +546,8 @@ type Query { \\"\\"\\"Returns the last n elements from the list.\\"\\"\\" last: Int - ): UserConnection - userStats( + ): AnalyticsUserConnection + users( \\"\\"\\"Returns the elements in the list that come after the specified cursor\\"\\"\\" after: String @@ -561,7 +559,7 @@ type Query { \\"\\"\\"Returns the last n elements from the list.\\"\\"\\" last: Int - ): AnalyticsUserConnection + ): UserConnection } type User { @@ -587,8 +585,7 @@ type UserEdge { \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" node: User -} -" +}" `; exports[`field level configuration can define additional args for the connection 1`] = ` diff --git a/tests/plugins/connectionPlugin.spec.ts b/tests/plugins/connectionPlugin.spec.ts index 4513d2fb..59dad3b6 100644 --- a/tests/plugins/connectionPlugin.spec.ts +++ b/tests/plugins/connectionPlugin.spec.ts @@ -165,6 +165,7 @@ describe('defaults', () => { before: 'whatever', }, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.users.pageInfo.hasPreviousPage).toEqual(true) }) it('should provide forward pagination defaults', async () => { @@ -174,7 +175,9 @@ describe('defaults', () => { document: UsersFirst, variableValues: { first: 1 }, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(nodes.data?.users.edges).toEqual([{ cursor: 'Y3Vyc29yOjA=', node: { id: 'User:1' } }]) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(Buffer.from(nodes.data?.users.edges[0].cursor, 'base64').toString('utf8')).toEqual('cursor:0') }) }) @@ -215,6 +218,7 @@ describe('basic behavior', () => { document: UsersFirstAfter, variableValues: { first: 1, after: 'Y3Vyc29yOjA=' }, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(Buffer.from(nodes.data?.users.edges[0].cursor, 'base64').toString('utf8')).toEqual('cursor:1') }) @@ -228,6 +232,7 @@ describe('basic behavior', () => { document: UsersFirst, variableValues: { first: 9 }, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(first.data?.users.pageInfo).toEqual({ hasNextPage: true, hasPreviousPage: false, @@ -239,9 +244,11 @@ describe('basic behavior', () => { document: UsersLastBefore, variableValues: { last: 3, + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support before: first.data?.users.pageInfo.endCursor, }, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(lastNodes.data?.users.pageInfo).toEqual({ startCursor: 'cursor:5', endCursor: 'cursor:7', @@ -273,6 +280,7 @@ describe('basic behavior', () => { last: 3, }, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(lastNodes.data?.users.pageInfo).toEqual({ startCursor: 'cursor:98', endCursor: 'cursor:100', @@ -305,6 +313,7 @@ describe('basic behavior', () => { document: UsersFirst, variableValues: { first: 10 }, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(lastNodes.data?.users.pageInfo).toEqual({ endCursor: 'Y3Vyc29yOjk=', hasNextPage: false, @@ -322,6 +331,7 @@ describe('basic behavior', () => { document: UsersFirst, variableValues: { first: 10 }, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(lastNodes.data?.users.nodes).toEqual(lastNodes.data?.users.edges.map((e: any) => e.node)) }) @@ -369,7 +379,9 @@ describe('basic behavior', () => { resolve: (...args) => { const result = customResolveFn(...args) return { + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support ...result, + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support nodes: result.edges.map((e: any) => e.node), } }, @@ -573,6 +585,7 @@ describe('basic behavior', () => { document: UsersFirst, variableValues: { first: 1000 }, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.users.nodes.length).toEqual(10) }) @@ -670,6 +683,7 @@ describe('global plugin configuration', () => { schema, document: UsersAll, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.users?.edges.length).toEqual(10) }) @@ -932,7 +946,7 @@ describe('field level configuration', () => { output: false, }, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) it('prints the types associated with the connection plugin correctly', async () => { @@ -986,7 +1000,7 @@ describe('field level configuration', () => { }, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) it('#450 can extend connection edge with custom field', async () => { @@ -1030,7 +1044,7 @@ describe('field level configuration', () => { schema, document: parse(`{ users(first: 10) { edges { delta } } }`), }) - + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.users.edges.map((e: any) => e.delta)).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) }) @@ -1041,6 +1055,8 @@ describe('field level configuration', () => { scalarType({ name: 'UUID', serialize() {}, + parseLiteral() {}, + parseValue() {}, }), scalarType({ name: 'UUID4', @@ -1082,7 +1098,7 @@ describe('field level configuration', () => { }, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchSnapshot() + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchSnapshot() }) it('#479 allows a promise to be returned from pageInfoFromNodes', async () => { @@ -1102,7 +1118,9 @@ describe('field level configuration', () => { first: 1, }, }) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.users.pageInfo.hasNextPage).toEqual(true) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(result.data?.users.pageInfo.hasPreviousPage).toEqual(false) }) }) @@ -1339,7 +1357,7 @@ describe('connectionPlugin extensions', () => { {}, [ queryField((t) => { - // @ts-expect-error + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support t.connectionField('users2', { type: User, nodes(root: any, args: any, ctx: any, info: any) { @@ -1397,7 +1415,7 @@ describe('connectionPlugin extensions', () => { {}, [ queryField((t) => { - // @ts-expect-error + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support t.connectionField('users2', { type: User, nodes(root: any, args: any, ctx: any, info: any) { @@ -1446,8 +1464,11 @@ describe('iteration', () => { }) const end = new Date().valueOf() expect(end - start).toBeLessThan(1000) // This was taking awhile when looping i < first + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(nodes.data?.users.edges.length).toEqual(10) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(Buffer.from(nodes.data?.users.edges[0].cursor, 'base64').toString('utf8')).toEqual('cursor:0') + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(Buffer.from(nodes.data?.users.edges[9].cursor, 'base64').toString('utf8')).toEqual('cursor:9') }) @@ -1469,8 +1490,11 @@ describe('iteration', () => { }) const end = new Date().valueOf() expect(end - start).toBeLessThan(1000) // This was taking awhile when looping i < last + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(nodes.data?.users.edges.length).toEqual(9) + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(Buffer.from(nodes.data?.users.edges[0].cursor, 'base64').toString('utf8')).toEqual('cursor:0') + // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support expect(Buffer.from(nodes.data?.users.edges[8].cursor, 'base64').toString('utf8')).toEqual('cursor:8') }) }) diff --git a/tests/plugins/fieldAuthorizePlugin.spec.ts b/tests/plugins/fieldAuthorizePlugin.spec.ts index 5cc989e5..6eb7aad3 100644 --- a/tests/plugins/fieldAuthorizePlugin.spec.ts +++ b/tests/plugins/fieldAuthorizePlugin.spec.ts @@ -86,18 +86,17 @@ describe('fieldAuthorizePlugin', () => { }) const mockCtx = { user: { id: 1 } } const testField = (field: string, passes = false, schema = testSchema) => { - return graphql( + return graphql({ schema, - ` + source: ` { ${field} { id } } `, - {}, - mockCtx - ) + contextValue: mockCtx, + }) } test('field-level authorize passes returning true', async () => { diff --git a/tests/plugins/nullabilityGuardPlugin.spec.ts b/tests/plugins/nullabilityGuardPlugin.spec.ts index 7806a215..9fef262a 100644 --- a/tests/plugins/nullabilityGuardPlugin.spec.ts +++ b/tests/plugins/nullabilityGuardPlugin.spec.ts @@ -147,46 +147,46 @@ describe('nullabilityGuardPlugin', () => { }) it('should trigger the nullability guard', async () => { - const { errors = [], data } = await graphql( - defaultSchema, - ` + const { errors = [], data } = await graphql({ + schema: defaultSchema, + source: ` { getUserWithGuard { id } } - ` - ) + `, + }) expect(errors).toEqual([]) expect(data!.getUserWithGuard).toEqual({ id: 'User:N/A' }) expect(onGuardedMock).toBeCalledTimes(1) }) it('should fill ints with a default', async () => { - const { errors = [], data } = await graphql( - defaultSchema, - ` + const { errors = [], data } = await graphql({ + schema: defaultSchema, + source: ` { intList } - ` - ) + `, + }) expect(errors).toEqual([]) expect(data!.intList).toEqual([1, 2, -1]) expect(onGuardedMock).toBeCalledTimes(1) }) it('should fill with defaults', async () => { - const { errors = [], data } = await graphql( - defaultSchema, - ` + const { errors = [], data } = await graphql({ + schema: defaultSchema, + source: ` { userList { id } } - ` - ) + `, + }) expect(errors).toEqual([]) expect(data!.userList).toEqual([{ id: 'User:N/A' }, { id: 'User:N/A' }, { id: 'User:N/A' }]) // Once for each null, once for each "id" field @@ -194,25 +194,25 @@ describe('nullabilityGuardPlugin', () => { }) it('should guard on GraphQLObjectType fields', async () => { - const { errors = [], data } = await graphql( - defaultSchema, - ` + const { errors = [], data } = await graphql({ + schema: defaultSchema, + source: ` { objType { id } } - ` - ) + `, + }) expect(errors).toEqual([]) expect(data!.objType).toEqual({ id: 'SomeObjectType:N/A' }) expect(onGuardedMock).toBeCalledTimes(1) }) it('should guard interface types', async () => { - const { errors = [], data } = await graphql( - defaultSchema, - ` + const { errors = [], data } = await graphql({ + schema: defaultSchema, + source: ` { interfaceType { __typename @@ -225,8 +225,8 @@ describe('nullabilityGuardPlugin', () => { } } } - ` - ) + `, + }) expect(errors).toEqual([]) expect(data!.interfaceType).toEqual({ __typename: 'User', @@ -238,8 +238,8 @@ describe('nullabilityGuardPlugin', () => { }) it('should guard union types', async () => { - const { errors = [], data } = await graphql( - makeSchema({ + const { errors = [], data } = await graphql({ + schema: makeSchema({ outputs: false, nonNullDefaults: { output: true, @@ -264,7 +264,7 @@ describe('nullabilityGuardPlugin', () => { }, }, }), - ` + source: ` { unionType { __typename @@ -278,8 +278,8 @@ describe('nullabilityGuardPlugin', () => { } } } - ` - ) + `, + }) expect(errors).toEqual([]) expect(data!.unionType).toEqual({ __typename: 'User', @@ -294,14 +294,14 @@ describe('nullabilityGuardPlugin', () => { }) it('should guard on enumType fields', async () => { - const { errors = [], data } = await graphql( - defaultSchema, - ` + const { errors = [], data } = await graphql({ + schema: defaultSchema, + source: ` { enumType } - ` - ) + `, + }) expect(errors).toEqual([]) expect(data!.enumType).toEqual('A') expect(onGuardedMock).toBeCalledTimes(1) @@ -322,16 +322,16 @@ describe('nullabilityGuardPlugin', () => { }, }, }) - const { errors = [], data } = await graphql( + const { errors = [], data } = await graphql({ schema, - ` + source: ` { getUserWithGuard { id } } - ` - ) + `, + }) expect(errors).toEqual([]) expect(data!.getUserWithGuard).toEqual({ id: 'User:N/A' }) expect(warnSpy).toHaveBeenCalledTimes(1) @@ -352,16 +352,16 @@ describe('nullabilityGuardPlugin', () => { }, }, }) - const { errors = [], data } = await graphql( + const { errors = [], data } = await graphql({ schema, - ` + source: ` { getUserWithGuard { id } } - ` - ) + `, + }) expect(errors).toHaveLength(1) expect(errors[0].message).toEqual('Cannot return null for non-nullable field User.id.') expect(data).toBeNull() @@ -379,16 +379,16 @@ describe('nullabilityGuardPlugin', () => { }, }, }) - const { errors: errors2 = [], data: data2 } = await graphql( - schema2, - ` + const { errors: errors2 = [], data: data2 } = await graphql({ + schema: schema2, + source: ` { getUserWithGuard { id } } - ` - ) + `, + }) expect(errors2).toEqual([]) expect(data2!.getUserWithGuard).toEqual({ id: 'User:N/A' }) }) @@ -442,22 +442,22 @@ describe('nullabilityGuardPlugin', () => { }) it('will still fail if it cant handle with a guard', async () => { - const { errors = [] } = await graphql( - defaultSchema, - ` + const { errors = [] } = await graphql({ + schema: defaultSchema, + source: ` { shouldFail } - ` - ) + `, + }) expect(errors).toHaveLength(1) expect(errors[0].message).toEqual('Cannot return null for non-nullable field Query.shouldFail.') }) it('will return null for nullable list values', async () => { const onGuardedMock = jest.fn() - const { errors = [], data } = await graphql( - makeSchema({ + const { errors = [], data } = await graphql({ + schema: makeSchema({ types: [ queryField('nullableList', { type: list('String'), @@ -471,12 +471,12 @@ describe('nullabilityGuardPlugin', () => { }), ], }), - ` + source: ` { nullableList } - ` - ) + `, + }) expect(errors).toHaveLength(0) expect(data!.nullableList).toEqual(null) expect(onGuardedMock).toHaveBeenCalledTimes(0) diff --git a/tests/resolveTypes.spec.ts b/tests/resolveTypes.spec.ts index c996cce9..3c7d88c4 100644 --- a/tests/resolveTypes.spec.ts +++ b/tests/resolveTypes.spec.ts @@ -8,8 +8,8 @@ describe('custom scalars', () => { types: [ scalarType({ name: 'Date', - serialize: (value) => value.getTime(), - parseValue: (value) => new Date(value), + serialize: (value) => (value as Date).getTime(), + parseValue: (value) => new Date(value as number | string), parseLiteral: (ast) => (ast.kind === 'IntValue' ? new Date(ast.value) : null), asNexusMethod: 'date', sourceType: 'Date', @@ -30,7 +30,7 @@ describe('custom scalars', () => { testDate } ` - const result = await graphql(schema, query) + const result = await graphql({ schema, source: query }) expect(result.data!.testDate).toBe(now.getTime()) }) }) diff --git a/tests/scalarType.spec.ts b/tests/scalarType.spec.ts index 68b8bb18..0c40de8a 100644 --- a/tests/scalarType.spec.ts +++ b/tests/scalarType.spec.ts @@ -57,17 +57,17 @@ describe('scalarType', () => { shouldGenerateArtifacts: false, }) expect( - await graphql( + await graphql({ schema, - ` + source: ` { user(input: { date: "2020-01-01" }) { id dateTimeField } } - ` - ) + `, + }) ).toMatchSnapshot() }) diff --git a/tests/subscriptionField.spec.ts b/tests/subscriptionField.spec.ts index de0b245e..133f3989 100644 --- a/tests/subscriptionField.spec.ts +++ b/tests/subscriptionField.spec.ts @@ -16,15 +16,14 @@ it('defines a field on the mutation type as shorthand', async () => { outputs: false, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchInlineSnapshot(` + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchInlineSnapshot(` "type Query { ok: Boolean! } type Subscription { someField: Int - } - " + }" `) expect( @@ -71,15 +70,14 @@ it('can be defined as a thunk', async () => { outputs: false, }) - expect(printSchema(lexicographicSortSchema(schema))).toMatchInlineSnapshot(` + expect(printSchema(lexicographicSortSchema(schema)).trim()).toMatchInlineSnapshot(` "type Query { ok: Boolean! } type Subscription { someField: Int - } - " + }" `) expect( diff --git a/tests/subscriptionType.spec.ts b/tests/subscriptionType.spec.ts index d6de11e8..2e03fe50 100644 --- a/tests/subscriptionType.spec.ts +++ b/tests/subscriptionType.spec.ts @@ -92,7 +92,7 @@ it('defines a field on the mutation type as shorthand', async () => { outputs: false, }) - expect(GQL.printSchema(GQL.lexicographicSortSchema(schema))).toMatchInlineSnapshot(` + expect(GQL.printSchema(GQL.lexicographicSortSchema(schema)).trim()).toMatchInlineSnapshot(` "type Query { ok: Boolean! } @@ -107,8 +107,7 @@ it('defines a field on the mutation type as shorthand', async () => { someInt: Int someInts: [Int] someString: String - } - " + }" `) expect( diff --git a/tests/typegen-globals/schema.gen.graphql b/tests/typegen-globals/schema.gen.graphql index c61a8dd1..f32dc933 100644 --- a/tests/typegen-globals/schema.gen.graphql +++ b/tests/typegen-globals/schema.gen.graphql @@ -54,6 +54,8 @@ enum SomeEnum { B @deprecated(reason: "This is a deprecation reason for B") } +scalar UUID + type User implements Node { email: String! id: ID! @@ -71,5 +73,3 @@ type User implements Node { phone: String posts(filters: PostFilters): [Post!]! } - -scalar UUID diff --git a/tests/typegen/schema.gen.graphql b/tests/typegen/schema.gen.graphql index c61a8dd1..f32dc933 100644 --- a/tests/typegen/schema.gen.graphql +++ b/tests/typegen/schema.gen.graphql @@ -54,6 +54,8 @@ enum SomeEnum { B @deprecated(reason: "This is a deprecation reason for B") } +scalar UUID + type User implements Node { email: String! id: ID! @@ -71,5 +73,3 @@ type User implements Node { phone: String posts(filters: PostFilters): [Post!]! } - -scalar UUID diff --git a/tests/unionType.spec.ts b/tests/unionType.spec.ts index 04365d7e..c4ec19ad 100644 --- a/tests/unionType.spec.ts +++ b/tests/unionType.spec.ts @@ -51,9 +51,9 @@ describe('unionType', () => { shouldGenerateArtifacts: false, }) expect( - await graphql( + await graphql({ schema, - ` + source: ` fragment UserOrErrorFields on UserOrError { __typename ... on User { @@ -72,8 +72,8 @@ describe('unionType', () => { ...UserOrErrorFields } } - ` - ) + `, + }) ).toMatchSnapshot() }) }) diff --git a/tests/v15/__snapshots__/interfaceType-v15.spec.ts.snap b/tests/v15/__snapshots__/interfaceType-v15.spec.ts.snap index 84925575..d15da3e9 100644 --- a/tests/v15/__snapshots__/interfaceType-v15.spec.ts.snap +++ b/tests/v15/__snapshots__/interfaceType-v15.spec.ts.snap @@ -21,6 +21,5 @@ type Foo implements Node2 & Node { type Query { ok: Boolean! -} -" +}" `; diff --git a/tests/v15/__snapshots__/modify-v15.spec.ts.snap b/tests/v15/__snapshots__/modify-v15.spec.ts.snap index 76addf1a..34e11a1c 100644 --- a/tests/v15/__snapshots__/modify-v15.spec.ts.snap +++ b/tests/v15/__snapshots__/modify-v15.spec.ts.snap @@ -27,6 +27,5 @@ type Mule implements Equine & Pet { type Query { ok: Boolean! -} -" +}" `; diff --git a/tests/v15/interfaceType-v15.spec.ts b/tests/v15/interfaceType-v15.spec.ts index a4bcf567..d8d00f15 100644 --- a/tests/v15/interfaceType-v15.spec.ts +++ b/tests/v15/interfaceType-v15.spec.ts @@ -38,6 +38,6 @@ describe('interfaceType', () => { }, null ) - expect(schemaTypes).toMatchSnapshot() + expect(schemaTypes.trim()).toMatchSnapshot() }) }) diff --git a/tests/v15/modify-v15.spec.ts b/tests/v15/modify-v15.spec.ts index b7dc3e98..23bd34b3 100644 --- a/tests/v15/modify-v15.spec.ts +++ b/tests/v15/modify-v15.spec.ts @@ -50,7 +50,7 @@ describe('modify', () => { }) it('should output a valid schema', () => { - expect(schemaTypes).toMatchSnapshot() + expect(schemaTypes.trim()).toMatchSnapshot() }) }) }) diff --git a/tsconfig.json b/tsconfig.json index 1542b72a..f8e93d4a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,8 +10,10 @@ "noUnusedLocals": true, "importHelpers": true, "resolveJsonModule": true, + "useUnknownInCatchVariables": false, "noEmit": true, - "importsNotUsedAsValues": "error" + "importsNotUsedAsValues": "error", + "stripInternal": true }, "exclude": [ "./examples", diff --git a/yarn.lock b/yarn.lock index cbf056fb..4ee87422 100644 --- a/yarn.lock +++ b/yarn.lock @@ -406,14 +406,6 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@dsherret/to-absolute-glob@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@dsherret/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1f6475dc8bd974cea07a2daf3864b317b1dd332c" - integrity sha1-H2R13IvZdM6gei2vOGSzF7HdMyw= - dependencies: - is-absolute "^1.0.0" - is-negated-glob "^1.0.0" - "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -884,17 +876,15 @@ dependencies: defer-to-connect "^1.0.1" -"@ts-morph/common@~0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.6.0.tgz#cbd4ee57c5ef971511b9c5778e0bb8eb27de4783" - integrity sha512-pI35nZz5bs3tL3btSVX2cWkAE8rc80F+Fn4TwSC6bQvn7fgn9IyLXVcAfpG6X6NBY5wN9TkSWXn/QYUkBvR/Fw== +"@ts-morph/common@~0.12.3": + version "0.12.3" + resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.12.3.tgz#a96e250217cd30e480ab22ec6a0ebbe65fd784ff" + integrity sha512-4tUmeLyXJnJWvTFOKtcNJ1yh0a3SsTLi2MUoyj8iUNznFRN1ZquaNe7Oukqrnki2FzZkm0J9adCNLDZxUzvj+w== dependencies: - "@dsherret/to-absolute-glob" "^2.0.2" - fast-glob "^3.2.4" - fs-extra "^9.0.1" - is-negated-glob "^1.0.0" - multimatch "^4.0.0" - typescript "~4.0.2" + fast-glob "^3.2.7" + minimatch "^3.0.4" + mkdirp "^1.0.4" + path-browserify "^1.0.1" "@types/babel__core@^7.0.0": version "7.1.12" @@ -1015,11 +1005,6 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A== -"@types/minimatch@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - "@types/minimist@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" @@ -1313,11 +1298,6 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-differ@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" - integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== - array-each@^1.0.0, array-each@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" @@ -1927,10 +1907,12 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= -code-block-writer@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-10.1.0.tgz#54fc410ebef2af836d9c2314ac40af7d7b37eee9" - integrity sha512-RG9hpXtWFeUWhuUav1YuP/vGcyncW+t90yJLk9fNZs1De2OuHTHKAKThVCokt29PYq5RoJ0QSZaIZ+rvPO23hA== +code-block-writer@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-11.0.0.tgz#5956fb186617f6740e2c3257757fea79315dd7d4" + integrity sha512-GEqWvEWWsOvER+g9keO4ohFoD3ymwyCnqY3hoTr7GZipYFwEhMHJw+TtV0rfgRhNImM6QWZGO2XYjlJVyYT62w== + dependencies: + tslib "2.3.1" code-point-at@^1.0.0: version "1.1.0" @@ -2858,7 +2840,7 @@ fast-deep-equal@^2.0.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= -fast-glob@^3.1.1, fast-glob@^3.2.4: +fast-glob@^3.1.1: version "3.2.4" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== @@ -2870,6 +2852,17 @@ fast-glob@^3.1.1, fast-glob@^3.2.4: micromatch "^4.0.2" picomatch "^2.2.1" +fast-glob@^3.2.7: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -3225,6 +3218,13 @@ glob-parent@^5.1.0: dependencies: is-glob "^4.0.1" +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob-stream@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" @@ -3356,17 +3356,17 @@ graceful-fs@^4.1.2: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.1.tgz#1c1f0c364882c868f5bff6512146328336a11b1d" integrity sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw== -graphql-relay@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/graphql-relay/-/graphql-relay-0.6.0.tgz#18ec36b772cfcb3dbb9bd369c3f8004cf42c7b93" - integrity sha512-OVDi6C9/qOT542Q3KxZdXja3NrDvqzbihn1B44PH8P/c5s0Q90RyQwT6guhGqXqbYEH6zbeLJWjQqiYvcg2vVw== - dependencies: - prettier "^1.16.0" +graphql-relay@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/graphql-relay/-/graphql-relay-0.10.0.tgz#3b661432edf1cb414cd4a132cf595350e524db2b" + integrity sha512-44yBuw2/DLNEiMypbNZBt1yMDbBmyVPVesPywnteGGALiBmdyy1JP8jSg8ClLePg8ZZxk0O4BLhd1a6U/1jDOQ== -graphql-scalars@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/graphql-scalars/-/graphql-scalars-1.2.6.tgz#a934ed63c91054db00cde41b9beeddb09b606729" - integrity sha512-k/88kZVXIuUKQuVLokokkKU2lnFEZ9aTn7O0fDweJpISd0pP5fQU1wzPN0jarH4Lnadr4092PfyIUtCcKzkeAw== +graphql-scalars@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/graphql-scalars/-/graphql-scalars-1.14.1.tgz#546a12ac2901e17202f354c71e336942feb9afa2" + integrity sha512-IrJ2SI9IkCmWHyr7yIvtPNGWTWF3eTS+iNnw1DQMmEtsOgs1dUmT0ge+8M1+1xm+q3/5ZqB95yUYyThDyOTE+Q== + dependencies: + tslib "~2.3.0" graphql@^14.5.3: version "14.5.7" @@ -3375,11 +3375,16 @@ graphql@^14.5.3: dependencies: iterall "^1.2.2" -graphql@^15.1.0, graphql@^15.3.0: +graphql@^15.1.0: version "15.3.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" integrity sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w== +graphql@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05" + integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A== + growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -5069,6 +5074,14 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +micromatch@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + dependencies: + braces "^3.0.1" + picomatch "^2.2.3" + mime-db@1.40.0: version "1.40.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" @@ -5152,7 +5165,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@1.x: +mkdirp@1.x, mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -5174,17 +5187,6 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -multimatch@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3" - integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ== - dependencies: - "@types/minimatch" "^3.0.3" - array-differ "^3.0.0" - array-union "^2.1.0" - arrify "^2.0.1" - minimatch "^3.0.4" - mute-stdout@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.1.tgz#acb0300eb4de23a7ddeec014e3e96044b3472331" @@ -5631,6 +5633,11 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= +path-browserify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== + path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -5714,6 +5721,11 @@ picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.2.3: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -5791,15 +5803,10 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier@^1.16.0: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== - -prettier@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" - integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== +prettier@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" + integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== pretty-format@^23.6.0: version "23.6.0" @@ -7059,14 +7066,13 @@ ts-jest@^26.4.4: semver "7.x" yargs-parser "20.x" -ts-morph@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-8.2.0.tgz#41d83cd501cbd897eb029ac489d6d5b927555c57" - integrity sha512-NHHWu+7I2/AOZiTni5w3f+xCfIxrkzPCcQbTGa81Yk3pr23a4h9xLLEE6tIGuYIubWjkjr9QVC3ITqgmA5touQ== +ts-morph@^13.0.3: + version "13.0.3" + resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-13.0.3.tgz#c0c51d1273ae2edb46d76f65161eb9d763444c1d" + integrity sha512-pSOfUMx8Ld/WUreoSzvMFQG5i9uEiWIsBYjpU9+TTASOeUa89j5HykomeqVULm1oqWtBdleI3KEFRLrlA3zGIw== dependencies: - "@dsherret/to-absolute-glob" "^2.0.2" - "@ts-morph/common" "~0.6.0" - code-block-writer "^10.1.0" + "@ts-morph/common" "~0.12.3" + code-block-writer "^11.0.0" ts-node@^9.0.0: version "9.0.0" @@ -7091,6 +7097,11 @@ tsd@^0.13.1: read-pkg-up "^7.0.0" update-notifier "^4.1.0" +tslib@2.3.1, tslib@~2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" @@ -7215,15 +7226,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9" - integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== - -typescript@~4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5" - integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg== +typescript@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== unc-path-regex@^0.1.2: version "0.1.2" From bbc969a5b0209b8c08f1db78349b35001ca0445e Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Sat, 5 Mar 2022 14:12:48 -0500 Subject: [PATCH 21/33] chore: update github workflows (#1053) --- .github/workflows/pr.yml | 6 +++--- .github/workflows/trunk.yml | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7f06dd0a..b8da1d32 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 12.x + node-version: 14.x - name: Install Dependencies run: yarn --frozen-lockfile && yarn format:ci - name: Install GraphQL@15.x @@ -21,7 +21,7 @@ jobs: test: strategy: matrix: - node-version: [12.x, 14.x] + node-version: [14.x, 16.x] os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: @@ -56,7 +56,7 @@ jobs: # rm examples/star-wars/star-wars-schema.graphql # node examples/star-wars/dist/schema.js # git diff --exit-code - node-version: [12.x] + node-version: [14.x] os: [macos-latest] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/trunk.yml b/.github/workflows/trunk.yml index 1030a291..1f7edf5a 100644 --- a/.github/workflows/trunk.yml +++ b/.github/workflows/trunk.yml @@ -5,24 +5,24 @@ on: branches: [main] jobs: - graphql-14: + graphql-15: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 12.x + node-version: 14.x - name: Install Dependencies - run: yarn --frozen-lockfile || yarn --frozen-lockfile - - name: Install GraphQL@14.x - run: yarn add graphql@^14.5.8 + run: yarn --frozen-lockfile && yarn format:ci + - name: Install GraphQL@15.x + run: yarn add graphql@^15 - name: Test - run: yarn -s test:ci --testPathIgnorePatterns v15 + run: yarn -s test:ci test: strategy: matrix: - node-version: [12.x, 14.x] + node-version: [14.x, 16.x] os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: @@ -57,7 +57,7 @@ jobs: # rm examples/star-wars/star-wars-schema.graphql # node examples/star-wars/dist/schema.js # git diff --exit-code - node-version: [12.x] + node-version: [14.x] os: [macos-latest] runs-on: ${{ matrix.os }} steps: From 92f20dc9e98d9699688ef16398603acb3f988f6d Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Sat, 5 Mar 2022 15:25:11 -0500 Subject: [PATCH 22/33] chore: add test confirming v16 schema compat (#1054) --- src/definitions/_types.ts | 5 ++++- tests/makeSchema.spec.ts | 14 +++++++++++++- tests/typegenPrinterGlobals.spec.ts | 4 ++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/definitions/_types.ts b/src/definitions/_types.ts index d7480821..ac914b07 100644 --- a/src/definitions/_types.ts +++ b/src/definitions/_types.ts @@ -156,7 +156,10 @@ export type NexusGraphQLInterfaceTypeConfig = WithExt< > & { interfaces: () => GraphQLInterfaceType[] } export interface NexusGraphQLSchema extends GraphQLSchema { - extensions: { nexus: NexusSchemaExtension } + extensions: { + nexus: NexusSchemaExtension + [attributeName: string]: unknown + } } export type NexusFeaturesInput = { diff --git a/tests/makeSchema.spec.ts b/tests/makeSchema.spec.ts index 59de9750..5ed0b6e4 100644 --- a/tests/makeSchema.spec.ts +++ b/tests/makeSchema.spec.ts @@ -1,4 +1,4 @@ -import { printSchema } from 'graphql' +import { GraphQLSchema, printSchema } from 'graphql' import os from 'os' import path from 'path' import { objectType } from '../src' @@ -151,4 +151,16 @@ describe('makeSchema', () => { expect(tsTypes).toContain(`import type { Context } from "./makeSchema.spec"`) }) }) + + it('is compatible with GraphQL schema types', () => { + const someFn = (schema: GraphQLSchema) => { + return schema.toConfig() + } + + const nexusSchema = makeSchema({ + types: [], + }) + + someFn(nexusSchema) + }) }) diff --git a/tests/typegenPrinterGlobals.spec.ts b/tests/typegenPrinterGlobals.spec.ts index f86b7e94..5eb59037 100644 --- a/tests/typegenPrinterGlobals.spec.ts +++ b/tests/typegenPrinterGlobals.spec.ts @@ -19,7 +19,7 @@ describe('typegenPrinter: globals', () => { schema: path.join(__dirname, 'typegen-globals/schema.gen.graphql'), } as const - const schema = (await generateSchema({ + const schema = await generateSchema({ outputs, shouldGenerateArtifacts: true, types: [buildSchema(EXAMPLE_SDL)], @@ -35,7 +35,7 @@ describe('typegenPrinter: globals', () => { return content.replace("'nexus'", `'../../src'`) }, - })) as core.NexusGraphQLSchema + }) metadata = new TypegenMetadata({ outputs, From 6c1530a3d5cdda4cbedf82b070e7dfa163d0ab1b Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Sat, 5 Mar 2022 15:26:42 -0500 Subject: [PATCH 23/33] v1.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b987ade9..e5c72989 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nexus", - "version": "0.0.0-dripip", + "version": "1.3.0", "description": "Scalable, strongly typed GraphQL schema development", "keywords": [ "graphql", From 0f37c3e9d42765b90566de1461bee3c374c35340 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Sat, 5 Mar 2022 15:29:59 -0500 Subject: [PATCH 24/33] docs: Update npm badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f33d4b4..c8e1f7f9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Nexus [![trunk](https://github.com/graphql-nexus/nexus/workflows/trunk/badge.svg)](https://github.com/graphql-nexus/nexus/actions/workflows/trunk.yml) -[![npm version](https://badge.fury.io/js/%40nexus%2Fschema.svg)](https://badge.fury.io/js/%40nexus%2Fschema) +[![npm version](https://badge.fury.io/js/nexus.svg)](https://badge.fury.io/js/nexus) Declarative, code-first and strongly typed GraphQL schema construction for TypeScript & JavaScript. From bc12ca0f8e704de0b7e911fa6352e8f2bb48cb22 Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Thu, 10 Mar 2022 14:02:20 -0500 Subject: [PATCH 25/33] chore: use dripip reusable workflow --- .github/workflows/trunk.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/trunk.yml b/.github/workflows/trunk.yml index 1f7edf5a..9d40d758 100644 --- a/.github/workflows/trunk.yml +++ b/.github/workflows/trunk.yml @@ -80,18 +80,7 @@ jobs: release-canary: needs: [test, test-examples] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-node@v2 - - name: Install Dependencies - run: yarn --frozen-lockfile || yarn --frozen-lockfile - - name: Release Canary - env: - NPM_TOKEN: ${{secrets.NPM_TOKEN}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - run: | - yarn -s dripip preview --json > result.json - jq '.' < result.json + uses: prisma-labs/dripip/.github/workflows/release.yml@master + secrets: + npmToken: ${{secrets.NPM_TOKEN}} + githubToken: ${{secrets.GITHUB_TOKEN}} From 892af670a4ffd99c1f17691082cdbfbd2b4ab82f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Fran=C3=A7ois?= Date: Thu, 24 Mar 2022 22:02:17 +0100 Subject: [PATCH 26/33] feat: Use ReadonlyArray in typings (#1041) * Use ReadonlArray when generating output types * Add useReadonlyArrayForInputs config and use it accordingly * Update tests snapshots * Move useReadonlyArrayForInputs in ConfiguredTypegen option * Add tests for useReadonlyArrayForInputs Co-authored-by: Jason Kuhrt Co-authored-by: Tim Griesser --- src/builder.ts | 7 + src/typegenMetadata.ts | 10 +- src/typegenPrinter.ts | 12 +- .../__snapshots__/typegenPrinter.spec.ts.snap | 36 +-- .../typegenPrinterGlobals.spec.ts.snap | 283 +++++++++++++++++- .../declarativeWrappingPlugin/__typegen.ts | 4 +- tests/integrations/kitchenSink/__typegen.ts | 10 +- ...bal-types-useReadonlyArrayForInputs.gen.ts | 19 ++ .../types-useReadonlyArrayForInputs.gen.ts | 238 +++++++++++++++ tests/typegen-globals/types.gen.ts | 16 +- tests/typegen/types.gen.ts | 16 +- tests/typegenPrinterGlobals.spec.ts | 70 +++++ 12 files changed, 661 insertions(+), 60 deletions(-) create mode 100644 tests/typegen-globals/global-types-useReadonlyArrayForInputs.gen.ts create mode 100644 tests/typegen-globals/types-useReadonlyArrayForInputs.gen.ts diff --git a/src/builder.ts b/src/builder.ts index ec360a7a..4507bd8b 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -193,6 +193,13 @@ export interface ConfiguredTypegen { * @default false */ declareInputs?: boolean + + /** + * If "true", uses ReadonlyArray to type array for inputs + * + * @default false + */ + useReadonlyArrayForInputs?: boolean } export interface MergeSchemaConfig { diff --git a/src/typegenMetadata.ts b/src/typegenMetadata.ts index 9bd63b41..acb69cec 100644 --- a/src/typegenMetadata.ts +++ b/src/typegenMetadata.ts @@ -133,6 +133,7 @@ export class TypegenMetadata { return new TypegenPrinter(schema, { declareInputs: false, + useReadonlyArrayForInputs: false, ...typegenInfo, typegenPath, }).print() @@ -140,7 +141,13 @@ export class TypegenMetadata { /** Generates the type definitions */ async generateConfiguredTypes(schema: NexusGraphQLSchema, typegen: ConfiguredTypegen) { - const { outputPath: typegenPath, globalsPath, globalsHeaders, declareInputs = false } = typegen + const { + outputPath: typegenPath, + globalsPath, + globalsHeaders, + declareInputs = false, + useReadonlyArrayForInputs = false, + } = typegen const typegenInfo = await this.getTypegenInfo(schema, typegenPath) return new TypegenPrinter(schema, { @@ -149,6 +156,7 @@ export class TypegenMetadata { globalsPath, globalsHeaders, declareInputs, + useReadonlyArrayForInputs, }).printConfigured() } diff --git a/src/typegenPrinter.ts b/src/typegenPrinter.ts index 5e0b2ba2..fd873560 100644 --- a/src/typegenPrinter.ts +++ b/src/typegenPrinter.ts @@ -58,6 +58,7 @@ interface TypegenInfoWithFile extends TypegenInfo { globalsPath?: string globalsHeaders?: string[] declareInputs?: boolean + useReadonlyArrayForInputs?: boolean } /** @@ -755,13 +756,13 @@ export class TypegenPrinter { if (item.length === 1) { if (Array.isArray(item[0])) { const toPrint = combine(item[0]) - return toPrint.indexOf('null') === -1 ? `${toPrint}[]` : `Array<${toPrint}>` + return `ReadonlyArray<${toPrint}>` } return item[0] } if (Array.isArray(item[1])) { const toPrint = combine(item[1]) - return toPrint.indexOf('null') === -1 ? `${toPrint}[] | null` : `Array<${toPrint}> | null` + return `ReadonlyArray<${toPrint}> | null` } return `${item[1]} | null` } @@ -817,16 +818,23 @@ export class TypegenPrinter { private argTypeRepresentation(arg: GraphQLInputType): string { const argType = this.argTypeArr(arg) + const useReadonlyArrayForInputs = !!this.typegenInfo.useReadonlyArrayForInputs function combine(item: any[]): string { if (item.length === 1) { if (Array.isArray(item[0])) { const toPrint = combine(item[0]) + if (useReadonlyArrayForInputs) { + return `ReadonlyArray<${toPrint}>` + } return toPrint.indexOf('null') === -1 ? `${toPrint}[]` : `Array<${toPrint}>` } return item[0] } if (Array.isArray(item[1])) { const toPrint = combine(item[1]) + if (useReadonlyArrayForInputs) { + return `ReadonlyArray<${toPrint}> | null` + } return toPrint.indexOf('null') === -1 ? `${toPrint}[] | null` : `Array<${toPrint}> | null` } return `${item[1]} | null` diff --git a/tests/__snapshots__/typegenPrinter.spec.ts.snap b/tests/__snapshots__/typegenPrinter.spec.ts.snap index 4af47893..0c7318c5 100644 --- a/tests/__snapshots__/typegenPrinter.spec.ts.snap +++ b/tests/__snapshots__/typegenPrinter.spec.ts.snap @@ -55,9 +55,9 @@ exports[`typegenPrinter should not print roots for fields with resolvers 1`] = ` Mutation: {}; Post: { // root type author: NexusGenRootTypes['User']; // User! - geo: number[][]; // [[Float!]!]! + geo: ReadonlyArray>; // [[Float!]!]! id: string; // ID! - messyGeo?: Array | null; // [[Float!]] + messyGeo?: ReadonlyArray | null> | null; // [[Float!]] uuid: NexusGenScalars['UUID']; // UUID! } Query: {}; @@ -84,9 +84,9 @@ exports[`typegenPrinter should print a object type map 1`] = ` Mutation: {}; Post: { // root type author: NexusGenRootTypes['User']; // User! - geo: number[][]; // [[Float!]!]! + geo: ReadonlyArray>; // [[Float!]!]! id: string; // ID! - messyGeo?: Array | null; // [[Float!]] + messyGeo?: ReadonlyArray | null> | null; // [[Float!]] uuid: NexusGenScalars['UUID']; // UUID! } Query: {}; @@ -96,7 +96,7 @@ exports[`typegenPrinter should print a object type map 1`] = ` name: string; // String! outEnum?: NexusGenEnums['SomeEnum'] | null; // SomeEnum phone?: string | null; // String - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! } }" `; @@ -106,17 +106,17 @@ exports[`typegenPrinter should print a return type map 1`] = ` Mutation: { // field return type createPost: NexusGenRootTypes['Post']; // Post! registerClick: NexusGenRootTypes['Query']; // Query! - someList: Array; // [String]! + someList: ReadonlyArray; // [String]! } Post: { // field return type author: NexusGenRootTypes['User']; // User! - geo: number[][]; // [[Float!]!]! + geo: ReadonlyArray>; // [[Float!]!]! id: string; // ID! - messyGeo: Array | null; // [[Float!]] + messyGeo: ReadonlyArray | null> | null; // [[Float!]] uuid: NexusGenScalars['UUID']; // UUID! } Query: { // field return type - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! unionField: NexusGenRootTypes['ExampleUnion']; // ExampleUnion! user: NexusGenRootTypes['User']; // User! } @@ -126,7 +126,7 @@ exports[`typegenPrinter should print a return type map 1`] = ` name: string; // String! outEnum: NexusGenEnums['SomeEnum'] | null; // SomeEnum phone: string | null; // String - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! } Node: { // field return type id: string; // ID! @@ -189,9 +189,9 @@ export interface NexusGenObjects { Mutation: {}; Post: { // root type author: NexusGenRootTypes['User']; // User! - geo: number[][]; // [[Float!]!]! + geo: ReadonlyArray>; // [[Float!]!]! id: string; // ID! - messyGeo?: Array | null; // [[Float!]] + messyGeo?: ReadonlyArray | null> | null; // [[Float!]] uuid: NexusGenScalars['UUID']; // UUID! } Query: {}; @@ -201,7 +201,7 @@ export interface NexusGenObjects { name: string; // String! outEnum?: NexusGenEnums['SomeEnum'] | null; // SomeEnum phone?: string | null; // String - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! } } @@ -221,17 +221,17 @@ export interface NexusGenFieldTypes { Mutation: { // field return type createPost: NexusGenRootTypes['Post']; // Post! registerClick: NexusGenRootTypes['Query']; // Query! - someList: Array; // [String]! + someList: ReadonlyArray; // [String]! } Post: { // field return type author: NexusGenRootTypes['User']; // User! - geo: number[][]; // [[Float!]!]! + geo: ReadonlyArray>; // [[Float!]!]! id: string; // ID! - messyGeo: Array | null; // [[Float!]] + messyGeo: ReadonlyArray | null> | null; // [[Float!]] uuid: NexusGenScalars['UUID']; // UUID! } Query: { // field return type - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! unionField: NexusGenRootTypes['ExampleUnion']; // ExampleUnion! user: NexusGenRootTypes['User']; // User! } @@ -241,7 +241,7 @@ export interface NexusGenFieldTypes { name: string; // String! outEnum: NexusGenEnums['SomeEnum'] | null; // SomeEnum phone: string | null; // String - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! } Node: { // field return type id: string; // ID! diff --git a/tests/__snapshots__/typegenPrinterGlobals.spec.ts.snap b/tests/__snapshots__/typegenPrinterGlobals.spec.ts.snap index 290a2730..b462073f 100644 --- a/tests/__snapshots__/typegenPrinterGlobals.spec.ts.snap +++ b/tests/__snapshots__/typegenPrinterGlobals.spec.ts.snap @@ -80,9 +80,9 @@ export interface NexusGenObjects { Mutation: {}; Post: { // root type author: NexusGenRootTypes['User']; // User! - geo: number[][]; // [[Float!]!]! + geo: ReadonlyArray>; // [[Float!]!]! id: string; // ID! - messyGeo?: Array | null; // [[Float!]] + messyGeo?: ReadonlyArray | null> | null; // [[Float!]] uuid: NexusGenScalars['UUID']; // UUID! } Query: {}; @@ -92,7 +92,7 @@ export interface NexusGenObjects { name: string; // String! outEnum?: SomeEnum | null; // SomeEnum phone?: string | null; // String - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! } } @@ -112,17 +112,17 @@ export interface NexusGenFieldTypes { Mutation: { // field return type createPost: NexusGenRootTypes['Post']; // Post! registerClick: NexusGenRootTypes['Query']; // Query! - someList: Array; // [String]! + someList: ReadonlyArray; // [String]! } Post: { // field return type author: NexusGenRootTypes['User']; // User! - geo: number[][]; // [[Float!]!]! + geo: ReadonlyArray>; // [[Float!]!]! id: string; // ID! - messyGeo: Array | null; // [[Float!]] + messyGeo: ReadonlyArray | null> | null; // [[Float!]] uuid: NexusGenScalars['UUID']; // UUID! } Query: { // field return type - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! unionField: NexusGenRootTypes['ExampleUnion']; // ExampleUnion! user: NexusGenRootTypes['User']; // User! } @@ -132,7 +132,7 @@ export interface NexusGenFieldTypes { name: string; // String! outEnum: SomeEnum | null; // SomeEnum phone: string | null; // String - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! } Node: { // field return type id: string; // ID! @@ -312,8 +312,8 @@ export interface NexusGenObjects { id: string; // ID! uuid: NexusGenScalars['UUID']; // UUID! author: NexusGenRootTypes['User']; // User! - geo: number[][]; // [[Float!]!]! - messyGeo?: Array | null; // [[Float!]] + geo: ReadonlyArray>; // [[Float!]!]! + messyGeo?: ReadonlyArray | null> | null; // [[Float!]] } Query: {}; User: { // root type @@ -321,7 +321,7 @@ export interface NexusGenObjects { name: string; // String! email: string; // String! phone?: string | null; // String - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! outEnum?: NexusGenEnums['SomeEnum'] | null; // SomeEnum } } @@ -340,7 +340,7 @@ export type NexusGenAllTypes = NexusGenRootTypes & NexusGenScalars & NexusGenEnu export interface NexusGenFieldTypes { Mutation: { // field return type - someList: Array; // [String]! + someList: ReadonlyArray; // [String]! createPost: NexusGenRootTypes['Post']; // Post! registerClick: NexusGenRootTypes['Query']; // Query! } @@ -348,12 +348,12 @@ export interface NexusGenFieldTypes { id: string; // ID! uuid: NexusGenScalars['UUID']; // UUID! author: NexusGenRootTypes['User']; // User! - geo: number[][]; // [[Float!]!]! - messyGeo: Array | null; // [[Float!]] + geo: ReadonlyArray>; // [[Float!]!]! + messyGeo: ReadonlyArray | null> | null; // [[Float!]] } Query: { // field return type user: NexusGenRootTypes['User']; // User! - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! unionField: NexusGenRootTypes['ExampleUnion']; // ExampleUnion! } User: { // field return type @@ -361,7 +361,7 @@ export interface NexusGenFieldTypes { name: string; // String! email: string; // String! phone: string | null; // String - posts: NexusGenRootTypes['Post'][]; // [Post!]! + posts: ReadonlyArray; // [Post!]! outEnum: NexusGenEnums['SomeEnum'] | null; // SomeEnum } Node: { // field return type @@ -521,3 +521,254 @@ declare global { } }" `; + +exports[`typegenPrinter: useReadonlyArrayForInputs should print the full output using ReadonlyArray in input types 1`] = ` +Object { + "globalTypes": "/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ + +import type { NexusGenTypes } from './types-useReadonlyArrayForInputs.gen' + + + + +declare global { + interface NexusGen extends NexusGenTypes {} +} + + + + +declare global { + interface NexusGenPluginTypeConfig { + } + interface NexusGenPluginInputTypeConfig { + } + interface NexusGenPluginFieldConfig { + } + interface NexusGenPluginInputFieldConfig { + } + interface NexusGenPluginSchemaConfig { + } + interface NexusGenPluginArgConfig { + } +}", + "tsTypes": "/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ + + +import type { TestContext } from \\"./../__helpers/index\\" +import type { core } from \\"nexus\\" + +export interface NexusGenInputs { + CreatePostInput: { // input type + author: string; // ID! + geo: ReadonlyArray>; // [[Float]!]! + name: string; // String! + } + PostFilters: { // input type + order: NexusGenEnums['OrderEnum']; // OrderEnum! + search: string | null; // String + } +} + +export interface NexusGenEnums { + OrderEnum: \\"ASC\\" | \\"DESC\\" + SomeEnum: \\"A\\" | \\"B\\" +} + +export interface NexusGenScalars { + String: string + Int: number + Float: number + Boolean: boolean + ID: string + UUID: string +} + +export interface NexusGenObjects { + Mutation: {}; + Post: { // root type + author: NexusGenRootTypes['User']; // User! + geo: ReadonlyArray>; // [[Float!]!]! + id: string; // ID! + messyGeo?: ReadonlyArray | null> | null; // [[Float!]] + uuid: NexusGenScalars['UUID']; // UUID! + } + Query: {}; + User: { // root type + email: string; // String! + id: string; // ID! + name: string; // String! + outEnum?: NexusGenEnums['SomeEnum'] | null; // SomeEnum + phone?: string | null; // String + posts: ReadonlyArray; // [Post!]! + } +} + +export interface NexusGenInterfaces { + Node: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'>; +} + +export interface NexusGenUnions { + ExampleUnion: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'>; +} + +export type NexusGenRootTypes = NexusGenInterfaces & NexusGenObjects & NexusGenUnions + +export type NexusGenAllTypes = NexusGenRootTypes & NexusGenScalars & NexusGenEnums + +export interface NexusGenFieldTypes { + Mutation: { // field return type + createPost: NexusGenRootTypes['Post']; // Post! + registerClick: NexusGenRootTypes['Query']; // Query! + someList: ReadonlyArray; // [String]! + } + Post: { // field return type + author: NexusGenRootTypes['User']; // User! + geo: ReadonlyArray>; // [[Float!]!]! + id: string; // ID! + messyGeo: ReadonlyArray | null> | null; // [[Float!]] + uuid: NexusGenScalars['UUID']; // UUID! + } + Query: { // field return type + posts: ReadonlyArray; // [Post!]! + unionField: NexusGenRootTypes['ExampleUnion']; // ExampleUnion! + user: NexusGenRootTypes['User']; // User! + } + User: { // field return type + email: string; // String! + id: string; // ID! + name: string; // String! + outEnum: NexusGenEnums['SomeEnum'] | null; // SomeEnum + phone: string | null; // String + posts: ReadonlyArray; // [Post!]! + } + Node: { // field return type + id: string; // ID! + } +} + +export interface NexusGenFieldTypeNames { + Mutation: { // field return type name + createPost: 'Post' + registerClick: 'Query' + someList: 'String' + } + Post: { // field return type name + author: 'User' + geo: 'Float' + id: 'ID' + messyGeo: 'Float' + uuid: 'UUID' + } + Query: { // field return type name + posts: 'Post' + unionField: 'ExampleUnion' + user: 'User' + } + User: { // field return type name + email: 'String' + id: 'ID' + name: 'String' + outEnum: 'SomeEnum' + phone: 'String' + posts: 'Post' + } + Node: { // field return type name + id: 'ID' + } +} + +export interface NexusGenArgTypes { + Mutation: { + createPost: { // args + input: NexusGenInputs['CreatePostInput']; // CreatePostInput! + } + registerClick: { // args + uuid?: NexusGenScalars['UUID'] | null; // UUID + } + someList: { // args + items: ReadonlyArray; // [String]! + } + } + Query: { + posts: { // args + filters: NexusGenInputs['PostFilters']; // PostFilters! + } + } + User: { + name: { // args + prefix?: string | null; // String + } + posts: { // args + filters?: NexusGenInputs['PostFilters'] | null; // PostFilters + } + } +} + +export interface NexusGenAbstractTypeMembers { + ExampleUnion: \\"Post\\" | \\"User\\" + Node: \\"Post\\" | \\"User\\" +} + +export interface NexusGenTypeInterfaces { + Post: \\"Node\\" + User: \\"Node\\" +} + +export type NexusGenObjectNames = keyof NexusGenObjects; + +export type NexusGenInputNames = keyof NexusGenInputs; + +export type NexusGenEnumNames = keyof NexusGenEnums; + +export type NexusGenInterfaceNames = keyof NexusGenInterfaces; + +export type NexusGenScalarNames = keyof NexusGenScalars; + +export type NexusGenUnionNames = keyof NexusGenUnions; + +export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never; + +export type NexusGenAbstractsUsingStrategyResolveType = \\"ExampleUnion\\" | \\"Node\\"; + +export type NexusGenFeaturesConfig = { + abstractTypeStrategies: { + __typename: true + isTypeOf: false + resolveType: false + } +} + +export interface NexusGenTypes { + context: TestContext; + inputTypes: NexusGenInputs; + rootTypes: NexusGenRootTypes; + inputTypeShapes: NexusGenInputs & NexusGenEnums & NexusGenScalars; + argTypes: NexusGenArgTypes; + fieldTypes: NexusGenFieldTypes; + fieldTypeNames: NexusGenFieldTypeNames; + allTypes: NexusGenAllTypes; + typeInterfaces: NexusGenTypeInterfaces; + objectNames: NexusGenObjectNames; + inputNames: NexusGenInputNames; + enumNames: NexusGenEnumNames; + interfaceNames: NexusGenInterfaceNames; + scalarNames: NexusGenScalarNames; + unionNames: NexusGenUnionNames; + allInputTypes: NexusGenTypes['inputNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['scalarNames']; + allOutputTypes: NexusGenTypes['objectNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['unionNames'] | NexusGenTypes['interfaceNames'] | NexusGenTypes['scalarNames']; + allNamedTypes: NexusGenTypes['allInputTypes'] | NexusGenTypes['allOutputTypes'] + abstractTypes: NexusGenTypes['interfaceNames'] | NexusGenTypes['unionNames']; + abstractTypeMembers: NexusGenAbstractTypeMembers; + objectsUsingAbstractStrategyIsTypeOf: NexusGenObjectsUsingAbstractStrategyIsTypeOf; + abstractsUsingStrategyResolveType: NexusGenAbstractsUsingStrategyResolveType; + features: NexusGenFeaturesConfig; +}", +} +`; diff --git a/tests/integrations/declarativeWrappingPlugin/__typegen.ts b/tests/integrations/declarativeWrappingPlugin/__typegen.ts index 3e2c2f72..6e4fc11b 100644 --- a/tests/integrations/declarativeWrappingPlugin/__typegen.ts +++ b/tests/integrations/declarativeWrappingPlugin/__typegen.ts @@ -40,8 +40,8 @@ export type NexusGenAllTypes = NexusGenRootTypes & NexusGenScalars export interface NexusGenFieldTypes { DeclarativeWrappingOutput: { // field return type - someList: Array | null // [String] - someListOfLists: string[][] | null // [[String!]!] + someList: ReadonlyArray | null // [String] + someListOfLists: ReadonlyArray> | null // [[String!]!] someNullField: string | null // String someRequiredField: string // String! } diff --git a/tests/integrations/kitchenSink/__typegen.ts b/tests/integrations/kitchenSink/__typegen.ts index a59f9484..56ae5728 100644 --- a/tests/integrations/kitchenSink/__typegen.ts +++ b/tests/integrations/kitchenSink/__typegen.ts @@ -105,7 +105,7 @@ export interface NexusGenObjects { } PostConnection: { // root type - edges?: Array | null // [PostEdge] + edges?: ReadonlyArray | null // [PostEdge] pageInfo: NexusGenRootTypes['PageInfo'] // PageInfo! totalCount: number // Int! } @@ -157,7 +157,7 @@ export interface NexusGenFieldTypes { } PostConnection: { // field return type - edges: Array | null // [PostEdge] + edges: ReadonlyArray | null // [PostEdge] pageInfo: NexusGenRootTypes['PageInfo'] // PageInfo! totalCount: number // Int! } @@ -171,7 +171,7 @@ export interface NexusGenFieldTypes { // field return type customScalar: NexusGenScalars['MyCustomScalar'] | null // MyCustomScalar foo: string | null // String - searchPosts: Array | null // [Post] + searchPosts: ReadonlyArray | null // [Post] user: NexusGenRootTypes['User'] | null // User } Subscription: { @@ -180,11 +180,11 @@ export interface NexusGenFieldTypes { someBooleanFromExtendType: boolean | null // Boolean someBooleanFromSubscriptionField: boolean | null // Boolean someField: number | null // Int - someFields: Array | null // [Int] + someFields: ReadonlyArray | null // [Int] someFloat: number | null // Float someID: string | null // ID someInt: number | null // Int - someInts: Array | null // [Int] + someInts: ReadonlyArray | null // [Int] someString: string | null // String } User: { diff --git a/tests/typegen-globals/global-types-useReadonlyArrayForInputs.gen.ts b/tests/typegen-globals/global-types-useReadonlyArrayForInputs.gen.ts new file mode 100644 index 00000000..b177938e --- /dev/null +++ b/tests/typegen-globals/global-types-useReadonlyArrayForInputs.gen.ts @@ -0,0 +1,19 @@ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ + +import type { NexusGenTypes } from './types-useReadonlyArrayForInputs.gen' + +declare global { + interface NexusGen extends NexusGenTypes {} +} + +declare global { + interface NexusGenPluginTypeConfig {} + interface NexusGenPluginInputTypeConfig {} + interface NexusGenPluginFieldConfig {} + interface NexusGenPluginInputFieldConfig {} + interface NexusGenPluginSchemaConfig {} + interface NexusGenPluginArgConfig {} +} diff --git a/tests/typegen-globals/types-useReadonlyArrayForInputs.gen.ts b/tests/typegen-globals/types-useReadonlyArrayForInputs.gen.ts new file mode 100644 index 00000000..8679ef60 --- /dev/null +++ b/tests/typegen-globals/types-useReadonlyArrayForInputs.gen.ts @@ -0,0 +1,238 @@ +/** + * This file was generated by Nexus Schema + * Do not make changes to this file directly + */ + +import type { core } from '../../src' + +export interface NexusGenInputs { + CreatePostInput: { + // input type + author: string // ID! + geo: ReadonlyArray> // [[Float]!]! + name: string // String! + } + PostFilters: { + // input type + order: NexusGenEnums['OrderEnum'] // OrderEnum! + search: string | null // String + } +} + +export interface NexusGenEnums { + OrderEnum: 'ASC' | 'DESC' + SomeEnum: 'A' | 'B' +} + +export interface NexusGenScalars { + String: string + Int: number + Float: number + Boolean: boolean + ID: string + UUID: any +} + +export interface NexusGenObjects { + Mutation: {} + Post: { + // root type + author: NexusGenRootTypes['User'] // User! + geo: ReadonlyArray> // [[Float!]!]! + id: string // ID! + messyGeo?: ReadonlyArray | null> | null // [[Float!]] + uuid: NexusGenScalars['UUID'] // UUID! + } + Query: {} + User: { + // root type + email: string // String! + id: string // ID! + name: string // String! + outEnum?: NexusGenEnums['SomeEnum'] | null // SomeEnum + phone?: string | null // String + posts: ReadonlyArray // [Post!]! + } +} + +export interface NexusGenInterfaces { + Node: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'> +} + +export interface NexusGenUnions { + ExampleUnion: core.Discriminate<'Post', 'optional'> | core.Discriminate<'User', 'optional'> +} + +export type NexusGenRootTypes = NexusGenInterfaces & NexusGenObjects & NexusGenUnions + +export type NexusGenAllTypes = NexusGenRootTypes & NexusGenScalars & NexusGenEnums + +export interface NexusGenFieldTypes { + Mutation: { + // field return type + createPost: NexusGenRootTypes['Post'] // Post! + registerClick: NexusGenRootTypes['Query'] // Query! + someList: ReadonlyArray // [String]! + } + Post: { + // field return type + author: NexusGenRootTypes['User'] // User! + geo: ReadonlyArray> // [[Float!]!]! + id: string // ID! + messyGeo: ReadonlyArray | null> | null // [[Float!]] + uuid: NexusGenScalars['UUID'] // UUID! + } + Query: { + // field return type + posts: ReadonlyArray // [Post!]! + unionField: NexusGenRootTypes['ExampleUnion'] // ExampleUnion! + user: NexusGenRootTypes['User'] // User! + } + User: { + // field return type + email: string // String! + id: string // ID! + name: string // String! + outEnum: NexusGenEnums['SomeEnum'] | null // SomeEnum + phone: string | null // String + posts: ReadonlyArray // [Post!]! + } + Node: { + // field return type + id: string // ID! + } +} + +export interface NexusGenFieldTypeNames { + Mutation: { + // field return type name + createPost: 'Post' + registerClick: 'Query' + someList: 'String' + } + Post: { + // field return type name + author: 'User' + geo: 'Float' + id: 'ID' + messyGeo: 'Float' + uuid: 'UUID' + } + Query: { + // field return type name + posts: 'Post' + unionField: 'ExampleUnion' + user: 'User' + } + User: { + // field return type name + email: 'String' + id: 'ID' + name: 'String' + outEnum: 'SomeEnum' + phone: 'String' + posts: 'Post' + } + Node: { + // field return type name + id: 'ID' + } +} + +export interface NexusGenArgTypes { + Mutation: { + createPost: { + // args + input: NexusGenInputs['CreatePostInput'] // CreatePostInput! + } + registerClick: { + // args + uuid?: NexusGenScalars['UUID'] | null // UUID + } + someList: { + // args + items: ReadonlyArray // [String]! + } + } + Query: { + posts: { + // args + filters: NexusGenInputs['PostFilters'] // PostFilters! + } + } + User: { + name: { + // args + prefix?: string | null // String + } + posts: { + // args + filters?: NexusGenInputs['PostFilters'] | null // PostFilters + } + } +} + +export interface NexusGenAbstractTypeMembers { + ExampleUnion: 'Post' | 'User' + Node: 'Post' | 'User' +} + +export interface NexusGenTypeInterfaces { + Post: 'Node' + User: 'Node' +} + +export type NexusGenObjectNames = keyof NexusGenObjects + +export type NexusGenInputNames = keyof NexusGenInputs + +export type NexusGenEnumNames = keyof NexusGenEnums + +export type NexusGenInterfaceNames = keyof NexusGenInterfaces + +export type NexusGenScalarNames = keyof NexusGenScalars + +export type NexusGenUnionNames = keyof NexusGenUnions + +export type NexusGenObjectsUsingAbstractStrategyIsTypeOf = never + +export type NexusGenAbstractsUsingStrategyResolveType = 'ExampleUnion' | 'Node' + +export type NexusGenFeaturesConfig = { + abstractTypeStrategies: { + __typename: true + isTypeOf: false + resolveType: false + } +} + +export interface NexusGenTypes { + context: any + inputTypes: NexusGenInputs + rootTypes: NexusGenRootTypes + inputTypeShapes: NexusGenInputs & NexusGenEnums & NexusGenScalars + argTypes: NexusGenArgTypes + fieldTypes: NexusGenFieldTypes + fieldTypeNames: NexusGenFieldTypeNames + allTypes: NexusGenAllTypes + typeInterfaces: NexusGenTypeInterfaces + objectNames: NexusGenObjectNames + inputNames: NexusGenInputNames + enumNames: NexusGenEnumNames + interfaceNames: NexusGenInterfaceNames + scalarNames: NexusGenScalarNames + unionNames: NexusGenUnionNames + allInputTypes: NexusGenTypes['inputNames'] | NexusGenTypes['enumNames'] | NexusGenTypes['scalarNames'] + allOutputTypes: + | NexusGenTypes['objectNames'] + | NexusGenTypes['enumNames'] + | NexusGenTypes['unionNames'] + | NexusGenTypes['interfaceNames'] + | NexusGenTypes['scalarNames'] + allNamedTypes: NexusGenTypes['allInputTypes'] | NexusGenTypes['allOutputTypes'] + abstractTypes: NexusGenTypes['interfaceNames'] | NexusGenTypes['unionNames'] + abstractTypeMembers: NexusGenAbstractTypeMembers + objectsUsingAbstractStrategyIsTypeOf: NexusGenObjectsUsingAbstractStrategyIsTypeOf + abstractsUsingStrategyResolveType: NexusGenAbstractsUsingStrategyResolveType + features: NexusGenFeaturesConfig +} diff --git a/tests/typegen-globals/types.gen.ts b/tests/typegen-globals/types.gen.ts index 92f76293..9ddde9e5 100644 --- a/tests/typegen-globals/types.gen.ts +++ b/tests/typegen-globals/types.gen.ts @@ -44,9 +44,9 @@ export interface NexusGenObjects { Post: { // root type author: NexusGenRootTypes['User'] // User! - geo: number[][] // [[Float!]!]! + geo: ReadonlyArray> // [[Float!]!]! id: string // ID! - messyGeo?: Array | null // [[Float!]] + messyGeo?: ReadonlyArray | null> | null // [[Float!]] uuid: NexusGenScalars['UUID'] // UUID! } Query: {} @@ -57,7 +57,7 @@ export interface NexusGenObjects { name: string // String! outEnum?: SomeEnum | null // SomeEnum phone?: string | null // String - posts: NexusGenRootTypes['Post'][] // [Post!]! + posts: ReadonlyArray // [Post!]! } } @@ -78,19 +78,19 @@ export interface NexusGenFieldTypes { // field return type createPost: NexusGenRootTypes['Post'] // Post! registerClick: NexusGenRootTypes['Query'] // Query! - someList: Array // [String]! + someList: ReadonlyArray // [String]! } Post: { // field return type author: NexusGenRootTypes['User'] // User! - geo: number[][] // [[Float!]!]! + geo: ReadonlyArray> // [[Float!]!]! id: string // ID! - messyGeo: Array | null // [[Float!]] + messyGeo: ReadonlyArray | null> | null // [[Float!]] uuid: NexusGenScalars['UUID'] // UUID! } Query: { // field return type - posts: NexusGenRootTypes['Post'][] // [Post!]! + posts: ReadonlyArray // [Post!]! unionField: NexusGenRootTypes['ExampleUnion'] // ExampleUnion! user: NexusGenRootTypes['User'] // User! } @@ -101,7 +101,7 @@ export interface NexusGenFieldTypes { name: string // String! outEnum: SomeEnum | null // SomeEnum phone: string | null // String - posts: NexusGenRootTypes['Post'][] // [Post!]! + posts: ReadonlyArray // [Post!]! } Node: { // field return type diff --git a/tests/typegen/types.gen.ts b/tests/typegen/types.gen.ts index 11f205b7..5e14b75f 100644 --- a/tests/typegen/types.gen.ts +++ b/tests/typegen/types.gen.ts @@ -42,9 +42,9 @@ export interface NexusGenObjects { Post: { // root type author: NexusGenRootTypes['User'] // User! - geo: number[][] // [[Float!]!]! + geo: ReadonlyArray> // [[Float!]!]! id: string // ID! - messyGeo?: Array | null // [[Float!]] + messyGeo?: ReadonlyArray | null> | null // [[Float!]] uuid: NexusGenScalars['UUID'] // UUID! } Query: {} @@ -55,7 +55,7 @@ export interface NexusGenObjects { name: string // String! outEnum?: NexusGenEnums['SomeEnum'] | null // SomeEnum phone?: string | null // String - posts: NexusGenRootTypes['Post'][] // [Post!]! + posts: ReadonlyArray // [Post!]! } } @@ -76,19 +76,19 @@ export interface NexusGenFieldTypes { // field return type createPost: NexusGenRootTypes['Post'] // Post! registerClick: NexusGenRootTypes['Query'] // Query! - someList: Array // [String]! + someList: ReadonlyArray // [String]! } Post: { // field return type author: NexusGenRootTypes['User'] // User! - geo: number[][] // [[Float!]!]! + geo: ReadonlyArray> // [[Float!]!]! id: string // ID! - messyGeo: Array | null // [[Float!]] + messyGeo: ReadonlyArray | null> | null // [[Float!]] uuid: NexusGenScalars['UUID'] // UUID! } Query: { // field return type - posts: NexusGenRootTypes['Post'][] // [Post!]! + posts: ReadonlyArray // [Post!]! unionField: NexusGenRootTypes['ExampleUnion'] // ExampleUnion! user: NexusGenRootTypes['User'] // User! } @@ -99,7 +99,7 @@ export interface NexusGenFieldTypes { name: string // String! outEnum: NexusGenEnums['SomeEnum'] | null // SomeEnum phone: string | null // String - posts: NexusGenRootTypes['Post'][] // [Post!]! + posts: ReadonlyArray // [Post!]! } Node: { // field return type diff --git a/tests/typegenPrinterGlobals.spec.ts b/tests/typegenPrinterGlobals.spec.ts index 5eb59037..6f921094 100644 --- a/tests/typegenPrinterGlobals.spec.ts +++ b/tests/typegenPrinterGlobals.spec.ts @@ -76,6 +76,76 @@ describe('typegenPrinter: globals', () => { }) }) +describe('typegenPrinter: useReadonlyArrayForInputs', () => { + let typegen: core.TypegenPrinter + let metadata: core.TypegenMetadata + beforeEach(async () => { + const outputs = { + typegen: { + outputPath: path.join(__dirname, 'typegen-globals/types-useReadonlyArrayForInputs.gen.ts'), + globalsPath: path.join(__dirname, 'typegen-globals/global-types-useReadonlyArrayForInputs.gen.ts'), + useReadonlyArrayForInputs: true, + }, + schema: path.join(__dirname, 'typegen-globals/schema.gen.graphql'), + } as const + + const schema = (await generateSchema({ + outputs, + shouldGenerateArtifacts: true, + types: [buildSchema(EXAMPLE_SDL)], + // __typename put to true to prevent from erroring because of missing resolveType + features: { + abstractTypeStrategies: { + __typename: true, + }, + }, + async formatTypegen(source, type) { + const prettierConfigPath = require.resolve('../.prettierrc') + const content = await typegenFormatPrettier(prettierConfigPath)(source, type) + + return content.replace("'nexus'", `'../../src'`) + }, + })) as core.NexusGraphQLSchema + + metadata = new TypegenMetadata({ + outputs, + sourceTypes: { + modules: [ + { + module: path.join(__dirname, '__helpers/index.ts'), + alias: 't', + }, + ], + mapping: { + UUID: 'string', + }, + }, + contextType: { + module: path.join(__dirname, '__helpers/index.ts'), + export: 'TestContext', + }, + }) + + const typegenInfo = await metadata.getTypegenInfo(schema) + + const { outputPath, ...rest } = outputs.typegen + + typegen = new TypegenPrinter(metadata.sortSchema(schema), { + ...typegenInfo, + ...rest, + typegenPath: outputPath, + }) + }) + + afterEach(() => { + jest.clearAllMocks() + }) + + it('should print the full output using ReadonlyArray in input types', () => { + expect(typegen.printConfigured()).toMatchSnapshot() + }) +}) + describe('typegenPrinter: no input changes', () => { let out: { schema: NexusGraphQLSchema From 7349e3633cb1de05e410e0b29bbb458c4565ef36 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Thu, 24 Mar 2022 18:48:41 -0400 Subject: [PATCH 27/33] feat: allow specifying custom directives in makeSchema (#1064) * feat: allow specifying custom directives in makeSchema * fix for earlier graphql snapshots --- src/builder.ts | 22 ++++++++++++++++++++ tests/__snapshots__/makeSchema.spec.ts.snap | 8 +++++++ tests/makeSchema.spec.ts | 23 ++++++++++++++++++++- 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/src/builder.ts b/src/builder.ts index 4507bd8b..acee7ec1 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -2,6 +2,7 @@ import { assertValidName, defaultFieldResolver, GraphQLBoolean, + GraphQLDirective, GraphQLEnumType, GraphQLEnumValueConfigMap, GraphQLFieldConfig, @@ -331,6 +332,26 @@ export interface BuilderConfigInput { mutation?: GetGen<'allOutputTypes', string> | AllNexusOutputTypeDefs subscription?: GetGen<'allOutputTypes', string> | AllNexusOutputTypeDefs } + /** + * Allows specifying defined directives to pass to the GraphQLSchema constructor. + * + * @example + * import { + * GraphQLSchema, + * GraphQLDeferDirective, + * GraphQLStreamDirective, + * specifiedDirectives, + * } from 'graphql'; + * const nexusSchema = makeSchema({ + * types: [...], + * directives: [ + * ...specifiedDirectives, + * GraphQLDeferDirective, + * GraphQLStreamDirective, + * ], + * }); + */ + directives?: GraphQLDirective[] } export interface BuilderConfig extends Omit { @@ -1800,6 +1821,7 @@ export function makeSchemaInternal(config: SchemaConfig) { ...config.extensions, nexus: schemaExtension, }, + directives: config.directives ?? undefined, }) as NexusGraphQLSchema onAfterBuildFns.forEach((fn) => fn(schema)) diff --git a/tests/__snapshots__/makeSchema.spec.ts.snap b/tests/__snapshots__/makeSchema.spec.ts.snap index 835160e3..98330682 100644 --- a/tests/__snapshots__/makeSchema.spec.ts.snap +++ b/tests/__snapshots__/makeSchema.spec.ts.snap @@ -1,5 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`makeSchema directives can specify custom directives 1`] = ` +"directive @customDirective(code: Int = 42) on FRAGMENT_DEFINITION + +type Query { + ok: Boolean! +}" +`; + exports[`makeSchema shouldExitAfterGenerateArtifacts accepts a customPrintSchemaFn 1`] = ` "### This file was generated by Nexus Schema ### Do not make changes to this file directly diff --git a/tests/makeSchema.spec.ts b/tests/makeSchema.spec.ts index 5ed0b6e4..96425a70 100644 --- a/tests/makeSchema.spec.ts +++ b/tests/makeSchema.spec.ts @@ -1,4 +1,4 @@ -import { GraphQLSchema, printSchema } from 'graphql' +import { DirectiveLocation, GraphQLDirective, GraphQLInt, GraphQLSchema, printSchema } from 'graphql' import os from 'os' import path from 'path' import { objectType } from '../src' @@ -163,4 +163,25 @@ describe('makeSchema', () => { someFn(nexusSchema) }) + + describe('directives', () => { + it('can specify custom directives', async () => { + const { schema } = await generateSchema.withArtifacts({ + types: [], + directives: [ + new GraphQLDirective({ + name: 'customDirective', + locations: [DirectiveLocation.FRAGMENT_DEFINITION], + args: { + code: { + type: GraphQLInt, + defaultValue: 42, + }, + }, + }), + ], + }) + expect(printSchema(schema).trim()).toMatchSnapshot() + }) + }) }) From aaa45204b631c77b55c254b4224aa27eabf8a250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Fran=C3=A7ois?= Date: Fri, 25 Mar 2022 13:20:32 +0100 Subject: [PATCH 28/33] feat: Run both formatTypegen and prettier formatter if given (#1042) --- src/typegenMetadata.ts | 15 +++++++-------- tests/__helpers/testApp.ts | 10 +++------- tests/typegenPrinterGlobals.spec.ts | 18 +++++------------- 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/src/typegenMetadata.ts b/src/typegenMetadata.ts index acb69cec..f35ccb2d 100644 --- a/src/typegenMetadata.ts +++ b/src/typegenMetadata.ts @@ -5,7 +5,7 @@ import type { ConfiguredTypegen } from './core' import type { NexusGraphQLSchema } from './definitions/_types' import { SDL_HEADER, TYPEGEN_HEADER } from './lang' import { typegenAutoConfig } from './typegenAutoConfig' -import { TypegenFormatFn, typegenFormatPrettier } from './typegenFormatPrettier' +import { typegenFormatPrettier } from './typegenFormatPrettier' import { TypegenPrinter } from './typegenPrinter' export interface TypegenMetadataConfig @@ -87,13 +87,12 @@ export class TypegenMetadata { util.promisify(fs.unlink), util.promisify(fs.mkdir), ] - let formatTypegen: TypegenFormatFn | null = null - if (typeof this.config.formatTypegen === 'function') { - formatTypegen = this.config.formatTypegen - } else if (this.config.prettierConfig) { - formatTypegen = typegenFormatPrettier(this.config.prettierConfig) - } - const content = typeof formatTypegen === 'function' ? await formatTypegen(output, type) : output + const formattedOutput = + typeof this.config.formatTypegen === 'function' ? await this.config.formatTypegen(output, type) : output + const content = this.config.prettierConfig + ? await typegenFormatPrettier(this.config.prettierConfig)(formattedOutput, type) + : formattedOutput + const [toSave, existing] = await Promise.all([content, readFile(filePath, 'utf8').catch(() => '')]) if (toSave !== existing) { const dirPath = path.dirname(filePath) diff --git a/tests/__helpers/testApp.ts b/tests/__helpers/testApp.ts index 0000fd19..fe4b39a7 100644 --- a/tests/__helpers/testApp.ts +++ b/tests/__helpers/testApp.ts @@ -3,7 +3,7 @@ import { join, relative } from 'path' import { core } from '../../src' import type { BuilderConfigInput } from '../../src/core' -const { generateSchema, typegenFormatPrettier } = core +const { generateSchema } = core type HookSettings = { rootDir: string @@ -29,12 +29,8 @@ export async function generateTypegen(settings: HookSettings) { }, shouldGenerateArtifacts: true, plugins: plugins || [], - async formatTypegen(source, type) { - const prettierConfigPath = require.resolve('../../.prettierrc') - const content = await typegenFormatPrettier(prettierConfigPath)(source, type) - - return content.replace("'nexus'", `'${importPath}'`) - }, + prettierConfig: require.resolve('../../.prettierrc'), + formatTypegen: (content) => content.replace('from "nexus"', `from '${importPath}'`), features: { abstractTypeStrategies: { resolveType: true, diff --git a/tests/typegenPrinterGlobals.spec.ts b/tests/typegenPrinterGlobals.spec.ts index 6f921094..737638fa 100644 --- a/tests/typegenPrinterGlobals.spec.ts +++ b/tests/typegenPrinterGlobals.spec.ts @@ -1,7 +1,7 @@ import { buildSchema } from 'graphql' import * as path from 'path' import { core } from '../src' -import { generateSchema, NexusGraphQLSchema, typegenFormatPrettier } from '../src/core' +import { generateSchema, NexusGraphQLSchema } from '../src/core' import { EXAMPLE_SDL } from './_sdl' const { TypegenPrinter, TypegenMetadata } = core @@ -29,12 +29,8 @@ describe('typegenPrinter: globals', () => { __typename: true, }, }, - async formatTypegen(source, type) { - const prettierConfigPath = require.resolve('../.prettierrc') - const content = await typegenFormatPrettier(prettierConfigPath)(source, type) - - return content.replace("'nexus'", `'../../src'`) - }, + prettierConfig: require.resolve('../.prettierrc'), + formatTypegen: (content) => content.replace('from "nexus"', `from "../../src"`), }) metadata = new TypegenMetadata({ @@ -99,12 +95,8 @@ describe('typegenPrinter: useReadonlyArrayForInputs', () => { __typename: true, }, }, - async formatTypegen(source, type) { - const prettierConfigPath = require.resolve('../.prettierrc') - const content = await typegenFormatPrettier(prettierConfigPath)(source, type) - - return content.replace("'nexus'", `'../../src'`) - }, + prettierConfig: require.resolve('../.prettierrc'), + formatTypegen: (content) => content.replace('from "nexus"', `from "../../src"`), })) as core.NexusGraphQLSchema metadata = new TypegenMetadata({ From 509c246e88967496744f13aaadeb885f2ae856bb Mon Sep 17 00:00:00 2001 From: Jonathan Zinger Date: Fri, 25 Mar 2022 10:28:24 -0400 Subject: [PATCH 29/33] Update comment for `shouldGenerateArtifacts` (#1057) Update comment to reflect the current behavior as per [`src/typegenUtils.ts`](https://github.com/graphql-nexus/nexus/blob/bc12ca0f8e704de0b7e911fa6352e8f2bb48cb22/src/typegenUtils.ts#L11) --- src/builder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/builder.ts b/src/builder.ts index acee7ec1..cf90dea5 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -286,7 +286,7 @@ export interface BuilderConfigInput { } /** * Whether the schema & types are generated when the server starts. Default is !process.env.NODE_ENV || - * process.env.NODE_ENV === "development" + * process.env.NODE_ENV !== "production" */ shouldGenerateArtifacts?: boolean /** Register the Source Types */ From 11d028277e7fec241246237dbe31707c037407ee Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Fri, 25 Mar 2022 10:38:08 -0400 Subject: [PATCH 30/33] feat: allow specifying custom directives in makeSchema (#1065) --- src/builder.ts | 79 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/src/builder.ts b/src/builder.ts index cf90dea5..8bb592dc 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -2,7 +2,6 @@ import { assertValidName, defaultFieldResolver, GraphQLBoolean, - GraphQLDirective, GraphQLEnumType, GraphQLEnumValueConfigMap, GraphQLFieldConfig, @@ -332,26 +331,6 @@ export interface BuilderConfigInput { mutation?: GetGen<'allOutputTypes', string> | AllNexusOutputTypeDefs subscription?: GetGen<'allOutputTypes', string> | AllNexusOutputTypeDefs } - /** - * Allows specifying defined directives to pass to the GraphQLSchema constructor. - * - * @example - * import { - * GraphQLSchema, - * GraphQLDeferDirective, - * GraphQLStreamDirective, - * specifiedDirectives, - * } from 'graphql'; - * const nexusSchema = makeSchema({ - * types: [...], - * directives: [ - * ...specifiedDirectives, - * GraphQLDeferDirective, - * GraphQLStreamDirective, - * ], - * }); - */ - directives?: GraphQLDirective[] } export interface BuilderConfig extends Omit { @@ -360,7 +339,26 @@ export interface BuilderConfig extends Omit } -export type SchemaConfig = BuilderConfigInput & { +/** + * Pick the properties off of the GraphQL schema config that we are supplying, and allow the user to + * specify anything else that is defined on the currently used GraphQL schema: + * + * @example + * const nexusSchema = makeSchema({ + * directives: [ + * ...specifiedDirectives, + * GraphQLDeferDirective, + * GraphQLStreamDirective, + * ], + * enableDeferStream: true + * }); + */ +export type AdditionalGraphQLSchemaConfigOptions = Omit< + GraphQLSchemaConfig, + 'query' | 'mutation' | 'subscription' | 'types' | keyof BuilderConfigInput +> + +export interface MakeSchemaOptions extends BuilderConfigInput { /** * All of the GraphQL types. This is an any for simplicity of developer experience, if it's an object we get * the values, if it's an array we flatten out the valid types, ignoring invalid ones. @@ -373,12 +371,11 @@ export type SchemaConfig = BuilderConfigInput & { * @default false */ shouldExitAfterGenerateArtifacts?: boolean - /** - * Custom extensions, as [supported in - * graphql-js](https://github.com/graphql/graphql-js/blob/master/src/type/__tests__/extensions-test.js) - */ - extensions?: GraphQLSchemaConfig['extensions'] -} & NexusGenPluginSchemaConfig +} + +export type SchemaConfig = MakeSchemaOptions & + AdditionalGraphQLSchemaConfigOptions & + NexusGenPluginSchemaConfig export interface TypegenInfo { /** Headers attached to the generate type output */ @@ -1813,6 +1810,7 @@ export function makeSchemaInternal(config: SchemaConfig) { } const schema = new GraphQLSchema({ + ...extractGraphQLSchemaOptions(config), query: getRootType('query', 'Query'), mutation: getRootType('mutation', 'Mutation'), subscription: getRootType('subscription', 'Subscription'), @@ -1821,7 +1819,6 @@ export function makeSchemaInternal(config: SchemaConfig) { ...config.extensions, nexus: schemaExtension, }, - directives: config.directives ?? undefined, }) as NexusGraphQLSchema onAfterBuildFns.forEach((fn) => fn(schema)) @@ -1829,6 +1826,30 @@ export function makeSchemaInternal(config: SchemaConfig) { return { schema, missingTypes, finalConfig } } +type OmittedVals = Partial<{ [K in keyof MakeSchemaOptions]: never }> + +function extractGraphQLSchemaOptions( + config: SchemaConfig +): Partial { + const { + formatTypegen, + nonNullDefaults, + mergeSchema, + outputs, + shouldExitAfterGenerateArtifacts, + shouldGenerateArtifacts, + schemaRoots, + sourceTypes, + prettierConfig, + plugins, + customPrintSchemaFn, + features, + contextType, + ...graphqlConfigOpts + } = config + return graphqlConfigOpts +} + export function setConfigDefaults(config: BuilderConfigInput): BuilderConfig { const defaults: { features: BuilderConfig['features'] From b906288c5830b272668d5c39031e81fad650be45 Mon Sep 17 00:00:00 2001 From: Daniel Schwartz <505433+danielschwartz@users.noreply.github.com> Date: Tue, 3 May 2022 11:24:45 -0400 Subject: [PATCH 31/33] chore: change facebook.github.io to relay.dev links (#1083) --- docs/content/030-plugins/01-connection.mdx | 2 +- .../kitchen-sink/kitchen-sink-schema.graphql | 26 +++--- src/plugins/connectionPlugin.ts | 10 +-- .../integrations/kitchenSink/__schema.graphql | 10 +-- .../connectionPlugin.spec.ts.snap | 84 +++++++++---------- 5 files changed, 66 insertions(+), 66 deletions(-) diff --git a/docs/content/030-plugins/01-connection.mdx b/docs/content/030-plugins/01-connection.mdx index 576837d2..39b89b48 100644 --- a/docs/content/030-plugins/01-connection.mdx +++ b/docs/content/030-plugins/01-connection.mdx @@ -4,7 +4,7 @@ title: Relay Connection ## Connection Plugin -The connection plugin provides a new method on the object definition builder, enabling paginated associations between types, following the [Relay Connection Specification](https://facebook.github.io/relay/graphql/connections.htm#sec-Node). It provides simple ways to customize fields available on the `Connection`, `Edges`, or `PageInfo` types. +The connection plugin provides a new method on the object definition builder, enabling paginated associations between types, following the [Relay Connection Specification](https://relay.dev/graphql/connections.htm#sec-Node). It provides simple ways to customize fields available on the `Connection`, `Edges`, or `PageInfo` types. To install, add the `connectionPlugin` to the `makeSchema.plugins` array, along with any other plugins you'd like to include: diff --git a/examples/kitchen-sink/kitchen-sink-schema.graphql b/examples/kitchen-sink/kitchen-sink-schema.graphql index 95fd8ba0..a3652c96 100644 --- a/examples/kitchen-sink/kitchen-sink-schema.graphql +++ b/examples/kitchen-sink/kitchen-sink-schema.graphql @@ -19,24 +19,24 @@ interface Baz { type BooleanConnection { """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types """ edges: [BooleanEdge] """ - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo """ pageInfo: PageInfo! } type BooleanEdge { """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor + https://relay.dev/graphql/connections.htm#sec-Cursor """ cursor: String! """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Node + https://relay.dev/graphql/connections.htm#sec-Node """ node: Boolean } @@ -49,24 +49,24 @@ scalar Date type DateConnection { """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types """ edges: [DateEdge] """ - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo """ pageInfo: PageInfo! } type DateEdge { """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor + https://relay.dev/graphql/connections.htm#sec-Cursor """ cursor: String! """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Node + https://relay.dev/graphql/connections.htm#sec-Node """ node: Date } @@ -104,7 +104,7 @@ interface Node { } """ -PageInfo cursor, as defined in https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo +PageInfo cursor, as defined in https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo """ type PageInfo { """ @@ -306,24 +306,24 @@ type User { type UserConnection { """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types """ edges: [UserEdge] """ - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo """ pageInfo: PageInfo! } type UserEdge { """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor + https://relay.dev/graphql/connections.htm#sec-Cursor """ cursor: String! """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Node + https://relay.dev/graphql/connections.htm#sec-Node """ node: User } diff --git a/src/plugins/connectionPlugin.ts b/src/plugins/connectionPlugin.ts index 6f5b3570..7f20003d 100644 --- a/src/plugins/connectionPlugin.ts +++ b/src/plugins/connectionPlugin.ts @@ -494,11 +494,11 @@ export const connectionPlugin = (connectionPluginConfig?: ConnectionPluginConfig definition(t2) { t2.list.field('edges', { type: edgeName as any, - description: `https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types`, + description: `https://relay.dev/graphql/connections.htm#sec-Edge-Types`, }) t2.nonNull.field('pageInfo', { type: 'PageInfo' as any, - description: `https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo`, + description: `https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo`, }) if (includeNodesField) { t2.list.field('nodes', { @@ -530,11 +530,11 @@ export const connectionPlugin = (connectionPluginConfig?: ConnectionPluginConfig definition(t2) { t2.field('cursor', { type: cursorType ?? nonNull('String'), - description: 'https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor', + description: 'https://relay.dev/graphql/connections.htm#sec-Cursor', }) t2.field('node', { type: targetType, - description: 'https://facebook.github.io/relay/graphql/connections.htm#sec-Node', + description: 'https://relay.dev/graphql/connections.htm#sec-Node', }) if (pluginExtendEdge) { eachObj(pluginExtendEdge, (val, key) => { @@ -558,7 +558,7 @@ export const connectionPlugin = (connectionPluginConfig?: ConnectionPluginConfig objectType({ name: 'PageInfo', description: - 'PageInfo cursor, as defined in https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo', + 'PageInfo cursor, as defined in https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo', definition(t2) { t2.nonNull.field('hasNextPage', { type: 'Boolean', diff --git a/tests/integrations/kitchenSink/__schema.graphql b/tests/integrations/kitchenSink/__schema.graphql index 77f1204c..9963cb9c 100644 --- a/tests/integrations/kitchenSink/__schema.graphql +++ b/tests/integrations/kitchenSink/__schema.graphql @@ -23,7 +23,7 @@ type OfI2 implements I { } """ -PageInfo cursor, as defined in https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo +PageInfo cursor, as defined in https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo """ type PageInfo { """ @@ -54,12 +54,12 @@ type Post { type PostConnection { """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types """ edges: [PostEdge] """ - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo """ pageInfo: PageInfo! totalCount: Int! @@ -67,13 +67,13 @@ type PostConnection { type PostEdge { """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor + https://relay.dev/graphql/connections.htm#sec-Cursor """ cursor: String! delta(format: String): String """ - https://facebook.github.io/relay/graphql/connections.htm#sec-Node + https://relay.dev/graphql/connections.htm#sec-Node """ node: Post } diff --git a/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap b/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap index 620eb2ef..409545e9 100644 --- a/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap +++ b/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap @@ -183,12 +183,12 @@ Object { exports[`basic behavior should adhere to the Relay spec 1`] = ` "type UserConnection { \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types \\"\\"\\" edges: [UserEdge] \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" pageInfo: PageInfo! }" @@ -196,17 +196,17 @@ exports[`basic behavior should adhere to the Relay spec 1`] = ` exports[`basic behavior should adhere to the Relay spec 2`] = ` "type UserEdge { - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Cursor\\"\\"\\" cursor: String! - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Node\\"\\"\\" node: User }" `; exports[`basic behavior should adhere to the Relay spec 3`] = ` "\\"\\"\\" -PageInfo cursor, as defined in https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo +PageInfo cursor, as defined in https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" type PageInfo { \\"\\"\\" @@ -233,7 +233,7 @@ type PageInfo { exports[`field level configuration #515 - custom non-string cursor type 1`] = ` "\\"\\"\\" -PageInfo cursor, as defined in https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo +PageInfo cursor, as defined in https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" type PageInfo { \\"\\"\\" @@ -301,43 +301,43 @@ type Query { type QueryFieldLevel2_Connection { \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types \\"\\"\\" edges: [QueryFieldLevel2_Edge!]! \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" pageInfo: PageInfo! } type QueryFieldLevel2_Edge { - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Cursor\\"\\"\\" cursor: UUID4! delta: Int! - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Node\\"\\"\\" node: User! } type QueryFieldLevel_Connection { \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types \\"\\"\\" edges: [QueryFieldLevel_Edge!]! \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" pageInfo: PageInfo! } type QueryFieldLevel_Edge { - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Cursor\\"\\"\\" cursor: UUID! delta: Int! - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Node\\"\\"\\" node: User! } @@ -352,29 +352,29 @@ type User { type UserConnection { \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types \\"\\"\\" edges: [UserEdge!]! \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" pageInfo: PageInfo! } type UserEdge { - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Cursor\\"\\"\\" cursor: UUID! delta: Int! - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Node\\"\\"\\" node: User! }" `; exports[`field level configuration #670 should explicitly state nullability for connectionPlugin args & fields 1`] = ` "\\"\\"\\" -PageInfo cursor, as defined in https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo +PageInfo cursor, as defined in https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" type PageInfo { \\"\\"\\" @@ -421,21 +421,21 @@ type User { type UserConnection { \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types \\"\\"\\" edges: [UserEdge!]! \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" pageInfo: PageInfo! } type UserEdge { - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Cursor\\"\\"\\" cursor: String! - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Node\\"\\"\\" node: User! }" `; @@ -447,12 +447,12 @@ exports[`field level configuration can configure edge names per-instance 1`] = ` exports[`field level configuration can configure the connection per-instance 1`] = ` "type QueryUsers_Connection { \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types \\"\\"\\" edges: [UserEdge] \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" pageInfo: PageInfo! totalCount: Int @@ -462,12 +462,12 @@ exports[`field level configuration can configure the connection per-instance 1`] exports[`field level configuration can configure the edge per-instance 1`] = ` "type QueryUsers_Connection { \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types \\"\\"\\" edges: [QueryUsers_Edge] \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" pageInfo: PageInfo! }" @@ -475,10 +475,10 @@ exports[`field level configuration can configure the edge per-instance 1`] = ` exports[`field level configuration can configure the edge per-instance 2`] = ` "type QueryUsers_Edge { - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Cursor\\"\\"\\" cursor: String! - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Node\\"\\"\\" node: User role: String }" @@ -489,27 +489,27 @@ exports[`field level configuration can define a schema with multiple plugins, an averageCount: Int \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types \\"\\"\\" edges: [AnalyticsUserEdge] \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" pageInfo: PageInfo! totalCount: Int } type AnalyticsUserEdge { - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Cursor\\"\\"\\" cursor: String! - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Node\\"\\"\\" node: User } \\"\\"\\" -PageInfo cursor, as defined in https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo +PageInfo cursor, as defined in https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" type PageInfo { \\"\\"\\" @@ -569,21 +569,21 @@ type User { type UserConnection { \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types \\"\\"\\" edges: [UserEdge] \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" pageInfo: PageInfo! } type UserEdge { - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Cursor\\"\\"\\" cursor: String! - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Node\\"\\"\\" node: User }" `; @@ -704,12 +704,12 @@ exports[`global plugin configuration allows disabling forward pagination w/ stri exports[`global plugin configuration can configure additional fields for the connection globally 1`] = ` "type UserConnection { \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types + https://relay.dev/graphql/connections.htm#sec-Edge-Types \\"\\"\\" edges: [UserEdge] \\"\\"\\" - https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo + https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo \\"\\"\\" pageInfo: PageInfo! totalCount: Int @@ -718,10 +718,10 @@ exports[`global plugin configuration can configure additional fields for the con exports[`global plugin configuration can configure additional fields for the edge globally 1`] = ` "type UserEdge { - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Cursor\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Cursor\\"\\"\\" cursor: String! - \\"\\"\\"https://facebook.github.io/relay/graphql/connections.htm#sec-Node\\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Node\\"\\"\\" node: User createdAt: String }" From 251af9461b9364f02ffbec89377df907573dafb3 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Tue, 3 May 2022 11:38:57 -0400 Subject: [PATCH 32/33] fix: update snapshots for change in #1083 --- .../connectionPlugin.spec.ts.snap | 80 +++++-------------- 1 file changed, 20 insertions(+), 60 deletions(-) diff --git a/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap b/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap index 409545e9..4b036f56 100644 --- a/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap +++ b/tests/plugins/__snapshots__/connectionPlugin.spec.ts.snap @@ -182,14 +182,10 @@ Object { exports[`basic behavior should adhere to the Relay spec 1`] = ` "type UserConnection { - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-Edge-Types - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Edge-Types\\"\\"\\" edges: [UserEdge] - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo\\"\\"\\" pageInfo: PageInfo! }" `; @@ -300,14 +296,10 @@ type Query { } type QueryFieldLevel2_Connection { - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-Edge-Types - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Edge-Types\\"\\"\\" edges: [QueryFieldLevel2_Edge!]! - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo\\"\\"\\" pageInfo: PageInfo! } @@ -321,14 +313,10 @@ type QueryFieldLevel2_Edge { } type QueryFieldLevel_Connection { - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-Edge-Types - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Edge-Types\\"\\"\\" edges: [QueryFieldLevel_Edge!]! - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo\\"\\"\\" pageInfo: PageInfo! } @@ -351,14 +339,10 @@ type User { } type UserConnection { - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-Edge-Types - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Edge-Types\\"\\"\\" edges: [UserEdge!]! - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo\\"\\"\\" pageInfo: PageInfo! } @@ -420,14 +404,10 @@ type User { } type UserConnection { - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-Edge-Types - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Edge-Types\\"\\"\\" edges: [UserEdge!]! - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo\\"\\"\\" pageInfo: PageInfo! } @@ -446,14 +426,10 @@ exports[`field level configuration can configure edge names per-instance 1`] = ` exports[`field level configuration can configure the connection per-instance 1`] = ` "type QueryUsers_Connection { - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-Edge-Types - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Edge-Types\\"\\"\\" edges: [UserEdge] - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo\\"\\"\\" pageInfo: PageInfo! totalCount: Int }" @@ -461,14 +437,10 @@ exports[`field level configuration can configure the connection per-instance 1`] exports[`field level configuration can configure the edge per-instance 1`] = ` "type QueryUsers_Connection { - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-Edge-Types - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Edge-Types\\"\\"\\" edges: [QueryUsers_Edge] - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo\\"\\"\\" pageInfo: PageInfo! }" `; @@ -488,14 +460,10 @@ exports[`field level configuration can define a schema with multiple plugins, an "type AnalyticsUserConnection { averageCount: Int - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-Edge-Types - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Edge-Types\\"\\"\\" edges: [AnalyticsUserEdge] - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo\\"\\"\\" pageInfo: PageInfo! totalCount: Int } @@ -568,14 +536,10 @@ type User { } type UserConnection { - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-Edge-Types - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Edge-Types\\"\\"\\" edges: [UserEdge] - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo\\"\\"\\" pageInfo: PageInfo! } @@ -703,14 +667,10 @@ exports[`global plugin configuration allows disabling forward pagination w/ stri exports[`global plugin configuration can configure additional fields for the connection globally 1`] = ` "type UserConnection { - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-Edge-Types - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-Edge-Types\\"\\"\\" edges: [UserEdge] - \\"\\"\\" - https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo - \\"\\"\\" + \\"\\"\\"https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo\\"\\"\\" pageInfo: PageInfo! totalCount: Int }" From 123dc61facc61a7ee88fb3f836b7b6c095451766 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Tue, 3 May 2022 15:35:21 -0400 Subject: [PATCH 33/33] fix: incorrect logic in backward pagination (#1084) --- src/plugins/connectionPlugin.ts | 19 ++----- tests/plugins/connectionPlugin.spec.ts | 77 ++++++++++++++++++-------- 2 files changed, 59 insertions(+), 37 deletions(-) diff --git a/src/plugins/connectionPlugin.ts b/src/plugins/connectionPlugin.ts index 7f20003d..d642c06b 100644 --- a/src/plugins/connectionPlugin.ts +++ b/src/plugins/connectionPlugin.ts @@ -724,10 +724,6 @@ export function makeResolveFn( formattedArgs.after = decodeCursor(args.after).replace(CURSOR_PREFIX, '') } - if (args.last && !args.before && cursorFromNode === defaultCursorFromNode) { - throw new Error(`Cannot paginate backward without a "before" cursor by default.`) - } - // Local variable to cache the execution of fetching the nodes, // which is needed for all fields. let cachedNodes: MaybePromiseLike> @@ -978,8 +974,10 @@ function iterateNodes(nodes: any[], args: PaginationArgs, cb: (node: any, i: num } } else if (typeof args.last === 'number') { const len = Math.min(args.last, nodes.length) + const startOffset = Math.max(nodes.length - args.last, 0) + for (let i = 0; i < len; i++) { - cb(nodes[i], i) + cb(nodes[i + startOffset], i) } } else { // Only happens if we have a custom validateArgs that ignores first/last @@ -1063,14 +1061,9 @@ function defaultCursorFromNode( // If we're paginating backward, assume we're working backward from the assumed length // e.g. [0...20] (last: 5, before: "cursor:20") -> [cursor:15, cursor:16, cursor:17, cursor:18, cursor:19] if (typeof args.last === 'number') { - if (args.before) { - const offset = parseInt(args.before, 10) - const len = Math.min(nodes.length, args.last) - cursorIndex = offset - len + index - } else { - /* istanbul ignore next */ - throw new Error('Unreachable') - } + const offset = args.before ? parseInt(args.before, 10) : nodes.length + const len = Math.min(nodes.length, args.last) + cursorIndex = offset - len + index } return `${CURSOR_PREFIX}${cursorIndex}` } diff --git a/tests/plugins/connectionPlugin.spec.ts b/tests/plugins/connectionPlugin.spec.ts index 59dad3b6..7fdafaac 100644 --- a/tests/plugins/connectionPlugin.spec.ts +++ b/tests/plugins/connectionPlugin.spec.ts @@ -76,7 +76,7 @@ const UsersAll = parse(`query UsersAll { users { ${UsersFieldBody} } }`) const UsersLast = parse(`query UsersFieldLast($last: Int!) { users(last: $last) { ${UsersFieldBody} } }`) const UsersLastBefore = parse( - `query UsersFieldLastBefore($last: Int!, $before: String!) { users(last: $last, before: $before) { ${UsersFieldBody} } }` + `query UsersFieldLastBefore($last: Int!, $before: String) { users(last: $last, before: $before) { ${UsersFieldBody} } }` ) const UsersFirst = parse(`query UsersFieldFirst($first: Int!) { users(first: $first) { ${UsersFieldBody} } }`) const UsersFirstAfter = parse( @@ -289,23 +289,6 @@ describe('basic behavior', () => { }) }) - it('cannot paginate backward without a before cursor or a custom cursorFromNodes', async () => { - const schema = makeTestSchema({ - encodeCursor: (str) => str, - decodeCursor: (str) => str, - }) - const lastNodes = await execute({ - schema, - document: UsersLast, - variableValues: { - last: 3, - }, - }) - expect(lastNodes.errors).toEqual([ - new GraphQLError(`Cannot paginate backward without a "before" cursor by default.`), - ]) - }) - it('should resolve pageInfo with basics', async () => { const schema = makeTestSchema({}) const lastNodes = await executeOk({ @@ -1489,12 +1472,58 @@ describe('iteration', () => { variableValues: { last: MAX_INT, before: 'Y3Vyc29yOjk=' }, }) const end = new Date().valueOf() + const users = nodes.data?.users as any + const edges = users.edges as any + expect(end - start).toBeLessThan(1000) // This was taking awhile when looping i < last - // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support - expect(nodes.data?.users.edges.length).toEqual(9) - // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support - expect(Buffer.from(nodes.data?.users.edges[0].cursor, 'base64').toString('utf8')).toEqual('cursor:0') - // @ts-ignore - TODO: change to @ts-expect-error when we drop v15 support - expect(Buffer.from(nodes.data?.users.edges[8].cursor, 'base64').toString('utf8')).toEqual('cursor:8') + expect(edges.length).toEqual(9) + expect(Buffer.from(edges[0].cursor, 'base64').toString('utf8')).toEqual('cursor:0') + expect(edges[0].node.id).toEqual('User:1') + expect(Buffer.from(edges[8].cursor, 'base64').toString('utf8')).toEqual('cursor:8') + expect(edges[8].node.id).toEqual('User:9') + }) + + it('iterates backward correctly when asking for fewer than nodes returned', async () => { + let checkArgs = false + const schema = makeTestSchema( + {}, + { + nodes(root: any, args: any) { + if (checkArgs) { + expect(args).toEqual({ last: 2, before: '9' }) + return userNodes.slice(0, Number(args.before)) + } + return userNodes + }, + } + ) + + const lastNode = await executeOk({ + schema, + document: UsersLastBefore, + variableValues: { last: 1 }, + }) + checkArgs = true + + const lastNodeUsers = lastNode.data?.users as any + + expect(lastNodeUsers.pageInfo.startCursor).toEqual('Y3Vyc29yOjk=') + expect(lastNodeUsers.pageInfo.endCursor).toEqual('Y3Vyc29yOjk=') + expect(lastNodeUsers.edges.length).toEqual(1) + expect(lastNodeUsers.edges[0].node.id).toEqual('User:10') + + const nodes = await executeOk({ + schema, + document: UsersLastBefore, + variableValues: { last: 2, before: lastNodeUsers.pageInfo.startCursor }, + }) + const users = nodes.data?.users as any + const edges = users.edges as any + + expect(edges.length).toEqual(2) + expect(Buffer.from(edges[0].cursor, 'base64').toString('utf8')).toEqual('cursor:7') + expect(edges[0].node.id).toEqual('User:8') + expect(Buffer.from(edges[1].cursor, 'base64').toString('utf8')).toEqual('cursor:8') + expect(edges[1].node.id).toEqual('User:9') }) })