@salesforce/lds-runtime-bridge 1.235.0 → 1.236.0

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.
@@ -1510,6 +1510,7 @@ function isEntryDurableRecordRepresentation(entry, key) {
1510
1510
  * For full license text, see the LICENSE.txt file
1511
1511
  */
1512
1512
 
1513
+
1513
1514
  var DraftActionStatus;
1514
1515
  (function (DraftActionStatus) {
1515
1516
  DraftActionStatus["Pending"] = "pending";
@@ -1629,6 +1630,7 @@ var DraftQueueOperationType;
1629
1630
  * Returns true if the value acts like a Promise, i.e. has a "then" function,
1630
1631
  * otherwise returns false.
1631
1632
  */
1633
+ // eslint-disable-next-line no-redeclare
1632
1634
 
1633
1635
  function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
1634
1636
 
@@ -2172,38 +2174,6 @@ defineInspect(Token);
2172
2174
  function isNode(maybeNode) {
2173
2175
  return maybeNode != null && typeof maybeNode.kind === 'string';
2174
2176
  }
2175
- /**
2176
- * The list of all possible AST node types.
2177
- */
2178
-
2179
- /**
2180
- * An exported enum describing the different kinds of tokens that the
2181
- * lexer emits.
2182
- */
2183
- Object.freeze({
2184
- SOF: '<SOF>',
2185
- EOF: '<EOF>',
2186
- BANG: '!',
2187
- DOLLAR: '$',
2188
- AMP: '&',
2189
- PAREN_L: '(',
2190
- PAREN_R: ')',
2191
- SPREAD: '...',
2192
- COLON: ':',
2193
- EQUALS: '=',
2194
- AT: '@',
2195
- BRACKET_L: '[',
2196
- BRACKET_R: ']',
2197
- BRACE_L: '{',
2198
- PIPE: '|',
2199
- BRACE_R: '}',
2200
- NAME: 'Name',
2201
- INT: 'Int',
2202
- FLOAT: 'Float',
2203
- STRING: 'String',
2204
- BLOCK_STRING: 'BlockString',
2205
- COMMENT: 'Comment'
2206
- });
2207
2177
  /**
2208
2178
  * The enum type representing the token kinds values.
2209
2179
  */
@@ -3942,9 +3912,6 @@ function argsToArgsConfig(args) {
3942
3912
  };
3943
3913
  });
3944
3914
  }
3945
- function isRequiredArgument(arg) {
3946
- return isNonNullType(arg.type) && arg.defaultValue === undefined;
3947
- }
3948
3915
 
3949
3916
  /**
3950
3917
  * Interface Type Definition
@@ -5525,7 +5492,7 @@ defineInspect(GraphQLDirective);
5525
5492
  /**
5526
5493
  * Used to conditionally include fields or fragments.
5527
5494
  */
