@zuplo/cli 7.14.0 → 7.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@posthog/types/dist/posthog-config.d.ts +16 -0
- package/node_modules/@posthog/types/dist/posthog-config.d.ts.map +1 -1
- package/node_modules/@posthog/types/package.json +1 -1
- package/node_modules/@posthog/types/src/posthog-config.ts +16 -0
- package/node_modules/@zuplo/core/customer.cli.minified.js +252 -252
- package/node_modules/@zuplo/core/index.minified.js +257 -257
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-7RNZS3GX.js +26 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-7RNZS3GX.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-ADPB2ZMZ.js +414 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-ADPB2ZMZ.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-AENEWA54.js +26 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-AENEWA54.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-C32OTSKW.js +91 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-C32OTSKW.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-UFTMOJ7K.js +37 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-UFTMOJ7K.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp/messages/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +12 -12
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +120 -0
- package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +64 -0
- package/node_modules/@zuplo/runtime/out/types/mcp/messages/index.d.ts +78 -0
- package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +3 -2
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/graphql/error/GraphQLError.d.ts +5 -1
- package/node_modules/graphql/error/GraphQLError.js +12 -7
- package/node_modules/graphql/error/GraphQLError.mjs +13 -6
- package/node_modules/graphql/error/locatedError.d.ts +6 -4
- package/node_modules/graphql/error/locatedError.js +6 -4
- package/node_modules/graphql/error/locatedError.mjs +6 -4
- package/node_modules/graphql/execution/collectFields.d.ts +1 -0
- package/node_modules/graphql/execution/collectFields.js +9 -0
- package/node_modules/graphql/execution/collectFields.mjs +9 -0
- package/node_modules/graphql/execution/execute.d.ts +9 -10
- package/node_modules/graphql/execution/execute.js +44 -29
- package/node_modules/graphql/execution/execute.mjs +44 -29
- package/node_modules/graphql/execution/mapAsyncIterator.js +12 -11
- package/node_modules/graphql/execution/mapAsyncIterator.mjs +12 -11
- package/node_modules/graphql/execution/subscribe.d.ts +5 -2
- package/node_modules/graphql/execution/subscribe.js +5 -2
- package/node_modules/graphql/execution/subscribe.mjs +5 -2
- package/node_modules/graphql/execution/values.d.ts +43 -21
- package/node_modules/graphql/execution/values.js +52 -24
- package/node_modules/graphql/execution/values.mjs +51 -23
- package/node_modules/graphql/graphql.d.ts +8 -14
- package/node_modules/graphql/graphql.js +16 -15
- package/node_modules/graphql/graphql.mjs +11 -15
- package/node_modules/graphql/jsutils/SetMap.d.ts +14 -0
- package/node_modules/graphql/jsutils/SetMap.js +48 -0
- package/node_modules/graphql/jsutils/SetMap.mjs +39 -0
- package/node_modules/graphql/jsutils/isIterableObject.d.ts +2 -0
- package/node_modules/graphql/jsutils/isIterableObject.js +2 -0
- package/node_modules/graphql/jsutils/isIterableObject.mjs +2 -0
- package/node_modules/graphql/jsutils/keyMap.d.ts +2 -0
- package/node_modules/graphql/jsutils/keyMap.js +2 -0
- package/node_modules/graphql/jsutils/keyMap.mjs +2 -0
- package/node_modules/graphql/jsutils/keyValMap.d.ts +3 -3
- package/node_modules/graphql/jsutils/keyValMap.js +3 -3
- package/node_modules/graphql/jsutils/keyValMap.mjs +3 -3
- package/node_modules/graphql/language/ast.d.ts +2 -6
- package/node_modules/graphql/language/ast.js +2 -6
- package/node_modules/graphql/language/ast.mjs +2 -6
- package/node_modules/graphql/language/lexer.d.ts +6 -0
- package/node_modules/graphql/language/lexer.js +22 -0
- package/node_modules/graphql/language/lexer.mjs +22 -0
- package/node_modules/graphql/language/location.d.ts +8 -3
- package/node_modules/graphql/language/location.js +57 -17
- package/node_modules/graphql/language/location.mjs +56 -16
- package/node_modules/graphql/language/parser.d.ts +27 -13
- package/node_modules/graphql/language/parser.js +31 -9
- package/node_modules/graphql/language/parser.mjs +31 -9
- package/node_modules/graphql/language/predicates.d.ts +10 -3
- package/node_modules/graphql/language/predicates.js +10 -3
- package/node_modules/graphql/language/predicates.mjs +10 -3
- package/node_modules/graphql/language/printLocation.d.ts +2 -6
- package/node_modules/graphql/language/printLocation.js +2 -6
- package/node_modules/graphql/language/printLocation.mjs +2 -6
- package/node_modules/graphql/language/printer.d.ts +22 -3
- package/node_modules/graphql/language/printer.js +394 -308
- package/node_modules/graphql/language/printer.mjs +394 -308
- package/node_modules/graphql/language/reducer.d.ts +32 -0
- package/node_modules/graphql/language/reducer.js +95 -0
- package/node_modules/graphql/language/reducer.mjs +86 -0
- package/node_modules/graphql/language/source.d.ts +4 -5
- package/node_modules/graphql/language/source.js +4 -5
- package/node_modules/graphql/language/source.mjs +4 -5
- package/node_modules/graphql/language/visitor.d.ts +16 -10
- package/node_modules/graphql/language/visitor.js +15 -7
- package/node_modules/graphql/language/visitor.mjs +15 -7
- package/node_modules/graphql/package.json +1 -4
- package/node_modules/graphql/type/definition.d.ts +170 -102
- package/node_modules/graphql/type/definition.js +169 -96
- package/node_modules/graphql/type/definition.mjs +168 -95
- package/node_modules/graphql/type/directives.d.ts +12 -6
- package/node_modules/graphql/type/directives.js +12 -6
- package/node_modules/graphql/type/directives.mjs +12 -6
- package/node_modules/graphql/type/scalars.js +8 -11
- package/node_modules/graphql/type/scalars.mjs +1 -1
- package/node_modules/graphql/type/schema.d.ts +36 -11
- package/node_modules/graphql/type/schema.js +35 -10
- package/node_modules/graphql/type/schema.mjs +35 -10
- package/node_modules/graphql/type/validate.d.ts +1 -3
- package/node_modules/graphql/type/validate.js +1 -3
- package/node_modules/graphql/type/validate.mjs +1 -3
- package/node_modules/graphql/utilities/TypeInfo.d.ts +15 -11
- package/node_modules/graphql/utilities/TypeInfo.js +15 -11
- package/node_modules/graphql/utilities/TypeInfo.mjs +15 -11
- package/node_modules/graphql/utilities/assertValidName.d.ts +1 -1
- package/node_modules/graphql/utilities/assertValidName.js +1 -1
- package/node_modules/graphql/utilities/assertValidName.mjs +1 -1
- package/node_modules/graphql/utilities/astFromValue.d.ts +3 -1
- package/node_modules/graphql/utilities/astFromValue.js +3 -1
- package/node_modules/graphql/utilities/astFromValue.mjs +3 -1
- package/node_modules/graphql/utilities/buildASTSchema.d.ts +8 -8
- package/node_modules/graphql/utilities/buildASTSchema.js +9 -20
- package/node_modules/graphql/utilities/buildASTSchema.mjs +9 -20
- package/node_modules/graphql/utilities/buildClientSchema.d.ts +6 -2
- package/node_modules/graphql/utilities/buildClientSchema.js +6 -2
- package/node_modules/graphql/utilities/buildClientSchema.mjs +6 -2
- package/node_modules/graphql/utilities/coerceInputValue.d.ts +9 -3
- package/node_modules/graphql/utilities/coerceInputValue.js +60 -13
- package/node_modules/graphql/utilities/coerceInputValue.mjs +58 -13
- package/node_modules/graphql/utilities/concatAST.d.ts +4 -1
- package/node_modules/graphql/utilities/concatAST.js +4 -1
- package/node_modules/graphql/utilities/concatAST.mjs +4 -1
- package/node_modules/graphql/utilities/extendSchema.d.ts +7 -4
- package/node_modules/graphql/utilities/extendSchema.js +7 -4
- package/node_modules/graphql/utilities/extendSchema.mjs +7 -4
- package/node_modules/graphql/utilities/findBreakingChanges.d.ts +2 -2
- package/node_modules/graphql/utilities/findBreakingChanges.js +2 -2
- package/node_modules/graphql/utilities/findBreakingChanges.mjs +2 -2
- package/node_modules/graphql/utilities/getIntrospectionQuery.d.ts +9 -9
- package/node_modules/graphql/utilities/getIntrospectionQuery.js +8 -8
- package/node_modules/graphql/utilities/getIntrospectionQuery.mjs +8 -8
- package/node_modules/graphql/utilities/getOperationAST.d.ts +2 -2
- package/node_modules/graphql/utilities/getOperationAST.js +2 -2
- package/node_modules/graphql/utilities/getOperationAST.mjs +2 -2
- package/node_modules/graphql/utilities/getOperationRootType.d.ts +3 -1
- package/node_modules/graphql/utilities/getOperationRootType.js +3 -1
- package/node_modules/graphql/utilities/getOperationRootType.mjs +3 -1
- package/node_modules/graphql/utilities/introspectionFromSchema.d.ts +12 -4
- package/node_modules/graphql/utilities/introspectionFromSchema.js +12 -4
- package/node_modules/graphql/utilities/introspectionFromSchema.mjs +12 -4
- package/node_modules/graphql/utilities/lexicographicSortSchema.d.ts +17 -13
- package/node_modules/graphql/utilities/lexicographicSortSchema.js +17 -13
- package/node_modules/graphql/utilities/lexicographicSortSchema.mjs +17 -13
- package/node_modules/graphql/utilities/printSchema.d.ts +7 -4
- package/node_modules/graphql/utilities/printSchema.js +7 -4
- package/node_modules/graphql/utilities/printSchema.mjs +7 -4
- package/node_modules/graphql/utilities/resolveSchemaCoordinate.d.ts +9 -8
- package/node_modules/graphql/utilities/resolveSchemaCoordinate.js +9 -8
- package/node_modules/graphql/utilities/resolveSchemaCoordinate.mjs +9 -8
- package/node_modules/graphql/utilities/separateOperations.d.ts +2 -2
- package/node_modules/graphql/utilities/separateOperations.js +2 -2
- package/node_modules/graphql/utilities/separateOperations.mjs +2 -2
- package/node_modules/graphql/utilities/stripIgnoredCharacters.d.ts +19 -5
- package/node_modules/graphql/utilities/stripIgnoredCharacters.js +19 -5
- package/node_modules/graphql/utilities/stripIgnoredCharacters.mjs +19 -5
- package/node_modules/graphql/utilities/typeComparators.d.ts +1 -5
- package/node_modules/graphql/utilities/typeComparators.js +1 -5
- package/node_modules/graphql/utilities/typeComparators.mjs +1 -5
- package/node_modules/graphql/utilities/valueFromAST.js +4 -4
- package/node_modules/graphql/utilities/valueFromAST.mjs +4 -4
- package/node_modules/graphql/utilities/valueFromASTUntyped.d.ts +1 -3
- package/node_modules/graphql/utilities/valueFromASTUntyped.js +1 -3
- package/node_modules/graphql/utilities/valueFromASTUntyped.mjs +1 -3
- package/node_modules/graphql/validation/ValidationContext.d.ts +22 -3
- package/node_modules/graphql/validation/ValidationContext.js +84 -27
- package/node_modules/graphql/validation/ValidationContext.mjs +82 -27
- package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js +6 -4
- package/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs +6 -4
- package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js +10 -6
- package/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs +12 -6
- package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js +6 -4
- package/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs +6 -4
- package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js +26 -17
- package/node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs +21 -11
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.d.ts +1 -3
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.js +1 -3
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs +1 -3
- package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js +4 -4
- package/node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs +4 -4
- package/node_modules/graphql/validation/rules/KnownTypeNamesRule.d.ts +1 -3
- package/node_modules/graphql/validation/rules/KnownTypeNamesRule.js +7 -7
- package/node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs +7 -7
- package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js +6 -4
- package/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs +6 -4
- package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js +44 -19
- package/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.mjs +44 -19
- package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.d.ts +1 -3
- package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js +1 -3
- package/node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs +1 -3
- package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js +4 -4
- package/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs +4 -4
- package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js +10 -14
- package/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs +10 -14
- package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js +4 -4
- package/node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs +4 -4
- package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.d.ts +8 -6
- package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js +552 -354
- package/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs +545 -352
- package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js +6 -4
- package/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs +6 -4
- package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js +6 -4
- package/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs +6 -4
- package/node_modules/graphql/validation/rules/ScalarLeafsRule.d.ts +1 -3
- package/node_modules/graphql/validation/rules/ScalarLeafsRule.js +1 -3
- package/node_modules/graphql/validation/rules/ScalarLeafsRule.mjs +1 -3
- package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js +50 -9
- package/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs +50 -9
- package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js +4 -4
- package/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs +4 -4
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +6 -4
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs +6 -4
- package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js +4 -4
- package/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs +4 -4
- package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js +6 -4
- package/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs +6 -4
- package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js +4 -4
- package/node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs +4 -4
- package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js +4 -4
- package/node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs +4 -4
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +29 -23
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs +24 -14
- package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js +6 -4
- package/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs +6 -4
- package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.d.ts +6 -4
- package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js +6 -4
- package/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs +6 -4
- package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.d.ts +4 -4
- package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js +4 -4
- package/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs +4 -4
- package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.d.ts +7 -5
- package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +7 -5
- package/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs +7 -5
- package/node_modules/graphql/validation/validate.d.ts +2 -0
- package/node_modules/graphql/validation/validate.js +14 -2
- package/node_modules/graphql/validation/validate.mjs +13 -2
- package/node_modules/graphql/validation/validationAbortedError.d.ts +3 -0
- package/node_modules/graphql/validation/validationAbortedError.js +14 -0
- package/node_modules/graphql/validation/validationAbortedError.mjs +4 -0
- package/node_modules/graphql/version.js +3 -3
- package/node_modules/graphql/version.mjs +3 -3
- package/package.json +11 -11
- package/node_modules/@zuplo/runtime/out/esm/chunk-4SVXBKXH.js +0 -414
- package/node_modules/@zuplo/runtime/out/esm/chunk-4SVXBKXH.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-7FFIW3HF.js +0 -26
- package/node_modules/@zuplo/runtime/out/esm/chunk-7FFIW3HF.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-QGAJTUPE.js +0 -26
- package/node_modules/@zuplo/runtime/out/esm/chunk-QGAJTUPE.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-WUZE2HKB.js +0 -102
- package/node_modules/@zuplo/runtime/out/esm/chunk-WUZE2HKB.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-4SVXBKXH.js.LEGAL.txt → chunk-ADPB2ZMZ.js.LEGAL.txt} +0 -0
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-WUZE2HKB.js.LEGAL.txt → chunk-UFTMOJ7K.js.LEGAL.txt} +0 -0
|
@@ -50,7 +50,7 @@ var _tokenKind = require('./tokenKind.js');
|
|
|
50
50
|
*
|
|
51
51
|
* const document = parse('fragment A($var: Boolean) on Query { field }', {
|
|
52
52
|
* allowLegacyFragmentVariables: true,
|
|
53
|
-
*
|
|
53
|
+
* maxLexicalTokens: 20,
|
|
54
54
|
* noLocation: true,
|
|
55
55
|
* });
|
|
56
56
|
* const directiveDocument = parse('directive @foo @bar on FIELD', {
|
|
@@ -216,6 +216,22 @@ class Parser {
|
|
|
216
216
|
|
|
217
217
|
this._options = _options;
|
|
218
218
|
this._tokenCounter = 0;
|
|
219
|
+
this._lexer._maxComments =
|
|
220
|
+
options === null || options === void 0 ? void 0 : options.maxComments;
|
|
221
|
+
this._lexer._commentCount = 0;
|
|
222
|
+
const maxSourceLength =
|
|
223
|
+
options === null || options === void 0 ? void 0 : options.maxSourceLength;
|
|
224
|
+
|
|
225
|
+
if (
|
|
226
|
+
maxSourceLength !== undefined &&
|
|
227
|
+
this._lexer.source.body.length > maxSourceLength
|
|
228
|
+
) {
|
|
229
|
+
throw (0, _syntaxError.syntaxError)(
|
|
230
|
+
this._lexer.source,
|
|
231
|
+
maxSourceLength,
|
|
232
|
+
`Source contains more than ${maxSourceLength} UTF-16 code units. Parsing aborted.`,
|
|
233
|
+
);
|
|
234
|
+
}
|
|
219
235
|
}
|
|
220
236
|
|
|
221
237
|
get tokenCount() {
|
|
@@ -1644,15 +1660,18 @@ class Parser {
|
|
|
1644
1660
|
* @returns Parsed schema coordinate AST.
|
|
1645
1661
|
* @example
|
|
1646
1662
|
* ```ts
|
|
1647
|
-
* import
|
|
1663
|
+
* import assert from 'node:assert/strict';
|
|
1664
|
+
* import { Kind, parseSchemaCoordinate } from 'graphql/language';
|
|
1648
1665
|
*
|
|
1649
|
-
* const typeCoordinate =
|
|
1650
|
-
* const directiveCoordinate =
|
|
1666
|
+
* const typeCoordinate = parseSchemaCoordinate('User.name');
|
|
1667
|
+
* const directiveCoordinate = parseSchemaCoordinate('@include(if:)');
|
|
1668
|
+
* assert(typeCoordinate.kind === Kind.MEMBER_COORDINATE);
|
|
1669
|
+
* assert(directiveCoordinate.kind === Kind.DIRECTIVE_ARGUMENT_COORDINATE);
|
|
1651
1670
|
*
|
|
1652
1671
|
* typeCoordinate.name.value; // => 'User'
|
|
1653
1672
|
* typeCoordinate.memberName?.value; // => 'name'
|
|
1654
|
-
* directiveCoordinate.name.value; // => '
|
|
1655
|
-
* directiveCoordinate.argumentName?.value; // => '
|
|
1673
|
+
* directiveCoordinate.name.value; // => 'include'
|
|
1674
|
+
* directiveCoordinate.argumentName?.value; // => 'if'
|
|
1656
1675
|
* ```
|
|
1657
1676
|
*/
|
|
1658
1677
|
|
|
@@ -1909,18 +1928,21 @@ class Parser {
|
|
|
1909
1928
|
}
|
|
1910
1929
|
|
|
1911
1930
|
advanceLexer() {
|
|
1912
|
-
const { maxTokens } = this._options;
|
|
1931
|
+
const { maxLexicalTokens = this._options.maxTokens } = this._options;
|
|
1913
1932
|
|
|
1914
1933
|
const token = this._lexer.advance();
|
|
1915
1934
|
|
|
1916
1935
|
if (token.kind !== _tokenKind.TokenKind.EOF) {
|
|
1917
1936
|
++this._tokenCounter;
|
|
1918
1937
|
|
|
1919
|
-
if (
|
|
1938
|
+
if (
|
|
1939
|
+
maxLexicalTokens !== undefined &&
|
|
1940
|
+
this._tokenCounter > maxLexicalTokens
|
|
1941
|
+
) {
|
|
1920
1942
|
throw (0, _syntaxError.syntaxError)(
|
|
1921
1943
|
this._lexer.source,
|
|
1922
1944
|
token.start,
|
|
1923
|
-
`Document contains more that ${
|
|
1945
|
+
`Document contains more that ${maxLexicalTokens} tokens. Parsing aborted.`,
|
|
1924
1946
|
);
|
|
1925
1947
|
}
|
|
1926
1948
|
}
|
|
@@ -31,7 +31,7 @@ import { TokenKind } from './tokenKind.mjs';
|
|
|
31
31
|
*
|
|
32
32
|
* const document = parse('fragment A($var: Boolean) on Query { field }', {
|
|
33
33
|
* allowLegacyFragmentVariables: true,
|
|
34
|
-
*
|
|
34
|
+
* maxLexicalTokens: 20,
|
|
35
35
|
* noLocation: true,
|
|
36
36
|
* });
|
|
37
37
|
* const directiveDocument = parse('directive @foo @bar on FIELD', {
|
|
@@ -193,6 +193,22 @@ export class Parser {
|
|
|
193
193
|
|
|
194
194
|
this._options = _options;
|
|
195
195
|
this._tokenCounter = 0;
|
|
196
|
+
this._lexer._maxComments =
|
|
197
|
+
options === null || options === void 0 ? void 0 : options.maxComments;
|
|
198
|
+
this._lexer._commentCount = 0;
|
|
199
|
+
const maxSourceLength =
|
|
200
|
+
options === null || options === void 0 ? void 0 : options.maxSourceLength;
|
|
201
|
+
|
|
202
|
+
if (
|
|
203
|
+
maxSourceLength !== undefined &&
|
|
204
|
+
this._lexer.source.body.length > maxSourceLength
|
|
205
|
+
) {
|
|
206
|
+
throw syntaxError(
|
|
207
|
+
this._lexer.source,
|
|
208
|
+
maxSourceLength,
|
|
209
|
+
`Source contains more than ${maxSourceLength} UTF-16 code units. Parsing aborted.`,
|
|
210
|
+
);
|
|
211
|
+
}
|
|
196
212
|
}
|
|
197
213
|
|
|
198
214
|
get tokenCount() {
|
|
@@ -1596,15 +1612,18 @@ export class Parser {
|
|
|
1596
1612
|
* @returns Parsed schema coordinate AST.
|
|
1597
1613
|
* @example
|
|
1598
1614
|
* ```ts
|
|
1599
|
-
* import
|
|
1615
|
+
* import assert from 'node:assert/strict';
|
|
1616
|
+
* import { Kind, parseSchemaCoordinate } from 'graphql/language';
|
|
1600
1617
|
*
|
|
1601
|
-
* const typeCoordinate =
|
|
1602
|
-
* const directiveCoordinate =
|
|
1618
|
+
* const typeCoordinate = parseSchemaCoordinate('User.name');
|
|
1619
|
+
* const directiveCoordinate = parseSchemaCoordinate('@include(if:)');
|
|
1620
|
+
* assert(typeCoordinate.kind === Kind.MEMBER_COORDINATE);
|
|
1621
|
+
* assert(directiveCoordinate.kind === Kind.DIRECTIVE_ARGUMENT_COORDINATE);
|
|
1603
1622
|
*
|
|
1604
1623
|
* typeCoordinate.name.value; // => 'User'
|
|
1605
1624
|
* typeCoordinate.memberName?.value; // => 'name'
|
|
1606
|
-
* directiveCoordinate.name.value; // => '
|
|
1607
|
-
* directiveCoordinate.argumentName?.value; // => '
|
|
1625
|
+
* directiveCoordinate.name.value; // => 'include'
|
|
1626
|
+
* directiveCoordinate.argumentName?.value; // => 'if'
|
|
1608
1627
|
* ```
|
|
1609
1628
|
*/
|
|
1610
1629
|
|
|
@@ -1861,18 +1880,21 @@ export class Parser {
|
|
|
1861
1880
|
}
|
|
1862
1881
|
|
|
1863
1882
|
advanceLexer() {
|
|
1864
|
-
const { maxTokens } = this._options;
|
|
1883
|
+
const { maxLexicalTokens = this._options.maxTokens } = this._options;
|
|
1865
1884
|
|
|
1866
1885
|
const token = this._lexer.advance();
|
|
1867
1886
|
|
|
1868
1887
|
if (token.kind !== TokenKind.EOF) {
|
|
1869
1888
|
++this._tokenCounter;
|
|
1870
1889
|
|
|
1871
|
-
if (
|
|
1890
|
+
if (
|
|
1891
|
+
maxLexicalTokens !== undefined &&
|
|
1892
|
+
this._tokenCounter > maxLexicalTokens
|
|
1893
|
+
) {
|
|
1872
1894
|
throw syntaxError(
|
|
1873
1895
|
this._lexer.source,
|
|
1874
1896
|
token.start,
|
|
1875
|
-
`Document contains more that ${
|
|
1897
|
+
`Document contains more that ${maxLexicalTokens} tokens. Parsing aborted.`,
|
|
1876
1898
|
);
|
|
1877
1899
|
}
|
|
1878
1900
|
}
|
|
@@ -54,8 +54,11 @@ export declare function isExecutableDefinitionNode(
|
|
|
54
54
|
* ```ts
|
|
55
55
|
* import { Kind, isSelectionNode } from 'graphql/language';
|
|
56
56
|
*
|
|
57
|
-
* const field = {
|
|
58
|
-
*
|
|
57
|
+
* const field = {
|
|
58
|
+
* kind: Kind.FIELD,
|
|
59
|
+
* name: { kind: Kind.NAME, value: 'hello' },
|
|
60
|
+
* } as const;
|
|
61
|
+
* const document = { kind: Kind.DOCUMENT, definitions: [] } as const;
|
|
59
62
|
*
|
|
60
63
|
* isSelectionNode(field); // => true
|
|
61
64
|
* isSelectionNode(document); // => false
|
|
@@ -84,7 +87,11 @@ export declare function isValueNode(node: ASTNode): node is ValueNode;
|
|
|
84
87
|
* @returns True when the AST node is a constant value node.
|
|
85
88
|
* @example
|
|
86
89
|
* ```ts
|
|
87
|
-
* import {
|
|
90
|
+
* import {
|
|
91
|
+
* parseConstValue,
|
|
92
|
+
* parseValue,
|
|
93
|
+
* isConstValueNode,
|
|
94
|
+
* } from 'graphql/language';
|
|
88
95
|
*
|
|
89
96
|
* const value = parseConstValue('[42]');
|
|
90
97
|
* const variable = parseValue('$id');
|
|
@@ -70,8 +70,11 @@ function isExecutableDefinitionNode(node) {
|
|
|
70
70
|
* ```ts
|
|
71
71
|
* import { Kind, isSelectionNode } from 'graphql/language';
|
|
72
72
|
*
|
|
73
|
-
* const field = {
|
|
74
|
-
*
|
|
73
|
+
* const field = {
|
|
74
|
+
* kind: Kind.FIELD,
|
|
75
|
+
* name: { kind: Kind.NAME, value: 'hello' },
|
|
76
|
+
* } as const;
|
|
77
|
+
* const document = { kind: Kind.DOCUMENT, definitions: [] } as const;
|
|
75
78
|
*
|
|
76
79
|
* isSelectionNode(field); // => true
|
|
77
80
|
* isSelectionNode(document); // => false
|
|
@@ -120,7 +123,11 @@ function isValueNode(node) {
|
|
|
120
123
|
* @returns True when the AST node is a constant value node.
|
|
121
124
|
* @example
|
|
122
125
|
* ```ts
|
|
123
|
-
* import {
|
|
126
|
+
* import {
|
|
127
|
+
* parseConstValue,
|
|
128
|
+
* parseValue,
|
|
129
|
+
* isConstValueNode,
|
|
130
|
+
* } from 'graphql/language';
|
|
124
131
|
*
|
|
125
132
|
* const value = parseConstValue('[42]');
|
|
126
133
|
* const variable = parseValue('$id');
|
|
@@ -52,8 +52,11 @@ export function isExecutableDefinitionNode(node) {
|
|
|
52
52
|
* ```ts
|
|
53
53
|
* import { Kind, isSelectionNode } from 'graphql/language';
|
|
54
54
|
*
|
|
55
|
-
* const field = {
|
|
56
|
-
*
|
|
55
|
+
* const field = {
|
|
56
|
+
* kind: Kind.FIELD,
|
|
57
|
+
* name: { kind: Kind.NAME, value: 'hello' },
|
|
58
|
+
* } as const;
|
|
59
|
+
* const document = { kind: Kind.DOCUMENT, definitions: [] } as const;
|
|
57
60
|
*
|
|
58
61
|
* isSelectionNode(field); // => true
|
|
59
62
|
* isSelectionNode(document); // => false
|
|
@@ -102,7 +105,11 @@ export function isValueNode(node) {
|
|
|
102
105
|
* @returns True when the AST node is a constant value node.
|
|
103
106
|
* @example
|
|
104
107
|
* ```ts
|
|
105
|
-
* import {
|
|
108
|
+
* import {
|
|
109
|
+
* parseConstValue,
|
|
110
|
+
* parseValue,
|
|
111
|
+
* isConstValueNode,
|
|
112
|
+
* } from 'graphql/language';
|
|
106
113
|
*
|
|
107
114
|
* const value = parseConstValue('[42]');
|
|
108
115
|
* const variable = parseValue('$id');
|
|
@@ -14,9 +14,7 @@ import type { Source } from './source';
|
|
|
14
14
|
* const location = document.definitions[0].loc;
|
|
15
15
|
*
|
|
16
16
|
* if (location) {
|
|
17
|
-
* const printed = printLocation(location);
|
|
18
|
-
*
|
|
19
|
-
* printed; // => 'GraphQL request:1:1\n1 | type Query { hello: String }\n | ^'
|
|
17
|
+
* const printed = printLocation(location); // => 'GraphQL request:1:1\n1 | type Query { hello: String }\n | ^'
|
|
20
18
|
* }
|
|
21
19
|
* ```
|
|
22
20
|
*/
|
|
@@ -31,9 +29,7 @@ export declare function printLocation(location: Location): string;
|
|
|
31
29
|
* import { Source, printSourceLocation } from 'graphql/language';
|
|
32
30
|
*
|
|
33
31
|
* const source = new Source('type Query { hello: String }');
|
|
34
|
-
* const printed = printSourceLocation(source, { line: 1, column: 14 });
|
|
35
|
-
*
|
|
36
|
-
* printed; // => 'GraphQL request:1:14\n1 | type Query { hello: String }\n | ^'
|
|
32
|
+
* const printed = printSourceLocation(source, { line: 1, column: 14 }); // => 'GraphQL request:1:14\n1 | type Query { hello: String }\n | ^'
|
|
37
33
|
* ```
|
|
38
34
|
*/
|
|
39
35
|
export declare function printSourceLocation(
|
|
@@ -22,9 +22,7 @@ var _location = require('./location.js');
|
|
|
22
22
|
* const location = document.definitions[0].loc;
|
|
23
23
|
*
|
|
24
24
|
* if (location) {
|
|
25
|
-
* const printed = printLocation(location);
|
|
26
|
-
*
|
|
27
|
-
* printed; // => 'GraphQL request:1:1\n1 | type Query { hello: String }\n | ^'
|
|
25
|
+
* const printed = printLocation(location); // => 'GraphQL request:1:1\n1 | type Query { hello: String }\n | ^'
|
|
28
26
|
* }
|
|
29
27
|
* ```
|
|
30
28
|
*/
|
|
@@ -44,9 +42,7 @@ function printLocation(location) {
|
|
|
44
42
|
* import { Source, printSourceLocation } from 'graphql/language';
|
|
45
43
|
*
|
|
46
44
|
* const source = new Source('type Query { hello: String }');
|
|
47
|
-
* const printed = printSourceLocation(source, { line: 1, column: 14 });
|
|
48
|
-
*
|
|
49
|
-
* printed; // => 'GraphQL request:1:14\n1 | type Query { hello: String }\n | ^'
|
|
45
|
+
* const printed = printSourceLocation(source, { line: 1, column: 14 }); // => 'GraphQL request:1:14\n1 | type Query { hello: String }\n | ^'
|
|
50
46
|
* ```
|
|
51
47
|
*/
|
|
52
48
|
|
|
@@ -13,9 +13,7 @@ import { getLocation } from './location.mjs';
|
|
|
13
13
|
* const location = document.definitions[0].loc;
|
|
14
14
|
*
|
|
15
15
|
* if (location) {
|
|
16
|
-
* const printed = printLocation(location);
|
|
17
|
-
*
|
|
18
|
-
* printed; // => 'GraphQL request:1:1\n1 | type Query { hello: String }\n | ^'
|
|
16
|
+
* const printed = printLocation(location); // => 'GraphQL request:1:1\n1 | type Query { hello: String }\n | ^'
|
|
19
17
|
* }
|
|
20
18
|
* ```
|
|
21
19
|
*/
|
|
@@ -35,9 +33,7 @@ export function printLocation(location) {
|
|
|
35
33
|
* import { Source, printSourceLocation } from 'graphql/language';
|
|
36
34
|
*
|
|
37
35
|
* const source = new Source('type Query { hello: String }');
|
|
38
|
-
* const printed = printSourceLocation(source, { line: 1, column: 14 });
|
|
39
|
-
*
|
|
40
|
-
* printed; // => 'GraphQL request:1:14\n1 | type Query { hello: String }\n | ^'
|
|
36
|
+
* const printed = printSourceLocation(source, { line: 1, column: 14 }); // => 'GraphQL request:1:14\n1 | type Query { hello: String }\n | ^'
|
|
41
37
|
* ```
|
|
42
38
|
*/
|
|
43
39
|
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
/** @category Printing */
|
|
2
2
|
import type { ASTNode } from './ast';
|
|
3
|
+
interface PrintOptions {
|
|
4
|
+
/** Maximum indentation depth. Defaults to Infinity. */
|
|
5
|
+
maxIndentDepth?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Prints an AST with indentation and inserted newlines disabled at the given depth.
|
|
9
|
+
* @param ast - The GraphQL AST node to print.
|
|
10
|
+
* @param options - Output configuration.
|
|
11
|
+
* Indentation depth defaults to `Infinity`.
|
|
12
|
+
* @returns A string representation of the AST.
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { parse, print } from 'graphql/language';
|
|
16
|
+
*
|
|
17
|
+
* print(parse('{ a { b } }'), { maxIndentDepth: 0 }); // => '{ a { b } }'
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function print(ast: ASTNode, options: PrintOptions): string;
|
|
3
21
|
/**
|
|
4
22
|
* Converts an AST into a string, using one set of reasonable
|
|
5
23
|
* formatting rules.
|
|
@@ -10,9 +28,10 @@ import type { ASTNode } from './ast';
|
|
|
10
28
|
* import { parse, print } from 'graphql';
|
|
11
29
|
*
|
|
12
30
|
* const ast = parse('{ hero { name } }');
|
|
13
|
-
* const text = print(ast);
|
|
14
|
-
*
|
|
15
|
-
* text; // => '{\n hero {\n name\n }\n}'
|
|
31
|
+
* const text = print(ast); // => '{\n hero {\n name\n }\n}'
|
|
16
32
|
* ```
|
|
17
33
|
*/
|
|
18
34
|
export declare function print(ast: ASTNode): string;
|
|
35
|
+
/** @internal */
|
|
36
|
+
export declare function printForError(ast: ASTNode): string;
|
|
37
|
+
export {};
|