@supacloud/cli 0.51.0 → 0.51.2

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.
Files changed (2) hide show
  1. package/dist/index.js +633 -1240
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -186729,6 +186729,9 @@ var init_esm3 = __esm(() => {
186729
186729
  init_utils();
186730
186730
  });
186731
186731
 
186732
+ // node_modules/@graphql-codegen/visitor-plugin-common/esm/avoid-optionals.js
186733
+ var init_avoid_optionals = () => {};
186734
+
186732
186735
  // node_modules/auto-bind/index.js
186733
186736
  function autoBind(self2, { include, exclude } = {}) {
186734
186737
  const filter = (key) => {
@@ -186762,39 +186765,6 @@ var getAllProperties = (object) => {
186762
186765
  return properties;
186763
186766
  };
186764
186767
 
186765
- // node_modules/@graphql-codegen/visitor-plugin-common/esm/avoid-optionals.js
186766
- function normalizeAvoidOptionals(avoidOptionals) {
186767
- if (typeof avoidOptionals === "boolean") {
186768
- return {
186769
- object: avoidOptionals,
186770
- inputValue: avoidOptionals,
186771
- field: avoidOptionals,
186772
- defaultValue: avoidOptionals,
186773
- resolvers: avoidOptionals,
186774
- query: avoidOptionals,
186775
- mutation: avoidOptionals,
186776
- subscription: avoidOptionals
186777
- };
186778
- }
186779
- return {
186780
- ...DEFAULT_AVOID_OPTIONALS,
186781
- ...avoidOptionals
186782
- };
186783
- }
186784
- var DEFAULT_AVOID_OPTIONALS;
186785
- var init_avoid_optionals = __esm(() => {
186786
- DEFAULT_AVOID_OPTIONALS = {
186787
- object: false,
186788
- inputValue: false,
186789
- field: false,
186790
- defaultValue: false,
186791
- resolvers: false,
186792
- query: false,
186793
- mutation: false,
186794
- subscription: false
186795
- };
186796
- });
186797
-
186798
186768
  // node_modules/@graphql-codegen/visitor-plugin-common/esm/mappers.js
186799
186769
  function prepareLegacy(mapper) {
186800
186770
  const isScoped = mapper.includes("\\#");
@@ -186909,15 +186879,6 @@ function addSuffix(element, suffix) {
186909
186879
  function isExternalMapper(value) {
186910
186880
  return value.includes("#");
186911
186881
  }
186912
- function transformDirectiveArgumentAndInputFieldMappings(rawDirectiveArgumentAndInputFieldMappings, directiveArgumentAndInputFieldMappingTypeSuffix) {
186913
- const result = {};
186914
- for (const directive of Object.keys(rawDirectiveArgumentAndInputFieldMappings)) {
186915
- const mapperDef = rawDirectiveArgumentAndInputFieldMappings[directive];
186916
- const parsedMapper = parseMapper(mapperDef, directive, directiveArgumentAndInputFieldMappingTypeSuffix);
186917
- result[directive] = parsedMapper;
186918
- }
186919
- return result;
186920
- }
186921
186882
  var MapperKind3;
186922
186883
  var init_mappers = __esm(() => {
186923
186884
  (function(MapperKind4) {
@@ -188164,33 +188125,7 @@ var init_convert_schema_enum_to_declaration_block_string = __esm(() => {
188164
188125
  });
188165
188126
 
188166
188127
  // node_modules/@graphql-codegen/visitor-plugin-common/esm/declaration-kinds.js
188167
- function normalizeDeclarationKind(declarationKind) {
188168
- if (typeof declarationKind === "string") {
188169
- return {
188170
- directive: declarationKind,
188171
- scalar: declarationKind,
188172
- input: declarationKind,
188173
- type: declarationKind,
188174
- interface: declarationKind,
188175
- arguments: declarationKind
188176
- };
188177
- }
188178
- return {
188179
- ...DEFAULT_DECLARATION_KINDS,
188180
- ...declarationKind
188181
- };
188182
- }
188183
- var DEFAULT_DECLARATION_KINDS;
188184
- var init_declaration_kinds = __esm(() => {
188185
- DEFAULT_DECLARATION_KINDS = {
188186
- directive: "type",
188187
- scalar: "type",
188188
- input: "type",
188189
- type: "type",
188190
- interface: "type",
188191
- arguments: "type"
188192
- };
188193
- });
188128
+ var init_declaration_kinds = () => {};
188194
188129
 
188195
188130
  // node_modules/unc-path-regex/index.js
188196
188131
  var require_unc_path_regex = __commonJS(function(exports, module) {
@@ -188544,7 +188479,6 @@ var init_imports = __esm(() => {
188544
188479
  });
188545
188480
 
188546
188481
  // node_modules/@graphql-codegen/visitor-plugin-common/esm/base-types-visitor.js
188547
- var import_graphql74, BaseTypesVisitor;
188548
188482
  var init_base_types_visitor = __esm(() => {
188549
188483
  init_base_visitor();
188550
188484
  init_convert_schema_enum_to_declaration_block_string();
@@ -188555,358 +188489,6 @@ var init_base_types_visitor = __esm(() => {
188555
188489
  init_scalars();
188556
188490
  init_utils2();
188557
188491
  init_variables_to_object();
188558
- import_graphql74 = __toESM(require_graphql2(), 1);
188559
- BaseTypesVisitor = class BaseTypesVisitor extends BaseVisitor {
188560
- _schema;
188561
- _argumentsTransformer;
188562
- constructor(_schema, rawConfig, additionalConfig, defaultScalars = DEFAULT_SCALARS) {
188563
- super(rawConfig, {
188564
- onlyEnums: getConfigValue(rawConfig.onlyEnums, false),
188565
- onlyOperationTypes: getConfigValue(rawConfig.onlyOperationTypes, false),
188566
- addUnderscoreToArgsType: getConfigValue(rawConfig.addUnderscoreToArgsType, false),
188567
- ignoreEnumValuesFromSchema: getConfigValue(rawConfig.ignoreEnumValuesFromSchema, false),
188568
- declarationKind: normalizeDeclarationKind(rawConfig.declarationKind),
188569
- scalars: buildScalarsFromConfig(_schema, rawConfig, defaultScalars),
188570
- fieldWrapperValue: getConfigValue(rawConfig.fieldWrapperValue, "T"),
188571
- wrapFieldDefinitions: getConfigValue(rawConfig.wrapFieldDefinitions, false),
188572
- entireFieldWrapperValue: getConfigValue(rawConfig.entireFieldWrapperValue, "T"),
188573
- wrapEntireDefinitions: getConfigValue(rawConfig.wrapEntireFieldDefinitions, false),
188574
- directiveArgumentAndInputFieldMappings: transformDirectiveArgumentAndInputFieldMappings(rawConfig.directiveArgumentAndInputFieldMappings ?? {}, rawConfig.directiveArgumentAndInputFieldMappingTypeSuffix),
188575
- addTypename: !rawConfig.skipTypename,
188576
- nonOptionalTypename: getConfigValue(rawConfig.nonOptionalTypename, false),
188577
- ...additionalConfig
188578
- });
188579
- this._schema = _schema;
188580
- this.config.enumValues = parseEnumValues({
188581
- schema: _schema,
188582
- mapOrStr: rawConfig.enumValues,
188583
- ignoreEnumValuesFromSchema: this.config.ignoreEnumValuesFromSchema,
188584
- naming: {
188585
- convert: this.config.convert,
188586
- options: {
188587
- typesPrefix: this.config.typesPrefix,
188588
- typesSuffix: this.config.typesSuffix,
188589
- useTypesPrefix: this.config.enumPrefix,
188590
- useTypesSuffix: this.config.enumSuffix
188591
- }
188592
- }
188593
- });
188594
- this._argumentsTransformer = new OperationVariablesToObject(this.scalars, this.convertName);
188595
- }
188596
- getExportPrefix() {
188597
- return "export ";
188598
- }
188599
- getFieldWrapperValue() {
188600
- if (this.config.fieldWrapperValue) {
188601
- return `${this.getExportPrefix()}type FieldWrapper<T> = ${this.config.fieldWrapperValue};`;
188602
- }
188603
- return "";
188604
- }
188605
- getEntireFieldWrapperValue() {
188606
- if (this.config.entireFieldWrapperValue) {
188607
- return `${this.getExportPrefix()}type EntireFieldWrapper<T> = ${this.config.entireFieldWrapperValue};`;
188608
- }
188609
- return "";
188610
- }
188611
- getScalarsImports() {
188612
- return Object.keys(this.config.scalars).reduce((res, enumName) => {
188613
- const mappedValue = this.config.scalars[enumName];
188614
- if (mappedValue.input.isExternal) {
188615
- res.push(buildTypeImport({
188616
- identifier: mappedValue.input.import,
188617
- source: mappedValue.input.source,
188618
- asDefault: mappedValue.input.default,
188619
- useTypeImports: this.config.useTypeImports
188620
- }));
188621
- }
188622
- if (mappedValue.output.isExternal) {
188623
- res.push(buildTypeImport({
188624
- identifier: mappedValue.output.import,
188625
- source: mappedValue.output.source,
188626
- asDefault: mappedValue.output.default,
188627
- useTypeImports: this.config.useTypeImports
188628
- }));
188629
- }
188630
- return res;
188631
- }, []);
188632
- }
188633
- getDirectiveArgumentAndInputFieldMappingsImports() {
188634
- return Object.keys(this.config.directiveArgumentAndInputFieldMappings).map((directive) => {
188635
- const mappedValue = this.config.directiveArgumentAndInputFieldMappings[directive];
188636
- if (mappedValue.isExternal) {
188637
- return buildTypeImport({
188638
- identifier: mappedValue.import,
188639
- source: mappedValue.source,
188640
- asDefault: mappedValue.default,
188641
- useTypeImports: this.config.useTypeImports
188642
- });
188643
- }
188644
- return null;
188645
- }).filter((a) => a);
188646
- }
188647
- get scalarsDefinition() {
188648
- if (this.config.onlyEnums)
188649
- return "";
188650
- const allScalars = Object.keys(this.config.scalars).map((scalarName) => {
188651
- const inputScalarValue = this.config.scalars[scalarName].input.type;
188652
- const outputScalarValue = this.config.scalars[scalarName].output.type;
188653
- const scalarType = this._schema.getType(scalarName);
188654
- const comment = scalarType?.astNode && scalarType.description ? transformComment(scalarType.description, 1) : "";
188655
- const { scalar } = this._parsedConfig.declarationKind;
188656
- return comment + indent3(`${scalarName}: { input: ${inputScalarValue}${this.getPunctuation(scalar)} output: ${outputScalarValue}${this.getPunctuation(scalar)} }`);
188657
- });
188658
- return new DeclarationBlock(this._declarationBlockConfig).export().asKind(this._parsedConfig.declarationKind.scalar).withName("Scalars").withComment("All built-in and custom scalars, mapped to their actual values").withBlock(allScalars.join(`
188659
- `)).string;
188660
- }
188661
- get directiveArgumentAndInputFieldMappingsDefinition() {
188662
- const directiveEntries = Object.entries(this.config.directiveArgumentAndInputFieldMappings);
188663
- if (directiveEntries.length === 0) {
188664
- return "";
188665
- }
188666
- const allDirectives = [];
188667
- for (const [directiveName, parsedMapper] of directiveEntries) {
188668
- const directiveType = this._schema.getDirective(directiveName);
188669
- const comment = directiveType?.astNode && directiveType.description ? transformComment(directiveType.description, 1) : "";
188670
- const { directive } = this._parsedConfig.declarationKind;
188671
- allDirectives.push(comment + indent3(`${directiveName}: ${parsedMapper.type}${this.getPunctuation(directive)}`));
188672
- }
188673
- return new DeclarationBlock(this._declarationBlockConfig).export().asKind(this._parsedConfig.declarationKind.directive).withName("DirectiveArgumentAndInputFieldMappings").withComment("Type overrides using directives").withBlock(allDirectives.join(`
188674
- `)).string;
188675
- }
188676
- setDeclarationBlockConfig(config) {
188677
- this._declarationBlockConfig = config;
188678
- }
188679
- setArgumentsTransformer(argumentsTransfomer) {
188680
- this._argumentsTransformer = argumentsTransfomer;
188681
- }
188682
- NonNullType(node) {
188683
- const asString = node.type;
188684
- return asString;
188685
- }
188686
- getInputObjectDeclarationBlock(node) {
188687
- return new DeclarationBlock(this._declarationBlockConfig).export().asKind(this._parsedConfig.declarationKind.input).withName(this.convertName(node)).withComment(node.description?.value).withBlock(node.fields.join(`
188688
- `));
188689
- }
188690
- getInputObjectOneOfDeclarationBlock(node) {
188691
- const declarationKind = node.fields.length === 1 ? this._parsedConfig.declarationKind.input : "type";
188692
- return new DeclarationBlock(this._declarationBlockConfig).export().asKind(declarationKind).withName(this.convertName(node)).withComment(node.description?.value).withContent(`
188693
- ` + node.fields.join(`
188694
- |`));
188695
- }
188696
- InputObjectTypeDefinition(node) {
188697
- if (this.config.onlyEnums)
188698
- return "";
188699
- if (isOneOfInputObjectType(this._schema.getType(node.name.value))) {
188700
- return this.getInputObjectOneOfDeclarationBlock(node).string;
188701
- }
188702
- return this.getInputObjectDeclarationBlock(node).string;
188703
- }
188704
- InputValueDefinition(node) {
188705
- if (this.config.onlyEnums)
188706
- return "";
188707
- const comment = transformComment(node.description.value, 1);
188708
- const { input } = this._parsedConfig.declarationKind;
188709
- let type = node.type;
188710
- if (node.directives && this.config.directiveArgumentAndInputFieldMappings) {
188711
- type = this._getDirectiveOverrideType(node.directives) || type;
188712
- }
188713
- return comment + indent3(`${node.name.value}: ${type}${this.getPunctuation(input)}`);
188714
- }
188715
- FieldDefinition(node) {
188716
- if (this.config.onlyEnums)
188717
- return "";
188718
- const typeString = node.type;
188719
- const { type } = this._parsedConfig.declarationKind;
188720
- const comment = getNodeComment(node);
188721
- return comment + indent3(`${node.name.value}: ${typeString}${this.getPunctuation(type)}`);
188722
- }
188723
- UnionTypeDefinition(node, key, parent) {
188724
- if (this.config.onlyOperationTypes || this.config.onlyEnums)
188725
- return "";
188726
- const originalNode = parent[key];
188727
- const possibleTypes = originalNode.types.map((t) => this.scalars[t.name.value] ? this._getScalar(t.name.value, "output") : this.convertName(t)).join(" | ");
188728
- return new DeclarationBlock(this._declarationBlockConfig).export().asKind("type").withName(this.convertName(node)).withComment(node.description.value).withContent(possibleTypes).string;
188729
- }
188730
- mergeInterfaces(interfaces, hasOtherFields) {
188731
- return interfaces.join(" & ") + (interfaces.length && hasOtherFields ? " & " : "");
188732
- }
188733
- appendInterfacesAndFieldsToBlock(block3, interfaces, fields2) {
188734
- block3.withContent(this.mergeInterfaces(interfaces, fields2.length > 0));
188735
- block3.withBlock(this.mergeAllFields(fields2, interfaces.length > 0));
188736
- }
188737
- getObjectTypeDeclarationBlock(node, originalNode) {
188738
- const optionalTypename = this.config.nonOptionalTypename ? "__typename" : "__typename?";
188739
- const { type, interface: interfacesType } = this._parsedConfig.declarationKind;
188740
- const allFields = [
188741
- ...this.config.addTypename ? [
188742
- indent3(`${this.config.immutableTypes ? "readonly " : ""}${optionalTypename}: '${node.name.value}'${this.getPunctuation(type)}`)
188743
- ] : [],
188744
- ...node.fields
188745
- ];
188746
- const interfacesNames = originalNode.interfaces ? originalNode.interfaces.map((i) => this.convertName(i)) : [];
188747
- const declarationBlock = new DeclarationBlock(this._declarationBlockConfig).export().asKind(type).withName(this.convertName(node)).withComment(node.description?.value);
188748
- if (type === "interface" || type === "class") {
188749
- if (interfacesNames.length > 0) {
188750
- const keyword = interfacesType === "interface" && type === "class" ? "implements" : "extends";
188751
- declarationBlock.withContent(`${keyword} ` + interfacesNames.join(", ") + (allFields.length > 0 ? " " : " {}"));
188752
- }
188753
- declarationBlock.withBlock(this.mergeAllFields(allFields, false));
188754
- } else {
188755
- this.appendInterfacesAndFieldsToBlock(declarationBlock, interfacesNames, allFields);
188756
- }
188757
- return declarationBlock;
188758
- }
188759
- mergeAllFields(allFields, _hasInterfaces) {
188760
- return allFields.join(`
188761
- `);
188762
- }
188763
- ObjectTypeDefinition(node, key, parent) {
188764
- if (this.config.onlyOperationTypes || this.config.onlyEnums)
188765
- return "";
188766
- const originalNode = parent[key];
188767
- return [
188768
- this.getObjectTypeDeclarationBlock(node, originalNode).string,
188769
- this.buildArgumentsBlock(originalNode)
188770
- ].filter((f) => f).join(`
188771
-
188772
- `);
188773
- }
188774
- getInterfaceTypeDeclarationBlock(node, _originalNode) {
188775
- const declarationBlock = new DeclarationBlock(this._declarationBlockConfig).export().asKind(this._parsedConfig.declarationKind.interface).withName(this.convertName(node)).withComment(node.description?.value);
188776
- return declarationBlock.withBlock(node.fields.join(`
188777
- `));
188778
- }
188779
- InterfaceTypeDefinition(node, key, parent) {
188780
- if (this.config.onlyOperationTypes || this.config.onlyEnums)
188781
- return "";
188782
- const originalNode = parent[key];
188783
- return [
188784
- this.getInterfaceTypeDeclarationBlock(node, originalNode).string,
188785
- this.buildArgumentsBlock(originalNode)
188786
- ].filter((f) => f).join(`
188787
-
188788
- `);
188789
- }
188790
- ScalarTypeDefinition(_node) {
188791
- return "";
188792
- }
188793
- getEnumsImports() {
188794
- return getEnumsImports({
188795
- enumValues: this.config.enumValues,
188796
- useTypeImports: this.config.useTypeImports
188797
- });
188798
- }
188799
- EnumTypeDefinition(node) {
188800
- const enumName = node.name.value;
188801
- if (this.config.enumValues[enumName]?.sourceFile) {
188802
- return null;
188803
- }
188804
- return new DeclarationBlock(this._declarationBlockConfig).export().asKind("enum").withName(this.convertName(node, {
188805
- useTypesPrefix: this.config.enumPrefix,
188806
- useTypesSuffix: this.config.enumSuffix
188807
- })).withComment(node.description.value).withBlock(buildEnumValuesBlock({
188808
- typeName: enumName,
188809
- values: node.values,
188810
- schema: this._schema,
188811
- naming: {
188812
- convert: this.config.convert,
188813
- options: {
188814
- typesPrefix: this.config.typesPrefix,
188815
- useTypesPrefix: this.config.enumPrefix,
188816
- typesSuffix: this.config.typesSuffix,
188817
- useTypesSuffix: this.config.enumSuffix
188818
- }
188819
- },
188820
- ignoreEnumValuesFromSchema: this.config.ignoreEnumValuesFromSchema,
188821
- declarationBlockConfig: this._declarationBlockConfig,
188822
- enumValues: this.config.enumValues
188823
- })).string;
188824
- }
188825
- makeValidEnumIdentifier(identifier) {
188826
- if (/^[0-9]/.exec(identifier)) {
188827
- return wrapWithSingleQuotes(identifier, true);
188828
- }
188829
- return identifier;
188830
- }
188831
- DirectiveDefinition(_node) {
188832
- return "";
188833
- }
188834
- getArgumentsObjectDeclarationBlock(node, name, field) {
188835
- return new DeclarationBlock(this._declarationBlockConfig).export().asKind(this._parsedConfig.declarationKind.arguments).withName(this.convertName(name)).withComment(node.description?.value).withBlock(this._argumentsTransformer.transform(field.arguments));
188836
- }
188837
- getArgumentsObjectTypeDefinition(node, name, field) {
188838
- if (this.config.onlyEnums)
188839
- return "";
188840
- return this.getArgumentsObjectDeclarationBlock(node, name, field).string;
188841
- }
188842
- buildArgumentsBlock(node) {
188843
- const fieldsWithArguments = node.fields.filter((field) => field.arguments && field.arguments.length > 0) || [];
188844
- return fieldsWithArguments.map((field) => {
188845
- const name = node.name.value + (this.config.addUnderscoreToArgsType ? "_" : "") + this.convertName(field, {
188846
- useTypesPrefix: false,
188847
- useTypesSuffix: false
188848
- }) + "Args";
188849
- return this.getArgumentsObjectTypeDefinition(node, name, field);
188850
- }).join(`
188851
-
188852
- `);
188853
- }
188854
- _getScalar(name, type) {
188855
- return `Scalars['${name}']['${type}']`;
188856
- }
188857
- _getDirectiveArgumentNadInputFieldMapping(name) {
188858
- return `DirectiveArgumentAndInputFieldMappings['${name}']`;
188859
- }
188860
- _getDirectiveOverrideType(directives2) {
188861
- const type = directives2.map((directive) => {
188862
- const directiveName = directive.name.value;
188863
- if (this.config.directiveArgumentAndInputFieldMappings[directiveName]) {
188864
- return this._getDirectiveArgumentNadInputFieldMapping(directiveName);
188865
- }
188866
- return null;
188867
- }).reverse().find((a) => !!a);
188868
- return type || null;
188869
- }
188870
- _getTypeForNode(node, isVisitingInputType) {
188871
- const typeAsString = node.name.value;
188872
- if (this.scalars[typeAsString]) {
188873
- return this._getScalar(typeAsString, isVisitingInputType ? "input" : "output");
188874
- }
188875
- if (this.config.enumValues[typeAsString]) {
188876
- return this.config.enumValues[typeAsString].typeIdentifierConverted;
188877
- }
188878
- const schemaType = this._schema.getType(typeAsString);
188879
- if (schemaType && import_graphql74.isEnumType(schemaType)) {
188880
- return this.convertName(node, {
188881
- useTypesPrefix: this.config.enumPrefix,
188882
- useTypesSuffix: this.config.enumSuffix
188883
- });
188884
- }
188885
- return this.convertName(node);
188886
- }
188887
- NamedType(node, key, parent, path, ancestors) {
188888
- const currentVisitContext = this.getVisitorKindContextFromAncestors(ancestors);
188889
- const isVisitingInputType = currentVisitContext.includes(import_graphql74.Kind.INPUT_OBJECT_TYPE_DEFINITION);
188890
- const typeToUse = this._getTypeForNode(node, isVisitingInputType);
188891
- if (!isVisitingInputType && this.config.fieldWrapperValue && this.config.wrapFieldDefinitions) {
188892
- return `FieldWrapper<${typeToUse}>`;
188893
- }
188894
- return typeToUse;
188895
- }
188896
- ListType(node, _key, _parent, _path, _ancestors) {
188897
- const asString = node.type;
188898
- return this.wrapWithListType(asString);
188899
- }
188900
- SchemaDefinition() {
188901
- return null;
188902
- }
188903
- SchemaExtension() {
188904
- return null;
188905
- }
188906
- wrapWithListType(str) {
188907
- return `Array<${str}>`;
188908
- }
188909
- };
188910
188492
  });
188911
188493
 
188912
188494
  // node_modules/dependency-graph/lib/dep_graph.js
@@ -189893,7 +189475,7 @@ var require_main = __commonJS(function(exports, module) {
189893
189475
  });
189894
189476
 
189895
189477
  // node_modules/@graphql-tools/optimize/esm/optimizers/remove-description.js
189896
- var import_graphql75, removeDescriptions = (input) => {
189478
+ var import_graphql74, removeDescriptions = (input) => {
189897
189479
  function transformNode(node) {
189898
189480
  if (!node.description) {
189899
189481
  return node;
@@ -189901,7 +189483,7 @@ var import_graphql75, removeDescriptions = (input) => {
189901
189483
  const { description, ...rest } = node;
189902
189484
  return rest;
189903
189485
  }
189904
- return import_graphql75.visit(input, {
189486
+ return import_graphql74.visit(input, {
189905
189487
  ScalarTypeDefinition: transformNode,
189906
189488
  ObjectTypeDefinition: transformNode,
189907
189489
  InterfaceTypeDefinition: transformNode,
@@ -189920,11 +189502,11 @@ var import_graphql75, removeDescriptions = (input) => {
189920
189502
  });
189921
189503
  };
189922
189504
  var init_remove_description = __esm(() => {
189923
- import_graphql75 = __toESM(require_graphql2(), 1);
189505
+ import_graphql74 = __toESM(require_graphql2(), 1);
189924
189506
  });
189925
189507
 
189926
189508
  // node_modules/@graphql-tools/optimize/esm/optimizers/remove-empty-nodes.js
189927
- var import_graphql76, removeEmptyNodes = (input) => {
189509
+ var import_graphql75, removeEmptyNodes = (input) => {
189928
189510
  function transformNode(node) {
189929
189511
  let resultNode = node;
189930
189512
  if (resultNode.directives && Array.isArray(resultNode.directives) && resultNode.directives.length === 0) {
@@ -189941,7 +189523,7 @@ var import_graphql76, removeEmptyNodes = (input) => {
189941
189523
  }
189942
189524
  return resultNode;
189943
189525
  }
189944
- return import_graphql76.visit(input, {
189526
+ return import_graphql75.visit(input, {
189945
189527
  FragmentDefinition: transformNode,
189946
189528
  OperationDefinition: transformNode,
189947
189529
  VariableDefinition: transformNode,
@@ -189970,11 +189552,11 @@ var import_graphql76, removeEmptyNodes = (input) => {
189970
189552
  });
189971
189553
  };
189972
189554
  var init_remove_empty_nodes = __esm(() => {
189973
- import_graphql76 = __toESM(require_graphql2(), 1);
189555
+ import_graphql75 = __toESM(require_graphql2(), 1);
189974
189556
  });
189975
189557
 
189976
189558
  // node_modules/@graphql-tools/optimize/esm/optimizers/remove-loc.js
189977
- var import_graphql77, removeLoc = (input) => {
189559
+ var import_graphql76, removeLoc = (input) => {
189978
189560
  function transformNode(node) {
189979
189561
  if (node.loc && typeof node.loc === "object") {
189980
189562
  const { loc, ...rest } = node;
@@ -189982,10 +189564,10 @@ var import_graphql77, removeLoc = (input) => {
189982
189564
  }
189983
189565
  return node;
189984
189566
  }
189985
- return import_graphql77.visit(input, { enter: transformNode });
189567
+ return import_graphql76.visit(input, { enter: transformNode });
189986
189568
  };
189987
189569
  var init_remove_loc = __esm(() => {
189988
- import_graphql77 = __toESM(require_graphql2(), 1);
189570
+ import_graphql76 = __toESM(require_graphql2(), 1);
189989
189571
  });
189990
189572
 
189991
189573
  // node_modules/@graphql-tools/optimize/esm/optimize.js
@@ -190025,7 +189607,7 @@ var init_esm4 = __esm(() => {
190025
189607
 
190026
189608
  // node_modules/@graphql-codegen/visitor-plugin-common/esm/client-side-base-visitor.js
190027
189609
  import { basename as basename4, extname } from "path";
190028
- var import_dependency_graph, import_graphql78, import_graphql_tag, DocumentMode, EXTENSIONS_TO_REMOVE, ClientSideBaseVisitor;
189610
+ var import_dependency_graph, import_graphql77, import_graphql_tag, DocumentMode, EXTENSIONS_TO_REMOVE, ClientSideBaseVisitor;
190029
189611
  var init_client_side_base_visitor = __esm(() => {
190030
189612
  init_dist();
190031
189613
  init_esm3();
@@ -190034,7 +189616,7 @@ var init_client_side_base_visitor = __esm(() => {
190034
189616
  init_imports();
190035
189617
  init_utils2();
190036
189618
  import_dependency_graph = __toESM(require_dep_graph(), 1);
190037
- import_graphql78 = __toESM(require_graphql2(), 1);
189619
+ import_graphql77 = __toESM(require_graphql2(), 1);
190038
189620
  import_graphql_tag = __toESM(require_main(), 1);
190039
189621
  import_graphql_tag.default.enableExperimentalFragmentVariables();
190040
189622
  (function(DocumentMode2) {
@@ -190115,7 +189697,7 @@ var init_client_side_base_visitor = __esm(() => {
190115
189697
  _includeFragments(fragments, nodeKind) {
190116
189698
  if (fragments && fragments.length > 0) {
190117
189699
  if (this.config.documentMode === DocumentMode.documentNode || this.config.documentMode === DocumentMode.string) {
190118
- return Array.from(this._fragments.values()).filter((f) => fragments.includes(this.getFragmentVariableName(f.name))).map((fragment) => import_graphql78.print(fragment.node)).join(`
189700
+ return Array.from(this._fragments.values()).filter((f) => fragments.includes(this.getFragmentVariableName(f.name))).map((fragment) => import_graphql77.print(fragment.node)).join(`
190119
189701
  `);
190120
189702
  }
190121
189703
  if (this.config.documentMode === DocumentMode.documentNodeImportFragments) {
@@ -190137,7 +189719,7 @@ var init_client_side_base_visitor = __esm(() => {
190137
189719
  const fragmentNames = this._extractFragments(node, includeNestedFragments);
190138
189720
  const fragments = this._transformFragments(fragmentNames);
190139
189721
  const doc = this._prepareDocument(`
190140
- ${import_graphql78.print(node).split("\\").join("\\\\")}
189722
+ ${import_graphql77.print(node).split("\\").join("\\\\")}
190141
189723
  ${this._includeFragments(fragments, node.kind)}`);
190142
189724
  if (this.config.documentMode === DocumentMode.documentNode) {
190143
189725
  let gqlObj = import_graphql_tag.default([doc]);
@@ -190160,7 +189742,7 @@ var init_client_side_base_visitor = __esm(() => {
190160
189742
  if (this.config.optimizeDocumentNode) {
190161
189743
  definitions = [
190162
189744
  ...optimizeDocumentNode({
190163
- kind: import_graphql78.Kind.DOCUMENT,
189745
+ kind: import_graphql77.Kind.DOCUMENT,
190164
189746
  definitions
190165
189747
  }).definitions
190166
189748
  ];
@@ -190175,17 +189757,17 @@ var init_client_side_base_visitor = __esm(() => {
190175
189757
  metaString = `"__meta__":${JSON.stringify(meta)},`;
190176
189758
  }
190177
189759
  }
190178
- return `{${metaString}"kind":"${import_graphql78.Kind.DOCUMENT}","definitions":${jsonStringify(definitions)}}`;
189760
+ return `{${metaString}"kind":"${import_graphql77.Kind.DOCUMENT}","definitions":${jsonStringify(definitions)}}`;
190179
189761
  }
190180
189762
  if (this.config.documentMode === DocumentMode.string) {
190181
- if (node.kind === import_graphql78.Kind.FRAGMENT_DEFINITION) {
189763
+ if (node.kind === import_graphql77.Kind.FRAGMENT_DEFINITION) {
190182
189764
  const meta = this._getGraphQLCodegenMetadata(node, import_graphql_tag.default([doc]).definitions);
190183
189765
  return `new TypedDocumentString(\`${doc}\`, ${JSON.stringify({
190184
189766
  fragmentName: node.name.value,
190185
189767
  ...meta
190186
189768
  })})`;
190187
189769
  }
190188
- if (this._onExecutableDocumentNode && node.kind === import_graphql78.Kind.OPERATION_DEFINITION) {
189770
+ if (this._onExecutableDocumentNode && node.kind === import_graphql77.Kind.OPERATION_DEFINITION) {
190189
189771
  const meta = this._getGraphQLCodegenMetadata(node, import_graphql_tag.default([doc]).definitions);
190190
189772
  if (meta) {
190191
189773
  if (this._omitDefinitions === true) {
@@ -190201,9 +189783,9 @@ var init_client_side_base_visitor = __esm(() => {
190201
189783
  }
190202
189784
  _getGraphQLCodegenMetadata(node, definitions) {
190203
189785
  let meta;
190204
- if (node.kind === import_graphql78.Kind.OPERATION_DEFINITION) {
189786
+ if (node.kind === import_graphql77.Kind.OPERATION_DEFINITION) {
190205
189787
  meta = this._onExecutableDocumentNode({
190206
- kind: import_graphql78.Kind.DOCUMENT,
189788
+ kind: import_graphql77.Kind.DOCUMENT,
190207
189789
  definitions
190208
189790
  });
190209
189791
  }
@@ -190221,19 +189803,19 @@ var init_client_side_base_visitor = __esm(() => {
190221
189803
  const queue = [...node.selectionSet.selections];
190222
189804
  while (queue.length) {
190223
189805
  const selection = queue.shift();
190224
- if (selection.kind === import_graphql78.Kind.FRAGMENT_SPREAD && selection.directives?.some((d) => d.name.value === "defer")) {
189806
+ if (selection.kind === import_graphql77.Kind.FRAGMENT_SPREAD && selection.directives?.some((d) => d.name.value === "defer")) {
190225
189807
  const fragmentName = selection.name.value;
190226
189808
  const fragment = this.fragmentsGraph.getNodeData(fragmentName);
190227
189809
  if (fragment) {
190228
189810
  const fields2 = fragment.node.selectionSet.selections.reduce((acc, selection2) => {
190229
- if (selection2.kind === import_graphql78.Kind.FIELD) {
189811
+ if (selection2.kind === import_graphql77.Kind.FIELD) {
190230
189812
  acc.push(selection2.name.value);
190231
189813
  }
190232
189814
  return acc;
190233
189815
  }, []);
190234
189816
  deferredFields[fragmentName] = fields2;
190235
189817
  }
190236
- } else if (selection.kind === import_graphql78.Kind.FIELD && selection.selectionSet) {
189818
+ } else if (selection.kind === import_graphql77.Kind.FIELD && selection.selectionSet) {
190237
189819
  queue.push(...selection.selectionSet.selections);
190238
189820
  }
190239
189821
  }
@@ -190253,8 +189835,8 @@ var init_client_side_base_visitor = __esm(() => {
190253
189835
  const graph = new import_dependency_graph.DepGraph({ circular: true });
190254
189836
  for (const fragment of this._fragments.values()) {
190255
189837
  if (graph.hasNode(fragment.name)) {
190256
- const cachedAsString = import_graphql78.print(graph.getNodeData(fragment.name).node);
190257
- const asString = import_graphql78.print(fragment.node);
189838
+ const cachedAsString = import_graphql77.print(graph.getNodeData(fragment.name).node);
189839
+ const asString = import_graphql77.print(fragment.node);
190258
189840
  if (cachedAsString !== asString) {
190259
189841
  throw new Error(`Duplicated fragment called '${fragment.name}'!`);
190260
189842
  }
@@ -190400,7 +189982,7 @@ var init_client_side_base_visitor = __esm(() => {
190400
189982
  if (variables.length === 0) {
190401
189983
  return false;
190402
189984
  }
190403
- return variables.some((variableDef) => variableDef.type.kind === import_graphql78.Kind.NON_NULL_TYPE && !variableDef.defaultValue);
189985
+ return variables.some((variableDef) => variableDef.type.kind === import_graphql77.Kind.NON_NULL_TYPE && !variableDef.defaultValue);
190404
189986
  }
190405
189987
  getOperationVariableName(node) {
190406
189988
  return this.convertName(node, {
@@ -199800,8 +199382,8 @@ function createGraphQLError4(message, options) {
199800
199382
  if (options?.originalError && !(options.originalError instanceof Error) && isGraphQLErrorLike4(options.originalError)) {
199801
199383
  options.originalError = createGraphQLError4(options.originalError.message, options.originalError);
199802
199384
  }
199803
- const Constructor2 = import_graphql79.GraphQLError;
199804
- const error = import_graphql79.versionInfo.major >= 16 ? new Constructor2(message, options) : new Constructor2(message, options?.nodes, options?.source, options?.positions, options?.path, options?.originalError, options?.extensions);
199385
+ const Constructor2 = import_graphql78.GraphQLError;
199386
+ const error = import_graphql78.versionInfo.major >= 16 ? new Constructor2(message, options) : new Constructor2(message, options?.nodes, options?.source, options?.positions, options?.path, options?.originalError, options?.extensions);
199805
199387
  if (options?.coordinate && error.coordinate == null) {
199806
199388
  Object.defineProperties(error, {
199807
199389
  coordinate: { value: options.coordinate, enumerable: true, configurable: true }
@@ -199809,9 +199391,9 @@ function createGraphQLError4(message, options) {
199809
199391
  }
199810
199392
  return error;
199811
199393
  }
199812
- var import_graphql79, possibleGraphQLErrorProperties4;
199394
+ var import_graphql78, possibleGraphQLErrorProperties4;
199813
199395
  var init_errors2 = __esm(() => {
199814
- import_graphql79 = __toESM(require_graphql2(), 1);
199396
+ import_graphql78 = __toESM(require_graphql2(), 1);
199815
199397
  possibleGraphQLErrorProperties4 = [
199816
199398
  "message",
199817
199399
  "locations",
@@ -199851,10 +199433,10 @@ function getArgumentValues5(def, node, variableValues = {}) {
199851
199433
  const argumentNode = argNodeMap[arg.name];
199852
199434
  if (!argumentNode) {
199853
199435
  if ("default" in arg && arg.default) {
199854
- coercedValues[arg.name] = "value" in arg.default ? arg.default.value : import_graphql80.valueFromASTUntyped(arg.default.literal);
199436
+ coercedValues[arg.name] = "value" in arg.default ? arg.default.value : import_graphql79.valueFromASTUntyped(arg.default.literal);
199855
199437
  } else if (arg.defaultValue !== undefined) {
199856
199438
  coercedValues[arg.name] = arg.defaultValue;
199857
- } else if (import_graphql80.isNonNullType(arg.type)) {
199439
+ } else if (import_graphql79.isNonNullType(arg.type)) {
199858
199440
  throw createGraphQLError4(`Argument "${arg.name}" of required type "${inspect(arg.type)}" ` + "was not provided.", {
199859
199441
  nodes: [node]
199860
199442
  });
@@ -199862,13 +199444,13 @@ function getArgumentValues5(def, node, variableValues = {}) {
199862
199444
  continue;
199863
199445
  }
199864
199446
  const valueNode = argumentNode.value;
199865
- let isNull = valueNode.kind === import_graphql80.Kind.NULL;
199866
- if (valueNode.kind === import_graphql80.Kind.VARIABLE) {
199447
+ let isNull = valueNode.kind === import_graphql79.Kind.NULL;
199448
+ if (valueNode.kind === import_graphql79.Kind.VARIABLE) {
199867
199449
  const variableName = valueNode.name.value;
199868
199450
  if (variableValues == null || !hasOwnProperty4(variableValues, variableName)) {
199869
199451
  if (arg.defaultValue !== undefined) {
199870
199452
  coercedValues[arg.name] = arg.defaultValue;
199871
- } else if (import_graphql80.isNonNullType(arg.type)) {
199453
+ } else if (import_graphql79.isNonNullType(arg.type)) {
199872
199454
  throw createGraphQLError4(`Argument "${arg.name}" of required type "${inspect(arg.type)}" ` + `was provided the variable "$${variableName}" which was not provided a runtime value.`, {
199873
199455
  nodes: [valueNode]
199874
199456
  });
@@ -199877,14 +199459,14 @@ function getArgumentValues5(def, node, variableValues = {}) {
199877
199459
  }
199878
199460
  isNull = variableValues[variableName] == null;
199879
199461
  }
199880
- if (isNull && import_graphql80.isNonNullType(arg.type)) {
199462
+ if (isNull && import_graphql79.isNonNullType(arg.type)) {
199881
199463
  throw createGraphQLError4(`Argument "${arg.name}" of non-null type "${inspect(arg.type)}" ` + "must not be null.", {
199882
199464
  nodes: [valueNode]
199883
199465
  });
199884
199466
  }
199885
- const coercedValue = import_graphql80.valueFromAST(valueNode, arg.type, variableValues);
199467
+ const coercedValue = import_graphql79.valueFromAST(valueNode, arg.type, variableValues);
199886
199468
  if (coercedValue === undefined) {
199887
- throw createGraphQLError4(`Argument "${arg.name}" has invalid value ${import_graphql80.print(valueNode)}.`, {
199469
+ throw createGraphQLError4(`Argument "${arg.name}" has invalid value ${import_graphql79.print(valueNode)}.`, {
199888
199470
  nodes: [valueNode]
199889
199471
  });
199890
199472
  }
@@ -199892,11 +199474,11 @@ function getArgumentValues5(def, node, variableValues = {}) {
199892
199474
  }
199893
199475
  return coercedValues;
199894
199476
  }
199895
- var import_graphql80;
199477
+ var import_graphql79;
199896
199478
  var init_getArgumentValues2 = __esm(() => {
199897
199479
  init_errors2();
199898
199480
  init_jsutils2();
199899
- import_graphql80 = __toESM(require_graphql2(), 1);
199481
+ import_graphql79 = __toESM(require_graphql2(), 1);
199900
199482
  });
199901
199483
 
199902
199484
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/memoize.js
@@ -200049,11 +199631,11 @@ function getDirectiveExtensions5(directableObj, schema, pathToDirectivesInExtens
200049
199631
  if (value[argName] == null) {
200050
199632
  const argInDirective = directiveInSchema?.args.find((arg) => arg.name === argName);
200051
199633
  if (argInDirective) {
200052
- value[argName] = import_graphql81.valueFromAST(argNode.value, argInDirective.type);
199634
+ value[argName] = import_graphql80.valueFromAST(argNode.value, argInDirective.type);
200053
199635
  }
200054
199636
  }
200055
199637
  if (value[argName] == null) {
200056
- value[argName] = import_graphql81.valueFromASTUntyped(argNode.value);
199638
+ value[argName] = import_graphql80.valueFromASTUntyped(argNode.value);
200057
199639
  }
200058
199640
  }
200059
199641
  }
@@ -200069,10 +199651,10 @@ function getDirectiveExtensions5(directableObj, schema, pathToDirectivesInExtens
200069
199651
  }
200070
199652
  return directiveExtensions;
200071
199653
  }
200072
- var import_graphql81;
199654
+ var import_graphql80;
200073
199655
  var init_getDirectiveExtensions2 = __esm(() => {
200074
199656
  init_getArgumentValues2();
200075
- import_graphql81 = __toESM(require_graphql2(), 1);
199657
+ import_graphql80 = __toESM(require_graphql2(), 1);
200076
199658
  });
200077
199659
 
200078
199660
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/get-directives.js
@@ -200095,38 +199677,38 @@ var init_get_arguments_with_directives2 = () => {};
200095
199677
 
200096
199678
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/astFromType.js
200097
199679
  function astFromType5(type) {
200098
- if (import_graphql82.isNonNullType(type)) {
199680
+ if (import_graphql81.isNonNullType(type)) {
200099
199681
  const innerType = astFromType5(type.ofType);
200100
- if (innerType.kind === import_graphql82.Kind.NON_NULL_TYPE) {
199682
+ if (innerType.kind === import_graphql81.Kind.NON_NULL_TYPE) {
200101
199683
  throw new Error(`Invalid type node ${inspect(type)}. Inner type of non-null type cannot be a non-null type.`);
200102
199684
  }
200103
199685
  return {
200104
- kind: import_graphql82.Kind.NON_NULL_TYPE,
199686
+ kind: import_graphql81.Kind.NON_NULL_TYPE,
200105
199687
  type: innerType
200106
199688
  };
200107
- } else if (import_graphql82.isListType(type)) {
199689
+ } else if (import_graphql81.isListType(type)) {
200108
199690
  return {
200109
- kind: import_graphql82.Kind.LIST_TYPE,
199691
+ kind: import_graphql81.Kind.LIST_TYPE,
200110
199692
  type: astFromType5(type.ofType)
200111
199693
  };
200112
199694
  }
200113
199695
  return {
200114
- kind: import_graphql82.Kind.NAMED_TYPE,
199696
+ kind: import_graphql81.Kind.NAMED_TYPE,
200115
199697
  name: {
200116
- kind: import_graphql82.Kind.NAME,
199698
+ kind: import_graphql81.Kind.NAME,
200117
199699
  value: type.name
200118
199700
  }
200119
199701
  };
200120
199702
  }
200121
- var import_graphql82;
199703
+ var import_graphql81;
200122
199704
  var init_astFromType2 = __esm(() => {
200123
- import_graphql82 = __toESM(require_graphql2(), 1);
199705
+ import_graphql81 = __toESM(require_graphql2(), 1);
200124
199706
  });
200125
199707
 
200126
199708
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/astFromValueUntyped.js
200127
199709
  function astFromValueUntyped5(value) {
200128
199710
  if (value === null) {
200129
- return { kind: import_graphql83.Kind.NULL };
199711
+ return { kind: import_graphql82.Kind.NULL };
200130
199712
  }
200131
199713
  if (value === undefined) {
200132
199714
  return null;
@@ -200139,7 +199721,7 @@ function astFromValueUntyped5(value) {
200139
199721
  valuesNodes.push(itemNode);
200140
199722
  }
200141
199723
  }
200142
- return { kind: import_graphql83.Kind.LIST, values: valuesNodes };
199724
+ return { kind: import_graphql82.Kind.LIST, values: valuesNodes };
200143
199725
  }
200144
199726
  if (typeof value === "object") {
200145
199727
  if (value?.toJSON) {
@@ -200151,51 +199733,51 @@ function astFromValueUntyped5(value) {
200151
199733
  const ast = astFromValueUntyped5(fieldValue);
200152
199734
  if (ast) {
200153
199735
  fieldNodes.push({
200154
- kind: import_graphql83.Kind.OBJECT_FIELD,
200155
- name: { kind: import_graphql83.Kind.NAME, value: fieldName },
199736
+ kind: import_graphql82.Kind.OBJECT_FIELD,
199737
+ name: { kind: import_graphql82.Kind.NAME, value: fieldName },
200156
199738
  value: ast
200157
199739
  });
200158
199740
  }
200159
199741
  }
200160
- return { kind: import_graphql83.Kind.OBJECT, fields: fieldNodes };
199742
+ return { kind: import_graphql82.Kind.OBJECT, fields: fieldNodes };
200161
199743
  }
200162
199744
  if (typeof value === "boolean") {
200163
- return { kind: import_graphql83.Kind.BOOLEAN, value };
199745
+ return { kind: import_graphql82.Kind.BOOLEAN, value };
200164
199746
  }
200165
199747
  if (typeof value === "bigint") {
200166
- return { kind: import_graphql83.Kind.INT, value: String(value) };
199748
+ return { kind: import_graphql82.Kind.INT, value: String(value) };
200167
199749
  }
200168
199750
  if (typeof value === "number" && isFinite(value)) {
200169
199751
  const stringNum = String(value);
200170
- return integerStringRegExp7.test(stringNum) ? { kind: import_graphql83.Kind.INT, value: stringNum } : { kind: import_graphql83.Kind.FLOAT, value: stringNum };
199752
+ return integerStringRegExp7.test(stringNum) ? { kind: import_graphql82.Kind.INT, value: stringNum } : { kind: import_graphql82.Kind.FLOAT, value: stringNum };
200171
199753
  }
200172
199754
  if (typeof value === "string") {
200173
- return { kind: import_graphql83.Kind.STRING, value };
199755
+ return { kind: import_graphql82.Kind.STRING, value };
200174
199756
  }
200175
199757
  throw new TypeError(`Cannot convert value to AST: ${value}.`);
200176
199758
  }
200177
- var import_graphql83, integerStringRegExp7;
199759
+ var import_graphql82, integerStringRegExp7;
200178
199760
  var init_astFromValueUntyped2 = __esm(() => {
200179
- import_graphql83 = __toESM(require_graphql2(), 1);
199761
+ import_graphql82 = __toESM(require_graphql2(), 1);
200180
199762
  integerStringRegExp7 = /^-?(?:0|[1-9][0-9]*)$/;
200181
199763
  });
200182
199764
 
200183
199765
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/astFromValue.js
200184
199766
  function astFromValue4(value, type) {
200185
- if (import_graphql84.isNonNullType(type)) {
199767
+ if (import_graphql83.isNonNullType(type)) {
200186
199768
  const astValue = astFromValue4(value, type.ofType);
200187
- if (astValue?.kind === import_graphql84.Kind.NULL) {
199769
+ if (astValue?.kind === import_graphql83.Kind.NULL) {
200188
199770
  return null;
200189
199771
  }
200190
199772
  return astValue;
200191
199773
  }
200192
199774
  if (value === null) {
200193
- return { kind: import_graphql84.Kind.NULL };
199775
+ return { kind: import_graphql83.Kind.NULL };
200194
199776
  }
200195
199777
  if (value === undefined) {
200196
199778
  return null;
200197
199779
  }
200198
- if (import_graphql84.isListType(type)) {
199780
+ if (import_graphql83.isListType(type)) {
200199
199781
  const itemType = type.ofType;
200200
199782
  if (isIterableObject4(value)) {
200201
199783
  const valuesNodes = [];
@@ -200205,11 +199787,11 @@ function astFromValue4(value, type) {
200205
199787
  valuesNodes.push(itemNode);
200206
199788
  }
200207
199789
  }
200208
- return { kind: import_graphql84.Kind.LIST, values: valuesNodes };
199790
+ return { kind: import_graphql83.Kind.LIST, values: valuesNodes };
200209
199791
  }
200210
199792
  return astFromValue4(value, itemType);
200211
199793
  }
200212
- if (import_graphql84.isInputObjectType(type)) {
199794
+ if (import_graphql83.isInputObjectType(type)) {
200213
199795
  if (!isObjectLike4(value)) {
200214
199796
  return null;
200215
199797
  }
@@ -200218,16 +199800,16 @@ function astFromValue4(value, type) {
200218
199800
  const fieldValue = astFromValue4(value[field.name], field.type);
200219
199801
  if (fieldValue) {
200220
199802
  fieldNodes.push({
200221
- kind: import_graphql84.Kind.OBJECT_FIELD,
200222
- name: { kind: import_graphql84.Kind.NAME, value: field.name },
199803
+ kind: import_graphql83.Kind.OBJECT_FIELD,
199804
+ name: { kind: import_graphql83.Kind.NAME, value: field.name },
200223
199805
  value: fieldValue
200224
199806
  });
200225
199807
  }
200226
199808
  }
200227
- return { kind: import_graphql84.Kind.OBJECT, fields: fieldNodes };
199809
+ return { kind: import_graphql83.Kind.OBJECT, fields: fieldNodes };
200228
199810
  }
200229
- if (import_graphql84.isLeafType(type)) {
200230
- if (import_graphql84.isEnumType(type)) {
199811
+ if (import_graphql83.isLeafType(type)) {
199812
+ if (import_graphql83.isEnumType(type)) {
200231
199813
  const values = type.getValues();
200232
199814
  for (const enumValue of values) {
200233
199815
  if (enumValue.value === value) {
@@ -200239,7 +199821,7 @@ function astFromValue4(value, type) {
200239
199821
  break;
200240
199822
  }
200241
199823
  }
200242
- return { kind: import_graphql84.Kind.ENUM, value };
199824
+ return { kind: import_graphql83.Kind.ENUM, value };
200243
199825
  } else {
200244
199826
  value = type.serialize(value);
200245
199827
  }
@@ -200247,21 +199829,21 @@ function astFromValue4(value, type) {
200247
199829
  return null;
200248
199830
  }
200249
199831
  if (type.name === "ID" && typeof value === "string" && integerStringRegExp8.test(value)) {
200250
- return { kind: import_graphql84.Kind.INT, value };
199832
+ return { kind: import_graphql83.Kind.INT, value };
200251
199833
  }
200252
199834
  }
200253
199835
  return astFromValueUntyped5(value);
200254
199836
  }
200255
- var import_graphql84, integerStringRegExp8;
199837
+ var import_graphql83, integerStringRegExp8;
200256
199838
  var init_astFromValue2 = __esm(() => {
200257
199839
  init_astFromValueUntyped2();
200258
199840
  init_jsutils2();
200259
- import_graphql84 = __toESM(require_graphql2(), 1);
199841
+ import_graphql83 = __toESM(require_graphql2(), 1);
200260
199842
  integerStringRegExp8 = /^-?(?:0|[1-9][0-9]*)$/;
200261
199843
  });
200262
199844
 
200263
199845
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/defaultValueAstFromType.js
200264
- var import_graphql85, defaultValueAstFromType4 = (arg) => {
199846
+ var import_graphql84, defaultValueAstFromType4 = (arg) => {
200265
199847
  if ("default" in arg) {
200266
199848
  if (!arg.default) {
200267
199849
  return;
@@ -200269,7 +199851,7 @@ var import_graphql85, defaultValueAstFromType4 = (arg) => {
200269
199851
  if ("value" in arg.default) {
200270
199852
  return astFromValueUntyped5(arg.default.value) ?? undefined;
200271
199853
  }
200272
- const value = import_graphql85.valueFromASTUntyped(arg.default.literal);
199854
+ const value = import_graphql84.valueFromASTUntyped(arg.default.literal);
200273
199855
  return astFromValue4(value, arg.type) ?? undefined;
200274
199856
  }
200275
199857
  return arg.defaultValue !== undefined ? astFromValue4(arg.defaultValue, arg.type) ?? undefined : undefined;
@@ -200277,14 +199859,14 @@ var import_graphql85, defaultValueAstFromType4 = (arg) => {
200277
199859
  var init_defaultValueAstFromType2 = __esm(() => {
200278
199860
  init_astFromValue2();
200279
199861
  init_astFromValueUntyped2();
200280
- import_graphql85 = __toESM(require_graphql2(), 1);
199862
+ import_graphql84 = __toESM(require_graphql2(), 1);
200281
199863
  });
200282
199864
 
200283
199865
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/descriptionFromObject.js
200284
199866
  function getDescriptionNode4(obj) {
200285
199867
  if (typeof obj.description === "string") {
200286
199868
  return {
200287
- kind: import_graphql86.Kind.STRING,
199869
+ kind: import_graphql85.Kind.STRING,
200288
199870
  value: obj.description,
200289
199871
  block: true
200290
199872
  };
@@ -200296,9 +199878,9 @@ function getDescriptionNode4(obj) {
200296
199878
  };
200297
199879
  }
200298
199880
  }
200299
- var import_graphql86;
199881
+ var import_graphql85;
200300
199882
  var init_descriptionFromObject2 = __esm(() => {
200301
- import_graphql86 = __toESM(require_graphql2(), 1);
199883
+ import_graphql85 = __toESM(require_graphql2(), 1);
200302
199884
  });
200303
199885
 
200304
199886
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/rootTypes.js
@@ -200338,42 +199920,42 @@ function getDocumentNodeFromSchema4(schema, options = {}) {
200338
199920
  const definitions = schemaNode != null ? [schemaNode] : [];
200339
199921
  const directives2 = schema.getDirectives();
200340
199922
  for (const directive of directives2) {
200341
- if (import_graphql87.isSpecifiedDirective(directive)) {
199923
+ if (import_graphql86.isSpecifiedDirective(directive)) {
200342
199924
  continue;
200343
199925
  }
200344
199926
  definitions.push(astFromDirective4(directive, schema, pathToDirectivesInExtensions));
200345
199927
  }
200346
199928
  for (const typeName in typesMap) {
200347
199929
  const type = typesMap[typeName];
200348
- const isPredefinedScalar = import_graphql87.isSpecifiedScalarType(type);
200349
- const isIntrospection = import_graphql87.isIntrospectionType(type);
199930
+ const isPredefinedScalar = import_graphql86.isSpecifiedScalarType(type);
199931
+ const isIntrospection = import_graphql86.isIntrospectionType(type);
200350
199932
  if (isPredefinedScalar || isIntrospection) {
200351
199933
  continue;
200352
199934
  }
200353
- if (import_graphql87.isObjectType(type)) {
199935
+ if (import_graphql86.isObjectType(type)) {
200354
199936
  definitions.push(astFromObjectType4(type, schema, pathToDirectivesInExtensions));
200355
- } else if (import_graphql87.isInterfaceType(type)) {
199937
+ } else if (import_graphql86.isInterfaceType(type)) {
200356
199938
  definitions.push(astFromInterfaceType4(type, schema, pathToDirectivesInExtensions));
200357
- } else if (import_graphql87.isUnionType(type)) {
199939
+ } else if (import_graphql86.isUnionType(type)) {
200358
199940
  definitions.push(astFromUnionType4(type, schema, pathToDirectivesInExtensions));
200359
- } else if (import_graphql87.isInputObjectType(type)) {
199941
+ } else if (import_graphql86.isInputObjectType(type)) {
200360
199942
  definitions.push(astFromInputObjectType4(type, schema, pathToDirectivesInExtensions));
200361
- } else if (import_graphql87.isEnumType(type)) {
199943
+ } else if (import_graphql86.isEnumType(type)) {
200362
199944
  definitions.push(astFromEnumType4(type, schema, pathToDirectivesInExtensions));
200363
- } else if (import_graphql87.isScalarType(type)) {
199945
+ } else if (import_graphql86.isScalarType(type)) {
200364
199946
  definitions.push(astFromScalarType4(type, schema, pathToDirectivesInExtensions));
200365
199947
  } else {
200366
199948
  throw new Error(`Unknown type ${type}.`);
200367
199949
  }
200368
199950
  }
200369
199951
  return {
200370
- kind: import_graphql87.Kind.DOCUMENT,
199952
+ kind: import_graphql86.Kind.DOCUMENT,
200371
199953
  definitions
200372
199954
  };
200373
199955
  }
200374
199956
  function printSchemaWithDirectives(schema, options = {}) {
200375
199957
  const documentNode = getDocumentNodeFromSchema4(schema, options);
200376
- return import_graphql87.print(documentNode);
199958
+ return import_graphql86.print(documentNode);
200377
199959
  }
200378
199960
  function astFromSchema4(schema, pathToDirectivesInExtensions) {
200379
199961
  const operationTypeMap = new Map([
@@ -200406,7 +199988,7 @@ function astFromSchema4(schema, pathToDirectivesInExtensions) {
200406
199988
  operationTypeDefinitionNode.type = rootTypeAST;
200407
199989
  } else {
200408
199990
  operationTypeMap.set(operationTypeNode, {
200409
- kind: import_graphql87.Kind.OPERATION_TYPE_DEFINITION,
199991
+ kind: import_graphql86.Kind.OPERATION_TYPE_DEFINITION,
200410
199992
  operation: operationTypeNode,
200411
199993
  type: rootTypeAST
200412
199994
  });
@@ -200421,7 +200003,7 @@ function astFromSchema4(schema, pathToDirectivesInExtensions) {
200421
200003
  return null;
200422
200004
  }
200423
200005
  const schemaNode = {
200424
- kind: operationTypes.length ? import_graphql87.Kind.SCHEMA_DEFINITION : import_graphql87.Kind.SCHEMA_EXTENSION,
200006
+ kind: operationTypes.length ? import_graphql86.Kind.SCHEMA_DEFINITION : import_graphql86.Kind.SCHEMA_EXTENSION,
200425
200007
  operationTypes,
200426
200008
  directives: directives2
200427
200009
  };
@@ -200433,16 +200015,16 @@ function astFromSchema4(schema, pathToDirectivesInExtensions) {
200433
200015
  }
200434
200016
  function astFromDirective4(directive, schema, pathToDirectivesInExtensions) {
200435
200017
  return {
200436
- kind: import_graphql87.Kind.DIRECTIVE_DEFINITION,
200018
+ kind: import_graphql86.Kind.DIRECTIVE_DEFINITION,
200437
200019
  description: getDescriptionNode4(directive),
200438
200020
  name: {
200439
- kind: import_graphql87.Kind.NAME,
200021
+ kind: import_graphql86.Kind.NAME,
200440
200022
  value: directive.name
200441
200023
  },
200442
200024
  arguments: directive.args?.map((arg) => astFromArg4(arg, schema, pathToDirectivesInExtensions)),
200443
200025
  repeatable: directive.isRepeatable,
200444
200026
  locations: directive.locations?.map((location) => ({
200445
- kind: import_graphql87.Kind.NAME,
200027
+ kind: import_graphql86.Kind.NAME,
200446
200028
  value: location
200447
200029
  })) || []
200448
200030
  };
@@ -200458,7 +200040,7 @@ function getDirectiveNodes4(entity, schema, pathToDirectivesInExtensions) {
200458
200040
  let specifiedByDirectiveNode = null;
200459
200041
  let oneOfDirectiveNode = null;
200460
200042
  if (directives2 != null) {
200461
- directiveNodesBesidesNativeDirectives = directives2.filter((directive) => import_graphql87.specifiedDirectives.every((specifiedDirective) => specifiedDirective.name !== directive.name.value));
200043
+ directiveNodesBesidesNativeDirectives = directives2.filter((directive) => import_graphql86.specifiedDirectives.every((specifiedDirective) => specifiedDirective.name !== directive.name.value));
200462
200044
  deprecatedDirectiveNode = directives2.find((directive) => directive.name.value === "deprecated");
200463
200045
  specifiedByDirectiveNode = directives2.find((directive) => directive.name.value === "specifiedBy");
200464
200046
  oneOfDirectiveNode = directives2.find((directive) => directive.name.value === "oneOf");
@@ -200489,10 +200071,10 @@ function getDirectiveNodes4(entity, schema, pathToDirectivesInExtensions) {
200489
200071
  }
200490
200072
  function astFromArg4(arg, schema, pathToDirectivesInExtensions) {
200491
200073
  return {
200492
- kind: import_graphql87.Kind.INPUT_VALUE_DEFINITION,
200074
+ kind: import_graphql86.Kind.INPUT_VALUE_DEFINITION,
200493
200075
  description: getDescriptionNode4(arg),
200494
200076
  name: {
200495
- kind: import_graphql87.Kind.NAME,
200077
+ kind: import_graphql86.Kind.NAME,
200496
200078
  value: arg.name
200497
200079
  },
200498
200080
  type: astFromType5(arg.type),
@@ -200502,10 +200084,10 @@ function astFromArg4(arg, schema, pathToDirectivesInExtensions) {
200502
200084
  }
200503
200085
  function astFromObjectType4(type, schema, pathToDirectivesInExtensions) {
200504
200086
  return {
200505
- kind: import_graphql87.Kind.OBJECT_TYPE_DEFINITION,
200087
+ kind: import_graphql86.Kind.OBJECT_TYPE_DEFINITION,
200506
200088
  description: getDescriptionNode4(type),
200507
200089
  name: {
200508
- kind: import_graphql87.Kind.NAME,
200090
+ kind: import_graphql86.Kind.NAME,
200509
200091
  value: type.name
200510
200092
  },
200511
200093
  fields: Object.values(type.getFields()).map((field) => astFromField4(field, schema, pathToDirectivesInExtensions)),
@@ -200515,10 +200097,10 @@ function astFromObjectType4(type, schema, pathToDirectivesInExtensions) {
200515
200097
  }
200516
200098
  function astFromInterfaceType4(type, schema, pathToDirectivesInExtensions) {
200517
200099
  const node = {
200518
- kind: import_graphql87.Kind.INTERFACE_TYPE_DEFINITION,
200100
+ kind: import_graphql86.Kind.INTERFACE_TYPE_DEFINITION,
200519
200101
  description: getDescriptionNode4(type),
200520
200102
  name: {
200521
- kind: import_graphql87.Kind.NAME,
200103
+ kind: import_graphql86.Kind.NAME,
200522
200104
  value: type.name
200523
200105
  },
200524
200106
  fields: Object.values(type.getFields()).map((field) => astFromField4(field, schema, pathToDirectivesInExtensions)),
@@ -200531,10 +200113,10 @@ function astFromInterfaceType4(type, schema, pathToDirectivesInExtensions) {
200531
200113
  }
200532
200114
  function astFromUnionType4(type, schema, pathToDirectivesInExtensions) {
200533
200115
  return {
200534
- kind: import_graphql87.Kind.UNION_TYPE_DEFINITION,
200116
+ kind: import_graphql86.Kind.UNION_TYPE_DEFINITION,
200535
200117
  description: getDescriptionNode4(type),
200536
200118
  name: {
200537
- kind: import_graphql87.Kind.NAME,
200119
+ kind: import_graphql86.Kind.NAME,
200538
200120
  value: type.name
200539
200121
  },
200540
200122
  directives: getDirectiveNodes4(type, schema, pathToDirectivesInExtensions),
@@ -200543,10 +200125,10 @@ function astFromUnionType4(type, schema, pathToDirectivesInExtensions) {
200543
200125
  }
200544
200126
  function astFromInputObjectType4(type, schema, pathToDirectivesInExtensions) {
200545
200127
  return {
200546
- kind: import_graphql87.Kind.INPUT_OBJECT_TYPE_DEFINITION,
200128
+ kind: import_graphql86.Kind.INPUT_OBJECT_TYPE_DEFINITION,
200547
200129
  description: getDescriptionNode4(type),
200548
200130
  name: {
200549
- kind: import_graphql87.Kind.NAME,
200131
+ kind: import_graphql86.Kind.NAME,
200550
200132
  value: type.name
200551
200133
  },
200552
200134
  fields: Object.values(type.getFields()).map((field) => astFromInputField4(field, schema, pathToDirectivesInExtensions)),
@@ -200555,10 +200137,10 @@ function astFromInputObjectType4(type, schema, pathToDirectivesInExtensions) {
200555
200137
  }
200556
200138
  function astFromEnumType4(type, schema, pathToDirectivesInExtensions) {
200557
200139
  return {
200558
- kind: import_graphql87.Kind.ENUM_TYPE_DEFINITION,
200140
+ kind: import_graphql86.Kind.ENUM_TYPE_DEFINITION,
200559
200141
  description: getDescriptionNode4(type),
200560
200142
  name: {
200561
- kind: import_graphql87.Kind.NAME,
200143
+ kind: import_graphql86.Kind.NAME,
200562
200144
  value: type.name
200563
200145
  },
200564
200146
  values: Object.values(type.getValues()).map((value) => astFromEnumValue4(value, schema, pathToDirectivesInExtensions)),
@@ -200576,10 +200158,10 @@ function astFromScalarType4(type, schema, pathToDirectivesInExtensions) {
200576
200158
  directives2.push(makeDirectiveNode4("specifiedBy", specifiedByArgs));
200577
200159
  }
200578
200160
  return {
200579
- kind: import_graphql87.Kind.SCALAR_TYPE_DEFINITION,
200161
+ kind: import_graphql86.Kind.SCALAR_TYPE_DEFINITION,
200580
200162
  description: getDescriptionNode4(type),
200581
200163
  name: {
200582
- kind: import_graphql87.Kind.NAME,
200164
+ kind: import_graphql86.Kind.NAME,
200583
200165
  value: type.name
200584
200166
  },
200585
200167
  directives: directives2
@@ -200587,10 +200169,10 @@ function astFromScalarType4(type, schema, pathToDirectivesInExtensions) {
200587
200169
  }
200588
200170
  function astFromField4(field, schema, pathToDirectivesInExtensions) {
200589
200171
  return {
200590
- kind: import_graphql87.Kind.FIELD_DEFINITION,
200172
+ kind: import_graphql86.Kind.FIELD_DEFINITION,
200591
200173
  description: getDescriptionNode4(field),
200592
200174
  name: {
200593
- kind: import_graphql87.Kind.NAME,
200175
+ kind: import_graphql86.Kind.NAME,
200594
200176
  value: field.name
200595
200177
  },
200596
200178
  arguments: field.args.map((arg) => astFromArg4(arg, schema, pathToDirectivesInExtensions)),
@@ -200600,10 +200182,10 @@ function astFromField4(field, schema, pathToDirectivesInExtensions) {
200600
200182
  }
200601
200183
  function astFromInputField4(field, schema, pathToDirectivesInExtensions) {
200602
200184
  return {
200603
- kind: import_graphql87.Kind.INPUT_VALUE_DEFINITION,
200185
+ kind: import_graphql86.Kind.INPUT_VALUE_DEFINITION,
200604
200186
  description: getDescriptionNode4(field),
200605
200187
  name: {
200606
- kind: import_graphql87.Kind.NAME,
200188
+ kind: import_graphql86.Kind.NAME,
200607
200189
  value: field.name
200608
200190
  },
200609
200191
  type: astFromType5(field.type),
@@ -200613,17 +200195,17 @@ function astFromInputField4(field, schema, pathToDirectivesInExtensions) {
200613
200195
  }
200614
200196
  function astFromEnumValue4(value, schema, pathToDirectivesInExtensions) {
200615
200197
  return {
200616
- kind: import_graphql87.Kind.ENUM_VALUE_DEFINITION,
200198
+ kind: import_graphql86.Kind.ENUM_VALUE_DEFINITION,
200617
200199
  description: getDescriptionNode4(value),
200618
200200
  name: {
200619
- kind: import_graphql87.Kind.NAME,
200201
+ kind: import_graphql86.Kind.NAME,
200620
200202
  value: value.name
200621
200203
  },
200622
200204
  directives: getDirectiveNodes4(value, schema, pathToDirectivesInExtensions)
200623
200205
  };
200624
200206
  }
200625
200207
  function makeDeprecatedDirective4(deprecationReason) {
200626
- return makeDirectiveNode4("deprecated", { reason: deprecationReason }, import_graphql87.GraphQLDeprecatedDirective);
200208
+ return makeDirectiveNode4("deprecated", { reason: deprecationReason }, import_graphql86.GraphQLDeprecatedDirective);
200627
200209
  }
200628
200210
  function makeDirectiveNode4(name, args, directive) {
200629
200211
  const directiveArguments = [];
@@ -200641,9 +200223,9 @@ function makeDirectiveNode4(name, args, directive) {
200641
200223
  }
200642
200224
  if (value != null) {
200643
200225
  directiveArguments.push({
200644
- kind: import_graphql87.Kind.ARGUMENT,
200226
+ kind: import_graphql86.Kind.ARGUMENT,
200645
200227
  name: {
200646
- kind: import_graphql87.Kind.NAME,
200228
+ kind: import_graphql86.Kind.NAME,
200647
200229
  value: argName
200648
200230
  },
200649
200231
  value
@@ -200651,9 +200233,9 @@ function makeDirectiveNode4(name, args, directive) {
200651
200233
  }
200652
200234
  }
200653
200235
  return {
200654
- kind: import_graphql87.Kind.DIRECTIVE,
200236
+ kind: import_graphql86.Kind.DIRECTIVE,
200655
200237
  name: {
200656
- kind: import_graphql87.Kind.NAME,
200238
+ kind: import_graphql86.Kind.NAME,
200657
200239
  value: name
200658
200240
  },
200659
200241
  arguments: directiveArguments
@@ -200667,7 +200249,7 @@ function makeDirectiveNodes4(schema, directiveValues) {
200667
200249
  }
200668
200250
  return directiveNodes;
200669
200251
  }
200670
- var import_graphql87;
200252
+ var import_graphql86;
200671
200253
  var init_print_schema_with_directives2 = __esm(() => {
200672
200254
  init_astFromType2();
200673
200255
  init_astFromValue2();
@@ -200677,7 +200259,7 @@ var init_print_schema_with_directives2 = __esm(() => {
200677
200259
  init_get_directives2();
200678
200260
  init_helpers3();
200679
200261
  init_rootTypes2();
200680
- import_graphql87 = __toESM(require_graphql2(), 1);
200262
+ import_graphql86 = __toESM(require_graphql2(), 1);
200681
200263
  });
200682
200264
 
200683
200265
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/validate-documents.js
@@ -201041,42 +200623,42 @@ var init_AccumulatorMap2 = __esm(() => {
201041
200623
  });
201042
200624
 
201043
200625
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/directives.js
201044
- var import_graphql88, GraphQLDeferDirective2, GraphQLStreamDirective2;
200626
+ var import_graphql87, GraphQLDeferDirective2, GraphQLStreamDirective2;
201045
200627
  var init_directives2 = __esm(() => {
201046
- import_graphql88 = __toESM(require_graphql2(), 1);
201047
- GraphQLDeferDirective2 = new import_graphql88.GraphQLDirective({
200628
+ import_graphql87 = __toESM(require_graphql2(), 1);
200629
+ GraphQLDeferDirective2 = new import_graphql87.GraphQLDirective({
201048
200630
  name: "defer",
201049
200631
  description: "Directs the executor to defer this fragment when the `if` argument is true or undefined.",
201050
- locations: [import_graphql88.DirectiveLocation.FRAGMENT_SPREAD, import_graphql88.DirectiveLocation.INLINE_FRAGMENT],
200632
+ locations: [import_graphql87.DirectiveLocation.FRAGMENT_SPREAD, import_graphql87.DirectiveLocation.INLINE_FRAGMENT],
201051
200633
  args: {
201052
200634
  if: {
201053
- type: new import_graphql88.GraphQLNonNull(import_graphql88.GraphQLBoolean),
200635
+ type: new import_graphql87.GraphQLNonNull(import_graphql87.GraphQLBoolean),
201054
200636
  description: "Deferred when true or undefined.",
201055
200637
  defaultValue: true
201056
200638
  },
201057
200639
  label: {
201058
- type: import_graphql88.GraphQLString,
200640
+ type: import_graphql87.GraphQLString,
201059
200641
  description: "Unique name"
201060
200642
  }
201061
200643
  }
201062
200644
  });
201063
- GraphQLStreamDirective2 = new import_graphql88.GraphQLDirective({
200645
+ GraphQLStreamDirective2 = new import_graphql87.GraphQLDirective({
201064
200646
  name: "stream",
201065
200647
  description: "Directs the executor to stream plural fields when the `if` argument is true or undefined.",
201066
- locations: [import_graphql88.DirectiveLocation.FIELD],
200648
+ locations: [import_graphql87.DirectiveLocation.FIELD],
201067
200649
  args: {
201068
200650
  if: {
201069
- type: new import_graphql88.GraphQLNonNull(import_graphql88.GraphQLBoolean),
200651
+ type: new import_graphql87.GraphQLNonNull(import_graphql87.GraphQLBoolean),
201070
200652
  description: "Stream when true or undefined.",
201071
200653
  defaultValue: true
201072
200654
  },
201073
200655
  label: {
201074
- type: import_graphql88.GraphQLString,
200656
+ type: import_graphql87.GraphQLString,
201075
200657
  description: "Unique name"
201076
200658
  },
201077
200659
  initialCount: {
201078
200660
  defaultValue: 0,
201079
- type: import_graphql88.GraphQLInt,
200661
+ type: import_graphql87.GraphQLInt,
201080
200662
  description: "Number of items to return immediately"
201081
200663
  }
201082
200664
  }
@@ -201085,28 +200667,28 @@ var init_directives2 = __esm(() => {
201085
200667
 
201086
200668
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/getDirectiveValues.js
201087
200669
  function getDirectiveValues2(directiveDef, node, variableValues) {
201088
- if (import_graphql89.versionInfo.major >= 17) {
201089
- return import_graphql89.getDirectiveValues(directiveDef, node, variableValues);
200670
+ if (import_graphql88.versionInfo.major >= 17) {
200671
+ return import_graphql88.getDirectiveValues(directiveDef, node, variableValues);
201090
200672
  }
201091
- return import_graphql89.getDirectiveValues(directiveDef, node, variableValues?.coerced);
200673
+ return import_graphql88.getDirectiveValues(directiveDef, node, variableValues?.coerced);
201092
200674
  }
201093
- var import_graphql89;
200675
+ var import_graphql88;
201094
200676
  var init_getDirectiveValues = __esm(() => {
201095
- import_graphql89 = __toESM(require_graphql2(), 1);
200677
+ import_graphql88 = __toESM(require_graphql2(), 1);
201096
200678
  });
201097
200679
 
201098
200680
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/collectFields.js
201099
200681
  function collectFieldsImpl2(schema, fragments, variableValues, runtimeType, selectionSet, fields2, patches, visitedFragmentNames) {
201100
200682
  for (const selection of selectionSet.selections) {
201101
200683
  switch (selection.kind) {
201102
- case import_graphql90.Kind.FIELD: {
200684
+ case import_graphql89.Kind.FIELD: {
201103
200685
  if (!shouldIncludeNode2(variableValues, selection)) {
201104
200686
  continue;
201105
200687
  }
201106
200688
  fields2.add(getFieldEntryKey2(selection), selection);
201107
200689
  break;
201108
200690
  }
201109
- case import_graphql90.Kind.INLINE_FRAGMENT: {
200691
+ case import_graphql89.Kind.INLINE_FRAGMENT: {
201110
200692
  if (!shouldIncludeNode2(variableValues, selection) || !doesFragmentConditionMatch2(schema, selection, runtimeType)) {
201111
200693
  continue;
201112
200694
  }
@@ -201123,7 +200705,7 @@ function collectFieldsImpl2(schema, fragments, variableValues, runtimeType, sele
201123
200705
  }
201124
200706
  break;
201125
200707
  }
201126
- case import_graphql90.Kind.FRAGMENT_SPREAD: {
200708
+ case import_graphql89.Kind.FRAGMENT_SPREAD: {
201127
200709
  const fragName = selection.name.value;
201128
200710
  if (!shouldIncludeNode2(variableValues, selection)) {
201129
200711
  continue;
@@ -201155,11 +200737,11 @@ function collectFieldsImpl2(schema, fragments, variableValues, runtimeType, sele
201155
200737
  }
201156
200738
  }
201157
200739
  function shouldIncludeNode2(variableValues, node) {
201158
- const skip = getDirectiveValues2(import_graphql90.GraphQLSkipDirective, node, variableValues);
200740
+ const skip = getDirectiveValues2(import_graphql89.GraphQLSkipDirective, node, variableValues);
201159
200741
  if (skip?.["if"] === true) {
201160
200742
  return false;
201161
200743
  }
201162
- const include = getDirectiveValues2(import_graphql90.GraphQLIncludeDirective, node, variableValues);
200744
+ const include = getDirectiveValues2(import_graphql89.GraphQLIncludeDirective, node, variableValues);
201163
200745
  if (include?.["if"] === false) {
201164
200746
  return false;
201165
200747
  }
@@ -201170,11 +200752,11 @@ function doesFragmentConditionMatch2(schema, fragment, type) {
201170
200752
  if (!typeConditionNode) {
201171
200753
  return true;
201172
200754
  }
201173
- const conditionalType = import_graphql90.typeFromAST(schema, typeConditionNode);
200755
+ const conditionalType = import_graphql89.typeFromAST(schema, typeConditionNode);
201174
200756
  if (conditionalType === type) {
201175
200757
  return true;
201176
200758
  }
201177
- if (import_graphql90.isAbstractType(conditionalType)) {
200759
+ if (import_graphql89.isAbstractType(conditionalType)) {
201178
200760
  const possibleTypes = schema.getPossibleTypes(conditionalType);
201179
200761
  return possibleTypes.includes(type);
201180
200762
  }
@@ -201195,12 +200777,12 @@ function getDeferValues2(variableValues, node) {
201195
200777
  label: typeof defer["label"] === "string" ? defer["label"] : undefined
201196
200778
  };
201197
200779
  }
201198
- var import_graphql90, collectSubFields2;
200780
+ var import_graphql89, collectSubFields2;
201199
200781
  var init_collectFields2 = __esm(() => {
201200
200782
  init_AccumulatorMap2();
201201
200783
  init_directives2();
201202
200784
  init_getDirectiveValues();
201203
- import_graphql90 = __toESM(require_graphql2(), 1);
200785
+ import_graphql89 = __toESM(require_graphql2(), 1);
201204
200786
  collectSubFields2 = memoize52(function collectSubfields2(schema, fragments, variableValues, returnType, fieldNodes) {
201205
200787
  const subFieldNodes = new AccumulatorMap2;
201206
200788
  const visitedFragmentNames = new Set;
@@ -201220,15 +200802,15 @@ var init_collectFields2 = __esm(() => {
201220
200802
 
201221
200803
  // node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils/esm/getOperationASTFromRequest.js
201222
200804
  function getOperationASTFromDocument2(documentNode, operationName) {
201223
- const doc = import_graphql91.getOperationAST(documentNode, operationName);
200805
+ const doc = import_graphql90.getOperationAST(documentNode, operationName);
201224
200806
  if (!doc) {
201225
200807
  throw new Error(`Cannot infer operation ${operationName || ""}`);
201226
200808
  }
201227
200809
  return doc;
201228
200810
  }
201229
- var import_graphql91, getOperationASTFromRequest4;
200811
+ var import_graphql90, getOperationASTFromRequest4;
201230
200812
  var init_getOperationASTFromRequest2 = __esm(() => {
201231
- import_graphql91 = __toESM(require_graphql2(), 1);
200813
+ import_graphql90 = __toESM(require_graphql2(), 1);
201232
200814
  getOperationASTFromRequest4 = memoize14(function getOperationASTFromRequest5(request) {
201233
200815
  return getOperationASTFromDocument2(request.document, request.operationName);
201234
200816
  });
@@ -201367,7 +200949,7 @@ function optimizeDocuments(schema, documents, options = {}) {
201367
200949
  ...options
201368
200950
  };
201369
200951
  const adjustedSchema = import_Schema.create(printSchemaWithDirectives(schema, options));
201370
- const documentAsts = import_graphql92.concatAST(documents);
200952
+ const documentAsts = import_graphql91.concatAST(documents);
201371
200953
  const relayDocuments = import_RelayParser.transform(adjustedSchema, documentAsts.definitions);
201372
200954
  const result = [];
201373
200955
  if (options.includeFragments) {
@@ -201376,7 +200958,7 @@ function optimizeDocuments(schema, documents, options = {}) {
201376
200958
  import_FlattenTransform.transformWithOptions({ flattenAbstractTypes: false }),
201377
200959
  import_SkipRedundantNodesTransform.transform
201378
200960
  ]);
201379
- result.push(...fragmentCompilerContext.documents().filter((doc) => doc.kind === "Fragment").map((doc) => import_graphql92.parse(import_IRPrinter.print(adjustedSchema, doc), options)));
200961
+ result.push(...fragmentCompilerContext.documents().filter((doc) => doc.kind === "Fragment").map((doc) => import_graphql91.parse(import_IRPrinter.print(adjustedSchema, doc), options)));
201380
200962
  }
201381
200963
  const queryCompilerContext = new import_CompilerContext.default(adjustedSchema).addAll(relayDocuments).applyTransforms([
201382
200964
  import_ApplyFragmentArgumentTransform.transform,
@@ -201384,13 +200966,13 @@ function optimizeDocuments(schema, documents, options = {}) {
201384
200966
  import_FlattenTransform.transformWithOptions({ flattenAbstractTypes: false }),
201385
200967
  import_SkipRedundantNodesTransform.transform
201386
200968
  ]);
201387
- result.push(...queryCompilerContext.documents().map((doc) => import_graphql92.parse(import_IRPrinter.print(adjustedSchema, doc), options)));
200969
+ result.push(...queryCompilerContext.documents().map((doc) => import_graphql91.parse(import_IRPrinter.print(adjustedSchema, doc), options)));
201388
200970
  return result;
201389
200971
  }
201390
- var import_graphql92, import_CompilerContext, import_IRPrinter, import_RelayParser, import_Schema, import_ApplyFragmentArgumentTransform, import_FlattenTransform, import_InlineFragmentsTransform, import_SkipRedundantNodesTransform;
200972
+ var import_graphql91, import_CompilerContext, import_IRPrinter, import_RelayParser, import_Schema, import_ApplyFragmentArgumentTransform, import_FlattenTransform, import_InlineFragmentsTransform, import_SkipRedundantNodesTransform;
201391
200973
  var init_esm6 = __esm(() => {
201392
200974
  init_esm5();
201393
- import_graphql92 = __toESM(require_graphql2(), 1);
200975
+ import_graphql91 = __toESM(require_graphql2(), 1);
201394
200976
  import_CompilerContext = __toESM(require_CompilerContext(), 1);
201395
200977
  import_IRPrinter = __toESM(require_IRPrinter(), 1);
201396
200978
  import_RelayParser = __toESM(require_RelayParser(), 1);
@@ -201457,10 +201039,10 @@ class BaseSelectionSetProcessor {
201457
201039
  }
201458
201040
 
201459
201041
  // node_modules/@graphql-codegen/visitor-plugin-common/esm/selection-set-processor/pre-resolve-types.js
201460
- var import_graphql93, PreResolveTypesProcessor;
201042
+ var import_graphql92, PreResolveTypesProcessor;
201461
201043
  var init_pre_resolve_types = __esm(() => {
201462
201044
  init_esm3();
201463
- import_graphql93 = __toESM(require_graphql2(), 1);
201045
+ import_graphql92 = __toESM(require_graphql2(), 1);
201464
201046
  PreResolveTypesProcessor = class PreResolveTypesProcessor extends BaseSelectionSetProcessor {
201465
201047
  transformTypenameField(type, name) {
201466
201048
  return [
@@ -201488,7 +201070,7 @@ var init_pre_resolve_types = __esm(() => {
201488
201070
  type: "never"
201489
201071
  };
201490
201072
  }
201491
- if (import_graphql93.isEnumType(baseType)) {
201073
+ if (import_graphql92.isEnumType(baseType)) {
201492
201074
  typeToUse = (this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : "") + this.config.convertName(baseType.name, {
201493
201075
  useTypesPrefix: this.config.enumPrefix,
201494
201076
  useTypesSuffix: this.config.enumSuffix
@@ -201518,7 +201100,7 @@ var init_pre_resolve_types = __esm(() => {
201518
201100
  const fieldObj = schemaType.getFields()[aliasedField.fieldName];
201519
201101
  const baseType = getBaseType(fieldObj.type);
201520
201102
  let typeToUse = this.config.scalars[baseType.name]?.output || baseType.name;
201521
- if (import_graphql93.isEnumType(baseType)) {
201103
+ if (import_graphql92.isEnumType(baseType)) {
201522
201104
  typeToUse = (this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : "") + this.config.convertName(baseType.name, {
201523
201105
  useTypesPrefix: this.config.enumPrefix,
201524
201106
  useTypesSuffix: this.config.enumSuffix
@@ -201602,10 +201184,10 @@ class SelectionSetToObject {
201602
201184
  directives: directives3
201603
201185
  };
201604
201186
  };
201605
- if (import_graphql94.isListType(parentType) || import_graphql94.isNonNullType(parentType)) {
201187
+ if (import_graphql93.isListType(parentType) || import_graphql93.isNonNullType(parentType)) {
201606
201188
  return this._collectInlineFragments(parentType.ofType, nodes, types5);
201607
201189
  }
201608
- if (import_graphql94.isObjectType(parentType)) {
201190
+ if (import_graphql93.isObjectType(parentType)) {
201609
201191
  for (const node of nodes) {
201610
201192
  const typeOnSchema = node.typeCondition ? this._schema.getType(node.typeCondition.name.value) : parentType;
201611
201193
  const { fields: fields3, inlines, spreads } = separateSelectionSet(node.selectionSet.selections);
@@ -201614,28 +201196,28 @@ class SelectionSetToObject {
201614
201196
  fields: fields3
201615
201197
  });
201616
201198
  const spreadsUsage = this.buildFragmentSpreadsUsage(spreads);
201617
- if (import_graphql94.isObjectType(typeOnSchema)) {
201199
+ if (import_graphql93.isObjectType(typeOnSchema)) {
201618
201200
  this._appendToTypeMap(types5, typeOnSchema.name, fieldsWithFragmentDirectives);
201619
201201
  this._appendToTypeMap(types5, typeOnSchema.name, spreadsUsage[typeOnSchema.name]);
201620
201202
  this._appendToTypeMap(types5, typeOnSchema.name, directives3);
201621
201203
  this._collectInlineFragments(typeOnSchema, inlines, types5);
201622
- } else if (import_graphql94.isInterfaceType(typeOnSchema) && parentType.getInterfaces().includes(typeOnSchema)) {
201204
+ } else if (import_graphql93.isInterfaceType(typeOnSchema) && parentType.getInterfaces().includes(typeOnSchema)) {
201623
201205
  this._appendToTypeMap(types5, parentType.name, fields3);
201624
201206
  this._appendToTypeMap(types5, parentType.name, spreadsUsage[parentType.name]);
201625
201207
  this._collectInlineFragments(typeOnSchema, inlines, types5);
201626
201208
  }
201627
201209
  }
201628
- } else if (import_graphql94.isInterfaceType(parentType)) {
201210
+ } else if (import_graphql93.isInterfaceType(parentType)) {
201629
201211
  const possibleTypes = getPossibleTypes(this._schema, parentType);
201630
201212
  for (const node of nodes) {
201631
201213
  const schemaType = node.typeCondition ? this._schema.getType(node.typeCondition.name.value) : parentType;
201632
201214
  const { fields: fields3, inlines, spreads } = separateSelectionSet(node.selectionSet.selections);
201633
201215
  const spreadsUsage = this.buildFragmentSpreadsUsage(spreads);
201634
- if (import_graphql94.isObjectType(schemaType) && possibleTypes.find((possibleType) => possibleType.name === schemaType.name)) {
201216
+ if (import_graphql93.isObjectType(schemaType) && possibleTypes.find((possibleType) => possibleType.name === schemaType.name)) {
201635
201217
  this._appendToTypeMap(types5, schemaType.name, fields3);
201636
201218
  this._appendToTypeMap(types5, schemaType.name, spreadsUsage[schemaType.name]);
201637
201219
  this._collectInlineFragments(schemaType, inlines, types5);
201638
- } else if (import_graphql94.isInterfaceType(schemaType) && schemaType.name === parentType.name) {
201220
+ } else if (import_graphql93.isInterfaceType(schemaType) && schemaType.name === parentType.name) {
201639
201221
  for (const possibleType of possibleTypes) {
201640
201222
  this._appendToTypeMap(types5, possibleType.name, fields3);
201641
201223
  this._appendToTypeMap(types5, possibleType.name, spreadsUsage[possibleType.name]);
@@ -201647,25 +201229,25 @@ class SelectionSetToObject {
201647
201229
  throw new Error("Invalid state. Expected type condition for interface spread on a interface field.");
201648
201230
  }
201649
201231
  const fragmentSpreadType = this._schema.getType(node.typeCondition.name.value);
201650
- if (import_graphql94.isTypeSubTypeOf(this._schema, possibleType, fragmentSpreadType)) {
201232
+ if (import_graphql93.isTypeSubTypeOf(this._schema, possibleType, fragmentSpreadType)) {
201651
201233
  this._appendToTypeMap(types5, possibleType.name, fields3);
201652
201234
  this._appendToTypeMap(types5, possibleType.name, spreadsUsage[possibleType.name]);
201653
201235
  }
201654
201236
  }
201655
201237
  }
201656
201238
  }
201657
- } else if (import_graphql94.isUnionType(parentType)) {
201239
+ } else if (import_graphql93.isUnionType(parentType)) {
201658
201240
  const possibleTypes = parentType.getTypes();
201659
201241
  for (const node of nodes) {
201660
201242
  const schemaType = node.typeCondition ? this._schema.getType(node.typeCondition.name.value) : parentType;
201661
201243
  const { fields: fields3, inlines, spreads } = separateSelectionSet(node.selectionSet.selections);
201662
201244
  const { fieldsWithFragmentDirectives } = enrichFieldWithDirectives({ node, fields: fields3 });
201663
201245
  const spreadsUsage = this.buildFragmentSpreadsUsage(spreads);
201664
- if (import_graphql94.isObjectType(schemaType) && possibleTypes.find((possibleType) => possibleType.name === schemaType.name)) {
201246
+ if (import_graphql93.isObjectType(schemaType) && possibleTypes.find((possibleType) => possibleType.name === schemaType.name)) {
201665
201247
  this._appendToTypeMap(types5, schemaType.name, fieldsWithFragmentDirectives);
201666
201248
  this._appendToTypeMap(types5, schemaType.name, spreadsUsage[schemaType.name]);
201667
201249
  this._collectInlineFragments(schemaType, inlines, types5);
201668
- } else if (import_graphql94.isInterfaceType(schemaType)) {
201250
+ } else if (import_graphql93.isInterfaceType(schemaType)) {
201669
201251
  const possibleInterfaceTypes = getPossibleTypes(this._schema, schemaType);
201670
201252
  for (const possibleType of possibleTypes) {
201671
201253
  if (possibleInterfaceTypes.find((possibleInterfaceType) => possibleInterfaceType.name === possibleType.name)) {
@@ -201697,7 +201279,7 @@ class SelectionSetToObject {
201697
201279
  const fragmentSelectionNodes = [
201698
201280
  ...fragmentSpreadObject.node.selectionSet.selections
201699
201281
  ].map((originalNode) => {
201700
- if (originalNode.kind === import_graphql94.Kind.FIELD) {
201282
+ if (originalNode.kind === import_graphql93.Kind.FIELD) {
201701
201283
  return {
201702
201284
  ...originalNode,
201703
201285
  fragmentDirectives: [...spread.directives || []]
@@ -201729,17 +201311,17 @@ class SelectionSetToObject {
201729
201311
  const fragmentSpreadsConditionalSelections = [];
201730
201312
  for (const selection of selections) {
201731
201313
  switch (selection.kind) {
201732
- case import_graphql94.Kind.FIELD:
201314
+ case import_graphql93.Kind.FIELD:
201733
201315
  fieldNodes.push(selection);
201734
201316
  break;
201735
- case import_graphql94.Kind.INLINE_FRAGMENT:
201317
+ case import_graphql93.Kind.INLINE_FRAGMENT:
201736
201318
  if (!this._config.extractAllFieldsToTypesCompact && (hasConditionalDirectives(selection.directives) || hasIncrementalDeliveryDirectives(selection.directives))) {
201737
201319
  inlineFragmentConditionalSelections.push(selection);
201738
201320
  break;
201739
201321
  }
201740
201322
  inlineFragmentSelections.push(selection);
201741
201323
  break;
201742
- case import_graphql94.Kind.FRAGMENT_SPREAD:
201324
+ case import_graphql93.Kind.FRAGMENT_SPREAD:
201743
201325
  if (!this._config.extractAllFieldsToTypesCompact && (hasConditionalDirectives(selection.directives) || hasIncrementalDeliveryDirectives(selection.directives))) {
201744
201326
  fragmentSpreadsConditionalSelections.push(selection);
201745
201327
  break;
@@ -201750,17 +201332,17 @@ class SelectionSetToObject {
201750
201332
  }
201751
201333
  if (fieldNodes.length) {
201752
201334
  inlineFragmentSelections.push({
201753
- kind: import_graphql94.Kind.INLINE_FRAGMENT,
201335
+ kind: import_graphql93.Kind.INLINE_FRAGMENT,
201754
201336
  typeCondition: {
201755
- kind: import_graphql94.Kind.NAMED_TYPE,
201337
+ kind: import_graphql93.Kind.NAMED_TYPE,
201756
201338
  name: {
201757
- kind: import_graphql94.Kind.NAME,
201339
+ kind: import_graphql93.Kind.NAME,
201758
201340
  value: (parentSchemaType ?? this._parentSchemaType).name
201759
201341
  }
201760
201342
  },
201761
201343
  directives: [],
201762
201344
  selectionSet: {
201763
- kind: import_graphql94.Kind.SELECTION_SET,
201345
+ kind: import_graphql93.Kind.SELECTION_SET,
201764
201346
  selections: fieldNodes
201765
201347
  }
201766
201348
  });
@@ -201807,7 +201389,7 @@ class SelectionSetToObject {
201807
201389
  const grouped2 = possibleTypes.reduce((prev, type) => {
201808
201390
  const typeName = type.name;
201809
201391
  const schemaType = this._schema.getType(typeName);
201810
- if (!import_graphql94.isObjectType(schemaType)) {
201392
+ if (!import_graphql93.isObjectType(schemaType)) {
201811
201393
  throw new TypeError(`Invalid state! Schema type ${typeName} is not a valid GraphQL object!`);
201812
201394
  }
201813
201395
  prev[typeName] ||= [];
@@ -201863,7 +201445,7 @@ class SelectionSetToObject {
201863
201445
  const directNodes = [];
201864
201446
  const nestedSelections = [];
201865
201447
  for (const n of flattenedSelectionNodes) {
201866
- if ("kind" in n && (n.kind === import_graphql94.Kind.INLINE_FRAGMENT || n.kind === import_graphql94.Kind.FRAGMENT_SPREAD)) {
201448
+ if ("kind" in n && (n.kind === import_graphql93.Kind.INLINE_FRAGMENT || n.kind === import_graphql93.Kind.FRAGMENT_SPREAD)) {
201867
201449
  nestedSelections.push(n);
201868
201450
  } else {
201869
201451
  directNodes.push(n);
@@ -201909,7 +201491,7 @@ class SelectionSetToObject {
201909
201491
  const grouped = possibleTypes.reduce((prev, type) => {
201910
201492
  const typeName = type.name;
201911
201493
  const schemaType = this._schema.getType(typeName);
201912
- if (!import_graphql94.isObjectType(schemaType)) {
201494
+ if (!import_graphql93.isObjectType(schemaType)) {
201913
201495
  throw new TypeError(`Invalid state! Schema type ${typeName} is not a valid GraphQL object!`);
201914
201496
  }
201915
201497
  const selectionNodes = selectionNodesByTypeName.get(typeName) || [];
@@ -201957,7 +201539,7 @@ class SelectionSetToObject {
201957
201539
  let inlineFragmentConditional = false;
201958
201540
  for (const selectionNode of selectionNodes) {
201959
201541
  if ("kind" in selectionNode) {
201960
- if (selectionNode.kind === import_graphql94.Kind.FIELD) {
201542
+ if (selectionNode.kind === import_graphql93.Kind.FIELD) {
201961
201543
  if (selectionNode.selectionSet) {
201962
201544
  let selectedField = null;
201963
201545
  const fields4 = parentSchemaType.getFields();
@@ -201992,7 +201574,7 @@ class SelectionSetToObject {
201992
201574
  } else {
201993
201575
  primitiveFields.set(selectionNode.name.value, selectionNode);
201994
201576
  }
201995
- } else if (selectionNode.kind === import_graphql94.Kind.DIRECTIVE) {
201577
+ } else if (selectionNode.kind === import_graphql93.Kind.DIRECTIVE) {
201996
201578
  if (hasConditionalDirectives([selectionNode])) {
201997
201579
  inlineFragmentConditional = true;
201998
201580
  }
@@ -202015,7 +201597,7 @@ class SelectionSetToObject {
202015
201597
  if (fragmentType == null) {
202016
201598
  throw new TypeError(`Unexpected error: Type ${selectionNode.onType} does not exist within schema.`);
202017
201599
  }
202018
- if (parentSchemaType.name === selectionNode.onType || parentSchemaType.getInterfaces().find((iinterface) => iinterface.name === selectionNode.onType) != null || import_graphql94.isUnionType(fragmentType) && fragmentType.getTypes().find((objectType) => objectType.name === parentSchemaType.name)) {
201600
+ if (parentSchemaType.name === selectionNode.onType || parentSchemaType.getInterfaces().find((iinterface) => iinterface.name === selectionNode.onType) != null || import_graphql93.isUnionType(fragmentType) && fragmentType.getTypes().find((objectType) => objectType.name === parentSchemaType.name)) {
202019
201601
  const { selectionNodesByTypeName, selectionNodesByTypeNameConditional } = this.flattenSelectionSet(selectionNode.selectionNodes, parentSchemaType);
202020
201602
  const typeNodes = selectionNodesByTypeName.get(parentSchemaType.name) ?? [];
202021
201603
  selectionNodes.push(...typeNodes);
@@ -202268,16 +201850,16 @@ class SelectionSetToObject {
202268
201850
  }
202269
201851
  const schemaType = this._schema.getType(typeName);
202270
201852
  const hasTypeNarrowingFragments = this._selectionSet?.selections?.some((selection) => {
202271
- if (selection.kind === import_graphql94.Kind.INLINE_FRAGMENT) {
201853
+ if (selection.kind === import_graphql93.Kind.INLINE_FRAGMENT) {
202272
201854
  return true;
202273
201855
  }
202274
- if (selection.kind === import_graphql94.Kind.FRAGMENT_SPREAD) {
201856
+ if (selection.kind === import_graphql93.Kind.FRAGMENT_SPREAD) {
202275
201857
  const spreadFragment = this._loadedFragments.find((lf) => lf.name === selection.name.value);
202276
201858
  return !spreadFragment || !this._parentSchemaType || spreadFragment.onType !== this._parentSchemaType.name;
202277
201859
  }
202278
201860
  return false;
202279
201861
  }) ?? false;
202280
- if (import_graphql94.isObjectType(schemaType) && this._parentSchemaType && import_graphql94.isInterfaceType(this._parentSchemaType) && !hasTypeNarrowingFragments) {
201862
+ if (import_graphql93.isObjectType(schemaType) && this._parentSchemaType && import_graphql93.isInterfaceType(this._parentSchemaType) && !hasTypeNarrowingFragments) {
202281
201863
  return `${parentName}_${this._parentSchemaType.name}`;
202282
201864
  }
202283
201865
  return `${parentName}_${typeName}`;
@@ -202293,16 +201875,16 @@ function formatUnion(members) {
202293
201875
  }
202294
201876
  return members.join(" | ");
202295
201877
  }
202296
- var import_graphql94, operationTypes, metadataFieldMap;
201878
+ var import_graphql93, operationTypes, metadataFieldMap;
202297
201879
  var init_selection_set_to_object = __esm(() => {
202298
201880
  init_esm3();
202299
201881
  init_esm2();
202300
201882
  init_utils2();
202301
- import_graphql94 = __toESM(require_graphql2(), 1);
201883
+ import_graphql93 = __toESM(require_graphql2(), 1);
202302
201884
  operationTypes = ["Query", "Mutation", "Subscription"];
202303
201885
  metadataFieldMap = {
202304
- __schema: import_graphql94.SchemaMetaFieldDef,
202305
- __type: import_graphql94.TypeMetaFieldDef
201886
+ __schema: import_graphql93.SchemaMetaFieldDef,
201887
+ __type: import_graphql93.TypeMetaFieldDef
202306
201888
  };
202307
201889
  });
202308
201890
 
@@ -202310,14 +201892,14 @@ var init_selection_set_to_object = __esm(() => {
202310
201892
  var init_types4 = () => {};
202311
201893
 
202312
201894
  // node_modules/@graphql-codegen/visitor-plugin-common/esm/graphql-type-utils.js
202313
- var import_graphql95, isNativeNamedType = (namedType) => {
202314
- if (import_graphql95.isSpecifiedScalarType(namedType) || import_graphql95.isIntrospectionType(namedType)) {
201895
+ var import_graphql94, isNativeNamedType = (namedType) => {
201896
+ if (import_graphql94.isSpecifiedScalarType(namedType) || import_graphql94.isIntrospectionType(namedType)) {
202315
201897
  return true;
202316
201898
  }
202317
201899
  return false;
202318
201900
  };
202319
201901
  var init_graphql_type_utils = __esm(() => {
202320
- import_graphql95 = __toESM(require_graphql2(), 1);
201902
+ import_graphql94 = __toESM(require_graphql2(), 1);
202321
201903
  });
202322
201904
 
202323
201905
  // node_modules/@graphql-codegen/visitor-plugin-common/esm/typed-document-string.js
@@ -202381,13 +201963,13 @@ var init_visitor = __esm(() => {
202381
201963
  init_esm7();
202382
201964
  TypeScriptDocumentNodesVisitor = class TypeScriptDocumentNodesVisitor extends ClientSideBaseVisitor {
202383
201965
  pluginConfig;
202384
- constructor(schema, fragments, config2, documents) {
201966
+ constructor(schema, fragments, config, documents) {
202385
201967
  super(schema, fragments, {
202386
201968
  documentNodeImport: "@graphql-typed-document-node/core#TypedDocumentNode",
202387
- ...config2,
202388
- documentMode: config2.documentMode || DocumentMode.documentNodeImportFragments
201969
+ ...config,
201970
+ documentMode: config.documentMode || DocumentMode.documentNodeImportFragments
202389
201971
  }, {}, documents);
202390
- this.pluginConfig = config2;
201972
+ this.pluginConfig = config;
202391
201973
  autoBind(this);
202392
201974
  if (this.config.documentMode === DocumentMode.graphQLTag) {
202393
201975
  const documentNodeImport = this._parseImport(this.config.documentNodeImport || "graphql#DocumentNode");
@@ -202443,35 +202025,35 @@ var init_visitor = __esm(() => {
202443
202025
  });
202444
202026
 
202445
202027
  // node_modules/@graphql-codegen/typed-document-node/esm/index.js
202446
- var exports_esm3 = {};
202447
- __export(exports_esm3, {
202448
- plugin: () => plugin3,
202028
+ var exports_esm2 = {};
202029
+ __export(exports_esm2, {
202030
+ plugin: () => plugin2,
202449
202031
  validate: () => validate2
202450
202032
  });
202451
202033
  import { extname as extname2 } from "path";
202452
- var import_graphql102, plugin3 = (schema, rawDocuments, config2) => {
202453
- const documents = config2.flattenGeneratedTypes ? optimizeOperations(schema, rawDocuments) : rawDocuments;
202454
- const allAst = import_graphql102.concatAST(documents.map((v) => v.document));
202034
+ var import_graphql98, plugin2 = (schema, rawDocuments, config) => {
202035
+ const documents = config.flattenGeneratedTypes ? optimizeOperations(schema, rawDocuments) : rawDocuments;
202036
+ const allAst = import_graphql98.concatAST(documents.map((v) => v.document));
202455
202037
  const allFragments = [
202456
- ...allAst.definitions.filter((d) => d.kind === import_graphql102.Kind.FRAGMENT_DEFINITION).map((fragmentDef) => ({
202038
+ ...allAst.definitions.filter((d) => d.kind === import_graphql98.Kind.FRAGMENT_DEFINITION).map((fragmentDef) => ({
202457
202039
  node: fragmentDef,
202458
202040
  name: fragmentDef.name.value,
202459
202041
  onType: fragmentDef.typeCondition.name.value,
202460
202042
  isExternal: false
202461
202043
  })),
202462
- ...config2.externalFragments || []
202044
+ ...config.externalFragments || []
202463
202045
  ];
202464
- const visitor2 = new TypeScriptDocumentNodesVisitor(schema, allFragments, config2, documents);
202465
- const visitorResult = oldVisit(allAst, { leave: visitor2 });
202046
+ const visitor = new TypeScriptDocumentNodesVisitor(schema, allFragments, config, documents);
202047
+ const visitorResult = oldVisit(allAst, { leave: visitor });
202466
202048
  let content = [];
202467
- if (config2.documentMode === DocumentMode.string) {
202049
+ if (config.documentMode === DocumentMode.string) {
202468
202050
  content = [typedDocumentString.template];
202469
202051
  }
202470
202052
  return {
202471
- prepend: allAst.definitions.length === 0 ? [] : visitor2.getImports(),
202053
+ prepend: allAst.definitions.length === 0 ? [] : visitor.getImports(),
202472
202054
  content: [
202473
202055
  ...content,
202474
- visitor2.fragments,
202056
+ visitor.fragments,
202475
202057
  ...visitorResult.definitions.filter((t) => typeof t === "string")
202476
202058
  ].join(`
202477
202059
  `)
@@ -202485,7 +202067,7 @@ var init_esm8 = __esm(() => {
202485
202067
  init_esm3();
202486
202068
  init_esm7();
202487
202069
  init_visitor();
202488
- import_graphql102 = __toESM(require_graphql2(), 1);
202070
+ import_graphql98 = __toESM(require_graphql2(), 1);
202489
202071
  });
202490
202072
 
202491
202073
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
@@ -216697,12 +216279,14 @@ import { dirname as dirname6, join as join12, resolve as resolve12 } from "node:
216697
216279
 
216698
216280
  // node_modules/@supacloud/compiler/dist/index.js
216699
216281
  var ts6 = __toESM(require_typescript(), 1);
216700
- var import_graphql103 = __toESM(require_graphql2(), 1);
216282
+ var ts7 = __toESM(require_typescript(), 1);
216283
+ var import_graphql99 = __toESM(require_graphql2(), 1);
216701
216284
  import { createHash as createHash42 } from "node:crypto";
216702
216285
  import { access, mkdir, rename as rename2, unlink as unlink2, writeFile as writeFile2 } from "node:fs/promises";
216703
216286
  import { join as join22 } from "node:path";
216704
216287
  import { extname as extname3 } from "node:path";
216705
216288
  import { resolve as resolve42 } from "node:path";
216289
+ import { resolve as resolve52 } from "node:path";
216706
216290
  import { createHash as createHash5 } from "node:crypto";
216707
216291
  import { readFile as readFile2 } from "node:fs/promises";
216708
216292
  import { relative as relative5, sep as sep5 } from "node:path";
@@ -221447,17 +221031,14 @@ function validateDuplicateDocuments(files) {
221447
221031
  }
221448
221032
  }
221449
221033
  }
221450
- // node_modules/@graphql-codegen/typescript/esm/index.js
221034
+ // node_modules/@graphql-codegen/typescript-operations/esm/index.js
221451
221035
  init_esm3();
221452
221036
  var exports_esm = {};
221453
221037
  __export(exports_esm, {
221454
- TsIntrospectionVisitor: () => TsIntrospectionVisitor,
221455
- TsVisitor: () => TsVisitor,
221456
- TypeScriptOperationVariablesToObject: () => TypeScriptOperationVariablesToObject,
221457
- includeIntrospectionTypesDefinitions: () => includeIntrospectionTypesDefinitions,
221038
+ TypeScriptDocumentsVisitor: () => TypeScriptDocumentsVisitor,
221458
221039
  plugin: () => plugin
221459
221040
  });
221460
- var import_graphql98 = __toESM(require_graphql2(), 1);
221041
+ var import_graphql97 = __toESM(require_graphql2(), 1);
221461
221042
 
221462
221043
  // node_modules/@graphql-codegen/schema-ast/esm/index.js
221463
221044
  init_esm3();
@@ -221486,382 +221067,20 @@ function transformSchemaAST(schema, config) {
221486
221067
  ast
221487
221068
  };
221488
221069
  }
221489
- // node_modules/@graphql-codegen/typescript/esm/visitor.js
221490
- init_esm7();
221491
- var import_graphql97 = __toESM(require_graphql2(), 1);
221492
-
221493
- // node_modules/@graphql-codegen/typescript/esm/typescript-variables-to-object.js
221494
- init_esm7();
221495
- var import_graphql96 = __toESM(require_graphql2(), 1);
221496
-
221497
- class TypeScriptOperationVariablesToObject extends OperationVariablesToObject {
221498
- _avoidOptionals;
221499
- _immutableTypes;
221500
- _maybeType;
221501
- constructor(_scalars, _convertName, _avoidOptionals, _immutableTypes, _namespacedImportName = null, _enumNames = [], _enumPrefix = true, _enumSuffix = true, _enumValues = {}, _applyCoercion = false, _directiveArgumentAndInputFieldMappings = {}, _maybeType = "Maybe") {
221502
- super(_scalars, _convertName, _namespacedImportName, _enumNames, _enumPrefix, _enumSuffix, _enumValues, _applyCoercion, _directiveArgumentAndInputFieldMappings);
221503
- this._avoidOptionals = _avoidOptionals;
221504
- this._immutableTypes = _immutableTypes;
221505
- this._maybeType = _maybeType;
221506
- }
221507
- clearOptional(str) {
221508
- const prefix = this._namespacedImportName ? `${this._namespacedImportName}.` : "";
221509
- const rgx = new RegExp(`^${this.wrapMaybe(`(.*?)`)}$`, "i");
221510
- if (str.startsWith(`${prefix}${this._maybeType}`)) {
221511
- return str.replace(rgx, "$1");
221512
- }
221513
- return str;
221514
- }
221515
- wrapAstTypeWithModifiers(baseType, typeNode, applyCoercion = false) {
221516
- if (typeNode.kind === import_graphql96.Kind.NON_NULL_TYPE) {
221517
- const type = this.wrapAstTypeWithModifiers(baseType, typeNode.type, applyCoercion);
221518
- return this.clearOptional(type);
221519
- }
221520
- if (typeNode.kind === import_graphql96.Kind.LIST_TYPE) {
221521
- const innerType = this.wrapAstTypeWithModifiers(baseType, typeNode.type, applyCoercion);
221522
- const listInputCoercionExtension = applyCoercion ? ` | ${innerType}` : "";
221523
- return this.wrapMaybe(`${this._immutableTypes ? "ReadonlyArray" : "Array"}<${innerType}>${listInputCoercionExtension}`);
221524
- }
221525
- return this.wrapMaybe(baseType);
221526
- }
221527
- formatFieldString(fieldName, isNonNullType21, hasDefaultValue) {
221528
- return `${fieldName}${this.getAvoidOption(isNonNullType21, hasDefaultValue) ? "?" : ""}`;
221529
- }
221530
- formatTypeString(fieldType, isNonNullType21, hasDefaultValue) {
221531
- if (!hasDefaultValue && isNonNullType21) {
221532
- return this.clearOptional(fieldType);
221533
- }
221534
- return fieldType;
221535
- }
221536
- wrapMaybe(type) {
221537
- const prefix = this._namespacedImportName ? `${this._namespacedImportName}.` : "";
221538
- return `${prefix}${this._maybeType}${type ? `<${type}>` : ""}`;
221539
- }
221540
- getAvoidOption(isNonNullType21, hasDefaultValue) {
221541
- const options = this._avoidOptionals;
221542
- return (options.object || !options.defaultValue) && hasDefaultValue || !options.object && !isNonNullType21;
221543
- }
221544
- getPunctuation() {
221545
- return ";";
221546
- }
221547
- }
221548
-
221549
- // node_modules/@graphql-codegen/typescript/esm/visitor.js
221550
- class TsVisitor extends BaseTypesVisitor {
221551
- constructor(schema, pluginConfig, additionalConfig = {}) {
221552
- super(schema, pluginConfig, {
221553
- noExport: getConfigValue(pluginConfig.noExport, false),
221554
- avoidOptionals: normalizeAvoidOptionals(getConfigValue(pluginConfig.avoidOptionals, false)),
221555
- maybeValue: getConfigValue(pluginConfig.maybeValue, "T | null"),
221556
- inputMaybeValue: getConfigValue(pluginConfig.inputMaybeValue, getConfigValue(pluginConfig.maybeValue, "Maybe<T>")),
221557
- constEnums: getConfigValue(pluginConfig.constEnums, false),
221558
- enumsAsTypes: getConfigValue(pluginConfig.enumsAsTypes, false),
221559
- futureProofEnums: getConfigValue(pluginConfig.futureProofEnums, false),
221560
- futureProofUnions: getConfigValue(pluginConfig.futureProofUnions, false),
221561
- enumsAsConst: getConfigValue(pluginConfig.enumsAsConst, false),
221562
- numericEnums: getConfigValue(pluginConfig.numericEnums, false),
221563
- onlyEnums: getConfigValue(pluginConfig.onlyEnums, false),
221564
- onlyOperationTypes: getConfigValue(pluginConfig.onlyOperationTypes, false),
221565
- immutableTypes: getConfigValue(pluginConfig.immutableTypes, false),
221566
- useImplementingTypes: getConfigValue(pluginConfig.useImplementingTypes, false),
221567
- entireFieldWrapperValue: getConfigValue(pluginConfig.entireFieldWrapperValue, "T"),
221568
- wrapEntireDefinitions: getConfigValue(pluginConfig.wrapEntireFieldDefinitions, false),
221569
- ...additionalConfig
221570
- });
221571
- autoBind(this);
221572
- const enumNames = Object.values(schema.getTypeMap()).filter(import_graphql97.isEnumType).map((type) => type.name);
221573
- this.setArgumentsTransformer(new TypeScriptOperationVariablesToObject(this.scalars, this.convertName, this.config.avoidOptionals, this.config.immutableTypes, null, enumNames, pluginConfig.enumPrefix, pluginConfig.enumSuffix, this.config.enumValues, false, this.config.directiveArgumentAndInputFieldMappings, "InputMaybe"));
221574
- this.setDeclarationBlockConfig({
221575
- enumNameValueSeparator: " =",
221576
- ignoreExport: this.config.noExport
221577
- });
221578
- }
221579
- _getTypeForNode(node, isVisitingInputType) {
221580
- const typeAsString = node.name.value;
221581
- if (this.config.useImplementingTypes) {
221582
- const allTypesMap = this._schema.getTypeMap();
221583
- const implementingTypes = [];
221584
- for (const graphqlType of Object.values(allTypesMap)) {
221585
- if (graphqlType instanceof import_graphql97.GraphQLObjectType) {
221586
- const allInterfaces = graphqlType.getInterfaces();
221587
- if (allInterfaces.some((int) => typeAsString === int.name)) {
221588
- implementingTypes.push(this.convertName(graphqlType.name));
221589
- }
221590
- }
221591
- }
221592
- if (implementingTypes.length > 0) {
221593
- return implementingTypes.join(" | ");
221594
- }
221595
- }
221596
- const typeString = super._getTypeForNode(node, isVisitingInputType);
221597
- const schemaType = this._schema.getType(node.name.value);
221598
- if (import_graphql97.isEnumType(schemaType)) {
221599
- const futureProofEnumUsageEnabled = this.config.futureProofEnums === true && this.config.enumsAsTypes !== true;
221600
- if (futureProofEnumUsageEnabled && this.config.allowEnumStringTypes === true) {
221601
- return `${typeString} | '%future added value' | ` + "`${" + typeString + "}`";
221602
- }
221603
- if (futureProofEnumUsageEnabled) {
221604
- return `${typeString} | '%future added value'`;
221605
- }
221606
- if (this.config.allowEnumStringTypes === true) {
221607
- return `${typeString} | ` + "`${" + typeString + "}`";
221608
- }
221609
- }
221610
- return typeString;
221611
- }
221612
- getWrapperDefinitions() {
221613
- if (this.config.onlyEnums)
221614
- return [];
221615
- const definitions = [this.getMaybeValue(), this.getInputMaybeValue()];
221616
- if (this.config.wrapFieldDefinitions) {
221617
- definitions.push(this.getFieldWrapperValue());
221618
- }
221619
- if (this.config.wrapEntireDefinitions) {
221620
- definitions.push(this.getEntireFieldWrapperValue());
221621
- }
221622
- return definitions;
221623
- }
221624
- getMaybeValue() {
221625
- return `${this.getExportPrefix()}type Maybe<T> = ${this.config.maybeValue};`;
221626
- }
221627
- getInputMaybeValue() {
221628
- return `${this.getExportPrefix()}type InputMaybe<T> = ${this.config.inputMaybeValue};`;
221629
- }
221630
- clearOptional(str) {
221631
- if (str.startsWith("Maybe")) {
221632
- return str.replace(/Maybe<(.*?)>$/, "$1");
221633
- }
221634
- if (str.startsWith("InputMaybe")) {
221635
- return str.replace(/InputMaybe<(.*?)>$/, "$1");
221636
- }
221637
- return str;
221638
- }
221639
- getExportPrefix() {
221640
- if (this.config.noExport) {
221641
- return "";
221642
- }
221643
- return super.getExportPrefix();
221644
- }
221645
- getMaybeWrapper(ancestors) {
221646
- const currentVisitContext = this.getVisitorKindContextFromAncestors(ancestors);
221647
- const isInputContext = currentVisitContext.includes(import_graphql97.Kind.INPUT_OBJECT_TYPE_DEFINITION);
221648
- return isInputContext ? "InputMaybe" : "Maybe";
221649
- }
221650
- NamedType(node, key, parent, path, ancestors) {
221651
- return `${this.getMaybeWrapper(ancestors)}<${super.NamedType(node, key, parent, path, ancestors)}>`;
221652
- }
221653
- ListType(node, key, parent, path, ancestors) {
221654
- return `${this.getMaybeWrapper(ancestors)}<${super.ListType(node, key, parent, path, ancestors)}>`;
221655
- }
221656
- UnionTypeDefinition(node, key, parent) {
221657
- if (this.config.onlyOperationTypes || this.config.onlyEnums)
221658
- return "";
221659
- let withFutureAddedValue = [];
221660
- if (this.config.futureProofUnions) {
221661
- withFutureAddedValue = [
221662
- this.config.immutableTypes ? `{ readonly __typename?: "%other" }` : `{ __typename?: "%other" }`
221663
- ];
221664
- }
221665
- const originalNode = parent[key];
221666
- const possibleTypes = originalNode.types.map((t) => this.scalars[t.name.value] ? this._getScalar(t.name.value, "output") : this.convertName(t)).concat(...withFutureAddedValue).join(" | ");
221667
- return new DeclarationBlock(this._declarationBlockConfig).export().asKind("type").withName(this.convertName(node)).withComment(node.description?.value).withContent(possibleTypes).string;
221668
- }
221669
- wrapWithListType(str) {
221670
- return `${this.config.immutableTypes ? "ReadonlyArray" : "Array"}<${str}>`;
221671
- }
221672
- NonNullType(node) {
221673
- const baseValue = super.NonNullType(node);
221674
- return this.clearOptional(baseValue);
221675
- }
221676
- FieldDefinition(node, key, parent) {
221677
- const typeString = this.config.wrapEntireDefinitions ? `EntireFieldWrapper<${node.type}>` : node.type;
221678
- const originalFieldNode = parent[key];
221679
- const addOptionalSign = !this.config.avoidOptionals.field && originalFieldNode.type.kind !== import_graphql97.Kind.NON_NULL_TYPE;
221680
- const comment = getNodeComment(node);
221681
- const { type } = this.config.declarationKind;
221682
- return comment + indent3(`${this.config.immutableTypes ? "readonly " : ""}${node.name.value}${addOptionalSign ? "?" : ""}: ${typeString}${this.getPunctuation(type)}`);
221683
- }
221684
- InputValueDefinition(node, key, parent, _path, ancestors) {
221685
- const originalFieldNode = parent[key];
221686
- const addOptionalSign = !this.config.avoidOptionals.inputValue && (originalFieldNode.type.kind !== import_graphql97.Kind.NON_NULL_TYPE || !this.config.avoidOptionals.defaultValue && node.defaultValue !== undefined);
221687
- const comment = getNodeComment(node);
221688
- const declarationKind = this.config.declarationKind.type;
221689
- let type = node.type;
221690
- if (node.directives && this.config.directiveArgumentAndInputFieldMappings) {
221691
- type = this._getDirectiveOverrideType(node.directives) || type;
221692
- }
221693
- const readonlyPrefix = this.config.immutableTypes ? "readonly " : "";
221694
- const buildFieldDefinition = (isOneOf = false) => {
221695
- return `${readonlyPrefix}${node.name.value}${addOptionalSign && !isOneOf ? "?" : ""}: ${isOneOf ? this.clearOptional(type) : type}${this.getPunctuation(declarationKind)}`;
221696
- };
221697
- const realParentDef = ancestors?.[ancestors.length - 1];
221698
- if (realParentDef) {
221699
- const parentType = this._schema.getType(realParentDef.name.value);
221700
- if (isOneOfInputObjectType(parentType)) {
221701
- if (originalFieldNode.type.kind === import_graphql97.Kind.NON_NULL_TYPE) {
221702
- throw new Error("Fields on an input object type can not be non-nullable. It seems like the schema was not validated.");
221703
- }
221704
- const fieldParts = [];
221705
- for (const fieldName of Object.keys(parentType.getFields())) {
221706
- if (fieldName === node.name.value) {
221707
- fieldParts.push(buildFieldDefinition(true));
221708
- continue;
221709
- }
221710
- fieldParts.push(`${readonlyPrefix}${fieldName}?: never;`);
221711
- }
221712
- return comment + indent3(`{ ${fieldParts.join(" ")} }`);
221713
- }
221714
- }
221715
- return comment + indent3(buildFieldDefinition());
221716
- }
221717
- EnumTypeDefinition(node) {
221718
- const enumName = node.name.value;
221719
- const outputType = (() => {
221720
- if (this.config.enumsAsTypes) {
221721
- return "string-literal";
221722
- }
221723
- if (this.config.numericEnums) {
221724
- return "native-numeric";
221725
- }
221726
- if (this.config.enumsAsConst) {
221727
- return "const";
221728
- }
221729
- return this.config.constEnums ? "native-const" : "native";
221730
- })();
221731
- return convertSchemaEnumToDeclarationBlockString({
221732
- schema: this._schema,
221733
- node,
221734
- declarationBlockConfig: this._declarationBlockConfig,
221735
- enumName,
221736
- enumValues: this.config.enumValues,
221737
- futureProofEnums: this.config.futureProofEnums,
221738
- ignoreEnumValuesFromSchema: this.config.ignoreEnumValuesFromSchema,
221739
- outputType,
221740
- naming: {
221741
- convert: this.config.convert,
221742
- options: {
221743
- typesPrefix: this.config.typesPrefix,
221744
- typesSuffix: this.config.typesSuffix,
221745
- useTypesPrefix: this.config.enumPrefix,
221746
- useTypesSuffix: this.config.enumSuffix
221747
- }
221748
- }
221749
- });
221750
- }
221751
- getPunctuation(_declarationKind) {
221752
- return ";";
221753
- }
221754
- }
221755
-
221756
- // node_modules/@graphql-codegen/typescript/esm/introspection-visitor.js
221757
- class TsIntrospectionVisitor extends TsVisitor {
221758
- typesToInclude = [];
221759
- constructor(schema, pluginConfig = {}, typesToInclude) {
221760
- super(schema, pluginConfig);
221761
- this.typesToInclude = typesToInclude;
221762
- autoBind(this);
221763
- }
221764
- DirectiveDefinition() {
221765
- return null;
221766
- }
221767
- ObjectTypeDefinition(node, key, parent) {
221768
- const name = node.name.value;
221769
- if (this.typesToInclude.some((type) => type.name === name)) {
221770
- return super.ObjectTypeDefinition(node, key, parent);
221771
- }
221772
- return null;
221773
- }
221774
- EnumTypeDefinition(node) {
221775
- const name = node.name.value;
221776
- if (this.typesToInclude.some((type) => type.name === name)) {
221777
- return super.EnumTypeDefinition(node);
221778
- }
221779
- return null;
221780
- }
221781
- }
221782
- // node_modules/@graphql-codegen/typescript/esm/index.js
221783
- var plugin = (schema, documents, config2) => {
221784
- const { schema: _schema, ast } = transformSchemaAST(schema, config2);
221785
- const visitor2 = new TsVisitor(_schema, config2);
221786
- const visitorResult = oldVisit(ast, { leave: visitor2 });
221787
- const introspectionDefinitions = includeIntrospectionTypesDefinitions(_schema, documents, config2);
221788
- const scalars2 = visitor2.scalarsDefinition;
221789
- const directiveArgumentAndInputFieldMappings = visitor2.directiveArgumentAndInputFieldMappingsDefinition;
221790
- return {
221791
- prepend: [
221792
- ...visitor2.getEnumsImports(),
221793
- ...visitor2.getDirectiveArgumentAndInputFieldMappingsImports(),
221794
- ...visitor2.getScalarsImports(),
221795
- ...visitor2.getWrapperDefinitions()
221796
- ].filter(Boolean),
221797
- content: [
221798
- scalars2,
221799
- directiveArgumentAndInputFieldMappings,
221800
- ...visitorResult.definitions,
221801
- ...introspectionDefinitions
221802
- ].filter(Boolean).join(`
221803
- `)
221804
- };
221805
- };
221806
- function includeIntrospectionTypesDefinitions(schema, documents, config2) {
221807
- const typeInfo = new import_graphql98.TypeInfo(schema);
221808
- const usedTypes = [];
221809
- const documentsVisitor = import_graphql98.visitWithTypeInfo(typeInfo, {
221810
- Field() {
221811
- const type = import_graphql98.getNamedType(typeInfo.getType());
221812
- if (type && import_graphql98.isIntrospectionType(type) && !usedTypes.includes(type)) {
221813
- usedTypes.push(type);
221814
- }
221815
- }
221816
- });
221817
- for (const doc of documents) {
221818
- import_graphql98.visit(doc.document, documentsVisitor);
221819
- }
221820
- const typesToInclude = [];
221821
- for (const type of usedTypes) {
221822
- collectTypes(type);
221823
- }
221824
- const visitor2 = new TsIntrospectionVisitor(schema, config2, typesToInclude);
221825
- const result = oldVisit(import_graphql98.parse(import_graphql98.printIntrospectionSchema(schema)), {
221826
- leave: visitor2
221827
- });
221828
- function collectTypes(type) {
221829
- if (typesToInclude.includes(type)) {
221830
- return;
221831
- }
221832
- typesToInclude.push(type);
221833
- if (import_graphql98.isObjectType(type)) {
221834
- const fields3 = type.getFields();
221835
- for (const key of Object.keys(fields3)) {
221836
- const field = fields3[key];
221837
- const type2 = import_graphql98.getNamedType(field.type);
221838
- collectTypes(type2);
221839
- }
221840
- }
221841
- }
221842
- return result.definitions;
221843
- }
221844
221070
 
221845
221071
  // node_modules/@graphql-codegen/typescript-operations/esm/index.js
221846
- init_esm3();
221847
- var exports_esm2 = {};
221848
- __export(exports_esm2, {
221849
- TypeScriptDocumentsVisitor: () => TypeScriptDocumentsVisitor,
221850
- plugin: () => plugin2
221851
- });
221852
- var import_graphql101 = __toESM(require_graphql2(), 1);
221853
221072
  init_esm7();
221854
221073
 
221855
221074
  // node_modules/@graphql-codegen/typescript-operations/esm/visitor.js
221856
221075
  init_esm3();
221857
221076
  init_esm7();
221858
- var import_graphql100 = __toESM(require_graphql2(), 1);
221077
+ var import_graphql96 = __toESM(require_graphql2(), 1);
221859
221078
 
221860
221079
  // node_modules/@graphql-codegen/typescript-operations/esm/ts-operation-variables-to-object.js
221861
221080
  init_esm7();
221862
- var import_graphql99 = __toESM(require_graphql2(), 1);
221081
+ var import_graphql95 = __toESM(require_graphql2(), 1);
221863
221082
 
221864
- class TypeScriptOperationVariablesToObject2 extends OperationVariablesToObject {
221083
+ class TypeScriptOperationVariablesToObject extends OperationVariablesToObject {
221865
221084
  _config;
221866
221085
  constructor(_config, _scalars, _convertName, _namespacedImportName, _enumNames, _enumPrefix, _enumSuffix, _enumValues, _applyCoercion) {
221867
221086
  super(_scalars, _convertName, _namespacedImportName, _enumNames, _enumPrefix, _enumSuffix, _enumValues, _applyCoercion, {});
@@ -221891,11 +221110,11 @@ class TypeScriptOperationVariablesToObject2 extends OperationVariablesToObject {
221891
221110
  return ";";
221892
221111
  }
221893
221112
  wrapAstTypeWithModifiers(baseType, typeNode, applyCoercion = false) {
221894
- if (typeNode.kind === import_graphql99.Kind.NON_NULL_TYPE) {
221113
+ if (typeNode.kind === import_graphql95.Kind.NON_NULL_TYPE) {
221895
221114
  const type = this.wrapAstTypeWithModifiers(baseType, typeNode.type, applyCoercion);
221896
221115
  return this.clearOptional(type);
221897
221116
  }
221898
- if (typeNode.kind === import_graphql99.Kind.LIST_TYPE) {
221117
+ if (typeNode.kind === import_graphql95.Kind.LIST_TYPE) {
221899
221118
  const innerType = this.wrapAstTypeWithModifiers(baseType, typeNode.type, applyCoercion);
221900
221119
  const listInputCoercionExtension = applyCoercion ? ` | ${innerType}` : "";
221901
221120
  return this.wrapMaybe(`${this._config.immutableTypes ? "ReadonlyArray" : "Array"}<${innerType}>${listInputCoercionExtension}`);
@@ -221916,24 +221135,24 @@ class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
221916
221135
  _needsExactUtilityType = false;
221917
221136
  _usedEnumIntrospectionType = false;
221918
221137
  _outputPath;
221919
- constructor(schema, config2, documentNode, outputPath) {
221920
- super(config2, {
221921
- arrayInputCoercion: getConfigValue(config2.arrayInputCoercion, true),
221922
- noExport: getConfigValue(config2.noExport, false),
221923
- immutableTypes: getConfigValue(config2.immutableTypes, false),
221924
- nonOptionalTypename: getConfigValue(config2.nonOptionalTypename, false),
221925
- mergeFragmentTypes: getConfigValue(config2.mergeFragmentTypes, false),
221926
- allowUndefinedQueryVariables: getConfigValue(config2.allowUndefinedQueryVariables, false),
221927
- enumType: getConfigValue(config2.enumType, "string-literal"),
221928
- ignoreEnumValuesFromSchema: getConfigValue(config2.ignoreEnumValuesFromSchema, false),
221929
- futureProofEnums: getConfigValue(config2.futureProofEnums, false),
221930
- maybeValue: getConfigValue(config2.maybeValue, "T | null"),
221931
- inputMaybeValue: getConfigValue(config2.inputMaybeValue, "T | null | undefined")
221138
+ constructor(schema, config, documentNode, outputPath) {
221139
+ super(config, {
221140
+ arrayInputCoercion: getConfigValue(config.arrayInputCoercion, true),
221141
+ noExport: getConfigValue(config.noExport, false),
221142
+ immutableTypes: getConfigValue(config.immutableTypes, false),
221143
+ nonOptionalTypename: getConfigValue(config.nonOptionalTypename, false),
221144
+ mergeFragmentTypes: getConfigValue(config.mergeFragmentTypes, false),
221145
+ allowUndefinedQueryVariables: getConfigValue(config.allowUndefinedQueryVariables, false),
221146
+ enumType: getConfigValue(config.enumType, "string-literal"),
221147
+ ignoreEnumValuesFromSchema: getConfigValue(config.ignoreEnumValuesFromSchema, false),
221148
+ futureProofEnums: getConfigValue(config.futureProofEnums, false),
221149
+ maybeValue: getConfigValue(config.maybeValue, "T | null"),
221150
+ inputMaybeValue: getConfigValue(config.inputMaybeValue, "T | null | undefined")
221932
221151
  }, schema);
221933
221152
  this.config.enumValues = parseEnumValues({
221934
221153
  schema,
221935
- mapOrStr: config2.enumValues,
221936
- ignoreEnumValuesFromSchema: config2.ignoreEnumValuesFromSchema,
221154
+ mapOrStr: config.enumValues,
221155
+ ignoreEnumValuesFromSchema: config.ignoreEnumValuesFromSchema,
221937
221156
  naming: {
221938
221157
  convert: this.config.convert,
221939
221158
  options: {
@@ -221947,18 +221166,18 @@ class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
221947
221166
  this._outputPath = outputPath;
221948
221167
  autoBind(this);
221949
221168
  const allFragments = [
221950
- ...documentNode.definitions.filter((d) => d.kind === import_graphql100.Kind.FRAGMENT_DEFINITION).map((fragmentDef) => ({
221169
+ ...documentNode.definitions.filter((d) => d.kind === import_graphql96.Kind.FRAGMENT_DEFINITION).map((fragmentDef) => ({
221951
221170
  node: fragmentDef,
221952
221171
  name: fragmentDef.name.value,
221953
221172
  onType: fragmentDef.typeCondition.name.value,
221954
221173
  isExternal: false
221955
221174
  })),
221956
- ...config2.externalFragments || []
221175
+ ...config.externalFragments || []
221957
221176
  ];
221958
221177
  const documentWithAllFragments = {
221959
221178
  ...documentNode,
221960
221179
  definitions: [
221961
- ...documentNode.definitions.filter((d) => d.kind !== import_graphql100.Kind.FRAGMENT_DEFINITION),
221180
+ ...documentNode.definitions.filter((d) => d.kind !== import_graphql96.Kind.FRAGMENT_DEFINITION),
221962
221181
  ...allFragments.map((f) => f.node)
221963
221182
  ]
221964
221183
  };
@@ -221990,8 +221209,8 @@ class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
221990
221209
  printFieldsOnNewLines: this.config.printFieldsOnNewLines
221991
221210
  };
221992
221211
  this.setSelectionSetHandler(new SelectionSetToObject(new PreResolveTypesProcessor(processorConfig), this.scalars, this.schema, this.convertName.bind(this), this.getFragmentSuffix.bind(this), allFragments, this.config));
221993
- const enumsNames = Object.keys(schema.getTypeMap()).filter((typeName) => import_graphql100.isEnumType(schema.getType(typeName)));
221994
- this.setVariablesTransformer(new TypeScriptOperationVariablesToObject2({
221212
+ const enumsNames = Object.keys(schema.getTypeMap()).filter((typeName) => import_graphql96.isEnumType(schema.getType(typeName)));
221213
+ this.setVariablesTransformer(new TypeScriptOperationVariablesToObject({
221995
221214
  avoidOptionals: this.config.avoidOptionals,
221996
221215
  immutableTypes: this.config.immutableTypes,
221997
221216
  inputMaybeValue: this.config.inputMaybeValue
@@ -222078,7 +221297,7 @@ class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
222078
221297
  }
222079
221298
  }
222080
221299
  }
222081
- const addOptionalSign = !oneOfDetails.isOneOfInputValue && !this.config.avoidOptionals.inputValue && (node.type.kind !== import_graphql100.Kind.NON_NULL_TYPE || !this.config.avoidOptionals.defaultValue && node.defaultValue !== undefined);
221300
+ const addOptionalSign = !oneOfDetails.isOneOfInputValue && !this.config.avoidOptionals.inputValue && (node.type.kind !== import_graphql96.Kind.NON_NULL_TYPE || !this.config.avoidOptionals.defaultValue && node.defaultValue !== undefined);
222082
221301
  const keyPart = `${node.name.value}${addOptionalSign ? "?" : ""}`;
222083
221302
  const commentPart = getNodeComment(node);
222084
221303
  const readonlyPart = this.config.immutableTypes ? "readonly " : "";
@@ -222193,7 +221412,7 @@ class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
222193
221412
  return `Exact<${variablesBlock === "{}" ? `{ [key: string]: never; }` : variablesBlock}>${extraType}`;
222194
221413
  }
222195
221414
  collectInnerTypesRecursively({ node, usedSchemaTypes, location }) {
222196
- if (node instanceof import_graphql100.GraphQLEnumType) {
221415
+ if (node instanceof import_graphql96.GraphQLEnumType) {
222197
221416
  if (usedSchemaTypes[node.name]) {
222198
221417
  return;
222199
221418
  }
@@ -222204,7 +221423,7 @@ class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
222204
221423
  };
222205
221424
  return;
222206
221425
  }
222207
- if (node instanceof import_graphql100.GraphQLScalarType) {
221426
+ if (node instanceof import_graphql96.GraphQLScalarType) {
222208
221427
  const scalarType = usedSchemaTypes[node.name] || {
222209
221428
  type: "GraphQLScalarType",
222210
221429
  node,
@@ -222237,7 +221456,7 @@ class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
222237
221456
  };
222238
221457
  const fields3 = node.getFields();
222239
221458
  for (const field of Object.values(fields3)) {
222240
- const fieldType = import_graphql100.getNamedType(field.type);
221459
+ const fieldType = import_graphql96.getNamedType(field.type);
222241
221460
  this.collectInnerTypesRecursively({
222242
221461
  node: fieldType,
222243
221462
  usedSchemaTypes,
@@ -222248,12 +221467,12 @@ class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
222248
221467
  collectUsedSchemaTypesToGenerate({ schema, documentNode }) {
222249
221468
  const schemaTypes = schema.getTypeMap();
222250
221469
  const usedSchemaTypes = {};
222251
- import_graphql100.visit(documentNode, {
221470
+ import_graphql96.visit(documentNode, {
222252
221471
  VariableDefinition: (variableDefinitionNode) => {
222253
- import_graphql100.visit(variableDefinitionNode, {
221472
+ import_graphql96.visit(variableDefinitionNode, {
222254
221473
  NamedType: (namedTypeNode) => {
222255
221474
  const foundInputType = schemaTypes[namedTypeNode.name.value];
222256
- if (foundInputType && (foundInputType instanceof import_graphql100.GraphQLInputObjectType || foundInputType instanceof import_graphql100.GraphQLScalarType || foundInputType instanceof import_graphql100.GraphQLEnumType) && !isNativeNamedType(foundInputType)) {
221475
+ if (foundInputType && (foundInputType instanceof import_graphql96.GraphQLInputObjectType || foundInputType instanceof import_graphql96.GraphQLScalarType || foundInputType instanceof import_graphql96.GraphQLEnumType) && !isNativeNamedType(foundInputType)) {
222257
221476
  this.collectInnerTypesRecursively({
222258
221477
  node: foundInputType,
222259
221478
  usedSchemaTypes,
@@ -222264,24 +221483,24 @@ class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
222264
221483
  });
222265
221484
  }
222266
221485
  });
222267
- const typeInfo = new import_graphql100.TypeInfo(schema);
222268
- import_graphql100.visit(documentNode, import_graphql100.visitWithTypeInfo(typeInfo, {
221486
+ const typeInfo = new import_graphql96.TypeInfo(schema);
221487
+ import_graphql96.visit(documentNode, import_graphql96.visitWithTypeInfo(typeInfo, {
222269
221488
  Field: () => {
222270
221489
  const fieldType = typeInfo.getType();
222271
221490
  if (fieldType) {
222272
- const namedType = import_graphql100.getNamedType(fieldType);
222273
- if (namedType instanceof import_graphql100.GraphQLEnumType) {
221491
+ const namedType = import_graphql96.getNamedType(fieldType);
221492
+ if (namedType instanceof import_graphql96.GraphQLEnumType) {
222274
221493
  usedSchemaTypes[namedType.name] = {
222275
221494
  type: "GraphQLEnumType",
222276
221495
  node: namedType,
222277
221496
  tsType: this.convertName(namedType.name)
222278
221497
  };
222279
- if (import_graphql100.isIntrospectionType(namedType)) {
221498
+ if (import_graphql96.isIntrospectionType(namedType)) {
222280
221499
  this._usedEnumIntrospectionType = true;
222281
221500
  }
222282
221501
  return;
222283
221502
  }
222284
- if (namedType instanceof import_graphql100.GraphQLScalarType) {
221503
+ if (namedType instanceof import_graphql96.GraphQLScalarType) {
222285
221504
  const scalarType = usedSchemaTypes[namedType.name] || {
222286
221505
  type: "GraphQLScalarType",
222287
221506
  node: namedType,
@@ -222322,7 +221541,7 @@ function parseOneOfInputValue({ node, schema, ancestors }) {
222322
221541
  if (realParentDef) {
222323
221542
  const parentType = schema.getType(realParentDef.name.value);
222324
221543
  if (isOneOfInputObjectType(parentType)) {
222325
- if (node.type.kind === import_graphql100.Kind.NON_NULL_TYPE) {
221544
+ if (node.type.kind === import_graphql96.Kind.NON_NULL_TYPE) {
222326
221545
  throw new Error("Fields on an input object type can not be non-nullable. It seems like the schema was not validated.");
222327
221546
  }
222328
221547
  return { isOneOfInputValue: true, realParentDef, parentType };
@@ -222331,14 +221550,14 @@ function parseOneOfInputValue({ node, schema, ancestors }) {
222331
221550
  return { isOneOfInputValue: false };
222332
221551
  }
222333
221552
  function collectAndFlattenTypeNodes({ currentTypeNode, isPreviousNodeNonNullable, typeNodes }) {
222334
- if (currentTypeNode.kind === import_graphql100.Kind.NON_NULL_TYPE) {
221553
+ if (currentTypeNode.kind === import_graphql96.Kind.NON_NULL_TYPE) {
222335
221554
  const nextTypeNode = currentTypeNode.type;
222336
221555
  collectAndFlattenTypeNodes({
222337
221556
  currentTypeNode: nextTypeNode,
222338
221557
  isPreviousNodeNonNullable: true,
222339
221558
  typeNodes
222340
221559
  });
222341
- } else if (currentTypeNode.kind === import_graphql100.Kind.LIST_TYPE) {
221560
+ } else if (currentTypeNode.kind === import_graphql96.Kind.LIST_TYPE) {
222342
221561
  typeNodes.push({ type: "ListType", isNonNullable: isPreviousNodeNonNullable });
222343
221562
  const nextTypeNode = currentTypeNode.type;
222344
221563
  collectAndFlattenTypeNodes({
@@ -222346,7 +221565,7 @@ function collectAndFlattenTypeNodes({ currentTypeNode, isPreviousNodeNonNullable
222346
221565
  isPreviousNodeNonNullable: false,
222347
221566
  typeNodes
222348
221567
  });
222349
- } else if (currentTypeNode.kind === import_graphql100.Kind.NAMED_TYPE) {
221568
+ } else if (currentTypeNode.kind === import_graphql96.Kind.NAMED_TYPE) {
222350
221569
  typeNodes.push({
222351
221570
  type: "NamedType",
222352
221571
  isNonNullable: isPreviousNodeNonNullable,
@@ -222356,10 +221575,10 @@ function collectAndFlattenTypeNodes({ currentTypeNode, isPreviousNodeNonNullable
222356
221575
  }
222357
221576
 
222358
221577
  // node_modules/@graphql-codegen/typescript-operations/esm/index.js
222359
- var plugin2 = async (inputSchema, rawDocuments, config2, { outputFile }) => {
222360
- const schema = config2.nullability?.errorHandlingClient ? await semanticToStrict(inputSchema) : inputSchema;
222361
- const documents = config2.flattenGeneratedTypes ? optimizeOperations(schema, rawDocuments, {
222362
- includeFragments: config2.flattenGeneratedTypesIncludeFragments
221578
+ var plugin = async (inputSchema, rawDocuments, config, { outputFile }) => {
221579
+ const schema = config.nullability?.errorHandlingClient ? await semanticToStrict(inputSchema) : inputSchema;
221580
+ const documents = config.flattenGeneratedTypes ? optimizeOperations(schema, rawDocuments, {
221581
+ includeFragments: config.flattenGeneratedTypesIncludeFragments
222363
221582
  }) : rawDocuments;
222364
221583
  const parsedDocuments = documents.reduce((prev, document) => {
222365
221584
  prev.all.documentFiles.push(document);
@@ -222373,14 +221592,14 @@ var plugin2 = async (inputSchema, rawDocuments, config2, { outputFile }) => {
222373
221592
  all: { documentFiles: [], documentNodes: [] },
222374
221593
  standard: { documentFiles: [], documentNodes: [] }
222375
221594
  });
222376
- const allDocumentsAST = import_graphql101.concatAST(parsedDocuments.all.documentNodes);
222377
- const visitor2 = new TypeScriptDocumentsVisitor(schema, config2, allDocumentsAST, outputFile);
222378
- const documentsToVisitAST = import_graphql101.concatAST(parsedDocuments.standard.documentNodes);
221595
+ const allDocumentsAST = import_graphql97.concatAST(parsedDocuments.all.documentNodes);
221596
+ const visitor = new TypeScriptDocumentsVisitor(schema, config, allDocumentsAST, outputFile);
221597
+ const documentsToVisitAST = import_graphql97.concatAST(parsedDocuments.standard.documentNodes);
222379
221598
  const operationsResult = oldVisit(documentsToVisitAST, {
222380
- leave: visitor2
221599
+ leave: visitor
222381
221600
  });
222382
221601
  const operationsDefinitions = operationsResult.definitions;
222383
- if (config2.addOperationExport) {
221602
+ if (config.addOperationExport) {
222384
221603
  for (const d of allDocumentsAST.definitions) {
222385
221604
  if ("name" in d) {
222386
221605
  operationsDefinitions.push(`export declare const ${d.name.value}: import("graphql").DocumentNode;`);
@@ -222388,14 +221607,14 @@ var plugin2 = async (inputSchema, rawDocuments, config2, { outputFile }) => {
222388
221607
  }
222389
221608
  }
222390
221609
  let schemaTypesDefinitions = [];
222391
- if (!config2.importSchemaTypesFrom) {
222392
- const schemaTypes = oldVisit(transformSchemaAST(schema, config2).ast, { leave: visitor2 });
221610
+ if (!config.importSchemaTypesFrom) {
221611
+ const schemaTypes = oldVisit(transformSchemaAST(schema, config).ast, { leave: visitor });
222393
221612
  schemaTypesDefinitions = findTransformedDefinitions(schemaTypes);
222394
221613
  }
222395
221614
  let introspectionTypesDefinitions = [];
222396
- if (visitor2.shouldVisitIntrospectionTypes()) {
222397
- const introspectionTypes = oldVisit(import_graphql101.parse(import_graphql101.printIntrospectionSchema(schema)), {
222398
- leave: visitor2
221615
+ if (visitor.shouldVisitIntrospectionTypes()) {
221616
+ const introspectionTypes = oldVisit(import_graphql97.parse(import_graphql97.printIntrospectionSchema(schema)), {
221617
+ leave: visitor
222399
221618
  });
222400
221619
  introspectionTypesDefinitions = findTransformedDefinitions(introspectionTypes);
222401
221620
  }
@@ -222405,7 +221624,7 @@ var plugin2 = async (inputSchema, rawDocuments, config2, { outputFile }) => {
222405
221624
  ...operationsDefinitions
222406
221625
  ].join(`
222407
221626
  `);
222408
- if (config2.globalNamespace) {
221627
+ if (config.globalNamespace) {
222409
221628
  content = `
222410
221629
  declare global {
222411
221630
  ${content}
@@ -222413,13 +221632,13 @@ var plugin2 = async (inputSchema, rawDocuments, config2, { outputFile }) => {
222413
221632
  }
222414
221633
  return {
222415
221634
  prepend: [
222416
- ...visitor2.getImports(),
222417
- ...visitor2.getExternalSchemaTypeImports(),
222418
- ...visitor2.getEnumsImports(),
222419
- ...visitor2.getScalarsImports(),
222420
- ...visitor2.getGlobalDeclarations(visitor2.config.noExport),
222421
- visitor2.getExactUtilityType(),
222422
- visitor2.getIncrementalUtilityType()
221635
+ ...visitor.getImports(),
221636
+ ...visitor.getExternalSchemaTypeImports(),
221637
+ ...visitor.getEnumsImports(),
221638
+ ...visitor.getScalarsImports(),
221639
+ ...visitor.getGlobalDeclarations(visitor.config.noExport),
221640
+ visitor.getExactUtilityType(),
221641
+ visitor.getIncrementalUtilityType()
222423
221642
  ],
222424
221643
  content
222425
221644
  };
@@ -222442,12 +221661,12 @@ var ts2 = __toESM(require_typescript(), 1);
222442
221661
  var ts = __toESM(require_typescript(), 1);
222443
221662
  import { mkdir as mkdir2, readFile as readFile4 } from "node:fs/promises";
222444
221663
  import { createHash as createHash7 } from "node:crypto";
222445
- import { dirname as dirname7, resolve as resolve8 } from "node:path";
221664
+ import { dirname as dirname7, resolve as resolve9 } from "node:path";
222446
221665
  import { createHash as createHash32 } from "node:crypto";
222447
221666
  import { relative as relative4, resolve as resolvePath, sep as sep3 } from "node:path";
222448
221667
  import { createHash as createHash22 } from "node:crypto";
222449
221668
  import { existsSync as existsSync8, readFileSync as readFileSync6 } from "node:fs";
222450
- import { dirname as dirname4, join as join10, resolve as resolve9 } from "node:path";
221669
+ import { dirname as dirname4, join as join10, resolve as resolve8 } from "node:path";
222451
221670
  import { createHash as createHash6 } from "node:crypto";
222452
221671
  var ts4 = __toESM(require_typescript(), 1);
222453
221672
  var ts5 = __toESM(require_typescript(), 1);
@@ -222457,7 +221676,7 @@ import { join as join42 } from "node:path";
222457
221676
  import { existsSync as existsSync22, readFileSync as readFileSync22 } from "node:fs";
222458
221677
  import { dirname as dirname42, join as join32, relative as relative42, resolve as resolve32, sep as sep4 } from "node:path";
222459
221678
  import { existsSync as existsSync62 } from "node:fs";
222460
- import { join as join62, resolve as resolve72 } from "node:path";
221679
+ import { join as join62, resolve as resolve82 } from "node:path";
222461
221680
  import { pathToFileURL } from "node:url";
222462
221681
  var __defProp2 = Object.defineProperty;
222463
221682
  var __returnValue2 = (v) => v;
@@ -222482,10 +221701,11 @@ function camelName(token) {
222482
221701
  return token.charAt(0).toLowerCase() + token.slice(1);
222483
221702
  }
222484
221703
  function relativeImportPath(fromDir, toFile) {
222485
- const fromParts = fromDir.split("/").filter(Boolean);
222486
- const toParts = toFile.split("/").filter(Boolean);
221704
+ const fromParts = fromDir.split(/[\\/]/).filter(Boolean);
221705
+ const toParts = toFile.split(/[\\/]/).filter(Boolean);
221706
+ const isWindows = process.platform === "win32" || /^[a-zA-Z]:/.test(fromParts[0] ?? "") || /^[a-zA-Z]:/.test(toParts[0] ?? "");
222487
221707
  let common = 0;
222488
- while (common < fromParts.length && common < toParts.length && fromParts[common] === toParts[common]) {
221708
+ while (common < fromParts.length && common < toParts.length && (fromParts[common] === toParts[common] || isWindows && fromParts[common].toLowerCase() === toParts[common].toLowerCase())) {
222489
221709
  common += 1;
222490
221710
  }
222491
221711
  const ups = fromParts.length - common;
@@ -222695,19 +221915,19 @@ function topoSortModules(modules) {
222695
221915
  const byName = new Map(modules.map((m) => [m.name, m]));
222696
221916
  const visited2 = new Set;
222697
221917
  const result = [];
222698
- const visit10 = (module) => {
221918
+ const visit9 = (module) => {
222699
221919
  if (visited2.has(module.name))
222700
221920
  return;
222701
221921
  visited2.add(module.name);
222702
221922
  for (const importName of module.imports) {
222703
221923
  const dep = byName.get(importName);
222704
221924
  if (dep && dep !== module)
222705
- visit10(dep);
221925
+ visit9(dep);
222706
221926
  }
222707
221927
  result.push(module);
222708
221928
  };
222709
221929
  for (const module of modules)
222710
- visit10(module);
221930
+ visit9(module);
222711
221931
  return result;
222712
221932
  }
222713
221933
  function pascalName(name) {
@@ -223665,11 +222885,11 @@ export function createGraphqlClient(options: GraphqlClientOptions) {
223665
222885
  }
223666
222886
  endpoint.pathname = endpoint.pathname.replace(/\\/$/, "") + "/graphql/v1";
223667
222887
  const fetcher = options.fetch ?? globalThis.fetch.bind(globalThis);
223668
- return getSdk<GraphqlRequestOptions>(async <R, V>(
222888
+ return getSdk<GraphqlRequestOptions>(async (
223669
222889
  query: string,
223670
- variables?: V,
222890
+ variables?: unknown,
223671
222891
  request?: GraphqlRequestOptions,
223672
- ): Promise<R> => {
222892
+ ): Promise<unknown> => {
223673
222893
  const headers = new Headers({ "Content-Type": "application/json", Accept: "application/json" });
223674
222894
  if (options.publishableKey) headers.set("apikey", options.publishableKey);
223675
222895
  const token = await options.getAccessToken?.();
@@ -223678,7 +222898,7 @@ export function createGraphqlClient(options: GraphqlClientOptions) {
223678
222898
  method: "POST",
223679
222899
  headers,
223680
222900
  body: JSON.stringify({ query, variables }),
223681
- signal: request?.signal,
222901
+ ...(request?.signal ? { signal: request.signal } : {}),
223682
222902
  redirect: "error",
223683
222903
  });
223684
222904
  if (!response.ok) {
@@ -223704,8 +222924,8 @@ export function createGraphqlClient(options: GraphqlClientOptions) {
223704
222924
  if (!("data" in envelope) || !envelope.data || typeof envelope.data !== "object" || Array.isArray(envelope.data)) {
223705
222925
  throw new GraphqlRequestError("invalid-response", "GraphQL returned no result object.", response.status);
223706
222926
  }
223707
- // Operation types describe the schema snapshot, not runtime response validation.
223708
- return envelope.data as R;
222927
+ // The operation-specific parser in getSdk validates selected field values.
222928
+ return envelope.data;
223709
222929
  });
223710
222930
  }
223711
222931
  `;
@@ -223772,6 +222992,161 @@ function graphqlInputPaths(options) {
223772
222992
  var init_graphql_inputs = __esm2(() => {
223773
222993
  init_graphql_options();
223774
222994
  });
222995
+ function renderGraphqlValidators(source, operationNames) {
222996
+ const fileName = resolve52("/__supacloud_graphql__/contracts.ts");
222997
+ const options = {
222998
+ strict: true,
222999
+ noUncheckedIndexedAccess: true,
223000
+ exactOptionalPropertyTypes: true,
223001
+ noImplicitOverride: true,
223002
+ noPropertyAccessFromIndexSignature: true,
223003
+ noFallthroughCasesInSwitch: true,
223004
+ skipLibCheck: false,
223005
+ target: ts7.ScriptTarget.ES2022,
223006
+ lib: ["lib.es2022.d.ts"],
223007
+ types: [],
223008
+ noEmit: true
223009
+ };
223010
+ const host = ts7.createCompilerHost(options);
223011
+ const getSourceFile = host.getSourceFile.bind(host);
223012
+ host.getSourceFile = (path, languageVersion, onError, shouldCreateNewSourceFile) => path === fileName ? ts7.createSourceFile(path, source, languageVersion, true) : getSourceFile(path, languageVersion, onError, shouldCreateNewSourceFile);
223013
+ const program = ts7.createProgram([fileName], options, host);
223014
+ const diagnostics = ts7.getPreEmitDiagnostics(program);
223015
+ if (diagnostics.length) {
223016
+ throw new Error(`Generated GraphQL types cannot be validated: ${diagnostics.map((item) => ts7.flattenDiagnosticMessageText(item.messageText, `
223017
+ `)).join("; ")}`);
223018
+ }
223019
+ const checker = program.getTypeChecker();
223020
+ const entry = program.getSourceFile(fileName);
223021
+ const module = entry && checker.getSymbolAtLocation(entry);
223022
+ if (!module)
223023
+ throw new Error("Generated GraphQL types have no module");
223024
+ const exports = new Map(checker.getExportsOfModule(module).map((symbol) => [symbol.name, symbol]));
223025
+ if (exports.has("GraphqlQueryResults")) {
223026
+ throw new Error("GraphQL type GraphqlQueryResults conflicts with the generated result registry.");
223027
+ }
223028
+ const names = new Map;
223029
+ const definitions = new Map;
223030
+ function unsupported(type) {
223031
+ throw new Error(`Unsupported GraphQL result wire type: ${checker.typeToString(type)}. Map custom scalars to JSON wire types or unknown.`);
223032
+ }
223033
+ function reference(type) {
223034
+ const existing = names.get(type);
223035
+ if (existing)
223036
+ return existing;
223037
+ const name = `checkGraphqlValue${names.size}`;
223038
+ names.set(type, name);
223039
+ definitions.set(name, "");
223040
+ definitions.set(name, `function ${name}(value: unknown): boolean {
223041
+ return ${expression(type)};
223042
+ }`);
223043
+ return name;
223044
+ }
223045
+ function expression(type) {
223046
+ if (type.flags & ts7.TypeFlags.Any)
223047
+ return unsupported(type);
223048
+ if (type.flags & ts7.TypeFlags.Unknown)
223049
+ return "true";
223050
+ if (type.flags & ts7.TypeFlags.Never)
223051
+ return "false";
223052
+ if (type.flags & ts7.TypeFlags.Null)
223053
+ return "value === null";
223054
+ if (type.flags & ts7.TypeFlags.Undefined)
223055
+ return "value === undefined";
223056
+ if (type.isStringLiteral() || type.isNumberLiteral())
223057
+ return `value === ${JSON.stringify(type.value)}`;
223058
+ if (type.flags & ts7.TypeFlags.BooleanLiteral)
223059
+ return `value === ${checker.typeToString(type)}`;
223060
+ if (type.flags & ts7.TypeFlags.String)
223061
+ return 'typeof value === "string"';
223062
+ if (type.flags & ts7.TypeFlags.Number)
223063
+ return 'typeof value === "number" && Number.isFinite(value)';
223064
+ if (type.flags & ts7.TypeFlags.Boolean)
223065
+ return 'typeof value === "boolean"';
223066
+ if (type.isUnion())
223067
+ return type.types.map((part) => `${reference(part)}(value)`).join(" || ");
223068
+ if (type.isIntersection())
223069
+ return type.types.map((part) => `${reference(part)}(value)`).join(" && ");
223070
+ if (checker.isTupleType(type))
223071
+ return unsupported(type);
223072
+ if (checker.isArrayType(type)) {
223073
+ const item = checker.getIndexTypeOfType(type, ts7.IndexKind.Number);
223074
+ if (!item)
223075
+ return unsupported(type);
223076
+ return `isGraphqlArray(value) && Array.from(value).every(${reference(item)})`;
223077
+ }
223078
+ if (type.flags & ts7.TypeFlags.Object) {
223079
+ if (type.getCallSignatures().length || type.getConstructSignatures().length)
223080
+ return unsupported(type);
223081
+ const indexes = checker.getIndexInfosOfType(type);
223082
+ if (indexes.some((index) => !(index.keyType.flags & ts7.TypeFlags.String)))
223083
+ return unsupported(type);
223084
+ const properties = checker.getPropertiesOfType(type).map((property2) => {
223085
+ const declaration = property2.valueDeclaration ?? property2.declarations?.[0];
223086
+ if (!declaration)
223087
+ return unsupported(type);
223088
+ const check2 = reference(checker.getTypeOfSymbolAtLocation(property2, declaration));
223089
+ const key = JSON.stringify(property2.name);
223090
+ const present = `Object.prototype.hasOwnProperty.call(value, ${key})`;
223091
+ return property2.flags & ts7.SymbolFlags.Optional ? `(!${present} || ${check2}(value[${key}]))` : `(${present} && ${check2}(value[${key}]))`;
223092
+ });
223093
+ const indexedValues = indexes.map((index) => `Object.values(value).every(${reference(index.type)})`);
223094
+ return ["isGraphqlRecord(value)", ...properties, ...indexedValues].join(" && ");
223095
+ }
223096
+ return unsupported(type);
223097
+ }
223098
+ const operations = [...operationNames].sort();
223099
+ const parsers = operations.map((name) => {
223100
+ const typeName = `${name}Query`;
223101
+ const symbol = exports.get(typeName);
223102
+ if (!symbol)
223103
+ throw new Error(`Missing generated operation type: ${typeName}`);
223104
+ const check2 = reference(checker.getDeclaredTypeOfSymbol(symbol));
223105
+ return `export function is${typeName}(value: unknown): value is ${typeName} {
223106
+ return ${check2}(value);
223107
+ }
223108
+ export function parse${typeName}(value: unknown): ${typeName} {
223109
+ if (!is${typeName}(value)) {
223110
+ throw new GraphqlRequestError("invalid-response", ${JSON.stringify(`GraphQL result does not match ${name}.`)});
223111
+ }
223112
+ return value;
223113
+ }`;
223114
+ });
223115
+ return `
223116
+ function isGraphqlRecord(value: unknown): value is Record<string, unknown> {
223117
+ return value !== null && typeof value === "object" && !Array.isArray(value);
223118
+ }
223119
+ function isGraphqlArray(value: unknown): value is unknown[] {
223120
+ return Array.isArray(value);
223121
+ }
223122
+ ${[...definitions.values()].join(`
223123
+ `)}
223124
+ ${parsers.join(`
223125
+ `)}
223126
+ export interface GraphqlQueryResults {
223127
+ ${operations.map((name) => ` ${JSON.stringify(name)}: ${name}Query;`).join(`
223128
+ `)}
223129
+ }
223130
+ export function isGraphqlResult<Name extends keyof GraphqlQueryResults>(
223131
+ name: Name, value: unknown,
223132
+ ): value is GraphqlQueryResults[Name] {
223133
+ switch (name) {
223134
+ ${operations.map((name) => ` case ${JSON.stringify(name)}: return is${name}Query(value);`).join(`
223135
+ `)}
223136
+ default: return false;
223137
+ }
223138
+ }
223139
+ export function parseGraphqlResult<Name extends keyof GraphqlQueryResults>(
223140
+ name: Name, value: unknown,
223141
+ ): GraphqlQueryResults[Name] {
223142
+ if (!isGraphqlResult(name, value)) {
223143
+ throw new GraphqlRequestError("invalid-response", "GraphQL result does not match operation " + name + ".");
223144
+ }
223145
+ return value;
223146
+ }
223147
+ `;
223148
+ }
223149
+ var init_graphql_runtime = () => {};
223775
223150
  var exports_graphql = {};
223776
223151
  __export2(exports_graphql, {
223777
223152
  renderGraphql: () => renderGraphql
@@ -223801,7 +223176,7 @@ async function renderGraphql(options) {
223801
223176
  };
223802
223177
  result.contract = contract;
223803
223178
  const diagnostic = (code, error, file) => {
223804
- const gql = error instanceof import_graphql103.GraphQLError ? error : undefined;
223179
+ const gql = error instanceof import_graphql99.GraphQLError ? error : undefined;
223805
223180
  const source = gql?.source?.name ?? gql?.nodes?.[0]?.loc?.source.name ?? file;
223806
223181
  result.diagnostics.push({
223807
223182
  severity: "error",
@@ -223819,11 +223194,11 @@ async function renderGraphql(options) {
223819
223194
  contract.schemaHash = createHash5("sha256").update(schemaContent).digest("hex");
223820
223195
  if (schemaPath.endsWith(".json")) {
223821
223196
  const json = JSON.parse(schemaContent);
223822
- schema = import_graphql103.buildClientSchema(json.data ?? json);
223197
+ schema = import_graphql99.buildClientSchema(json.data ?? json);
223823
223198
  } else {
223824
- schema = import_graphql103.buildSchema(new import_graphql103.Source(schemaContent, schemaPath));
223199
+ schema = import_graphql99.buildSchema(new import_graphql99.Source(schemaContent, schemaPath));
223825
223200
  }
223826
- for (const error of import_graphql103.validateSchema(schema))
223201
+ for (const error of import_graphql99.validateSchema(schema))
223827
223202
  diagnostic("graphql-schema-invalid", error, schemaPath);
223828
223203
  } catch (error) {
223829
223204
  diagnostic("graphql-schema-invalid", error, schemaPath);
@@ -223834,7 +223209,7 @@ async function renderGraphql(options) {
223834
223209
  const documents = [];
223835
223210
  for (const path of paths.slice(1)) {
223836
223211
  try {
223837
- documents.push({ location: path, document: import_graphql103.parse(new import_graphql103.Source(await readFile2(path, "utf8"), path)) });
223212
+ documents.push({ location: path, document: import_graphql99.parse(new import_graphql99.Source(await readFile2(path, "utf8"), path)) });
223838
223213
  } catch (error) {
223839
223214
  diagnostic("graphql-document-invalid", error, path);
223840
223215
  }
@@ -223845,13 +223220,13 @@ async function renderGraphql(options) {
223845
223220
  diagnostic("graphql-documents-missing", new Error("No GraphQL query documents matched the configured patterns."), schemaPath);
223846
223221
  return result;
223847
223222
  }
223848
- const combined = import_graphql103.concatAST(documents.map(({ document }) => document));
223223
+ const combined = import_graphql99.concatAST(documents.map(({ document }) => document));
223849
223224
  const queryEntries = contract.operations;
223850
223225
  for (const definition of combined.definitions) {
223851
- if (definition.kind !== import_graphql103.Kind.OPERATION_DEFINITION && definition.kind !== import_graphql103.Kind.FRAGMENT_DEFINITION) {
223852
- diagnostic("graphql-document-invalid", new import_graphql103.GraphQLError("Query documents may contain only operations and fragments.", { nodes: definition }));
223226
+ if (definition.kind !== import_graphql99.Kind.OPERATION_DEFINITION && definition.kind !== import_graphql99.Kind.FRAGMENT_DEFINITION) {
223227
+ diagnostic("graphql-document-invalid", new import_graphql99.GraphQLError("Query documents may contain only operations and fragments.", { nodes: definition }));
223853
223228
  }
223854
- if (definition.kind !== import_graphql103.Kind.OPERATION_DEFINITION)
223229
+ if (definition.kind !== import_graphql99.Kind.OPERATION_DEFINITION)
223855
223230
  continue;
223856
223231
  if (definition.operation !== "query") {
223857
223232
  result.diagnostics.push({
@@ -223864,7 +223239,7 @@ async function renderGraphql(options) {
223864
223239
  });
223865
223240
  }
223866
223241
  if (!definition.name) {
223867
- diagnostic("graphql-operation-name-required", new import_graphql103.GraphQLError("Name each query to generate a stable client method.", { nodes: definition }));
223242
+ diagnostic("graphql-operation-name-required", new import_graphql99.GraphQLError("Name each query to generate a stable client method.", { nodes: definition }));
223868
223243
  } else {
223869
223244
  queryEntries.push({
223870
223245
  name: definition.name.value,
@@ -223873,16 +223248,15 @@ async function renderGraphql(options) {
223873
223248
  });
223874
223249
  }
223875
223250
  }
223876
- for (const error of import_graphql103.validate(schema, combined))
223251
+ for (const error of import_graphql99.validate(schema, combined))
223877
223252
  diagnostic("graphql-validation", error);
223878
223253
  if (result.diagnostics.length)
223879
223254
  return result;
223880
223255
  try {
223881
- const config2 = {
223256
+ const config = {
223882
223257
  useTypeImports: true,
223883
- skipTypename: true,
223884
- enumsAsTypes: true,
223885
- onlyOperationTypes: true,
223258
+ nonOptionalTypename: false,
223259
+ enumType: "string-literal",
223886
223260
  namingConvention: "keep",
223887
223261
  dedupeOperationSuffix: false,
223888
223262
  omitOperationSuffix: false,
@@ -223891,25 +223265,25 @@ async function renderGraphql(options) {
223891
223265
  };
223892
223266
  const generated = await codegen({
223893
223267
  filename: "graphql.ts",
223894
- schema: import_graphql103.parse(import_graphql103.printSchema(schema)),
223268
+ schema: import_graphql99.parse(import_graphql99.printSchema(schema)),
223895
223269
  schemaAst: schema,
223896
223270
  documents,
223897
- config: config2,
223898
- plugins: [{ typescript: {} }, { operations: {} }],
223899
- pluginMap: { typescript: exports_esm, operations: exports_esm2 }
223271
+ config,
223272
+ plugins: [{ operations: {} }],
223273
+ pluginMap: { operations: exports_esm }
223900
223274
  });
223901
- const separated = import_graphql103.separateOperations(combined);
223275
+ const separated = import_graphql99.separateOperations(combined);
223902
223276
  const methods = Object.entries(separated).sort(([a], [b]) => a.localeCompare(b)).map(([name, document]) => {
223903
- const operation = document.definitions.find((node) => node.kind === import_graphql103.Kind.OPERATION_DEFINITION);
223904
- if (operation.kind !== import_graphql103.Kind.OPERATION_DEFINITION)
223277
+ const operation = document.definitions.find((node) => node.kind === import_graphql99.Kind.OPERATION_DEFINITION);
223278
+ if (!operation || operation.kind !== import_graphql99.Kind.OPERATION_DEFINITION)
223905
223279
  throw new Error("Missing query operation");
223906
- const required = operation.variableDefinitions?.some((variable) => variable.type.kind === import_graphql103.Kind.NON_NULL_TYPE && !variable.defaultValue);
223907
- return ` ${JSON.stringify(name)}(variables${required ? "" : "?"}: ${name}QueryVariables, options?: C): Promise<${name}Query> {
223908
- return requester<${name}Query, ${name}QueryVariables>(${JSON.stringify(import_graphql103.print(document))}, variables, options);
223280
+ const required = operation.variableDefinitions?.some((variable) => variable.type.kind === import_graphql99.Kind.NON_NULL_TYPE && !variable.defaultValue);
223281
+ return ` async ${JSON.stringify(name)}(variables${required ? "" : "?"}: ${name}QueryVariables, options?: C): Promise<${name}Query> {
223282
+ return parse${name}Query(await requester(${JSON.stringify(import_graphql99.print(document))}, variables, options));
223909
223283
  }`;
223910
223284
  });
223911
223285
  const facade = `
223912
- export type Requester<C> = <R, V>(query: string, variables?: V, options?: C) => Promise<R>;
223286
+ export type Requester<C> = (query: string, variables?: unknown, options?: C) => Promise<unknown>;
223913
223287
  export function getSdk<C>(requester: Requester<C>) {
223914
223288
  return {
223915
223289
  ${methods.join(`,
@@ -223917,19 +223291,20 @@ ${methods.join(`,
223917
223291
  };
223918
223292
  }
223919
223293
  `;
223294
+ const validators = renderGraphqlValidators(generated, queryEntries.map((entry) => entry.name));
223920
223295
  result.files["graphql.ts"] = `// GENERATED BY @supacloud/compiler. DO NOT EDIT.
223921
- ` + generated + facade + GRAPHQL_CLIENT_SOURCE;
223296
+ ` + generated + validators + facade + GRAPHQL_CLIENT_SOURCE;
223922
223297
  if (options.graphql.typedDocuments) {
223923
- const typedDocuments = await Promise.resolve().then(() => (init_esm8(), exports_esm3));
223298
+ const typedDocuments = await Promise.resolve().then(() => (init_esm8(), exports_esm2));
223924
223299
  result.files["graphql.documents.ts"] = `// GENERATED BY @supacloud/compiler. DO NOT EDIT.
223925
223300
  ` + await codegen({
223926
223301
  filename: "graphql.documents.ts",
223927
- schema: import_graphql103.parse(import_graphql103.printSchema(schema)),
223302
+ schema: import_graphql99.parse(import_graphql99.printSchema(schema)),
223928
223303
  schemaAst: schema,
223929
223304
  documents,
223930
- config: config2,
223931
- plugins: [{ typescript: {} }, { operations: {} }, { typedDocuments: {} }],
223932
- pluginMap: { typescript: exports_esm, operations: exports_esm2, typedDocuments }
223305
+ config,
223306
+ plugins: [{ operations: {} }, { typedDocuments: {} }],
223307
+ pluginMap: { operations: exports_esm, typedDocuments }
223933
223308
  });
223934
223309
  }
223935
223310
  result.files["graphql.manifest.json"] = JSON.stringify({
@@ -223947,6 +223322,7 @@ ${methods.join(`,
223947
223322
  var init_graphql = __esm2(() => {
223948
223323
  init_graphql_inputs();
223949
223324
  init_graphql_options();
223325
+ init_graphql_runtime();
223950
223326
  });
223951
223327
  var exports_graphql_schema = {};
223952
223328
  __export2(exports_graphql_schema, {
@@ -223991,7 +223367,7 @@ async function pullGraphqlSchema(options) {
223991
223367
  throw new Error("GraphQL schema export failed. Verify caller grants and enable introspection only in the intended development environment.");
223992
223368
  }
223993
223369
  const schema = lexicographicSortSchema(buildClientSchema2(data));
223994
- const path = resolve8(options.output);
223370
+ const path = resolve9(options.output);
223995
223371
  const content = path.endsWith(".json") ? JSON.stringify(introspectionFromSchema(schema), null, 2) + `
223996
223372
  ` : `# GENERATED BY supacloud-compiler graphql-schema. DO NOT EDIT.
223997
223373
  # Database First: change database declarations, apply migrations, then re-export for the intended role.
@@ -224039,15 +223415,15 @@ class TraitCompiler {
224039
223415
  }
224040
223416
  compileSourceFile(sourceFile) {
224041
223417
  const traits = [];
224042
- const visit10 = (node) => {
223418
+ const visit9 = (node) => {
224043
223419
  for (const handler of this.handlers) {
224044
223420
  const name = handler.detect(node);
224045
223421
  if (name)
224046
223422
  traits.push(record(handler.kind, name, sourceFile, node));
224047
223423
  }
224048
- ts.forEachChild(node, visit10);
223424
+ ts.forEachChild(node, visit9);
224049
223425
  };
224050
- visit10(sourceFile);
223426
+ visit9(sourceFile);
224051
223427
  return traits;
224052
223428
  }
224053
223429
  }
@@ -224134,7 +223510,7 @@ function decoratedDeclaration(decorator) {
224134
223510
  };
224135
223511
  }
224136
223512
  function createIncrementalProgramSession(projectRoot) {
224137
- const rootDir = resolve9(projectRoot);
223513
+ const rootDir = resolve8(projectRoot);
224138
223514
  let projectConfig = readProjectConfig(rootDir);
224139
223515
  let projectConfigKey = configKey(projectConfig);
224140
223516
  let builder;
@@ -224163,8 +223539,8 @@ function createIncrementalProgramSession(projectRoot) {
224163
223539
  }
224164
223540
  projectConfig = nextProjectConfig;
224165
223541
  projectConfigKey = nextProjectConfigKey;
224166
- const normalizedRoots = [...new Set(rootNames.map((file) => resolve9(rootDir, file)))].sort();
224167
- const normalizedChanged = [...new Set(changedPaths.map((file) => resolve9(rootDir, file)))];
223542
+ const normalizedRoots = [...new Set(rootNames.map((file) => resolve8(rootDir, file)))].sort();
223543
+ const normalizedChanged = [...new Set(changedPaths.map((file) => resolve8(rootDir, file)))];
224168
223544
  const invalidatedPaths = new Set(normalizedChanged.map(canonical));
224169
223545
  for (const sourceFile of oldSourceFiles.values()) {
224170
223546
  if (sourceVersion(sourceFile.fileName) !== sourceFileVersion(sourceFile)) {
@@ -224265,7 +223641,7 @@ function createHost(options, rootDir, sourceFileCache, invalidatedPaths, invalid
224265
223641
  return host;
224266
223642
  }
224267
223643
  function canonical(fileName) {
224268
- const normalized = resolve9(fileName);
223644
+ const normalized = resolve8(fileName);
224269
223645
  return ts2.sys.useCaseSensitiveFileNames ? normalized : normalized.toLowerCase();
224270
223646
  }
224271
223647
  function sourceFileParseKey(languageVersion) {
@@ -224275,11 +223651,11 @@ function sourceFileParseKey(languageVersion) {
224275
223651
  jsDocParsingMode: languageVersion.jsDocParsingMode
224276
223652
  });
224277
223653
  }
224278
- function configKey(config2) {
223654
+ function configKey(config) {
224279
223655
  return JSON.stringify({
224280
- options: config2.options,
224281
- projectReferences: config2.projectReferences,
224282
- configFingerprint: config2.configFingerprint
223656
+ options: config.options,
223657
+ projectReferences: config.projectReferences,
223658
+ configFingerprint: config.configFingerprint
224283
223659
  });
224284
223660
  }
224285
223661
  function hashText(text) {
@@ -224319,15 +223695,15 @@ function readProjectConfig(rootDir) {
224319
223695
  configReads.set(canonical(fileName), text === undefined ? "missing" : hashText(text));
224320
223696
  return text;
224321
223697
  };
224322
- const config2 = ts2.readConfigFile(configPath, readConfig);
224323
- if (config2.error) {
223698
+ const config = ts2.readConfigFile(configPath, readConfig);
223699
+ if (config.error) {
224324
223700
  return {
224325
223701
  options: {},
224326
- errors: [config2.error],
223702
+ errors: [config.error],
224327
223703
  configFingerprint: JSON.stringify([...configReads])
224328
223704
  };
224329
223705
  }
224330
- const parsed = ts2.parseJsonConfigFileContent(config2.config, { ...ts2.sys, readFile: readConfig }, dirname4(configPath));
223706
+ const parsed = ts2.parseJsonConfigFileContent(config.config, { ...ts2.sys, readFile: readConfig }, dirname4(configPath));
224331
223707
  return {
224332
223708
  options: parsed.options,
224333
223709
  errors: parsed.errors,
@@ -224383,12 +223759,12 @@ function hasDestroyHook(cls) {
224383
223759
  }
224384
223760
  function descendantsOfKind(root, predicate) {
224385
223761
  const result = [];
224386
- const visit10 = (node) => {
223762
+ const visit9 = (node) => {
224387
223763
  if (predicate(node))
224388
223764
  result.push(node);
224389
- ts3.forEachChild(node, visit10);
223765
+ ts3.forEachChild(node, visit9);
224390
223766
  };
224391
- visit10(root);
223767
+ visit9(root);
224392
223768
  return result;
224393
223769
  }
224394
223770
  async function analyzeProject(rootDir, include, cache, changedPaths) {
@@ -227157,7 +226533,7 @@ function detectCycles(graph, resolveDep) {
227157
226533
  const state = new Map;
227158
226534
  const stack = [];
227159
226535
  const reported = new Set;
227160
- const visit10 = (ref) => {
226536
+ const visit9 = (ref) => {
227161
226537
  const id = nodeId(ref);
227162
226538
  if (state.get(id) === "done")
227163
226539
  return;
@@ -227190,13 +226566,13 @@ function detectCycles(graph, resolveDep) {
227190
226566
  skipSelf: ref.provider.skipSelfDeps?.includes(dep)
227191
226567
  });
227192
226568
  if (resolved)
227193
- visit10(resolved);
226569
+ visit9(resolved);
227194
226570
  }
227195
226571
  stack.pop();
227196
226572
  state.set(id, "done");
227197
226573
  };
227198
226574
  for (const ref of nodes)
227199
- visit10(ref);
226575
+ visit9(ref);
227200
226576
  return diagnostics;
227201
226577
  }
227202
226578
  function detectExistingAliasCycles(graph, resolveDep) {
@@ -227246,7 +226622,7 @@ function detectModuleCycles(graph) {
227246
226622
  const state = new Map;
227247
226623
  const stack = [];
227248
226624
  const reported = new Set;
227249
- const visit10 = (name) => {
226625
+ const visit9 = (name) => {
227250
226626
  if (state.get(name) === "done")
227251
226627
  return;
227252
226628
  if (state.get(name) === "visiting") {
@@ -227276,7 +226652,7 @@ function detectModuleCycles(graph) {
227276
226652
  if (mod) {
227277
226653
  for (const importName of mod.imports) {
227278
226654
  if (moduleMap.has(importName)) {
227279
- visit10(importName);
226655
+ visit9(importName);
227280
226656
  }
227281
226657
  }
227282
226658
  }
@@ -227284,7 +226660,7 @@ function detectModuleCycles(graph) {
227284
226660
  state.set(name, "done");
227285
226661
  };
227286
226662
  for (const mod of graph.modules) {
227287
- visit10(mod.name);
226663
+ visit9(mod.name);
227288
226664
  }
227289
226665
  return diagnostics;
227290
226666
  }
@@ -227446,10 +226822,10 @@ function scanSourceFile(sourceFile, checker, rootDir, diagnostics, strict) {
227446
226822
  }
227447
226823
  }
227448
226824
  function readProjectConfig2(configPath) {
227449
- const config2 = ts5.readConfigFile(configPath, (file) => readFileSync22(file, "utf8"));
227450
- if (config2.error)
227451
- return { options: {}, errors: [config2.error] };
227452
- const parsed = ts5.parseJsonConfigFileContent(config2.config, ts5.sys, dirname42(configPath));
226825
+ const config = ts5.readConfigFile(configPath, (file) => readFileSync22(file, "utf8"));
226826
+ if (config.error)
226827
+ return { options: {}, errors: [config.error] };
226828
+ const parsed = ts5.parseJsonConfigFileContent(config.config, ts5.sys, dirname42(configPath));
227453
226829
  return { options: parsed.options, errors: parsed.errors };
227454
226830
  }
227455
226831
  function isProductionSource(rootDir, sourceFile, excludes, outDir) {
@@ -227500,21 +226876,21 @@ function isConstDeclaration(declaration) {
227500
226876
  }
227501
226877
  function descendants(root) {
227502
226878
  const result = [];
227503
- const visit10 = (node) => {
226879
+ const visit9 = (node) => {
227504
226880
  result.push(node);
227505
- ts5.forEachChild(node, visit10);
226881
+ ts5.forEachChild(node, visit9);
227506
226882
  };
227507
- ts5.forEachChild(root, visit10);
226883
+ ts5.forEachChild(root, visit9);
227508
226884
  return result;
227509
226885
  }
227510
226886
  function descendantsOfKind2(root, predicate) {
227511
226887
  const result = [];
227512
- const visit10 = (node) => {
226888
+ const visit9 = (node) => {
227513
226889
  if (predicate(node))
227514
226890
  result.push(node);
227515
- ts5.forEachChild(node, visit10);
226891
+ ts5.forEachChild(node, visit9);
227516
226892
  };
227517
- ts5.forEachChild(root, visit10);
226893
+ ts5.forEachChild(root, visit9);
227518
226894
  return result;
227519
226895
  }
227520
226896
  function makeDiagnostic(code, message, fileOrSourceFile, node, strict, rootDir) {
@@ -227769,21 +227145,46 @@ var DEFAULT_SUPACLOUD_CONFIG = {
227769
227145
  treeShakeUnusedProviders: true,
227770
227146
  moduleBoundaryPreset: "modular-monolith"
227771
227147
  };
227772
- function defineSupacloudConfig(config2 = {}) {
227773
- if (config2.graphql !== undefined && config2.graphql !== false)
227774
- assertGraphqlOptions(config2.graphql);
227148
+ function defineSupacloudConfig(config = {}) {
227149
+ if (config.graphql !== undefined && config.graphql !== false)
227150
+ assertGraphqlOptions(config.graphql);
227151
+ validateGovernanceConfig(config);
227775
227152
  return {
227776
227153
  ...DEFAULT_SUPACLOUD_CONFIG,
227777
- ...config2,
227778
- include: config2.include ?? [...DEFAULT_SUPACLOUD_CONFIG.include],
227779
- graphql: config2.graphql ?? DEFAULT_SUPACLOUD_CONFIG.graphql
227154
+ ...config,
227155
+ include: config.include ?? [...DEFAULT_SUPACLOUD_CONFIG.include],
227156
+ graphql: config.graphql ?? DEFAULT_SUPACLOUD_CONFIG.graphql
227780
227157
  };
227781
227158
  }
227782
- function resolveSupacloudConfig(config2 = {}, cwd2 = process.cwd()) {
227783
- const resolved = defineSupacloudConfig(config2);
227159
+ function validateGovernanceConfig(config) {
227160
+ const isRecord3 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
227161
+ const isStrings = (value) => Array.isArray(value) && Array.from(value).every((item) => typeof item === "string" && item.trim().length > 0);
227162
+ if (config.moduleBoundaries !== undefined) {
227163
+ if (!Array.isArray(config.moduleBoundaries))
227164
+ throw new Error("moduleBoundaries must be an array of module tag rules.");
227165
+ const rules = config.moduleBoundaries;
227166
+ for (const rule of rules) {
227167
+ if (!isRecord3(rule) || typeof rule["sourceTag"] !== "string" || !rule["sourceTag"].trim() || Object.keys(rule).some((key) => !["sourceTag", "onlyDependOnLibsWithTags", "bannedDependenciesWithTags"].includes(key)) || rule["onlyDependOnLibsWithTags"] !== undefined && !isStrings(rule["onlyDependOnLibsWithTags"]) || rule["bannedDependenciesWithTags"] !== undefined && !isStrings(rule["bannedDependenciesWithTags"])) {
227168
+ throw new Error("moduleBoundaries rules require sourceTag and optional string arrays onlyDependOnLibsWithTags/bannedDependenciesWithTags.");
227169
+ }
227170
+ }
227171
+ }
227172
+ if (config.typeSafety !== undefined) {
227173
+ const rules = config.typeSafety;
227174
+ if (!isRecord3(rules) || Object.keys(rules).some((key) => !["scanProductionSource", "noAnyInGenerated", "exclude"].includes(key)) || rules["scanProductionSource"] !== undefined && typeof rules["scanProductionSource"] !== "boolean" || rules["noAnyInGenerated"] !== undefined && typeof rules["noAnyInGenerated"] !== "boolean" || rules["exclude"] !== undefined && !isStrings(rules["exclude"])) {
227175
+ throw new Error("typeSafety accepts boolean scanProductionSource/noAnyInGenerated and a string array exclude.");
227176
+ }
227177
+ }
227178
+ for (const key of ["allowRouteCommandBindings", "disallowControllerDirectDb", "detectOrphanModules"]) {
227179
+ if (config[key] !== undefined && typeof config[key] !== "boolean")
227180
+ throw new Error(`${key} must be a boolean.`);
227181
+ }
227182
+ }
227183
+ function resolveSupacloudConfig(config = {}, cwd2 = process.cwd()) {
227184
+ const resolved = defineSupacloudConfig(config);
227784
227185
  return {
227785
- rootDir: resolve72(cwd2, resolved.root ?? DEFAULT_SUPACLOUD_CONFIG.root),
227786
- outDir: resolve72(cwd2, resolved.outDir ?? DEFAULT_SUPACLOUD_CONFIG.outDir),
227186
+ rootDir: resolve82(cwd2, resolved.root ?? DEFAULT_SUPACLOUD_CONFIG.root),
227187
+ outDir: resolve82(cwd2, resolved.outDir ?? DEFAULT_SUPACLOUD_CONFIG.outDir),
227787
227188
  include: resolved.include ?? [...DEFAULT_SUPACLOUD_CONFIG.include],
227788
227189
  strict: resolved.strict ?? DEFAULT_SUPACLOUD_CONFIG.strict,
227789
227190
  requireRouteContracts: resolved.requireRouteContracts ?? DEFAULT_SUPACLOUD_CONFIG.requireRouteContracts,
@@ -227791,10 +227192,15 @@ function resolveSupacloudConfig(config2 = {}, cwd2 = process.cwd()) {
227791
227192
  generatePermissions: resolved.generatePermissions ?? DEFAULT_SUPACLOUD_CONFIG.generatePermissions,
227792
227193
  moduleBoundaryPreset: resolved.moduleBoundaryPreset ?? DEFAULT_SUPACLOUD_CONFIG.moduleBoundaryPreset,
227793
227194
  commandCapabilities: resolved.commandCapabilities,
227195
+ ...resolved.moduleBoundaries ? { moduleBoundaries: resolved.moduleBoundaries } : {},
227196
+ ...resolved.typeSafety ? { typeSafety: resolved.typeSafety } : {},
227197
+ ...resolved.allowRouteCommandBindings === undefined ? {} : { allowRouteCommandBindings: resolved.allowRouteCommandBindings },
227198
+ ...resolved.disallowControllerDirectDb === undefined ? {} : { disallowControllerDirectDb: resolved.disallowControllerDirectDb },
227199
+ ...resolved.detectOrphanModules === undefined ? {} : { detectOrphanModules: resolved.detectOrphanModules },
227794
227200
  treeShakeUnusedProviders: resolved.treeShakeUnusedProviders ?? DEFAULT_SUPACLOUD_CONFIG.treeShakeUnusedProviders,
227795
227201
  graphql: resolved.graphql ? {
227796
227202
  ...resolved.graphql,
227797
- schema: resolve72(cwd2, resolved.graphql.schema)
227203
+ schema: resolve82(cwd2, resolved.graphql.schema)
227798
227204
  } : undefined
227799
227205
  };
227800
227206
  }
@@ -227811,21 +227217,8 @@ async function loadSupacloudConfig(cwd2 = process.cwd()) {
227811
227217
  const imported = await import(pathToFileURL(configPath).href);
227812
227218
  return defineSupacloudConfig(imported.default ?? {});
227813
227219
  }
227814
- function compileOptionsFromConfig(config2, cwd2 = process.cwd()) {
227815
- const resolved = resolveSupacloudConfig(config2, cwd2);
227816
- return {
227817
- rootDir: resolved.rootDir,
227818
- outDir: resolved.outDir,
227819
- include: resolved.include,
227820
- strict: resolved.strict,
227821
- requireRouteContracts: resolved.requireRouteContracts,
227822
- generateClient: resolved.generateClient,
227823
- generatePermissions: resolved.generatePermissions,
227824
- moduleBoundaryPreset: resolved.moduleBoundaryPreset,
227825
- commandCapabilities: resolved.commandCapabilities,
227826
- treeShakeUnusedProviders: resolved.treeShakeUnusedProviders,
227827
- graphql: resolved.graphql
227828
- };
227220
+ function compileOptionsFromConfig(config, cwd2 = process.cwd()) {
227221
+ return resolveSupacloudConfig(config, cwd2);
227829
227222
  }
227830
227223
  init_graphql_schema();
227831
227224
 
@@ -227945,7 +227338,7 @@ function buildToolDefinitions(manifest) {
227945
227338
 
227946
227339
  // src/shared/tools/app-starter.ts
227947
227340
  import { lstat, mkdir as mkdir3, readdir, writeFile } from "node:fs/promises";
227948
- import { basename as basename5, dirname as dirname5, join as join11, resolve as resolve11 } from "node:path";
227341
+ import { basename as basename5, dirname as dirname5, join as join11, resolve as resolve10 } from "node:path";
227949
227342
 
227950
227343
  // src/shared/tools/app-starter-environment.ts
227951
227344
  var STARTER_ENVIRONMENT = String.raw`import { existsSync, readFileSync } from "node:fs";
@@ -228080,7 +227473,7 @@ test("partial and untagged inherited remote profiles cannot mix with selected fi
228080
227473
  // ../compiler/package.json
228081
227474
  var package_default = {
228082
227475
  name: "@supacloud/compiler",
228083
- version: "0.13.0",
227476
+ version: "0.15.0",
228084
227477
  description: "Static compiler for @supacloud/app metadata: builds the application graph from AST, validates it, and generates reflection-free factory code",
228085
227478
  type: "module",
228086
227479
  main: "./dist/index.js",
@@ -228105,8 +227498,9 @@ var package_default = {
228105
227498
  "build:js": "bun build src/index.ts src/cli.ts --outdir dist --target node --external @typescript/typescript6 --external graphql --external '@graphql-codegen/*'",
228106
227499
  "build:types": "tsc -p tsconfig.json --emitDeclarationOnly",
228107
227500
  clean: "rm -rf dist",
228108
- prepublishOnly: "bun run build",
227501
+ prepublishOnly: "bun run build && bun run test:package",
228109
227502
  test: "bun test",
227503
+ "test:package": 'SUPACLOUD_COMPILER_TEST_CLI="$PWD/dist/cli.js" bun test src/graphql-package.test.ts',
228110
227504
  benchmark: "bun run src/benchmark.ts",
228111
227505
  typecheck: "tsc -p tsconfig.json --noEmit",
228112
227506
  "typecheck:test": "tsc -p tsconfig.test.json --noEmit"
@@ -228127,7 +227521,6 @@ var package_default = {
228127
227521
  dependencies: {
228128
227522
  "@graphql-codegen/core": "^6.2.0",
228129
227523
  "@graphql-codegen/typed-document-node": "^7.1.0",
228130
- "@graphql-codegen/typescript": "^6.1.0",
228131
227524
  "@graphql-codegen/typescript-operations": "^6.1.6",
228132
227525
  "@graphql-typed-document-node/core": "^3.2.0",
228133
227526
  "@typescript/typescript6": "^6.0.2",
@@ -228776,7 +228169,7 @@ and governance; TypeScript checks both application and generated source.
228776
228169
  };
228777
228170
  }
228778
228171
  async function initializeAppProject(options) {
228779
- const root = resolve11(options.root ?? process.cwd());
228172
+ const root = resolve10(options.root ?? process.cwd());
228780
228173
  const name = options.name ?? basename5(root);
228781
228174
  if (!/^[a-z][a-z0-9-]*$/.test(name) || name.length > 100) {
228782
228175
  throw new Error("Project name must be lowercase kebab-case (1-100 characters)");
@@ -228951,14 +228344,14 @@ async function runCheck(args) {
228951
228344
  const root = resolve12(args.root || process.cwd());
228952
228345
  const loadedConfig = await loadSupacloudConfig(root);
228953
228346
  const defaults = resolveSupacloudConfig(loadedConfig, root);
228954
- const config2 = compileOptionsFromConfig({
228347
+ const config = compileOptionsFromConfig({
228955
228348
  ...loadedConfig,
228956
228349
  root: sourceRoot(args, root, loadedConfig.root),
228957
228350
  outDir: args.out_dir ? resolve12(root, args.out_dir) : defaults.outDir,
228958
228351
  include: parseInclude(args.include) ?? loadedConfig.include,
228959
228352
  strict: args.strict ?? loadedConfig.strict ?? false
228960
228353
  }, root);
228961
- const result = await checkProject(config2);
228354
+ const result = await checkProject(config);
228962
228355
  const hasError = result.diagnostics.some((diagnostic) => diagnostic.severity === "error") || result.mismatches.length > 0;
228963
228356
  const summary = `checked ${result.graph.modules.length} module(s), no files written`;
228964
228357
  return textResult([
@@ -229266,10 +228659,10 @@ var POLCMD_MAP = {
229266
228659
  d: "delete",
229267
228660
  "*": "all"
229268
228661
  };
229269
- function extractSearchPath(config2) {
229270
- if (!config2)
228662
+ function extractSearchPath(config) {
228663
+ if (!config)
229271
228664
  return null;
229272
- const entry = config2.find((item) => item.startsWith("search_path="));
228665
+ const entry = config.find((item) => item.startsWith("search_path="));
229273
228666
  if (!entry)
229274
228667
  return null;
229275
228668
  return entry.slice("search_path=".length);
@@ -231936,14 +231329,14 @@ async function readDeployConfig(configRoot) {
231936
231329
  const candidate = await readJson(configPath);
231937
231330
  if (candidate === null)
231938
231331
  return {};
231939
- const config2 = record2(candidate);
231940
- const frontend = record2(config2?.frontend);
231941
- const targetValues = record2(config2?.targets);
231942
- if (!config2 || config2.frontend !== undefined && !frontend || config2.targets !== undefined && !targetValues) {
231332
+ const config = record2(candidate);
231333
+ const frontend = record2(config?.frontend);
231334
+ const targetValues = record2(config?.targets);
231335
+ if (!config || config.frontend !== undefined && !frontend || config.targets !== undefined && !targetValues) {
231943
231336
  throw new Error("supacloud.json must contain object-valued 'frontend' or 'targets' configuration");
231944
231337
  }
231945
231338
  return {
231946
- defaultTarget: optionalText(config2.defaultTarget, "defaultTarget"),
231339
+ defaultTarget: optionalText(config.defaultTarget, "defaultTarget"),
231947
231340
  targets: targetValues ? Object.fromEntries(Object.entries(targetValues).map(([name, value]) => [name, deployTargetConfig(value, name)])) : undefined,
231948
231341
  frontend: frontend ? {
231949
231342
  id: optionalText(frontend.id, "frontend.id"),
@@ -232014,13 +231407,13 @@ function targetRoot(configRoot, target, name) {
232014
231407
  }
232015
231408
  return root;
232016
231409
  }
232017
- function selectTarget(configRoot, invocationDirectory, config2, requestedName) {
232018
- const targets = config2.targets ? Object.entries(config2.targets) : [["frontend", {
231410
+ function selectTarget(configRoot, invocationDirectory, config, requestedName) {
231411
+ const targets = config.targets ? Object.entries(config.targets) : [["frontend", {
232019
231412
  type: "frontend",
232020
- root: config2.frontend?.root,
232021
- id: config2.frontend?.id,
232022
- buildCommand: config2.frontend?.buildCommand,
232023
- outputDirectory: config2.frontend?.outputDirectory
231413
+ root: config.frontend?.root,
231414
+ id: config.frontend?.id,
231415
+ buildCommand: config.frontend?.buildCommand,
231416
+ outputDirectory: config.frontend?.outputDirectory
232024
231417
  }]];
232025
231418
  if (targets.length === 0)
232026
231419
  throw new Error("supacloud.json defines no deploy targets");
@@ -232035,10 +231428,10 @@ function selectTarget(configRoot, invocationDirectory, config2, requestedName) {
232035
231428
  const selected = containing[0];
232036
231429
  return { name: selected.name, config: selected.target, root: selected.root };
232037
231430
  }
232038
- if (config2.defaultTarget) {
232039
- const selected = targets.find(([name]) => name === config2.defaultTarget);
231431
+ if (config.defaultTarget) {
231432
+ const selected = targets.find(([name]) => name === config.defaultTarget);
232040
231433
  if (!selected)
232041
- throw new Error(`supacloud.json defaultTarget '${config2.defaultTarget}' was not found`);
231434
+ throw new Error(`supacloud.json defaultTarget '${config.defaultTarget}' was not found`);
232042
231435
  return { name: selected[0], config: selected[1], root: targetRoot(configRoot, selected[1], selected[0]) };
232043
231436
  }
232044
231437
  if (targets.length === 1) {
@@ -232086,7 +231479,7 @@ async function collectArchiveFiles(root) {
232086
231479
  throw new Error(`Frontend output directory does not exist or is not a regular directory: ${root}`);
232087
231480
  }
232088
231481
  const paths = [];
232089
- const visit10 = async (directory) => {
231482
+ const visit9 = async (directory) => {
232090
231483
  const entries = [];
232091
231484
  for await (const entry of await opendir(directory))
232092
231485
  entries.push(entry);
@@ -232097,14 +231490,14 @@ async function collectArchiveFiles(root) {
232097
231490
  if (stats.isSymbolicLink())
232098
231491
  throw new Error(`Frontend output cannot contain symbolic links: ${path}`);
232099
231492
  if (stats.isDirectory())
232100
- await visit10(path);
231493
+ await visit9(path);
232101
231494
  else if (stats.isFile())
232102
231495
  paths.push(path);
232103
231496
  else
232104
231497
  throw new Error(`Frontend output contains an unsupported file type: ${path}`);
232105
231498
  }
232106
231499
  };
232107
- await visit10(root);
231500
+ await visit9(root);
232108
231501
  if (paths.length === 0)
232109
231502
  throw new Error(`Frontend output directory is empty: ${root}`);
232110
231503
  let bytes = 0;
@@ -232177,8 +231570,8 @@ function registerDeployTools(server2, http, options = {}) {
232177
231570
  if (!projectRef2)
232178
231571
  throw new Error("A linked project ref is required. Set SUPACLOUD_PROJECT_REF or pass --ref");
232179
231572
  const configRoot = await findDeployConfigRoot(invocationDirectory);
232180
- const config2 = await readDeployConfig(configRoot);
232181
- const target = selectTarget(configRoot, invocationDirectory, config2, String(args.target || "").trim() || undefined);
231573
+ const config = await readDeployConfig(configRoot);
231574
+ const target = selectTarget(configRoot, invocationDirectory, config, String(args.target || "").trim() || undefined);
232182
231575
  const projectDirectory = target.root;
232183
231576
  const targetState = await lstat2(projectDirectory).catch(() => null);
232184
231577
  if (!targetState?.isDirectory() || targetState.isSymbolicLink()) {
@@ -232400,8 +231793,8 @@ function toolFailed(value) {
232400
231793
  async function migrateDatabase(args, options) {
232401
231794
  const root = resolve17(String(args.project_dir || options.cwd || process.cwd()));
232402
231795
  const projectConfig = await readProjectConfig3(root);
232403
- const config2 = projectConfig.dev || {};
232404
- const database = config2.database || {};
231796
+ const config = projectConfig.dev || {};
231797
+ const database = config.database || {};
232405
231798
  const execute = options.execute || ((command, commandArgs, cwd2) => runProcess(command, commandArgs, cwd2));
232406
231799
  const drizzleConfig = resolve17(root, String(args.drizzle_config || database.drizzleConfig || "drizzle.config.ts"));
232407
231800
  const migrationsDir = String(args.migrations_dir || database.migrationsDir || "supabase/migrations");
@@ -232434,22 +231827,22 @@ async function readProjectConfig3(root) {
232434
231827
  }
232435
231828
  }
232436
231829
  async function readDevConfig(root) {
232437
- const config2 = await readProjectConfig3(root);
232438
- return config2.dev || {};
231830
+ const config = await readProjectConfig3(root);
231831
+ return config.dev || {};
232439
231832
  }
232440
231833
  async function sourceFingerprint(root) {
232441
231834
  const files = [];
232442
- const visit10 = async (directory) => {
231835
+ const visit9 = async (directory) => {
232443
231836
  const entries = await readdir2(directory, { withFileTypes: true });
232444
231837
  for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
232445
231838
  const path = join16(directory, entry.name);
232446
231839
  if (entry.isDirectory() && ![".git", "node_modules", "dist", "generated", ".supacloud"].includes(entry.name))
232447
- await visit10(path);
231840
+ await visit9(path);
232448
231841
  else if (entry.isFile())
232449
231842
  files.push(path);
232450
231843
  }
232451
231844
  };
232452
- await visit10(root);
231845
+ await visit9(root);
232453
231846
  const hash2 = createHash10("sha256");
232454
231847
  for (const file of files) {
232455
231848
  hash2.update(file.slice(root.length).replace(/\\/g, "/"));
@@ -232468,17 +231861,17 @@ function remoteRoot(value) {
232468
231861
  throw new Error("Invalid remote_root");
232469
231862
  return normalized.replace(/\/$/, "");
232470
231863
  }
232471
- function targetDirectory(root, target, functionSlug, config2 = {}) {
231864
+ function targetDirectory(root, target, functionSlug, config = {}) {
232472
231865
  if (target === "db")
232473
231866
  return join16(root, "supabase", "migrations");
232474
231867
  if (target === "functions") {
232475
- const targets = config2.targets && typeof config2.targets === "object" ? config2.targets : {};
231868
+ const targets = config.targets && typeof config.targets === "object" ? config.targets : {};
232476
231869
  const match = Object.values(targets).find((entry) => entry?.type === "edge_function" && (!functionSlug || String(entry.slug || "") === functionSlug));
232477
231870
  const base2 = match?.root ? resolve17(root, String(match.root)) : join16(root, "supabase", "functions");
232478
231871
  return match?.root ? base2 : functionSlug ? join16(base2, safeToken(functionSlug, "function")) : base2;
232479
231872
  }
232480
231873
  if (target === "frontend") {
232481
- const targets = config2.targets && typeof config2.targets === "object" ? config2.targets : {};
231874
+ const targets = config.targets && typeof config.targets === "object" ? config.targets : {};
232482
231875
  const match = Object.values(targets).find((entry) => entry?.type === "frontend");
232483
231876
  return match?.root ? resolve17(root, String(match.root)) : join16(root, "apps", "web");
232484
231877
  }
@@ -232493,11 +231886,11 @@ function remoteTargetRoot(root, target, functionSlug) {
232493
231886
  return `${root}/frontend`;
232494
231887
  return `${root}/project`;
232495
231888
  }
232496
- function connectionArgs(options, config2, args) {
232497
- const host = String(args.remote_host || config2.host || options.host || "").trim();
232498
- const user = String(args.remote_user || config2.user || options.sshUser || "").trim();
232499
- const port = Number(args.remote_port || config2.port || options.sshPort || 22);
232500
- const key = String(args.remote_key || config2.key || options.sshKey || "").trim();
231889
+ function connectionArgs(options, config, args) {
231890
+ const host = String(args.remote_host || config.host || options.host || "").trim();
231891
+ const user = String(args.remote_user || config.user || options.sshUser || "").trim();
231892
+ const port = Number(args.remote_port || config.port || options.sshPort || 22);
231893
+ const key = String(args.remote_key || config.key || options.sshKey || "").trim();
232501
231894
  if (!host)
232502
231895
  throw new Error("Remote dev requires SUPACLOUD_HOST or --remote_host");
232503
231896
  safeToken(host, "remote_host");
@@ -232512,8 +231905,8 @@ function connectionArgs(options, config2, args) {
232512
231905
  function targetConfigPath(target) {
232513
231906
  return target === "project" ? "project" : target;
232514
231907
  }
232515
- function reloadCommand(config2, target, projectRef2, functionSlug) {
232516
- const command = config2.reloadCommand?.trim() || "supacloud-dev-agent reload";
231908
+ function reloadCommand(config, target, projectRef2, functionSlug) {
231909
+ const command = config.reloadCommand?.trim() || "supacloud-dev-agent reload";
232517
231910
  if (!/^[A-Za-z0-9._/-]+(?: [A-Za-z0-9._:/=-]+)*$/.test(command))
232518
231911
  throw new Error("Invalid reloadCommand in supacloud.json");
232519
231912
  return [...command.split(" "), "--project-ref", safeToken(projectRef2 || "test", "project_ref"), "--target", targetConfigPath(target), ...functionSlug ? ["--function", safeToken(functionSlug, "function")] : []];
@@ -232536,19 +231929,19 @@ function rsyncArgs(connection, source, destination, excludes, deleteRemote) {
232536
231929
  async function syncOnce(args, options) {
232537
231930
  const root = resolve17(String(args.project_dir || options.cwd || process.cwd()));
232538
231931
  const projectConfig = await readProjectConfig3(root);
232539
- const config2 = projectConfig.dev || {};
231932
+ const config = projectConfig.dev || {};
232540
231933
  const target = String(args.target || "project");
232541
231934
  const source = targetDirectory(root, target, typeof args.function === "string" ? args.function : undefined, projectConfig);
232542
231935
  if (!existsSync12(source))
232543
231936
  throw new Error(`Dev source directory not found: ${source}`);
232544
231937
  let compiled = false;
232545
- if (config2.compile === true && target !== "db") {
232546
- const compileRoot = resolve17(root, config2.compileRoot || ".");
232547
- const compileOutDir = resolve17(root, config2.compileOutDir || "generated");
231938
+ if (config.compile === true && target !== "db") {
231939
+ const compileRoot = resolve17(root, config.compileRoot || ".");
231940
+ const compileOutDir = resolve17(root, config.compileOutDir || "generated");
232548
231941
  const compilation = await compileProject({
232549
231942
  rootDir: compileRoot,
232550
231943
  outDir: compileOutDir,
232551
- strict: config2.compileStrict !== false
231944
+ strict: config.compileStrict !== false
232552
231945
  });
232553
231946
  const errors3 = compilation.diagnostics.filter((diagnostic) => diagnostic.severity === "error");
232554
231947
  if (errors3.length > 0) {
@@ -232556,22 +231949,22 @@ async function syncOnce(args, options) {
232556
231949
  }
232557
231950
  compiled = true;
232558
231951
  }
232559
- const remoteBase = remoteRoot(String(args.remote_root || config2.remoteRoot || `/var/lib/supacloud/dev/${options.projectRef || "project"}`));
231952
+ const remoteBase = remoteRoot(String(args.remote_root || config.remoteRoot || `/var/lib/supacloud/dev/${options.projectRef || "project"}`));
232560
231953
  const slug = typeof args.function === "string" ? args.function : undefined;
232561
231954
  const destination = remoteTargetRoot(remoteBase, target, slug);
232562
- const connection = connectionArgs(options, config2, args);
231955
+ const connection = connectionArgs(options, config, args);
232563
231956
  const execute = options.execute || ((command, commandArgs, cwd2) => runProcess(command, commandArgs, cwd2));
232564
231957
  const mkdir4 = await execute("ssh", sshArgs(connection, ["mkdir", "-p", destination]), root);
232565
231958
  if (mkdir4.exitCode !== 0)
232566
231959
  throw new Error(`Remote dev prepare failed: ${mkdir4.stderr.trim() || `exit ${mkdir4.exitCode}`}`);
232567
- const excludes = Array.isArray(config2.excludes) ? config2.excludes : ["node_modules", ".git", ".env*", "dist", ".supacloud"];
231960
+ const excludes = Array.isArray(config.excludes) ? config.excludes : ["node_modules", ".git", ".env*", "dist", ".supacloud"];
232568
231961
  const sync = await execute("rsync", rsyncArgs(connection, source, destination, excludes, args.delete === true), root);
232569
231962
  if (sync.exitCode !== 0)
232570
231963
  throw new Error(`Remote dev sync failed: ${sync.stderr.trim() || `exit ${sync.exitCode}`}`);
232571
231964
  const shouldReload = args.reload !== false;
232572
231965
  let reload = null;
232573
231966
  if (shouldReload) {
232574
- reload = await execute("ssh", sshArgs(connection, reloadCommand(config2, target, options.projectRef, slug)), root);
231967
+ reload = await execute("ssh", sshArgs(connection, reloadCommand(config, target, options.projectRef, slug)), root);
232575
231968
  if (reload.exitCode !== 0)
232576
231969
  throw new Error(`Remote dev reload failed: ${reload.stderr.trim() || `exit ${reload.exitCode}`}`);
232577
231970
  }
@@ -232583,8 +231976,8 @@ function registerRemoteDevTools(server2, options = {}) {
232583
231976
  throw new Error("Remote dev mode is forbidden for production environments");
232584
231977
  if (args.action === "status") {
232585
231978
  const root = resolve17(String(args.project_dir || options.cwd || process.cwd()));
232586
- const config2 = await readDevConfig(root);
232587
- const connection = connectionArgs(options, config2, args);
231979
+ const config = await readDevConfig(root);
231980
+ const connection = connectionArgs(options, config, args);
232588
231981
  const execute = options.execute || ((command, commandArgs, cwd2) => runProcess(command, commandArgs, cwd2));
232589
231982
  const status = await execute("ssh", sshArgs(connection, ["supacloud-dev-agent", "status", "--project-ref", safeToken(options.projectRef || "test", "project_ref")]), root);
232590
231983
  return { content: [{ type: "text", text: JSON.stringify({ ok: status.exitCode === 0, mode: "dev", action: "status", host: connection.host, output: status.stdout.trim(), error: status.stderr.trim() }, null, 2) }], isError: status.exitCode !== 0 };
@@ -232617,7 +232010,7 @@ function registerRemoteDevTools(server2, options = {}) {
232617
232010
  // package.json
232618
232011
  var package_default4 = {
232619
232012
  name: "@supacloud/cli",
232620
- version: "0.51.0",
232013
+ version: "0.51.2",
232621
232014
  description: "Project-scoped CLI for SupaCloud users",
232622
232015
  type: "module",
232623
232016
  main: "./dist/index.js",
@@ -232650,7 +232043,7 @@ var package_default4 = {
232650
232043
  },
232651
232044
  dependencies: {
232652
232045
  "@sinclair/typebox": "^0.34.52",
232653
- "@supacloud/compiler": "^0.13.0",
232046
+ "@supacloud/compiler": "^0.15.0",
232654
232047
  "@supacloud/db": "^0.2.0",
232655
232048
  fflate: "^0.8.3"
232656
232049
  },