5528
- var GraphQLIncludeDirective = new GraphQLDirective({
5495
+ new GraphQLDirective({
5529
5496
  name: 'include',
5530
5497
  description: 'Directs the executor to include this field or fragment only when the `if` argument is true.',
5531
5498
  locations: [DirectiveLocation.FIELD, DirectiveLocation.FRAGMENT_SPREAD, DirectiveLocation.INLINE_FRAGMENT],
@@ -5540,7 +5507,7 @@ var GraphQLIncludeDirective = new GraphQLDirective({
5540
5507
  * Used to conditionally skip (exclude) fields or fragments.
5541
5508
  */
5542
5509
 
5543
- var GraphQLSkipDirective = new GraphQLDirective({
5510
+ new GraphQLDirective({
5544
5511
  name: 'skip',
5545
5512
  description: 'Directs the executor to skip this field or fragment when the `if` argument is true.',
5546
5513
  locations: [DirectiveLocation.FIELD, DirectiveLocation.FRAGMENT_SPREAD, DirectiveLocation.INLINE_FRAGMENT],
@@ -5560,7 +5527,7 @@ var DEFAULT_DEPRECATION_REASON = 'No longer supported';
5560
5527
  * Used to declare element of a GraphQL schema as deprecated.
5561
5528
  */
5562
5529
 
5563
- var GraphQLDeprecatedDirective = new GraphQLDirective({
5530
+ new GraphQLDirective({
5564
5531
  name: 'deprecated',
5565
5532
  description: 'Marks an element of a GraphQL schema as no longer supported.',
5566
5533
  locations: [DirectiveLocation.FIELD_DEFINITION, DirectiveLocation.ARGUMENT_DEFINITION, DirectiveLocation.INPUT_FIELD_DEFINITION, DirectiveLocation.ENUM_VALUE],
@@ -5576,7 +5543,7 @@ var GraphQLDeprecatedDirective = new GraphQLDirective({
5576
5543
  * Used to provide a URL for specifying the behaviour of custom scalar definitions.
5577
5544
  */
5578
5545
 
5579
- var GraphQLSpecifiedByDirective = new GraphQLDirective({
5546
+ new GraphQLDirective({
5580
5547
  name: 'specifiedBy',
5581
5548
  description: 'Exposes a URL that specifies the behaviour of this scalar.',
5582
5549
  locations: [DirectiveLocation.SCALAR],
@@ -5587,810 +5554,14 @@ var GraphQLSpecifiedByDirective = new GraphQLDirective({
5587
5554
  }
5588
5555
  }
5589
5556
  });
5590
- /**
5591
- * The full list of specified directives.
5592
- */
5593
-
5594
- var specifiedDirectives = Object.freeze([GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective]);
5595
-
5596
- function isTypeSystemDefinitionNode(node) {
5597
- return node.kind === Kind.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === Kind.DIRECTIVE_DEFINITION;
5598
- }
5599
- function isTypeDefinitionNode(node) {
5600
- return node.kind === Kind.SCALAR_TYPE_DEFINITION || node.kind === Kind.OBJECT_TYPE_DEFINITION || node.kind === Kind.INTERFACE_TYPE_DEFINITION || node.kind === Kind.UNION_TYPE_DEFINITION || node.kind === Kind.ENUM_TYPE_DEFINITION || node.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION;
5601
- }
5602
- function isTypeSystemExtensionNode(node) {
5603
- return node.kind === Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node);
5604
- }
5605
- function isTypeExtensionNode(node) {
5606
- return node.kind === Kind.SCALAR_TYPE_EXTENSION || node.kind === Kind.OBJECT_TYPE_EXTENSION || node.kind === Kind.INTERFACE_TYPE_EXTENSION || node.kind === Kind.UNION_TYPE_EXTENSION || node.kind === Kind.ENUM_TYPE_EXTENSION || node.kind === Kind.INPUT_OBJECT_TYPE_EXTENSION;
5607
- }
5608
-
5609
- /**
5610
- * Known type names
5611
- *
5612
- * A GraphQL document is only valid if referenced types (specifically
5613
- * variable definitions and fragment conditions) are defined by the type schema.
5614
- */
5615
- function KnownTypeNamesRule(context) {
5616
- var schema = context.getSchema();
5617
- var existingTypesMap = schema ? schema.getTypeMap() : Object.create(null);
5618
- var definedTypes = Object.create(null);
5619
-
5620
- for (var _i2 = 0, _context$getDocument$2 = context.getDocument().definitions; _i2 < _context$getDocument$2.length; _i2++) {
5621
- var def = _context$getDocument$2[_i2];
5622
-
5623
- if (isTypeDefinitionNode(def)) {
5624
- definedTypes[def.name.value] = true;
5625
- }
5626
- }
5627
-
5628
- var typeNames = Object.keys(existingTypesMap).concat(Object.keys(definedTypes));
5629
- return {
5630
- NamedType: function NamedType(node, _1, parent, _2, ancestors) {
5631
- var typeName = node.name.value;
5632
-
5633
- if (!existingTypesMap[typeName] && !definedTypes[typeName]) {
5634
- var _ancestors$;
5635
-
5636
- var definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent;
5637
- var isSDL = definitionNode != null && isSDLNode(definitionNode);
5638
-
5639
- if (isSDL && isStandardTypeName(typeName)) {
5640
- return;
5641
- }
5642
-
5643
- var suggestedTypes = suggestionList(typeName, isSDL ? standardTypeNames.concat(typeNames) : typeNames);
5644
- context.reportError(new GraphQLError("Unknown type \"".concat(typeName, "\".") + didYouMean(suggestedTypes), node));
5645
- }
5646
- }
5647
- };
5648
- }
5649
- var standardTypeNames = [].concat(specifiedScalarTypes, introspectionTypes).map(function (type) {
5557
+ [].concat(specifiedScalarTypes, introspectionTypes).map(function (type) {
5650
5558
  return type.name;
5651
5559
  });
5652
5560
 
5653
- function isStandardTypeName(typeName) {
5654
- return standardTypeNames.indexOf(typeName) !== -1;
5655
- }
5656
-
5657
- function isSDLNode(value) {
5658
- return !Array.isArray(value) && (isTypeSystemDefinitionNode(value) || isTypeSystemExtensionNode(value));
5659
- }
5660
-
5661
- /**
5662
- * Known directives
5663
- *
5664
- * A GraphQL document is only valid if all `@directives` are known by the
5665
- * schema and legally positioned.
5666
- */
5667
- function KnownDirectivesRule(context) {
5668
- var locationsMap = Object.create(null);
5669
- var schema = context.getSchema();
5670
- var definedDirectives = schema ? schema.getDirectives() : specifiedDirectives;
5671
-
5672
- for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {
5673
- var directive = definedDirectives[_i2];
5674
- locationsMap[directive.name] = directive.locations;
5675
- }
5676
-
5677
- var astDefinitions = context.getDocument().definitions;
5678
-
5679
- for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {
5680
- var def = astDefinitions[_i4];
5681
-
5682
- if (def.kind === Kind.DIRECTIVE_DEFINITION) {
5683
- locationsMap[def.name.value] = def.locations.map(function (name) {
5684
- return name.value;
5685
- });
5686
- }
5687
- }
5688
-
5689
- return {
5690
- Directive: function Directive(node, _key, _parent, _path, ancestors) {
5691
- var name = node.name.value;
5692
- var locations = locationsMap[name];
5693
-
5694
- if (!locations) {
5695
- context.reportError(new GraphQLError("Unknown directive \"@".concat(name, "\"."), node));
5696
- return;
5697
- }
5698
-
5699
- var candidateLocation = getDirectiveLocationForASTPath(ancestors);
5700
-
5701
- if (candidateLocation && locations.indexOf(candidateLocation) === -1) {
5702
- context.reportError(new GraphQLError("Directive \"@".concat(name, "\" may not be used on ").concat(candidateLocation, "."), node));
5703
- }
5704
- }
5705
- };
5706
- }
5707
-
5708
- function getDirectiveLocationForASTPath(ancestors) {
5709
- var appliedTo = ancestors[ancestors.length - 1];
5710
- !Array.isArray(appliedTo) || invariant(0);
5711
-
5712
- switch (appliedTo.kind) {
5713
- case Kind.OPERATION_DEFINITION:
5714
- return getDirectiveLocationForOperation(appliedTo.operation);
5715
-
5716
- case Kind.FIELD:
5717
- return DirectiveLocation.FIELD;
5718
-
5719
- case Kind.FRAGMENT_SPREAD:
5720
- return DirectiveLocation.FRAGMENT_SPREAD;
5721
-
5722
- case Kind.INLINE_FRAGMENT:
5723
- return DirectiveLocation.INLINE_FRAGMENT;
5724
-
5725
- case Kind.FRAGMENT_DEFINITION:
5726
- return DirectiveLocation.FRAGMENT_DEFINITION;
5727
-
5728
- case Kind.VARIABLE_DEFINITION:
5729
- return DirectiveLocation.VARIABLE_DEFINITION;
5730
-
5731
- case Kind.SCHEMA_DEFINITION:
5732
- case Kind.SCHEMA_EXTENSION:
5733
- return DirectiveLocation.SCHEMA;
5734
-
5735
- case Kind.SCALAR_TYPE_DEFINITION:
5736
- case Kind.SCALAR_TYPE_EXTENSION:
5737
- return DirectiveLocation.SCALAR;
5738
-
5739
- case Kind.OBJECT_TYPE_DEFINITION:
5740
- case Kind.OBJECT_TYPE_EXTENSION:
5741
- return DirectiveLocation.OBJECT;
5742
-
5743
- case Kind.FIELD_DEFINITION:
5744
- return DirectiveLocation.FIELD_DEFINITION;
5745
-
5746
- case Kind.INTERFACE_TYPE_DEFINITION:
5747
- case Kind.INTERFACE_TYPE_EXTENSION:
5748
- return DirectiveLocation.INTERFACE;
5749
-
5750
- case Kind.UNION_TYPE_DEFINITION:
5751
- case Kind.UNION_TYPE_EXTENSION:
5752
- return DirectiveLocation.UNION;
5753
-
5754
- case Kind.ENUM_TYPE_DEFINITION:
5755
- case Kind.ENUM_TYPE_EXTENSION:
5756
- return DirectiveLocation.ENUM;
5757
-
5758
- case Kind.ENUM_VALUE_DEFINITION:
5759
- return DirectiveLocation.ENUM_VALUE;
5760
-
5761
- case Kind.INPUT_OBJECT_TYPE_DEFINITION:
5762
- case Kind.INPUT_OBJECT_TYPE_EXTENSION:
5763
- return DirectiveLocation.INPUT_OBJECT;
5764
-
5765
- case Kind.INPUT_VALUE_DEFINITION:
5766
- {
5767
- var parentNode = ancestors[ancestors.length - 3];
5768
- return parentNode.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION ? DirectiveLocation.INPUT_FIELD_DEFINITION : DirectiveLocation.ARGUMENT_DEFINITION;
5769
- }
5770
- }
5771
- }
5772
-
5773
- function getDirectiveLocationForOperation(operation) {
5774
- switch (operation) {
5775
- case 'query':
5776
- return DirectiveLocation.QUERY;
5777
-
5778
- case 'mutation':
5779
- return DirectiveLocation.MUTATION;
5780
-
5781
- case 'subscription':
5782
- return DirectiveLocation.SUBSCRIPTION;
5783
- } // istanbul ignore next (Not reachable. All possible types have been considered)
5784
-
5785
-
5786
- invariant(0, 'Unexpected operation: ' + inspect(operation));
5787
- }
5788
-
5789
- /**
5790
- * Unique directive names per location
5791
- *
5792
- * A GraphQL document is only valid if all non-repeatable directives at
5793
- * a given location are uniquely named.
5794
- */
5795
- function UniqueDirectivesPerLocationRule(context) {
5796
- var uniqueDirectiveMap = Object.create(null);
5797
- var schema = context.getSchema();
5798
- var definedDirectives = schema ? schema.getDirectives() : specifiedDirectives;
5799
-
5800
- for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {
5801
- var directive = definedDirectives[_i2];
5802
- uniqueDirectiveMap[directive.name] = !directive.isRepeatable;
5803
- }
5804
-
5805
- var astDefinitions = context.getDocument().definitions;
5806
-
5807
- for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {
5808
- var def = astDefinitions[_i4];
5809
-
5810
- if (def.kind === Kind.DIRECTIVE_DEFINITION) {
5811
- uniqueDirectiveMap[def.name.value] = !def.repeatable;
5812
- }
5813
- }
5814
-
5815
- var schemaDirectives = Object.create(null);
5816
- var typeDirectivesMap = Object.create(null);
5817
- return {
5818
- // Many different AST nodes may contain directives. Rather than listing
5819
- // them all, just listen for entering any node, and check to see if it
5820
- // defines any directives.
5821
- enter: function enter(node) {
5822
- if (node.directives == null) {
5823
- return;
5824
- }
5825
-
5826
- var seenDirectives;
5827
-
5828
- if (node.kind === Kind.SCHEMA_DEFINITION || node.kind === Kind.SCHEMA_EXTENSION) {
5829
- seenDirectives = schemaDirectives;
5830
- } else if (isTypeDefinitionNode(node) || isTypeExtensionNode(node)) {
5831
- var typeName = node.name.value;
5832
- seenDirectives = typeDirectivesMap[typeName];
5833
-
5834
- if (seenDirectives === undefined) {
5835
- typeDirectivesMap[typeName] = seenDirectives = Object.create(null);
5836
- }
5837
- } else {
5838
- seenDirectives = Object.create(null);
5839
- }
5840
-
5841
- for (var _i6 = 0, _node$directives2 = node.directives; _i6 < _node$directives2.length; _i6++) {
5842
- var _directive = _node$directives2[_i6];
5843
- var directiveName = _directive.name.value;
5844
-
5845
- if (uniqueDirectiveMap[directiveName]) {
5846
- if (seenDirectives[directiveName]) {
5847
- context.reportError(new GraphQLError("The directive \"@".concat(directiveName, "\" can only be used once at this location."), [seenDirectives[directiveName], _directive]));
5848
- } else {
5849
- seenDirectives[directiveName] = _directive;
5850
- }
5851
- }
5852
- }
5853
- }
5854
- };
5855
- }
5856
-
5857
- /**
5858
- * @internal
5859
- */
5860
-
5861
- function KnownArgumentNamesOnDirectivesRule(context) {
5862
- var directiveArgs = Object.create(null);
5863
- var schema = context.getSchema();
5864
- var definedDirectives = schema ? schema.getDirectives() : specifiedDirectives;
5865
-
5866
- for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {
5867
- var directive = definedDirectives[_i2];
5868
- directiveArgs[directive.name] = directive.args.map(function (arg) {
5869
- return arg.name;
5870
- });
5871
- }
5872
-
5873
- var astDefinitions = context.getDocument().definitions;
5874
-
5875
- for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {
5876
- var def = astDefinitions[_i4];
5877
-
5878
- if (def.kind === Kind.DIRECTIVE_DEFINITION) {
5879
- var _def$arguments;
5880
-
5881
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
5882
- var argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];
5883
- directiveArgs[def.name.value] = argsNodes.map(function (arg) {
5884
- return arg.name.value;
5885
- });
5886
- }
5887
- }
5888
-
5889
- return {
5890
- Directive: function Directive(directiveNode) {
5891
- var directiveName = directiveNode.name.value;
5892
- var knownArgs = directiveArgs[directiveName];
5893
-
5894
- if (directiveNode.arguments && knownArgs) {
5895
- for (var _i6 = 0, _directiveNode$argume2 = directiveNode.arguments; _i6 < _directiveNode$argume2.length; _i6++) {
5896
- var argNode = _directiveNode$argume2[_i6];
5897
- var argName = argNode.name.value;
5898
-
5899
- if (knownArgs.indexOf(argName) === -1) {
5900
- var suggestions = suggestionList(argName, knownArgs);
5901
- context.reportError(new GraphQLError("Unknown argument \"".concat(argName, "\" on directive \"@").concat(directiveName, "\".") + didYouMean(suggestions), argNode));
5902
- }
5903
- }
5904
- }
5905
-
5906
- return false;
5907
- }
5908
- };
5909
- }
5910
-
5911
- /**
5912
- * Unique argument names
5913
- *
5914
- * A GraphQL field or directive is only valid if all supplied arguments are
5915
- * uniquely named.
5916
- */
5917
- function UniqueArgumentNamesRule(context) {
5918
- var knownArgNames = Object.create(null);
5919
- return {
5920
- Field: function Field() {
5921
- knownArgNames = Object.create(null);
5922
- },
5923
- Directive: function Directive() {
5924
- knownArgNames = Object.create(null);
5925
- },
5926
- Argument: function Argument(node) {
5927
- var argName = node.name.value;
5928
-
5929
- if (knownArgNames[argName]) {
5930
- context.reportError(new GraphQLError("There can be only one argument named \"".concat(argName, "\"."), [knownArgNames[argName], node.name]));
5931
- } else {
5932
- knownArgNames[argName] = node.name;
5933
- }
5934
-
5935
- return false;
5936
- }
5937
- };
5938
- }
5939
-
5940
- /**
5941
- * @internal
5942
- */
5943
-
5944
- function ProvidedRequiredArgumentsOnDirectivesRule(context) {
5945
- var requiredArgsMap = Object.create(null);
5946
- var schema = context.getSchema();
5947
- var definedDirectives = schema ? schema.getDirectives() : specifiedDirectives;
5948
-
5949
- for (var _i4 = 0; _i4 < definedDirectives.length; _i4++) {
5950
- var directive = definedDirectives[_i4];
5951
- requiredArgsMap[directive.name] = keyMap(directive.args.filter(isRequiredArgument), function (arg) {
5952
- return arg.name;
5953
- });
5954
- }
5955
-
5956
- var astDefinitions = context.getDocument().definitions;
5957
-
5958
- for (var _i6 = 0; _i6 < astDefinitions.length; _i6++) {
5959
- var def = astDefinitions[_i6];
5960
-
5961
- if (def.kind === Kind.DIRECTIVE_DEFINITION) {
5962
- var _def$arguments;
5963
-
5964
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
5965
- var argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];
5966
- requiredArgsMap[def.name.value] = keyMap(argNodes.filter(isRequiredArgumentNode), function (arg) {
5967
- return arg.name.value;
5968
- });
5969
- }
5970
- }
5971
-
5972
- return {
5973
- Directive: {
5974
- // Validate on leave to allow for deeper errors to appear first.
5975
- leave: function leave(directiveNode) {
5976
- var directiveName = directiveNode.name.value;
5977
- var requiredArgs = requiredArgsMap[directiveName];
5978
-
5979
- if (requiredArgs) {
5980
- var _directiveNode$argume;
5981
-
5982
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
5983
- var _argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : [];
5984
-
5985
- var argNodeMap = keyMap(_argNodes, function (arg) {
5986
- return arg.name.value;
5987
- });
5988
-
5989
- for (var _i8 = 0, _Object$keys2 = Object.keys(requiredArgs); _i8 < _Object$keys2.length; _i8++) {
5990
- var argName = _Object$keys2[_i8];
5991
-
5992
- if (!argNodeMap[argName]) {
5993
- var argType = requiredArgs[argName].type;
5994
- var argTypeStr = isType(argType) ? inspect(argType) : print(argType);
5995
- context.reportError(new GraphQLError("Directive \"@".concat(directiveName, "\" argument \"").concat(argName, "\" of type \"").concat(argTypeStr, "\" is required, but it was not provided."), directiveNode));
5996
- }
5997
- }
5998
- }
5999
- }
6000
- }
6001
- };
6002
- }
6003
-
6004
- function isRequiredArgumentNode(arg) {
6005
- return arg.type.kind === Kind.NON_NULL_TYPE && arg.defaultValue == null;
6006
- }
6007
-
6008
- /**
6009
- * Unique input field names
6010
- *
6011
- * A GraphQL input object value is only valid if all supplied fields are
6012
- * uniquely named.
6013
- */
6014
- function UniqueInputFieldNamesRule(context) {
6015
- var knownNameStack = [];
6016
- var knownNames = Object.create(null);
6017
- return {
6018
- ObjectValue: {
6019
- enter: function enter() {
6020
- knownNameStack.push(knownNames);
6021
- knownNames = Object.create(null);
6022
- },
6023
- leave: function leave() {
6024
- knownNames = knownNameStack.pop();
6025
- }
6026
- },
6027
- ObjectField: function ObjectField(node) {
6028
- var fieldName = node.name.value;
6029
-
6030
- if (knownNames[fieldName]) {
6031
- context.reportError(new GraphQLError("There can be only one input field named \"".concat(fieldName, "\"."), [knownNames[fieldName], node.name]));
6032
- } else {
6033
- knownNames[fieldName] = node.name;
6034
- }
6035
- }
6036
- };
6037
- }
6038
-
6039
- /**
6040
- * Lone Schema definition
6041
- *
6042
- * A GraphQL document is only valid if it contains only one schema definition.
6043
- */
6044
- function LoneSchemaDefinitionRule(context) {
6045
- var _ref, _ref2, _oldSchema$astNode;
6046
-
6047
- var oldSchema = context.getSchema();
6048
- var alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType();
6049
- var schemaDefinitionsCount = 0;
6050
- return {
6051
- SchemaDefinition: function SchemaDefinition(node) {
6052
- if (alreadyDefined) {
6053
- context.reportError(new GraphQLError('Cannot define a new schema within a schema extension.', node));
6054
- return;
6055
- }
6056
-
6057
- if (schemaDefinitionsCount > 0) {
6058
- context.reportError(new GraphQLError('Must provide only one schema definition.', node));
6059
- }
6060
-
6061
- ++schemaDefinitionsCount;
6062
- }
6063
- };
6064
- }
6065
-
6066
- /**
6067
- * Unique operation types
6068
- *
6069
- * A GraphQL document is only valid if it has only one type per operation.
6070
- */
6071
- function UniqueOperationTypesRule(context) {
6072
- var schema = context.getSchema();
6073
- var definedOperationTypes = Object.create(null);
6074
- var existingOperationTypes = schema ? {
6075
- query: schema.getQueryType(),
6076
- mutation: schema.getMutationType(),
6077
- subscription: schema.getSubscriptionType()
6078
- } : {};
6079
- return {
6080
- SchemaDefinition: checkOperationTypes,
6081
- SchemaExtension: checkOperationTypes
6082
- };
6083
-
6084
- function checkOperationTypes(node) {
6085
- var _node$operationTypes;
6086
-
6087
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
6088
- var operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [];
6089
-
6090
- for (var _i2 = 0; _i2 < operationTypesNodes.length; _i2++) {
6091
- var operationType = operationTypesNodes[_i2];
6092
- var operation = operationType.operation;
6093
- var alreadyDefinedOperationType = definedOperationTypes[operation];
6094
-
6095
- if (existingOperationTypes[operation]) {
6096
- context.reportError(new GraphQLError("Type for ".concat(operation, " already defined in the schema. It cannot be redefined."), operationType));
6097
- } else if (alreadyDefinedOperationType) {
6098
- context.reportError(new GraphQLError("There can be only one ".concat(operation, " type in schema."), [alreadyDefinedOperationType, operationType]));
6099
- } else {
6100
- definedOperationTypes[operation] = operationType;
6101
- }
6102
- }
6103
-
6104
- return false;
6105
- }
6106
- }
6107
-
6108
- /**
6109
- * Unique type names
6110
- *
6111
- * A GraphQL document is only valid if all defined types have unique names.
6112
- */
6113
- function UniqueTypeNamesRule(context) {
6114
- var knownTypeNames = Object.create(null);
6115
- var schema = context.getSchema();
6116
- return {
6117
- ScalarTypeDefinition: checkTypeName,
6118
- ObjectTypeDefinition: checkTypeName,
6119
- InterfaceTypeDefinition: checkTypeName,
6120
- UnionTypeDefinition: checkTypeName,
6121
- EnumTypeDefinition: checkTypeName,
6122
- InputObjectTypeDefinition: checkTypeName
6123
- };
6124
-
6125
- function checkTypeName(node) {
6126
- var typeName = node.name.value;
6127
-
6128
- if (schema !== null && schema !== void 0 && schema.getType(typeName)) {
6129
- context.reportError(new GraphQLError("Type \"".concat(typeName, "\" already exists in the schema. It cannot also be defined in this type definition."), node.name));
6130
- return;
6131
- }
6132
-
6133
- if (knownTypeNames[typeName]) {
6134
- context.reportError(new GraphQLError("There can be only one type named \"".concat(typeName, "\"."), [knownTypeNames[typeName], node.name]));
6135
- } else {
6136
- knownTypeNames[typeName] = node.name;
6137
- }
6138
-
6139
- return false;
6140
- }
6141
- }
6142
-
6143
- /**
6144
- * Unique enum value names
6145
- *
6146
- * A GraphQL enum type is only valid if all its values are uniquely named.
6147
- */
6148
- function UniqueEnumValueNamesRule(context) {
6149
- var schema = context.getSchema();
6150
- var existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);
6151
- var knownValueNames = Object.create(null);
6152
- return {
6153
- EnumTypeDefinition: checkValueUniqueness,
6154
- EnumTypeExtension: checkValueUniqueness
6155
- };
6156
-
6157
- function checkValueUniqueness(node) {
6158
- var _node$values;
6159
-
6160
- var typeName = node.name.value;
6161
-
6162
- if (!knownValueNames[typeName]) {
6163
- knownValueNames[typeName] = Object.create(null);
6164
- } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
6165
-
6166
-
6167
- var valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [];
6168
- var valueNames = knownValueNames[typeName];
6169
-
6170
- for (var _i2 = 0; _i2 < valueNodes.length; _i2++) {
6171
- var valueDef = valueNodes[_i2];
6172
- var valueName = valueDef.name.value;
6173
- var existingType = existingTypeMap[typeName];
6174
-
6175
- if (isEnumType(existingType) && existingType.getValue(valueName)) {
6176
- context.reportError(new GraphQLError("Enum value \"".concat(typeName, ".").concat(valueName, "\" already exists in the schema. It cannot also be defined in this type extension."), valueDef.name));
6177
- } else if (valueNames[valueName]) {
6178
- context.reportError(new GraphQLError("Enum value \"".concat(typeName, ".").concat(valueName, "\" can only be defined once."), [valueNames[valueName], valueDef.name]));
6179
- } else {
6180
- valueNames[valueName] = valueDef.name;
6181
- }
6182
- }
6183
-
6184
- return false;
6185
- }
6186
- }
6187
-
6188
- /**
6189
- * Unique field definition names
6190
- *
6191
- * A GraphQL complex type is only valid if all its fields are uniquely named.
6192
- */
6193
- function UniqueFieldDefinitionNamesRule(context) {
6194
- var schema = context.getSchema();
6195
- var existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);
6196
- var knownFieldNames = Object.create(null);
6197
- return {
6198
- InputObjectTypeDefinition: checkFieldUniqueness,
6199
- InputObjectTypeExtension: checkFieldUniqueness,
6200
- InterfaceTypeDefinition: checkFieldUniqueness,
6201
- InterfaceTypeExtension: checkFieldUniqueness,
6202
- ObjectTypeDefinition: checkFieldUniqueness,
6203
- ObjectTypeExtension: checkFieldUniqueness
6204
- };
6205
-
6206
- function checkFieldUniqueness(node) {
6207
- var _node$fields;
6208
-
6209
- var typeName = node.name.value;
6210
-
6211
- if (!knownFieldNames[typeName]) {
6212
- knownFieldNames[typeName] = Object.create(null);
6213
- } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
6214
-
6215
-
6216
- var fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [];
6217
- var fieldNames = knownFieldNames[typeName];
6218
-
6219
- for (var _i2 = 0; _i2 < fieldNodes.length; _i2++) {
6220
- var fieldDef = fieldNodes[_i2];
6221
- var fieldName = fieldDef.name.value;
6222
-
6223
- if (hasField(existingTypeMap[typeName], fieldName)) {
6224
- context.reportError(new GraphQLError("Field \"".concat(typeName, ".").concat(fieldName, "\" already exists in the schema. It cannot also be defined in this type extension."), fieldDef.name));
6225
- } else if (fieldNames[fieldName]) {
6226
- context.reportError(new GraphQLError("Field \"".concat(typeName, ".").concat(fieldName, "\" can only be defined once."), [fieldNames[fieldName], fieldDef.name]));
6227
- } else {
6228
- fieldNames[fieldName] = fieldDef.name;
6229
- }
6230
- }
6231
-
6232
- return false;
6233
- }
6234
- }
6235
-
6236
- function hasField(type, fieldName) {
6237
- if (isObjectType(type) || isInterfaceType(type) || isInputObjectType(type)) {
6238
- return type.getFields()[fieldName] != null;
6239
- }
6240
-
6241
- return false;
6242
- }
6243
-
6244
- /**
6245
- * Unique directive names
6246
- *
6247
- * A GraphQL document is only valid if all defined directives have unique names.
6248
- */
6249
- function UniqueDirectiveNamesRule(context) {
6250
- var knownDirectiveNames = Object.create(null);
6251
- var schema = context.getSchema();
6252
- return {
6253
- DirectiveDefinition: function DirectiveDefinition(node) {
6254
- var directiveName = node.name.value;
6255
-
6256
- if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) {
6257
- context.reportError(new GraphQLError("Directive \"@".concat(directiveName, "\" already exists in the schema. It cannot be redefined."), node.name));
6258
- return;
6259
- }
6260
-
6261
- if (knownDirectiveNames[directiveName]) {
6262
- context.reportError(new GraphQLError("There can be only one directive named \"@".concat(directiveName, "\"."), [knownDirectiveNames[directiveName], node.name]));
6263
- } else {
6264
- knownDirectiveNames[directiveName] = node.name;
6265
- }
6266
-
6267
- return false;
6268
- }
6269
- };
6270
- }
6271
-
6272
5561
  var _defKindToExtKind;
6273
5562
 
6274
5563
  function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6275
-
6276
- /**
6277
- * Possible type extension
6278
- *
6279
- * A type extension is only valid if the type is defined and has the same kind.
6280
- */
6281
- function PossibleTypeExtensionsRule(context) {
6282
- var schema = context.getSchema();
6283
- var definedTypes = Object.create(null);
6284
-
6285
- for (var _i2 = 0, _context$getDocument$2 = context.getDocument().definitions; _i2 < _context$getDocument$2.length; _i2++) {
6286
- var def = _context$getDocument$2[_i2];
6287
-
6288
- if (isTypeDefinitionNode(def)) {
6289
- definedTypes[def.name.value] = def;
6290
- }
6291
- }
6292
-
6293
- return {
6294
- ScalarTypeExtension: checkExtension,
6295
- ObjectTypeExtension: checkExtension,
6296
- InterfaceTypeExtension: checkExtension,
6297
- UnionTypeExtension: checkExtension,
6298
- EnumTypeExtension: checkExtension,
6299
- InputObjectTypeExtension: checkExtension
6300
- };
6301
-
6302
- function checkExtension(node) {
6303
- var typeName = node.name.value;
6304
- var defNode = definedTypes[typeName];
6305
- var existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName);
6306
- var expectedKind;
6307
-
6308
- if (defNode) {
6309
- expectedKind = defKindToExtKind[defNode.kind];
6310
- } else if (existingType) {
6311
- expectedKind = typeToExtKind(existingType);
6312
- }
6313
-
6314
- if (expectedKind) {
6315
- if (expectedKind !== node.kind) {
6316
- var kindStr = extensionKindToTypeName(node.kind);
6317
- context.reportError(new GraphQLError("Cannot extend non-".concat(kindStr, " type \"").concat(typeName, "\"."), defNode ? [defNode, node] : node));
6318
- }
6319
- } else {
6320
- var allTypeNames = Object.keys(definedTypes);
6321
-
6322
- if (schema) {
6323
- allTypeNames = allTypeNames.concat(Object.keys(schema.getTypeMap()));
6324
- }
6325
-
6326
- var suggestedTypes = suggestionList(typeName, allTypeNames);
6327
- context.reportError(new GraphQLError("Cannot extend type \"".concat(typeName, "\" because it is not defined.") + didYouMean(suggestedTypes), node.name));
6328
- }
6329
- }
6330
- }
6331
- var defKindToExtKind = (_defKindToExtKind = {}, _defineProperty$1(_defKindToExtKind, Kind.SCALAR_TYPE_DEFINITION, Kind.SCALAR_TYPE_EXTENSION), _defineProperty$1(_defKindToExtKind, Kind.OBJECT_TYPE_DEFINITION, Kind.OBJECT_TYPE_EXTENSION), _defineProperty$1(_defKindToExtKind, Kind.INTERFACE_TYPE_DEFINITION, Kind.INTERFACE_TYPE_EXTENSION), _defineProperty$1(_defKindToExtKind, Kind.UNION_TYPE_DEFINITION, Kind.UNION_TYPE_EXTENSION), _defineProperty$1(_defKindToExtKind, Kind.ENUM_TYPE_DEFINITION, Kind.ENUM_TYPE_EXTENSION), _defineProperty$1(_defKindToExtKind, Kind.INPUT_OBJECT_TYPE_DEFINITION, Kind.INPUT_OBJECT_TYPE_EXTENSION), _defKindToExtKind);
6332
-
6333
- function typeToExtKind(type) {
6334
- if (isScalarType(type)) {
6335
- return Kind.SCALAR_TYPE_EXTENSION;
6336
- }
6337
-
6338
- if (isObjectType(type)) {
6339
- return Kind.OBJECT_TYPE_EXTENSION;
6340
- }
6341
-
6342
- if (isInterfaceType(type)) {
6343
- return Kind.INTERFACE_TYPE_EXTENSION;
6344
- }
6345
-
6346
- if (isUnionType(type)) {
6347
- return Kind.UNION_TYPE_EXTENSION;
6348
- }
6349
-
6350
- if (isEnumType(type)) {
6351
- return Kind.ENUM_TYPE_EXTENSION;
6352
- } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
6353
-
6354
-
6355
- if (isInputObjectType(type)) {
6356
- return Kind.INPUT_OBJECT_TYPE_EXTENSION;
6357
- } // istanbul ignore next (Not reachable. All possible types have been considered)
6358
-
6359
-
6360
- invariant(0, 'Unexpected type: ' + inspect(type));
6361
- }
6362
-
6363
- function extensionKindToTypeName(kind) {
6364
- switch (kind) {
6365
- case Kind.SCALAR_TYPE_EXTENSION:
6366
- return 'scalar';
6367
-
6368
- case Kind.OBJECT_TYPE_EXTENSION:
6369
- return 'object';
6370
-
6371
- case Kind.INTERFACE_TYPE_EXTENSION:
6372
- return 'interface';
6373
-
6374
- case Kind.UNION_TYPE_EXTENSION:
6375
- return 'union';
6376
-
6377
- case Kind.ENUM_TYPE_EXTENSION:
6378
- return 'enum';
6379
-
6380
- case Kind.INPUT_OBJECT_TYPE_EXTENSION:
6381
- return 'input object';
6382
- } // istanbul ignore next (Not reachable. All possible types have been considered)
6383
-
6384
-
6385
- invariant(0, 'Unexpected kind: ' + inspect(kind));
6386
- }
6387
-
6388
- // Spec Section: "Executable Definitions"
6389
- /**
6390
- * @internal
6391
- */
6392
-
6393
- Object.freeze([LoneSchemaDefinitionRule, UniqueOperationTypesRule, UniqueTypeNamesRule, UniqueEnumValueNamesRule, UniqueFieldDefinitionNamesRule, UniqueDirectiveNamesRule, KnownTypeNamesRule, KnownDirectivesRule, UniqueDirectivesPerLocationRule, PossibleTypeExtensionsRule, KnownArgumentNamesOnDirectivesRule, UniqueArgumentNamesRule, UniqueInputFieldNamesRule, ProvidedRequiredArgumentsOnDirectivesRule]);
5564
+ (_defKindToExtKind = {}, _defineProperty$1(_defKindToExtKind, Kind.SCALAR_TYPE_DEFINITION, Kind.SCALAR_TYPE_EXTENSION), _defineProperty$1(_defKindToExtKind, Kind.OBJECT_TYPE_DEFINITION, Kind.OBJECT_TYPE_EXTENSION), _defineProperty$1(_defKindToExtKind, Kind.INTERFACE_TYPE_DEFINITION, Kind.INTERFACE_TYPE_EXTENSION), _defineProperty$1(_defKindToExtKind, Kind.UNION_TYPE_DEFINITION, Kind.UNION_TYPE_EXTENSION), _defineProperty$1(_defKindToExtKind, Kind.ENUM_TYPE_DEFINITION, Kind.ENUM_TYPE_EXTENSION), _defineProperty$1(_defKindToExtKind, Kind.INPUT_OBJECT_TYPE_DEFINITION, Kind.INPUT_OBJECT_TYPE_EXTENSION), _defKindToExtKind);
6394
5565
  keyMap(specifiedScalarTypes.concat(introspectionTypes), function (type) {
6395
5566
  return type.name;
6396
5567
  });
@@ -6401,6 +5572,7 @@ keyMap(specifiedScalarTypes.concat(introspectionTypes), function (type) {
6401
5572
  * For full license text, see the LICENSE.txt file
6402
5573
  */
6403
5574
 
5575
+
6404
5576
  var DateLiteral;
6405
5577
  (function (DateLiteral) {
6406
5578
  DateLiteral["NEXT_YEAR"] = "NEXT_YEAR";
@@ -6475,6 +5647,7 @@ var PredicateType;
6475
5647
  * For full license text, see the LICENSE.txt file
6476
5648
  */
6477
5649
 
5650
+
6478
5651
  const { keys, values, create, assign, freeze } = Object;
6479
5652
 
6480
5653
  /**
@@ -6803,6 +5976,7 @@ function getRuntime() {
6803
5976
  }
6804
5977
 
6805
5978
  // so eslint doesn't complain about nimbus
5979
+ /* global __nimbus */
6806
5980
  function ldsRuntimeBridge() {
6807
5981
  if (typeof __nimbus !== 'undefined' &&
6808
5982
  __nimbus.plugins !== undefined &&
@@ -6819,4 +5993,4 @@ function ldsRuntimeBridge() {
6819
5993
  }
6820
5994
 
6821
5995
  export { ldsRuntimeBridge as default };
6822
- // version: 1.235.0-3790decf0
5996
+ // version: 1.236.0-036823f57
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-bridge",
3
- "version": "1.235.0",
3
+ "version": "1.236.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS runtime for bridge.app.",
6
6
  "main": "dist/ldsRuntimeBridge.js",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "scripts": {
28
28
  "prepare": "yarn build",
29
- "build": "rollup --config rollup.config.js",
29
+ "build": "rollup --bundleConfigAsCjs --config rollup.config.js",
30
30
  "test:debug": "node --inspect-brk ../../node_modules/.bin/jest --runInBand",
31
31
  "test:unit": "NODE_ENV=production jest",
32
32
  "test:size": "luvioBundlesize",