houdini 1.2.5 → 1.2.6-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/build/cmd-cjs/index.js +607 -554
  2. package/build/cmd-esm/index.js +607 -554
  3. package/build/codegen/generators/artifacts/selection.d.ts +1 -3
  4. package/build/codegen-cjs/index.js +594 -541
  5. package/build/codegen-esm/index.js +594 -541
  6. package/build/lib-cjs/index.js +35 -2
  7. package/build/lib-esm/index.js +35 -2
  8. package/build/runtime/cache/cache.d.ts +1 -0
  9. package/build/runtime/cache/gc.d.ts +1 -0
  10. package/build/runtime/cache/lists.d.ts +1 -0
  11. package/build/runtime/cache/staleManager.d.ts +1 -0
  12. package/build/runtime/cache/storage.d.ts +1 -0
  13. package/build/runtime/cache/subscription.d.ts +2 -1
  14. package/build/runtime/public/cache.d.ts +4 -0
  15. package/build/runtime-cjs/cache/cache.d.ts +1 -0
  16. package/build/runtime-cjs/cache/cache.js +10 -2
  17. package/build/runtime-cjs/cache/gc.d.ts +1 -0
  18. package/build/runtime-cjs/cache/gc.js +3 -0
  19. package/build/runtime-cjs/cache/lists.d.ts +1 -0
  20. package/build/runtime-cjs/cache/lists.js +4 -0
  21. package/build/runtime-cjs/cache/staleManager.d.ts +1 -0
  22. package/build/runtime-cjs/cache/staleManager.js +3 -0
  23. package/build/runtime-cjs/cache/storage.d.ts +1 -0
  24. package/build/runtime-cjs/cache/storage.js +3 -0
  25. package/build/runtime-cjs/cache/subscription.d.ts +2 -1
  26. package/build/runtime-cjs/cache/subscription.js +13 -0
  27. package/build/runtime-cjs/public/cache.d.ts +4 -0
  28. package/build/runtime-cjs/public/cache.js +3 -0
  29. package/build/runtime-esm/cache/cache.d.ts +1 -0
  30. package/build/runtime-esm/cache/cache.js +10 -2
  31. package/build/runtime-esm/cache/gc.d.ts +1 -0
  32. package/build/runtime-esm/cache/gc.js +3 -0
  33. package/build/runtime-esm/cache/lists.d.ts +1 -0
  34. package/build/runtime-esm/cache/lists.js +4 -0
  35. package/build/runtime-esm/cache/staleManager.d.ts +1 -0
  36. package/build/runtime-esm/cache/staleManager.js +3 -0
  37. package/build/runtime-esm/cache/storage.d.ts +1 -0
  38. package/build/runtime-esm/cache/storage.js +3 -0
  39. package/build/runtime-esm/cache/subscription.d.ts +2 -1
  40. package/build/runtime-esm/cache/subscription.js +13 -0
  41. package/build/runtime-esm/public/cache.d.ts +4 -0
  42. package/build/runtime-esm/public/cache.js +3 -0
  43. package/build/test-cjs/index.js +597 -544
  44. package/build/test-esm/index.js +597 -544
  45. package/build/vite-cjs/index.js +612 -559
  46. package/build/vite-esm/index.js +612 -559
  47. package/package.json +1 -1
@@ -3731,12 +3731,12 @@ var require_parser = __commonJS({
3731
3731
  return [];
3732
3732
  }
3733
3733
  if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {
3734
- var types18 = [];
3734
+ var types17 = [];
3735
3735
  this.expectOptionalToken(_tokenKind.TokenKind.AMP);
3736
3736
  do {
3737
- types18.push(this.parseNamedType());
3737
+ types17.push(this.parseNamedType());
3738
3738
  } while (this.expectOptionalToken(_tokenKind.TokenKind.AMP) || this.peek(_tokenKind.TokenKind.NAME));
3739
- return types18;
3739
+ return types17;
3740
3740
  }
3741
3741
  return this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType);
3742
3742
  };
@@ -3815,13 +3815,13 @@ var require_parser = __commonJS({
3815
3815
  this.expectKeyword("union");
3816
3816
  var name = this.parseName();
3817
3817
  var directives = this.parseDirectives(true);
3818
- var types18 = this.parseUnionMemberTypes();
3818
+ var types17 = this.parseUnionMemberTypes();
3819
3819
  return {
3820
3820
  kind: _kinds.Kind.UNION_TYPE_DEFINITION,
3821
3821
  description,
3822
3822
  name,
3823
3823
  directives,
3824
- types: types18,
3824
+ types: types17,
3825
3825
  loc: this.loc(start)
3826
3826
  };
3827
3827
  };
@@ -3979,15 +3979,15 @@ var require_parser = __commonJS({
3979
3979
  this.expectKeyword("union");
3980
3980
  var name = this.parseName();
3981
3981
  var directives = this.parseDirectives(true);
3982
- var types18 = this.parseUnionMemberTypes();
3983
- if (directives.length === 0 && types18.length === 0) {
3982
+ var types17 = this.parseUnionMemberTypes();
3983
+ if (directives.length === 0 && types17.length === 0) {
3984
3984
  throw this.unexpected();
3985
3985
  }
3986
3986
  return {
3987
3987
  kind: _kinds.Kind.UNION_TYPE_EXTENSION,
3988
3988
  name,
3989
3989
  directives,
3990
- types: types18,
3990
+ types: types17,
3991
3991
  loc: this.loc(start)
3992
3992
  };
3993
3993
  };
@@ -4965,8 +4965,8 @@ var require_printer = __commonJS({
4965
4965
  return join3(["interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ");
4966
4966
  }),
4967
4967
  UnionTypeDefinition: addDescription2(function(_ref27) {
4968
- var name = _ref27.name, directives = _ref27.directives, types18 = _ref27.types;
4969
- return join3(["union", name, join3(directives, " "), types18 && types18.length !== 0 ? "= " + join3(types18, " | ") : ""], " ");
4968
+ var name = _ref27.name, directives = _ref27.directives, types17 = _ref27.types;
4969
+ return join3(["union", name, join3(directives, " "), types17 && types17.length !== 0 ? "= " + join3(types17, " | ") : ""], " ");
4970
4970
  }),
4971
4971
  EnumTypeDefinition: addDescription2(function(_ref28) {
4972
4972
  var name = _ref28.name, directives = _ref28.directives, values = _ref28.values;
@@ -5001,8 +5001,8 @@ var require_printer = __commonJS({
5001
5001
  return join3(["extend interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ");
5002
5002
  },
5003
5003
  UnionTypeExtension: function UnionTypeExtension(_ref36) {
5004
- var name = _ref36.name, directives = _ref36.directives, types18 = _ref36.types;
5005
- return join3(["extend union", name, join3(directives, " "), types18 && types18.length !== 0 ? "= " + join3(types18, " | ") : ""], " ");
5004
+ var name = _ref36.name, directives = _ref36.directives, types17 = _ref36.types;
5005
+ return join3(["extend union", name, join3(directives, " "), types17 && types17.length !== 0 ? "= " + join3(types17, " | ") : ""], " ");
5006
5006
  },
5007
5007
  EnumTypeExtension: function EnumTypeExtension(_ref37) {
5008
5008
  var name = _ref37.name, directives = _ref37.directives, values = _ref37.values;
@@ -5673,9 +5673,9 @@ var require_definition = __commonJS({
5673
5673
  exports.GraphQLUnionType = GraphQLUnionType3;
5674
5674
  (0, _defineInspect.default)(GraphQLUnionType3);
5675
5675
  function defineTypes(config2) {
5676
- var types18 = resolveThunk(config2.types);
5677
- Array.isArray(types18) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config2.name, "."));
5678
- return types18;
5676
+ var types17 = resolveThunk(config2.types);
5677
+ Array.isArray(types17) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config2.name, "."));
5678
+ return types17;
5679
5679
  }
5680
5680
  var GraphQLEnumType4 = /* @__PURE__ */ function() {
5681
5681
  function GraphQLEnumType5(config2) {
@@ -13312,7 +13312,7 @@ var require_buildClientSchema = __commonJS({
13312
13312
  return new _definition.GraphQLUnionType({
13313
13313
  name: unionIntrospection.name,
13314
13314
  description: unionIntrospection.description,
13315
- types: function types18() {
13315
+ types: function types17() {
13316
13316
  return unionIntrospection.possibleTypes.map(getObjectType);
13317
13317
  }
13318
13318
  });
@@ -13657,7 +13657,7 @@ var require_extendSchema = __commonJS({
13657
13657
  var config2 = type.toConfig();
13658
13658
  var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
13659
13659
  return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config2), {}, {
13660
- types: function types18() {
13660
+ types: function types17() {
13661
13661
  return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
13662
13662
  },
13663
13663
  extensionASTNodes: config2.extensionASTNodes.concat(extensions)
@@ -13805,17 +13805,17 @@ var require_extendSchema = __commonJS({
13805
13805
  return interfaces;
13806
13806
  }
13807
13807
  function buildUnionTypes(nodes) {
13808
- var types18 = [];
13808
+ var types17 = [];
13809
13809
  for (var _i32 = 0; _i32 < nodes.length; _i32++) {
13810
13810
  var _node$types;
13811
13811
  var node = nodes[_i32];
13812
13812
  var typeNodes = (_node$types = node.types) !== null && _node$types !== void 0 ? _node$types : [];
13813
13813
  for (var _i34 = 0; _i34 < typeNodes.length; _i34++) {
13814
13814
  var type = typeNodes[_i34];
13815
- types18.push(getNamedType5(type));
13815
+ types17.push(getNamedType5(type));
13816
13816
  }
13817
13817
  }
13818
- return types18;
13818
+ return types17;
13819
13819
  }
13820
13820
  function buildType(astNode) {
13821
13821
  var _typeExtensionsMap$na;
@@ -13872,7 +13872,7 @@ var require_extendSchema = __commonJS({
13872
13872
  return new _definition.GraphQLUnionType({
13873
13873
  name: name2,
13874
13874
  description,
13875
- types: function types18() {
13875
+ types: function types17() {
13876
13876
  return buildUnionTypes(_allNodes3);
13877
13877
  },
13878
13878
  astNode,
@@ -14170,7 +14170,7 @@ var require_lexicographicSortSchema = __commonJS({
14170
14170
  if ((0, _definition.isUnionType)(type)) {
14171
14171
  var _config22 = type.toConfig();
14172
14172
  return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, _config22), {}, {
14173
- types: function types18() {
14173
+ types: function types17() {
14174
14174
  return sortTypes(_config22.types);
14175
14175
  }
14176
14176
  }));
@@ -14255,10 +14255,10 @@ var require_printSchema = __commonJS({
14255
14255
  }
14256
14256
  function printFilteredSchema(schema, directiveFilter, typeFilter, options) {
14257
14257
  var directives = schema.getDirectives().filter(directiveFilter);
14258
- var types18 = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter);
14258
+ var types17 = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter);
14259
14259
  return [printSchemaDefinition(schema)].concat(directives.map(function(directive) {
14260
14260
  return printDirective(directive, options);
14261
- }), types18.map(function(type) {
14261
+ }), types17.map(function(type) {
14262
14262
  return printType(type, options);
14263
14263
  })).filter(Boolean).join("\n\n") + "\n";
14264
14264
  }
@@ -14333,8 +14333,8 @@ var require_printSchema = __commonJS({
14333
14333
  return printDescription(options, type) + "interface ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);
14334
14334
  }
14335
14335
  function printUnion(type, options) {
14336
- var types18 = type.getTypes();
14337
- var possibleTypes = types18.length ? " = " + types18.join(" | ") : "";
14336
+ var types17 = type.getTypes();
14337
+ var possibleTypes = types17.length ? " = " + types17.join(" | ") : "";
14338
14338
  return printDescription(options, type) + "union " + type.name + possibleTypes;
14339
14339
  }
14340
14340
  function printEnum(type, options) {
@@ -30013,14 +30013,14 @@ var require_lib3 = __commonJS({
30013
30013
  this.preserveSpace = !!preserveSpace;
30014
30014
  }
30015
30015
  };
30016
- var types18 = {
30016
+ var types17 = {
30017
30017
  brace: new TokContext("{"),
30018
30018
  j_oTag: new TokContext("<tag"),
30019
30019
  j_cTag: new TokContext("</tag"),
30020
30020
  j_expr: new TokContext("<tag>...</tag>", true)
30021
30021
  };
30022
30022
  {
30023
- types18.template = new TokContext("`", true);
30023
+ types17.template = new TokContext("`", true);
30024
30024
  }
30025
30025
  var beforeExpr = true;
30026
30026
  var startsExpr = true;
@@ -30552,17 +30552,17 @@ var require_lib3 = __commonJS({
30552
30552
  context.pop();
30553
30553
  };
30554
30554
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
30555
- context.push(types18.brace);
30555
+ context.push(types17.brace);
30556
30556
  };
30557
30557
  tokenTypes[22].updateContext = (context) => {
30558
- if (context[context.length - 1] === types18.template) {
30558
+ if (context[context.length - 1] === types17.template) {
30559
30559
  context.pop();
30560
30560
  } else {
30561
- context.push(types18.template);
30561
+ context.push(types17.template);
30562
30562
  }
30563
30563
  };
30564
30564
  tokenTypes[140].updateContext = (context) => {
30565
- context.push(types18.j_expr, types18.j_oTag);
30565
+ context.push(types17.j_expr, types17.j_oTag);
30566
30566
  };
30567
30567
  }
30568
30568
  var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
@@ -31203,7 +31203,7 @@ var require_lib3 = __commonJS({
31203
31203
  this.lastTokEndLoc = null;
31204
31204
  this.lastTokStartLoc = null;
31205
31205
  this.lastTokStart = 0;
31206
- this.context = [types18.brace];
31206
+ this.context = [types17.brace];
31207
31207
  this.canStartJSXElement = true;
31208
31208
  this.containsEsc = false;
31209
31209
  this.firstInvalidTemplateEscapePos = null;
@@ -35127,7 +35127,7 @@ var require_lib3 = __commonJS({
35127
35127
  context
35128
35128
  } = this.state;
35129
35129
  const currentContext = context[context.length - 1];
35130
- if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
35130
+ if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
35131
35131
  context.pop();
35132
35132
  }
35133
35133
  }
@@ -36187,9 +36187,9 @@ var require_lib3 = __commonJS({
36187
36187
  switch (this.state.type) {
36188
36188
  case 5:
36189
36189
  node = this.startNode();
36190
- this.setContext(types18.brace);
36190
+ this.setContext(types17.brace);
36191
36191
  this.next();
36192
- node = this.jsxParseExpressionContainer(node, types18.j_oTag);
36192
+ node = this.jsxParseExpressionContainer(node, types17.j_oTag);
36193
36193
  if (node.expression.type === "JSXEmptyExpression") {
36194
36194
  this.raise(JsxErrors.AttributeIsEmpty, {
36195
36195
  at: node
@@ -36212,7 +36212,7 @@ var require_lib3 = __commonJS({
36212
36212
  jsxParseSpreadChild(node) {
36213
36213
  this.next();
36214
36214
  node.expression = this.parseExpression();
36215
- this.setContext(types18.j_expr);
36215
+ this.setContext(types17.j_expr);
36216
36216
  this.state.canStartJSXElement = true;
36217
36217
  this.expect(8);
36218
36218
  return this.finishNode(node, "JSXSpreadChild");
@@ -36232,11 +36232,11 @@ var require_lib3 = __commonJS({
36232
36232
  jsxParseAttribute() {
36233
36233
  const node = this.startNode();
36234
36234
  if (this.match(5)) {
36235
- this.setContext(types18.brace);
36235
+ this.setContext(types17.brace);
36236
36236
  this.next();
36237
36237
  this.expect(21);
36238
36238
  node.argument = this.parseMaybeAssignAllowIn();
36239
- this.setContext(types18.j_oTag);
36239
+ this.setContext(types17.j_oTag);
36240
36240
  this.state.canStartJSXElement = true;
36241
36241
  this.expect(8);
36242
36242
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -36295,12 +36295,12 @@ var require_lib3 = __commonJS({
36295
36295
  break;
36296
36296
  case 5: {
36297
36297
  const node2 = this.startNode();
36298
- this.setContext(types18.brace);
36298
+ this.setContext(types17.brace);
36299
36299
  this.next();
36300
36300
  if (this.match(21)) {
36301
36301
  children.push(this.jsxParseSpreadChild(node2));
36302
36302
  } else {
36303
- children.push(this.jsxParseExpressionContainer(node2, types18.j_expr));
36303
+ children.push(this.jsxParseExpressionContainer(node2, types17.j_expr));
36304
36304
  }
36305
36305
  break;
36306
36306
  }
@@ -36371,10 +36371,10 @@ var require_lib3 = __commonJS({
36371
36371
  }
36372
36372
  getTokenFromCode(code) {
36373
36373
  const context = this.curContext();
36374
- if (context === types18.j_expr) {
36374
+ if (context === types17.j_expr) {
36375
36375
  return this.jsxReadToken();
36376
36376
  }
36377
- if (context === types18.j_oTag || context === types18.j_cTag) {
36377
+ if (context === types17.j_oTag || context === types17.j_cTag) {
36378
36378
  if (isIdentifierStart(code)) {
36379
36379
  return this.jsxReadWord();
36380
36380
  }
@@ -36382,7 +36382,7 @@ var require_lib3 = __commonJS({
36382
36382
  ++this.state.pos;
36383
36383
  return this.finishToken(141);
36384
36384
  }
36385
- if ((code === 34 || code === 39) && context === types18.j_oTag) {
36385
+ if ((code === 34 || code === 39) && context === types17.j_oTag) {
36386
36386
  return this.jsxReadString(code);
36387
36387
  }
36388
36388
  }
@@ -36398,17 +36398,17 @@ var require_lib3 = __commonJS({
36398
36398
  type
36399
36399
  } = this.state;
36400
36400
  if (type === 56 && prevType === 140) {
36401
- context.splice(-2, 2, types18.j_cTag);
36401
+ context.splice(-2, 2, types17.j_cTag);
36402
36402
  this.state.canStartJSXElement = false;
36403
36403
  } else if (type === 140) {
36404
- context.push(types18.j_oTag);
36404
+ context.push(types17.j_oTag);
36405
36405
  } else if (type === 141) {
36406
36406
  const out = context[context.length - 1];
36407
- if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
36407
+ if (out === types17.j_oTag && prevType === 56 || out === types17.j_cTag) {
36408
36408
  context.pop();
36409
- this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
36409
+ this.state.canStartJSXElement = context[context.length - 1] === types17.j_expr;
36410
36410
  } else {
36411
- this.setContext(types18.j_expr);
36411
+ this.setContext(types17.j_expr);
36412
36412
  this.state.canStartJSXElement = true;
36413
36413
  }
36414
36414
  } else {
@@ -37416,14 +37416,14 @@ var require_lib3 = __commonJS({
37416
37416
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
37417
37417
  const node = this.startNode();
37418
37418
  const hasLeadingOperator = this.eat(operator);
37419
- const types19 = [];
37419
+ const types18 = [];
37420
37420
  do {
37421
- types19.push(parseConstituentType());
37421
+ types18.push(parseConstituentType());
37422
37422
  } while (this.eat(operator));
37423
- if (types19.length === 1 && !hasLeadingOperator) {
37424
- return types19[0];
37423
+ if (types18.length === 1 && !hasLeadingOperator) {
37424
+ return types18[0];
37425
37425
  }
37426
- node.types = types19;
37426
+ node.types = types18;
37427
37427
  return this.finishNode(node, kind);
37428
37428
  }
37429
37429
  tsParseIntersectionTypeOrHigher() {
@@ -38652,7 +38652,7 @@ var require_lib3 = __commonJS({
38652
38652
  context
38653
38653
  } = this.state;
38654
38654
  const currentContext = context[context.length - 1];
38655
- if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
38655
+ if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
38656
38656
  context.pop();
38657
38657
  }
38658
38658
  }
@@ -44291,9 +44291,9 @@ var require_shared = __commonJS({
44291
44291
  var tslib_1 = require_tslib();
44292
44292
  var types_1 = tslib_1.__importDefault(require_types());
44293
44293
  function default_1(fork) {
44294
- var types18 = fork.use(types_1.default);
44295
- var Type = types18.Type;
44296
- var builtin = types18.builtInTypes;
44294
+ var types17 = fork.use(types_1.default);
44295
+ var Type = types17.Type;
44296
+ var builtin = types17.builtInTypes;
44297
44297
  var isNumber = builtin.number;
44298
44298
  function geq(than) {
44299
44299
  return Type.from(function(value) {
@@ -44443,9 +44443,9 @@ var require_types = __commonJS({
44443
44443
  }(BaseType);
44444
44444
  var OrType = function(_super) {
44445
44445
  tslib_1.__extends(OrType2, _super);
44446
- function OrType2(types18) {
44446
+ function OrType2(types17) {
44447
44447
  var _this = _super.call(this) || this;
44448
- _this.types = types18;
44448
+ _this.types = types17;
44449
44449
  _this.kind = "OrType";
44450
44450
  return _this;
44451
44451
  }
@@ -44586,11 +44586,11 @@ var require_types = __commonJS({
44586
44586
  function typesPlugin(_fork) {
44587
44587
  var Type = {
44588
44588
  or: function() {
44589
- var types18 = [];
44589
+ var types17 = [];
44590
44590
  for (var _i = 0; _i < arguments.length; _i++) {
44591
- types18[_i] = arguments[_i];
44591
+ types17[_i] = arguments[_i];
44592
44592
  }
44593
- return new OrType(types18.map(function(type) {
44593
+ return new OrType(types17.map(function(type) {
44594
44594
  return Type.from(type);
44595
44595
  }));
44596
44596
  },
@@ -45035,9 +45035,9 @@ var require_path2 = __commonJS({
45035
45035
  var Op = Object.prototype;
45036
45036
  var hasOwn = Op.hasOwnProperty;
45037
45037
  function pathPlugin(fork) {
45038
- var types18 = fork.use(types_1.default);
45039
- var isArray = types18.builtInTypes.array;
45040
- var isNumber = types18.builtInTypes.number;
45038
+ var types17 = fork.use(types_1.default);
45039
+ var isArray = types17.builtInTypes.array;
45040
+ var isNumber = types17.builtInTypes.number;
45041
45041
  var Path = function Path2(value, parentPath, name) {
45042
45042
  if (!(this instanceof Path2)) {
45043
45043
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -45339,13 +45339,13 @@ var require_scope = __commonJS({
45339
45339
  var types_1 = tslib_1.__importDefault(require_types());
45340
45340
  var hasOwn = Object.prototype.hasOwnProperty;
45341
45341
  function scopePlugin(fork) {
45342
- var types18 = fork.use(types_1.default);
45343
- var Type = types18.Type;
45344
- var namedTypes = types18.namedTypes;
45342
+ var types17 = fork.use(types_1.default);
45343
+ var Type = types17.Type;
45344
+ var namedTypes = types17.namedTypes;
45345
45345
  var Node = namedTypes.Node;
45346
45346
  var Expression = namedTypes.Expression;
45347
- var isArray = types18.builtInTypes.array;
45348
- var b = types18.builders;
45347
+ var isArray = types17.builtInTypes.array;
45348
+ var b = types17.builders;
45349
45349
  var Scope = function Scope2(path2, parentScope) {
45350
45350
  if (!(this instanceof Scope2)) {
45351
45351
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -45408,7 +45408,7 @@ var require_scope = __commonJS({
45408
45408
  ++index;
45409
45409
  }
45410
45410
  var name = prefix + index;
45411
- return this.bindings[name] = types18.builders.identifier(name);
45411
+ return this.bindings[name] = types17.builders.identifier(name);
45412
45412
  };
45413
45413
  Sp.injectTemporary = function(identifier, init2) {
45414
45414
  identifier || (identifier = this.declareTemporary());
@@ -45484,7 +45484,7 @@ var require_scope = __commonJS({
45484
45484
  bindings
45485
45485
  );
45486
45486
  } else if (Node.check(node) && !Expression.check(node)) {
45487
- types18.eachField(node, function(name, child) {
45487
+ types17.eachField(node, function(name, child) {
45488
45488
  var childPath = path2.get(name);
45489
45489
  if (!pathHasValue(childPath, child)) {
45490
45490
  throw new Error("");
@@ -45562,24 +45562,24 @@ var require_scope = __commonJS({
45562
45562
  addPattern(patternPath.get("argument"), bindings);
45563
45563
  }
45564
45564
  }
45565
- function addTypePattern(patternPath, types19) {
45565
+ function addTypePattern(patternPath, types18) {
45566
45566
  var pattern = patternPath.value;
45567
45567
  namedTypes.Pattern.assert(pattern);
45568
45568
  if (namedTypes.Identifier.check(pattern)) {
45569
- if (hasOwn.call(types19, pattern.name)) {
45570
- types19[pattern.name].push(patternPath);
45569
+ if (hasOwn.call(types18, pattern.name)) {
45570
+ types18[pattern.name].push(patternPath);
45571
45571
  } else {
45572
- types19[pattern.name] = [patternPath];
45572
+ types18[pattern.name] = [patternPath];
45573
45573
  }
45574
45574
  }
45575
45575
  }
45576
- function addTypeParameter(parameterPath, types19) {
45576
+ function addTypeParameter(parameterPath, types18) {
45577
45577
  var parameter = parameterPath.value;
45578
45578
  FlowOrTSTypeParameterType.assert(parameter);
45579
- if (hasOwn.call(types19, parameter.name)) {
45580
- types19[parameter.name].push(parameterPath);
45579
+ if (hasOwn.call(types18, parameter.name)) {
45580
+ types18[parameter.name].push(parameterPath);
45581
45581
  } else {
45582
- types19[parameter.name] = [parameterPath];
45582
+ types18[parameter.name] = [parameterPath];
45583
45583
  }
45584
45584
  }
45585
45585
  Sp.lookup = function(name) {
@@ -45620,11 +45620,11 @@ var require_node_path = __commonJS({
45620
45620
  var scope_1 = tslib_1.__importDefault(require_scope());
45621
45621
  var shared_1 = require_shared();
45622
45622
  function nodePathPlugin(fork) {
45623
- var types18 = fork.use(types_1.default);
45624
- var n = types18.namedTypes;
45625
- var b = types18.builders;
45626
- var isNumber = types18.builtInTypes.number;
45627
- var isArray = types18.builtInTypes.array;
45623
+ var types17 = fork.use(types_1.default);
45624
+ var n = types17.namedTypes;
45625
+ var b = types17.builders;
45626
+ var isNumber = types17.builtInTypes.number;
45627
+ var isArray = types17.builtInTypes.array;
45628
45628
  var Path = fork.use(path_1.default);
45629
45629
  var Scope = fork.use(scope_1.default);
45630
45630
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -45715,7 +45715,7 @@ var require_node_path = __commonJS({
45715
45715
  return scope || null;
45716
45716
  };
45717
45717
  NPp.getValueProperty = function(name) {
45718
- return types18.getFieldValue(this.value, name);
45718
+ return types17.getFieldValue(this.value, name);
45719
45719
  };
45720
45720
  NPp.needsParens = function(assumeExpressionContext) {
45721
45721
  var pp = this.parentPath;
@@ -45857,7 +45857,7 @@ var require_node_path = __commonJS({
45857
45857
  return node.some(containsCallExpression);
45858
45858
  }
45859
45859
  if (n.Node.check(node)) {
45860
- return types18.someField(node, function(_name, child) {
45860
+ return types17.someField(node, function(_name, child) {
45861
45861
  return containsCallExpression(child);
45862
45862
  });
45863
45863
  }
@@ -45978,11 +45978,11 @@ var require_path_visitor = __commonJS({
45978
45978
  var shared_1 = require_shared();
45979
45979
  var hasOwn = Object.prototype.hasOwnProperty;
45980
45980
  function pathVisitorPlugin(fork) {
45981
- var types18 = fork.use(types_1.default);
45981
+ var types17 = fork.use(types_1.default);
45982
45982
  var NodePath = fork.use(node_path_1.default);
45983
- var isArray = types18.builtInTypes.array;
45984
- var isObject2 = types18.builtInTypes.object;
45985
- var isFunction = types18.builtInTypes.function;
45983
+ var isArray = types17.builtInTypes.array;
45984
+ var isObject2 = types17.builtInTypes.object;
45985
+ var isFunction = types17.builtInTypes.function;
45986
45986
  var undefined2;
45987
45987
  var PathVisitor = function PathVisitor2() {
45988
45988
  if (!(this instanceof PathVisitor2)) {
@@ -46002,7 +46002,7 @@ var require_path_visitor = __commonJS({
46002
46002
  typeNames[methodName.slice("visit".length)] = true;
46003
46003
  }
46004
46004
  }
46005
- var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
46005
+ var supertypeTable = types17.computeSupertypeLookupTable(typeNames);
46006
46006
  var methodNameTable = /* @__PURE__ */ Object.create(null);
46007
46007
  var typeNameKeys = Object.keys(supertypeTable);
46008
46008
  var typeNameCount = typeNameKeys.length;
@@ -46121,7 +46121,7 @@ var require_path_visitor = __commonJS({
46121
46121
  path2.each(visitor.visitWithoutReset, visitor);
46122
46122
  } else if (!isObject2.check(value)) {
46123
46123
  } else {
46124
- var childNames = types18.getFieldNames(value);
46124
+ var childNames = types17.getFieldNames(value);
46125
46125
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
46126
46126
  childNames.push("comments");
46127
46127
  }
@@ -46130,7 +46130,7 @@ var require_path_visitor = __commonJS({
46130
46130
  for (var i2 = 0; i2 < childCount; ++i2) {
46131
46131
  var childName = childNames[i2];
46132
46132
  if (!hasOwn.call(value, childName)) {
46133
- value[childName] = types18.getFieldValue(value, childName);
46133
+ value[childName] = types17.getFieldValue(value, childName);
46134
46134
  }
46135
46135
  childPaths.push(path2.get(childName));
46136
46136
  }
@@ -46273,13 +46273,13 @@ var require_equiv = __commonJS({
46273
46273
  var shared_1 = require_shared();
46274
46274
  var types_1 = tslib_1.__importDefault(require_types());
46275
46275
  function default_1(fork) {
46276
- var types18 = fork.use(types_1.default);
46277
- var getFieldNames = types18.getFieldNames;
46278
- var getFieldValue = types18.getFieldValue;
46279
- var isArray = types18.builtInTypes.array;
46280
- var isObject2 = types18.builtInTypes.object;
46281
- var isDate = types18.builtInTypes.Date;
46282
- var isRegExp = types18.builtInTypes.RegExp;
46276
+ var types17 = fork.use(types_1.default);
46277
+ var getFieldNames = types17.getFieldNames;
46278
+ var getFieldValue = types17.getFieldValue;
46279
+ var isArray = types17.builtInTypes.array;
46280
+ var isObject2 = types17.builtInTypes.object;
46281
+ var isDate = types17.builtInTypes.Date;
46282
+ var isRegExp = types17.builtInTypes.RegExp;
46283
46283
  var hasOwn = Object.prototype.hasOwnProperty;
46284
46284
  function astNodesAreEquivalent(a, b, problemPath) {
46285
46285
  if (isArray.check(problemPath)) {
@@ -46432,24 +46432,24 @@ var require_fork = __commonJS({
46432
46432
  var shared_1 = require_shared();
46433
46433
  function default_1(plugins) {
46434
46434
  var fork = createFork();
46435
- var types18 = fork.use(types_1.default);
46435
+ var types17 = fork.use(types_1.default);
46436
46436
  plugins.forEach(fork.use);
46437
- types18.finalize();
46437
+ types17.finalize();
46438
46438
  var PathVisitor = fork.use(path_visitor_1.default);
46439
46439
  return {
46440
- Type: types18.Type,
46441
- builtInTypes: types18.builtInTypes,
46442
- namedTypes: types18.namedTypes,
46443
- builders: types18.builders,
46444
- defineMethod: types18.defineMethod,
46445
- getFieldNames: types18.getFieldNames,
46446
- getFieldValue: types18.getFieldValue,
46447
- eachField: types18.eachField,
46448
- someField: types18.someField,
46449
- getSupertypeNames: types18.getSupertypeNames,
46450
- getBuilderName: types18.getBuilderName,
46440
+ Type: types17.Type,
46441
+ builtInTypes: types17.builtInTypes,
46442
+ namedTypes: types17.namedTypes,
46443
+ builders: types17.builders,
46444
+ defineMethod: types17.defineMethod,
46445
+ getFieldNames: types17.getFieldNames,
46446
+ getFieldValue: types17.getFieldValue,
46447
+ eachField: types17.eachField,
46448
+ someField: types17.someField,
46449
+ getSupertypeNames: types17.getSupertypeNames,
46450
+ getBuilderName: types17.getBuilderName,
46451
46451
  astNodesAreEquivalent: fork.use(equiv_1.default),
46452
- finalize: types18.finalize,
46452
+ finalize: types17.finalize,
46453
46453
  Path: fork.use(path_1.default),
46454
46454
  NodePath: fork.use(node_path_1.default),
46455
46455
  PathVisitor,
@@ -46619,8 +46619,8 @@ var require_core2 = __commonJS({
46619
46619
  var types_1 = tslib_1.__importDefault(require_types());
46620
46620
  var shared_1 = tslib_1.__importStar(require_shared());
46621
46621
  function default_1(fork) {
46622
- var types18 = fork.use(types_1.default);
46623
- var Type = types18.Type;
46622
+ var types17 = fork.use(types_1.default);
46623
+ var Type = types17.Type;
46624
46624
  var def = Type.def;
46625
46625
  var or = Type.or;
46626
46626
  var shared = fork.use(shared_1.default);
@@ -46712,9 +46712,9 @@ var require_es6 = __commonJS({
46712
46712
  var shared_1 = tslib_1.__importStar(require_shared());
46713
46713
  function default_1(fork) {
46714
46714
  fork.use(core_1.default);
46715
- var types18 = fork.use(types_1.default);
46716
- var def = types18.Type.def;
46717
- var or = types18.Type.or;
46715
+ var types17 = fork.use(types_1.default);
46716
+ var def = types17.Type.def;
46717
+ var or = types17.Type.or;
46718
46718
  var defaults = fork.use(shared_1.default).defaults;
46719
46719
  def("Function").field("generator", Boolean, defaults["false"]).field("expression", Boolean, defaults["false"]).field("defaults", [or(def("Expression"), null)], defaults.emptyArray).field("rest", or(def("Identifier"), null), defaults["null"]);
46720
46720
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -46804,8 +46804,8 @@ var require_es2017 = __commonJS({
46804
46804
  var shared_1 = tslib_1.__importStar(require_shared());
46805
46805
  function default_1(fork) {
46806
46806
  fork.use(es2016_1.default);
46807
- var types18 = fork.use(types_1.default);
46808
- var def = types18.Type.def;
46807
+ var types17 = fork.use(types_1.default);
46808
+ var def = types17.Type.def;
46809
46809
  var defaults = fork.use(shared_1.default).defaults;
46810
46810
  def("Function").field("async", Boolean, defaults["false"]);
46811
46811
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -46828,9 +46828,9 @@ var require_es2018 = __commonJS({
46828
46828
  var shared_1 = tslib_1.__importStar(require_shared());
46829
46829
  function default_1(fork) {
46830
46830
  fork.use(es2017_1.default);
46831
- var types18 = fork.use(types_1.default);
46832
- var def = types18.Type.def;
46833
- var or = types18.Type.or;
46831
+ var types17 = fork.use(types_1.default);
46832
+ var def = types17.Type.def;
46833
+ var or = types17.Type.or;
46834
46834
  var defaults = fork.use(shared_1.default).defaults;
46835
46835
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
46836
46836
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -46861,9 +46861,9 @@ var require_es2019 = __commonJS({
46861
46861
  var shared_1 = tslib_1.__importStar(require_shared());
46862
46862
  function default_1(fork) {
46863
46863
  fork.use(es2018_1.default);
46864
- var types18 = fork.use(types_1.default);
46865
- var def = types18.Type.def;
46866
- var or = types18.Type.or;
46864
+ var types17 = fork.use(types_1.default);
46865
+ var def = types17.Type.def;
46866
+ var or = types17.Type.or;
46867
46867
  var defaults = fork.use(shared_1.default).defaults;
46868
46868
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
46869
46869
  }
@@ -46887,9 +46887,9 @@ var require_es20202 = __commonJS({
46887
46887
  function default_1(fork) {
46888
46888
  fork.use(es2020_1.default);
46889
46889
  fork.use(es2019_1.default);
46890
- var types18 = fork.use(types_1.default);
46891
- var def = types18.Type.def;
46892
- var or = types18.Type.or;
46890
+ var types17 = fork.use(types_1.default);
46891
+ var def = types17.Type.def;
46892
+ var or = types17.Type.or;
46893
46893
  var shared = fork.use(shared_1.default);
46894
46894
  var defaults = shared.defaults;
46895
46895
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -46939,8 +46939,8 @@ var require_es2022 = __commonJS({
46939
46939
  var shared_1 = require_shared();
46940
46940
  function default_1(fork) {
46941
46941
  fork.use(es2021_1.default);
46942
- var types18 = fork.use(types_1.default);
46943
- var def = types18.Type.def;
46942
+ var types17 = fork.use(types_1.default);
46943
+ var def = types17.Type.def;
46944
46944
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
46945
46945
  }
46946
46946
  exports.default = default_1;
@@ -46961,9 +46961,9 @@ var require_es_proposals = __commonJS({
46961
46961
  var es2022_1 = tslib_1.__importDefault(require_es2022());
46962
46962
  function default_1(fork) {
46963
46963
  fork.use(es2022_1.default);
46964
- var types18 = fork.use(types_1.default);
46965
- var Type = types18.Type;
46966
- var def = types18.Type.def;
46964
+ var types17 = fork.use(types_1.default);
46965
+ var Type = types17.Type;
46966
+ var def = types17.Type.def;
46967
46967
  var or = Type.or;
46968
46968
  var shared = fork.use(shared_1.default);
46969
46969
  var defaults = shared.defaults;
@@ -47003,9 +47003,9 @@ var require_jsx = __commonJS({
47003
47003
  var shared_1 = tslib_1.__importStar(require_shared());
47004
47004
  function default_1(fork) {
47005
47005
  fork.use(es_proposals_1.default);
47006
- var types18 = fork.use(types_1.default);
47007
- var def = types18.Type.def;
47008
- var or = types18.Type.or;
47006
+ var types17 = fork.use(types_1.default);
47007
+ var def = types17.Type.def;
47008
+ var or = types17.Type.or;
47009
47009
  var defaults = fork.use(shared_1.default).defaults;
47010
47010
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
47011
47011
  def("Literal"),
@@ -47063,9 +47063,9 @@ var require_type_annotations = __commonJS({
47063
47063
  var types_1 = tslib_1.__importDefault(require_types());
47064
47064
  var shared_1 = tslib_1.__importStar(require_shared());
47065
47065
  function default_1(fork) {
47066
- var types18 = fork.use(types_1.default);
47067
- var def = types18.Type.def;
47068
- var or = types18.Type.or;
47066
+ var types17 = fork.use(types_1.default);
47067
+ var def = types17.Type.def;
47068
+ var or = types17.Type.or;
47069
47069
  var defaults = fork.use(shared_1.default).defaults;
47070
47070
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
47071
47071
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -47100,9 +47100,9 @@ var require_flow = __commonJS({
47100
47100
  function default_1(fork) {
47101
47101
  fork.use(es_proposals_1.default);
47102
47102
  fork.use(type_annotations_1.default);
47103
- var types18 = fork.use(types_1.default);
47104
- var def = types18.Type.def;
47105
- var or = types18.Type.or;
47103
+ var types17 = fork.use(types_1.default);
47104
+ var def = types17.Type.def;
47105
+ var or = types17.Type.or;
47106
47106
  var defaults = fork.use(shared_1.default).defaults;
47107
47107
  def("Flow").bases("Node");
47108
47108
  def("FlowType").bases("Flow");
@@ -47216,10 +47216,10 @@ var require_esprima = __commonJS({
47216
47216
  var shared_1 = tslib_1.__importStar(require_shared());
47217
47217
  function default_1(fork) {
47218
47218
  fork.use(es_proposals_1.default);
47219
- var types18 = fork.use(types_1.default);
47219
+ var types17 = fork.use(types_1.default);
47220
47220
  var defaults = fork.use(shared_1.default).defaults;
47221
- var def = types18.Type.def;
47222
- var or = types18.Type.or;
47221
+ var def = types17.Type.def;
47222
+ var or = types17.Type.or;
47223
47223
  def("VariableDeclaration").field("declarations", [or(
47224
47224
  def("VariableDeclarator"),
47225
47225
  def("Identifier")
@@ -47264,11 +47264,11 @@ var require_babel_core = __commonJS({
47264
47264
  function default_1(fork) {
47265
47265
  var _a, _b, _c, _d, _e;
47266
47266
  fork.use(es_proposals_1.default);
47267
- var types18 = fork.use(types_1.default);
47267
+ var types17 = fork.use(types_1.default);
47268
47268
  var defaults = fork.use(shared_1.default).defaults;
47269
- var def = types18.Type.def;
47270
- var or = types18.Type.or;
47271
- var isUndefined = types18.builtInTypes.undefined;
47269
+ var def = types17.Type.def;
47270
+ var or = types17.Type.or;
47271
+ var isUndefined = types17.builtInTypes.undefined;
47272
47272
  def("Noop").bases("Statement").build();
47273
47273
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
47274
47274
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -47293,7 +47293,7 @@ var require_babel_core = __commonJS({
47293
47293
  raw: String
47294
47294
  },
47295
47295
  function getDefault() {
47296
- var value = types18.getFieldValue(this, "value");
47296
+ var value = types17.getFieldValue(this, "value");
47297
47297
  return {
47298
47298
  rawValue: value,
47299
47299
  raw: toRaw ? toRaw(value) : String(value)
@@ -47396,8 +47396,8 @@ var require_babel = __commonJS({
47396
47396
  var flow_1 = tslib_1.__importDefault(require_flow());
47397
47397
  var shared_1 = require_shared();
47398
47398
  function default_1(fork) {
47399
- var types18 = fork.use(types_1.default);
47400
- var def = types18.Type.def;
47399
+ var types17 = fork.use(types_1.default);
47400
+ var def = types17.Type.def;
47401
47401
  fork.use(babel_core_1.default);
47402
47402
  fork.use(flow_1.default);
47403
47403
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -47423,12 +47423,12 @@ var require_typescript = __commonJS({
47423
47423
  function default_1(fork) {
47424
47424
  fork.use(babel_core_1.default);
47425
47425
  fork.use(type_annotations_1.default);
47426
- var types18 = fork.use(types_1.default);
47427
- var n = types18.namedTypes;
47428
- var def = types18.Type.def;
47429
- var or = types18.Type.or;
47426
+ var types17 = fork.use(types_1.default);
47427
+ var n = types17.namedTypes;
47428
+ var def = types17.Type.def;
47429
+ var or = types17.Type.or;
47430
47430
  var defaults = fork.use(shared_1.default).defaults;
47431
- var StringLiteral = types18.Type.from(function(value, deep) {
47431
+ var StringLiteral = types17.Type.from(function(value, deep) {
47432
47432
  if (n.StringLiteral && n.StringLiteral.check(value, deep)) {
47433
47433
  return true;
47434
47434
  }
@@ -49404,8 +49404,8 @@ var require_util2 = __commonJS({
49404
49404
  exports.isTrailingCommaEnabled = exports.getParentExportDeclaration = exports.isExportDeclaration = exports.fixFaultyLocations = exports.getTrueLoc = exports.composeSourceMaps = exports.copyPos = exports.comparePos = exports.getUnionOfKeys = exports.getOption = exports.isBrowser = exports.getLineTerminator = void 0;
49405
49405
  var tslib_1 = require_tslib();
49406
49406
  var assert_1 = tslib_1.__importDefault(__require("assert"));
49407
- var types18 = tslib_1.__importStar(require_main());
49408
- var n = types18.namedTypes;
49407
+ var types17 = tslib_1.__importStar(require_main());
49408
+ var n = types17.namedTypes;
49409
49409
  var source_map_1 = tslib_1.__importDefault(require_source_map());
49410
49410
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
49411
49411
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -56723,10 +56723,10 @@ var require_comments = __commonJS({
56723
56723
  exports.printComments = exports.attach = void 0;
56724
56724
  var tslib_1 = require_tslib();
56725
56725
  var assert_1 = tslib_1.__importDefault(__require("assert"));
56726
- var types18 = tslib_1.__importStar(require_main());
56727
- var n = types18.namedTypes;
56728
- var isArray = types18.builtInTypes.array;
56729
- var isObject2 = types18.builtInTypes.object;
56726
+ var types17 = tslib_1.__importStar(require_main());
56727
+ var n = types17.namedTypes;
56728
+ var isArray = types17.builtInTypes.array;
56729
+ var isObject2 = types17.builtInTypes.object;
56730
56730
  var lines_1 = require_lines();
56731
56731
  var util_1 = require_util2();
56732
56732
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -56757,7 +56757,7 @@ var require_comments = __commonJS({
56757
56757
  if (isArray.check(node)) {
56758
56758
  names = Object.keys(node);
56759
56759
  } else if (isObject2.check(node)) {
56760
- names = types18.getFieldNames(node);
56760
+ names = types17.getFieldNames(node);
56761
56761
  } else {
56762
56762
  return resultArray;
56763
56763
  }
@@ -56935,7 +56935,7 @@ var require_comments = __commonJS({
56935
56935
  function printComments(path2, print9) {
56936
56936
  var value = path2.getValue();
56937
56937
  var innerLines = print9(path2);
56938
- var comments = n.Node.check(value) && types18.getFieldValue(value, "comments");
56938
+ var comments = n.Node.check(value) && types17.getFieldValue(value, "comments");
56939
56939
  if (!comments || comments.length === 0) {
56940
56940
  return innerLines;
56941
56941
  }
@@ -56943,8 +56943,8 @@ var require_comments = __commonJS({
56943
56943
  var trailingParts = [innerLines];
56944
56944
  path2.each(function(commentPath) {
56945
56945
  var comment = commentPath.getValue();
56946
- var leading = types18.getFieldValue(comment, "leading");
56947
- var trailing = types18.getFieldValue(comment, "trailing");
56946
+ var leading = types17.getFieldValue(comment, "leading");
56947
+ var trailing = types17.getFieldValue(comment, "trailing");
56948
56948
  if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
56949
56949
  leadingParts.push(printLeadingComment(commentPath, print9));
56950
56950
  } else if (trailing) {
@@ -56966,10 +56966,10 @@ var require_parser2 = __commonJS({
56966
56966
  exports.parse = void 0;
56967
56967
  var tslib_1 = require_tslib();
56968
56968
  var assert_1 = tslib_1.__importDefault(__require("assert"));
56969
- var types18 = tslib_1.__importStar(require_main());
56970
- var b = types18.builders;
56971
- var isObject2 = types18.builtInTypes.object;
56972
- var isArray = types18.builtInTypes.array;
56969
+ var types17 = tslib_1.__importStar(require_main());
56970
+ var b = types17.builders;
56971
+ var isObject2 = types17.builtInTypes.object;
56972
+ var isArray = types17.builtInTypes.array;
56973
56973
  var options_1 = require_options();
56974
56974
  var lines_1 = require_lines();
56975
56975
  var comments_1 = require_comments();
@@ -57155,11 +57155,11 @@ var require_fast_path = __commonJS({
57155
57155
  Object.defineProperty(exports, "__esModule", { value: true });
57156
57156
  var tslib_1 = require_tslib();
57157
57157
  var assert_1 = tslib_1.__importDefault(__require("assert"));
57158
- var types18 = tslib_1.__importStar(require_main());
57158
+ var types17 = tslib_1.__importStar(require_main());
57159
57159
  var util = tslib_1.__importStar(require_util2());
57160
- var n = types18.namedTypes;
57161
- var isArray = types18.builtInTypes.array;
57162
- var isNumber = types18.builtInTypes.number;
57160
+ var n = types17.namedTypes;
57161
+ var isArray = types17.builtInTypes.array;
57162
+ var isNumber = types17.builtInTypes.number;
57163
57163
  var PRECEDENCE = {};
57164
57164
  [
57165
57165
  ["??"],
@@ -57188,7 +57188,7 @@ var require_fast_path = __commonJS({
57188
57188
  if (obj instanceof FastPath) {
57189
57189
  return obj.copy();
57190
57190
  }
57191
- if (obj instanceof types18.NodePath) {
57191
+ if (obj instanceof types17.NodePath) {
57192
57192
  var copy = Object.create(FastPath.prototype);
57193
57193
  var stack = [obj.value];
57194
57194
  for (var pp = void 0; pp = obj.parentPath; obj = pp)
@@ -57499,7 +57499,7 @@ var require_fast_path = __commonJS({
57499
57499
  return node.some(containsCallExpression);
57500
57500
  }
57501
57501
  if (n.Node.check(node)) {
57502
- return types18.someField(node, function(_name, child) {
57502
+ return types17.someField(node, function(_name, child) {
57503
57503
  return containsCallExpression(child);
57504
57504
  });
57505
57505
  }
@@ -57589,16 +57589,16 @@ var require_patcher = __commonJS({
57589
57589
  var tslib_1 = require_tslib();
57590
57590
  var assert_1 = tslib_1.__importDefault(__require("assert"));
57591
57591
  var linesModule = tslib_1.__importStar(require_lines());
57592
- var types18 = tslib_1.__importStar(require_main());
57593
- var Printable = types18.namedTypes.Printable;
57594
- var Expression = types18.namedTypes.Expression;
57595
- var ReturnStatement = types18.namedTypes.ReturnStatement;
57596
- var SourceLocation = types18.namedTypes.SourceLocation;
57592
+ var types17 = tslib_1.__importStar(require_main());
57593
+ var Printable = types17.namedTypes.Printable;
57594
+ var Expression = types17.namedTypes.Expression;
57595
+ var ReturnStatement = types17.namedTypes.ReturnStatement;
57596
+ var SourceLocation = types17.namedTypes.SourceLocation;
57597
57597
  var util_1 = require_util2();
57598
57598
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
57599
- var isObject2 = types18.builtInTypes.object;
57600
- var isArray = types18.builtInTypes.array;
57601
- var isString = types18.builtInTypes.string;
57599
+ var isObject2 = types17.builtInTypes.object;
57600
+ var isArray = types17.builtInTypes.array;
57601
+ var isString = types17.builtInTypes.string;
57602
57602
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
57603
57603
  var Patcher = function Patcher2(lines) {
57604
57604
  assert_1.default.ok(this instanceof Patcher2);
@@ -57868,8 +57868,8 @@ var require_patcher = __commonJS({
57868
57868
  if (k.charAt(0) === "_") {
57869
57869
  continue;
57870
57870
  }
57871
- newPath.stack.push(k, types18.getFieldValue(newNode, k));
57872
- oldPath.stack.push(k, types18.getFieldValue(oldNode, k));
57871
+ newPath.stack.push(k, types17.getFieldValue(newNode, k));
57872
+ oldPath.stack.push(k, types17.getFieldValue(oldNode, k));
57873
57873
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
57874
57874
  newPath.stack.length -= 2;
57875
57875
  oldPath.stack.length -= 2;
@@ -57893,16 +57893,16 @@ var require_printer2 = __commonJS({
57893
57893
  exports.Printer = void 0;
57894
57894
  var tslib_1 = require_tslib();
57895
57895
  var assert_1 = tslib_1.__importDefault(__require("assert"));
57896
- var types18 = tslib_1.__importStar(require_main());
57896
+ var types17 = tslib_1.__importStar(require_main());
57897
57897
  var comments_1 = require_comments();
57898
57898
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
57899
57899
  var lines_1 = require_lines();
57900
57900
  var options_1 = require_options();
57901
57901
  var patcher_1 = require_patcher();
57902
57902
  var util = tslib_1.__importStar(require_util2());
57903
- var namedTypes = types18.namedTypes;
57904
- var isString = types18.builtInTypes.string;
57905
- var isObject2 = types18.builtInTypes.object;
57903
+ var namedTypes = types17.namedTypes;
57904
+ var isString = types17.builtInTypes.string;
57905
+ var isObject2 = types17.builtInTypes.object;
57906
57906
  var PrintResult = function PrintResult2(code, sourceMap) {
57907
57907
  assert_1.default.ok(this instanceof PrintResult2);
57908
57908
  isString.assert(code);
@@ -58064,7 +58064,7 @@ var require_printer2 = __commonJS({
58064
58064
  case "OptionalMemberExpression": {
58065
58065
  parts.push(path2.call(print9, "object"));
58066
58066
  var property = path2.call(print9, "property");
58067
- var optional = types18.getFieldValue(n, "optional");
58067
+ var optional = types17.getFieldValue(n, "optional");
58068
58068
  if (n.computed) {
58069
58069
  parts.push(optional ? "?.[" : "[", property, "]");
58070
58070
  } else {
@@ -58335,7 +58335,7 @@ var require_printer2 = __commonJS({
58335
58335
  if (n.typeArguments) {
58336
58336
  parts.push(path2.call(print9, "typeArguments"));
58337
58337
  }
58338
- if (types18.getFieldValue(n, "optional")) {
58338
+ if (types17.getFieldValue(n, "optional")) {
58339
58339
  parts.push("?.");
58340
58340
  }
58341
58341
  parts.push(printArgumentsList(path2, options, print9));
@@ -60014,8 +60014,8 @@ var require_printer2 = __commonJS({
60014
60014
  });
60015
60015
  }
60016
60016
  function getPossibleRaw(node) {
60017
- var value = types18.getFieldValue(node, "value");
60018
- var extra = types18.getFieldValue(node, "extra");
60017
+ var value = types17.getFieldValue(node, "value");
60018
+ var extra = types17.getFieldValue(node, "extra");
60019
60019
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
60020
60020
  return extra.raw;
60021
60021
  }
@@ -60063,8 +60063,8 @@ var require_main2 = __commonJS({
60063
60063
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
60064
60064
  var tslib_1 = require_tslib();
60065
60065
  var fs_1 = tslib_1.__importDefault(__require("fs"));
60066
- var types18 = tslib_1.__importStar(require_main());
60067
- exports.types = types18;
60066
+ var types17 = tslib_1.__importStar(require_main());
60067
+ exports.types = types17;
60068
60068
  var parser_1 = require_parser2();
60069
60069
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
60070
60070
  return parser_1.parse;
@@ -66140,7 +66140,7 @@ var printDocASTReducer = {
66140
66140
  leave: ({ name, interfaces, directives, fields }) => join(["interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
66141
66141
  },
66142
66142
  UnionTypeDefinition: {
66143
- leave: ({ name, directives, types: types18 }) => join(["union", name, join(directives, " "), wrap("= ", join(types18, " | "))], " ")
66143
+ leave: ({ name, directives, types: types17 }) => join(["union", name, join(directives, " "), wrap("= ", join(types17, " | "))], " ")
66144
66144
  },
66145
66145
  EnumTypeDefinition: {
66146
66146
  leave: ({ name, directives, values }) => join(["enum", name, join(directives, " "), block(values)], " ")
@@ -66167,7 +66167,7 @@ var printDocASTReducer = {
66167
66167
  leave: ({ name, interfaces, directives, fields }) => join(["extend interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
66168
66168
  },
66169
66169
  UnionTypeExtension: {
66170
- leave: ({ name, directives, types: types18 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types18, " | "))], " ")
66170
+ leave: ({ name, directives, types: types17 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types17, " | "))], " ")
66171
66171
  },
66172
66172
  EnumTypeExtension: {
66173
66173
  leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
@@ -67047,8 +67047,8 @@ function healTypes(originalTypeMap, directives) {
67047
67047
  }
67048
67048
  }
67049
67049
  function healUnderlyingTypes(type) {
67050
- const types18 = type.getTypes();
67051
- types18.push(...types18.splice(0).map((t2) => healType(t2)).filter(Boolean));
67050
+ const types17 = type.getTypes();
67051
+ types17.push(...types17.splice(0).map((t2) => healType(t2)).filter(Boolean));
67052
67052
  }
67053
67053
  function healType(type) {
67054
67054
  if ((0, import_graphql11.isListType)(type)) {
@@ -67832,11 +67832,11 @@ function mergeEnum(e1, e2, config2) {
67832
67832
 
67833
67833
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.8.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
67834
67834
  var import_graphql20 = __toESM(require_graphql2(), 1);
67835
- function isStringTypes(types18) {
67836
- return typeof types18 === "string";
67835
+ function isStringTypes(types17) {
67836
+ return typeof types17 === "string";
67837
67837
  }
67838
- function isSourceTypes(types18) {
67839
- return types18 instanceof import_graphql20.Source;
67838
+ function isSourceTypes(types17) {
67839
+ return types17 instanceof import_graphql20.Source;
67840
67840
  }
67841
67841
  function extractType(type) {
67842
67842
  let visitedType = type;
@@ -70206,6 +70206,9 @@ var GarbageCollector = class {
70206
70206
  constructor(cache) {
70207
70207
  this.cache = cache;
70208
70208
  }
70209
+ reset() {
70210
+ this.lifetimes.clear();
70211
+ }
70209
70212
  resetLifetime(id, field) {
70210
70213
  if (!this.lifetimes.get(id)) {
70211
70214
  this.lifetimes.set(id, /* @__PURE__ */ new Map());
@@ -70325,6 +70328,10 @@ var ListManager = class {
70325
70328
  }
70326
70329
  this.listsByField.get(parentID).delete(field);
70327
70330
  }
70331
+ reset() {
70332
+ this.lists.clear();
70333
+ this.listsByField.clear();
70334
+ }
70328
70335
  };
70329
70336
  var List = class {
70330
70337
  recordID;
@@ -70707,6 +70714,9 @@ var StaleManager = class {
70707
70714
  }
70708
70715
  }
70709
70716
  }
70717
+ reset() {
70718
+ this.fieldsTime.clear();
70719
+ }
70710
70720
  };
70711
70721
 
70712
70722
  // src/runtime/cache/storage.ts
@@ -70887,6 +70897,9 @@ var InMemoryStorage = class {
70887
70897
  layer.fields = fields;
70888
70898
  layer.links = links;
70889
70899
  }
70900
+ reset() {
70901
+ this.data = [];
70902
+ }
70890
70903
  };
70891
70904
  var Layer = class {
70892
70905
  id;
@@ -71332,6 +71345,18 @@ var InMemorySubscriptions = class {
71332
71345
  this.remove(linkedRecordID, linkFields, targets, visited);
71333
71346
  }
71334
71347
  }
71348
+ reset() {
71349
+ const subscribers = Object.entries(this.subscribers).filter(
71350
+ ([id]) => !id.startsWith(rootID)
71351
+ );
71352
+ for (const [id, _fields] of subscribers) {
71353
+ delete this.subscribers[id];
71354
+ }
71355
+ const subscriptionSpecs = subscribers.flatMap(
71356
+ ([_id, fields]) => Object.values(fields).flatMap((field) => field.map(([spec]) => spec))
71357
+ );
71358
+ return subscriptionSpecs;
71359
+ }
71335
71360
  removeSubscribers(id, fieldName, specs) {
71336
71361
  let targets = [];
71337
71362
  for (const spec of specs) {
@@ -71521,6 +71546,14 @@ var Cache = class {
71521
71546
  }
71522
71547
  this.#notifySubscribers(toNotify);
71523
71548
  }
71549
+ reset() {
71550
+ const subSpecs = this._internal_unstable.subscriptions.reset();
71551
+ this._internal_unstable.staleManager.reset();
71552
+ this._internal_unstable.lifetimes.reset();
71553
+ this._internal_unstable.lists.reset();
71554
+ this._internal_unstable.storage.reset();
71555
+ this.#notifySubscribers(subSpecs);
71556
+ }
71524
71557
  #notifySubscribers(subs) {
71525
71558
  if (subs.length === 0) {
71526
71559
  return;
@@ -71703,7 +71736,7 @@ var CacheInternal = class {
71703
71736
  forceNotify
71704
71737
  });
71705
71738
  }
71706
- } else if (Array.isArray(value) && (typeof previousValue === "undefined" || Array.isArray(previousValue))) {
71739
+ } else if (Array.isArray(value) && (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
71707
71740
  let oldIDs = [...previousValue || []];
71708
71741
  const emptyEdges = !updates ? [] : oldIDs.map((id) => {
71709
71742
  if (!id) {
@@ -71776,7 +71809,7 @@ var CacheInternal = class {
71776
71809
  } else {
71777
71810
  linkedIDs = nestedIDs;
71778
71811
  }
71779
- const contentChanged = !deepEquals(linkedIDs, oldIDs);
71812
+ const contentChanged = !deepEquals(linkedIDs, oldIDs) || previousValue === null;
71780
71813
  if (contentChanged || forceNotify) {
71781
71814
  toNotify.push(...currentSubscribers);
71782
71815
  }
@@ -72495,7 +72528,7 @@ var Config = class {
72495
72528
  defaultListTarget = null,
72496
72529
  defaultPaginateMode = PaginateMode.Infinite,
72497
72530
  defaultKeys,
72498
- types: types18 = {},
72531
+ types: types17 = {},
72499
72532
  logLevel,
72500
72533
  defaultFragmentMasking = "enable",
72501
72534
  watchSchema,
@@ -72539,10 +72572,10 @@ var Config = class {
72539
72572
  if (defaultKeys) {
72540
72573
  this.defaultKeys = defaultKeys;
72541
72574
  }
72542
- if (types18) {
72575
+ if (types17) {
72543
72576
  this.typeConfig = {
72544
72577
  ...this.typeConfig,
72545
- ...types18
72578
+ ...types17
72546
72579
  };
72547
72580
  }
72548
72581
  }
@@ -73741,7 +73774,7 @@ var graphql27 = __toESM(require_graphql2(), 1);
73741
73774
 
73742
73775
  // src/codegen/generators/artifacts/index.ts
73743
73776
  var graphql14 = __toESM(require_graphql2(), 1);
73744
- var recast6 = __toESM(require_main2(), 1);
73777
+ var recast5 = __toESM(require_main2(), 1);
73745
73778
 
73746
73779
  // src/codegen/utils/commonjs.ts
73747
73780
  var cjsIndexFilePreamble = `"use strict";
@@ -74928,7 +74961,6 @@ function ancestorKey(ancestors) {
74928
74961
 
74929
74962
  // src/codegen/generators/artifacts/selection.ts
74930
74963
  var graphql13 = __toESM(require_graphql2(), 1);
74931
- var recast5 = __toESM(require_main2(), 1);
74932
74964
 
74933
74965
  // ../../node_modules/.pnpm/@kitql+helper@0.5.0/node_modules/@kitql/helper/index.mjs
74934
74966
  var config = {
@@ -75875,15 +75907,12 @@ function fieldKey(config2, field) {
75875
75907
  }
75876
75908
 
75877
75909
  // src/codegen/generators/artifacts/selection.ts
75878
- var AST5 = recast5.types.builders;
75879
75910
  function selection_default(args) {
75880
- const typeMap = {};
75881
- const abstractTypes = [];
75882
75911
  return mergeSelection({
75883
- object: prepareSelection({ ...args, typeMap, abstractTypes }),
75884
- filepath: args.filepath,
75885
- typeMap,
75886
- abstractTypes
75912
+ config: args.config,
75913
+ rootType: args.rootType,
75914
+ object: prepareSelection(args),
75915
+ filepath: args.filepath
75887
75916
  });
75888
75917
  }
75889
75918
  function prepareSelection({
@@ -75895,8 +75924,6 @@ function prepareSelection({
75895
75924
  path: path2 = [],
75896
75925
  document,
75897
75926
  inConnection,
75898
- typeMap,
75899
- abstractTypes,
75900
75927
  globalLoading,
75901
75928
  includeFragments
75902
75929
  }) {
@@ -75916,8 +75943,6 @@ function prepareSelection({
75916
75943
  selections: field.selectionSet.selections,
75917
75944
  path: path2,
75918
75945
  document,
75919
- typeMap,
75920
- abstractTypes,
75921
75946
  globalLoading,
75922
75947
  includeFragments
75923
75948
  }).fields || {}
@@ -75929,32 +75954,7 @@ function prepareSelection({
75929
75954
  typeMap: {}
75930
75955
  };
75931
75956
  }
75932
- const parentType = config2.schema.getType(rootType);
75933
75957
  const typeConditionName = field.typeCondition.name.value;
75934
- const typeCondition = config2.schema.getType(typeConditionName);
75935
- const possibleTypes = [];
75936
- if (!graphql13.isAbstractType(typeCondition)) {
75937
- } else if (graphql13.isAbstractType(parentType)) {
75938
- const possibleParentTypes = config2.schema.getPossibleTypes(parentType).map((type) => type.name);
75939
- for (const possible of config2.schema.getPossibleTypes(typeCondition)) {
75940
- if (possibleParentTypes.includes(possible.name)) {
75941
- possibleTypes.push(possible.name);
75942
- }
75943
- }
75944
- } else {
75945
- possibleTypes.push(rootType);
75946
- }
75947
- if (possibleTypes.length > 0) {
75948
- for (const type of possibleTypes) {
75949
- const existing = typeMap[type];
75950
- if (!existing || !existing.includes(type)) {
75951
- typeMap[type] = [typeConditionName].concat(existing || []);
75952
- }
75953
- if (!abstractTypes.includes(typeConditionName)) {
75954
- abstractTypes.push(typeConditionName);
75955
- }
75956
- }
75957
- }
75958
75958
  object.abstractFields.fields = {
75959
75959
  ...object.abstractFields.fields,
75960
75960
  [typeConditionName]: prepareSelection({
@@ -75965,8 +75965,6 @@ function prepareSelection({
75965
75965
  selections: field.selectionSet.selections,
75966
75966
  path: path2,
75967
75967
  document,
75968
- typeMap,
75969
- abstractTypes,
75970
75968
  globalLoading,
75971
75969
  includeFragments
75972
75970
  }).fields
@@ -75978,19 +75976,38 @@ function prepareSelection({
75978
75976
  } else if (field.kind === "Field") {
75979
75977
  const type = config2.schema.getType(rootType);
75980
75978
  if (!type) {
75981
- throw new HoudiniError({ filepath, message: "Could not find type" });
75979
+ throw new HoudiniError({
75980
+ filepath,
75981
+ message: "Could not find type. Looking for " + JSON.stringify(rootType)
75982
+ });
75982
75983
  }
75983
75984
  const attributeName = field.alias?.value || field.name.value;
75984
- let fieldType;
75985
+ let fieldType = null;
75985
75986
  let nullable = false;
75986
75987
  if (field.name.value === "__typename") {
75987
75988
  fieldType = config2.schema.getType("String");
75988
- } else {
75989
+ } else if ("getFields" in type) {
75989
75990
  let typeRef = type.getFields()[field.name.value].type;
75990
75991
  fieldType = getRootType(typeRef);
75991
75992
  nullable = !graphql13.isNonNullType(typeRef);
75993
+ } else if (graphql13.isAbstractType(type)) {
75994
+ for (const possible of config2.schema.getPossibleTypes(type)) {
75995
+ if (graphql13.isObjectType(possible)) {
75996
+ if (possible.getFields()[field.name.value]) {
75997
+ fieldType = possible.getFields()[field.name.value].type;
75998
+ nullable = !graphql13.isNonNullType(fieldType);
75999
+ break;
76000
+ }
76001
+ }
76002
+ }
76003
+ }
76004
+ if (!fieldType) {
76005
+ throw {
76006
+ message: "Could not identify field's type",
76007
+ description: `Missing definition for ${field.name.value} in ${type.name}`
76008
+ };
75992
76009
  }
75993
- const typeName = fieldType.toString();
76010
+ const typeName = getRootType(fieldType).name;
75994
76011
  const pathSoFar = path2.concat(attributeName);
75995
76012
  const keys2 = config2.keyFieldsForType(rootType);
75996
76013
  let fieldObj = {
@@ -76084,8 +76101,6 @@ function prepareSelection({
76084
76101
  path: pathSoFar,
76085
76102
  document,
76086
76103
  inConnection: connectionState,
76087
- typeMap,
76088
- abstractTypes,
76089
76104
  globalLoading: forceLoading,
76090
76105
  includeFragments
76091
76106
  });
@@ -76171,69 +76186,107 @@ function prepareSelection({
76171
76186
  return object;
76172
76187
  }
76173
76188
  function mergeSelection({
76189
+ config: config2,
76174
76190
  filepath,
76175
76191
  object,
76176
- typeMap,
76177
- abstractTypes
76192
+ rootType
76178
76193
  }) {
76179
76194
  if (Object.keys(object.fields || {}).length > 0 && object.abstractFields && Object.keys(object.abstractFields.fields).length > 0) {
76180
- for (const [typeName, possibles] of Object.entries(typeMap)) {
76181
- let overlap = false;
76195
+ const abstractSelection = {
76196
+ fields: {},
76197
+ typeMap: {}
76198
+ };
76199
+ const possibleSelectionTypes = {};
76200
+ for (const [typeName, typeSelection] of Object.entries(object.abstractFields.fields)) {
76201
+ const gqlType = config2.schema.getType(typeName);
76202
+ abstractSelection.fields[typeName] = deepMerge2(
76203
+ filepath,
76204
+ typeSelection,
76205
+ abstractSelection.fields[typeName] ?? {}
76206
+ );
76207
+ if (graphql13.isAbstractType(gqlType)) {
76208
+ for (const possible of config2.schema.getPossibleTypes(gqlType)) {
76209
+ if (!possibleSelectionTypes[typeName]) {
76210
+ possibleSelectionTypes[typeName] = [];
76211
+ }
76212
+ possibleSelectionTypes[typeName].push(possible.name);
76213
+ }
76214
+ }
76215
+ }
76216
+ const concreteSelectionImplements = {};
76217
+ for (const [typeName, possibles] of Object.entries(possibleSelectionTypes)) {
76218
+ for (const possible of possibles) {
76219
+ if (!concreteSelectionImplements[possible]) {
76220
+ concreteSelectionImplements[possible] = [];
76221
+ }
76222
+ concreteSelectionImplements[possible].push(typeName);
76223
+ }
76224
+ }
76225
+ for (const [concrete, implementations] of Object.entries(concreteSelectionImplements)) {
76226
+ if (implementations.length > 1) {
76227
+ abstractSelection.fields[concrete] = {};
76228
+ }
76229
+ }
76230
+ for (const [typeName, possibles] of Object.entries(possibleSelectionTypes)) {
76182
76231
  for (const possible of possibles) {
76183
- if (object.abstractFields.fields[typeName]) {
76184
- object.abstractFields.fields[typeName] = deepMerge2(
76232
+ if (abstractSelection.fields[possible]) {
76233
+ abstractSelection.fields[possible] = deepMerge2(
76185
76234
  filepath,
76186
- object.abstractFields.fields[typeName] ?? {},
76187
- object.abstractFields.fields[possible] ?? {}
76235
+ abstractSelection.fields[typeName] ?? {},
76236
+ abstractSelection.fields[possible] ?? {}
76188
76237
  );
76189
- overlap = true;
76190
76238
  }
76191
76239
  }
76192
- if (overlap) {
76193
- delete typeMap[typeName];
76194
- }
76195
76240
  }
76196
- for (const [type, options] of Object.entries(typeMap)) {
76197
- if (options.length > 1) {
76198
- object.abstractFields.fields[type] = deepMerge2(
76199
- filepath,
76200
- ...options.map((opt) => object.abstractFields.fields[opt] || {})
76201
- );
76202
- delete typeMap[type];
76241
+ const parentType = config2.schema.getType(rootType);
76242
+ const possibleParents = graphql13.isAbstractType(parentType) ? config2.schema.getPossibleTypes(parentType)?.map((t2) => t2.name) : [parentType.name];
76243
+ for (const key of Object.keys(abstractSelection.typeMap)) {
76244
+ if (!possibleParents.includes(key) && rootType !== key || abstractSelection.fields[key]) {
76245
+ delete abstractSelection.typeMap[key];
76203
76246
  }
76204
76247
  }
76205
- for (const [type, sel] of Object.entries(object.abstractFields?.fields || {})) {
76206
- object.abstractFields.fields[type] = deepMerge2(filepath, sel || {}, object.fields);
76248
+ for (const [type, sel] of Object.entries(abstractSelection.fields || {})) {
76249
+ abstractSelection.fields[type] = deepMerge2(filepath, sel || {}, object.fields);
76207
76250
  }
76208
- for (const [type, options] of Object.entries(typeMap)) {
76209
- object.abstractFields.typeMap[type] = options[0];
76251
+ for (const [typename, possibles] of Object.entries(possibleSelectionTypes)) {
76252
+ if (possibles.every((p) => abstractSelection.fields[p])) {
76253
+ delete abstractSelection.fields[typename];
76254
+ }
76210
76255
  }
76211
- const usedTypes = Object.values(object.abstractFields.typeMap);
76212
- for (const type of abstractTypes) {
76213
- if (!usedTypes.includes(type)) {
76214
- delete object.abstractFields.fields[type];
76256
+ for (const possible of possibleParents) {
76257
+ if (abstractSelection.fields[possible]) {
76258
+ continue;
76259
+ }
76260
+ for (const [abstractType, abstractTypeMembers] of Object.entries(
76261
+ possibleSelectionTypes
76262
+ )) {
76263
+ if (abstractTypeMembers.includes(possible)) {
76264
+ abstractSelection.typeMap[possible] = abstractType;
76265
+ break;
76266
+ }
76215
76267
  }
76216
76268
  }
76269
+ object.abstractFields = abstractSelection;
76217
76270
  }
76218
- for (const [key, value] of Object.entries(object.fields ?? {})) {
76271
+ for (const value of Object.values(object.fields ?? {})) {
76219
76272
  const selection = value.selection;
76220
76273
  if (selection) {
76221
76274
  mergeSelection({
76275
+ config: config2,
76276
+ rootType: value.type,
76222
76277
  filepath,
76223
- typeMap,
76224
- abstractTypes,
76225
76278
  object: selection
76226
76279
  });
76227
76280
  }
76228
76281
  }
76229
76282
  for (const [type, selection] of Object.entries(object.abstractFields?.fields ?? {})) {
76230
- for (const [key, value] of Object.entries(selection ?? {})) {
76283
+ for (const value of Object.values(selection ?? {})) {
76231
76284
  const selection2 = value.selection;
76232
76285
  if (selection2) {
76233
76286
  mergeSelection({
76287
+ config: config2,
76288
+ rootType: value.type,
76234
76289
  filepath,
76235
- typeMap,
76236
- abstractTypes,
76237
76290
  object: selection2
76238
76291
  });
76239
76292
  }
@@ -76243,7 +76296,7 @@ function mergeSelection({
76243
76296
  }
76244
76297
 
76245
76298
  // src/codegen/generators/artifacts/index.ts
76246
- var AST6 = recast6.types.builders;
76299
+ var AST5 = recast5.types.builders;
76247
76300
  function artifactGenerator(stats) {
76248
76301
  return async function(config2, docs) {
76249
76302
  const filterTypes = {};
@@ -76511,10 +76564,10 @@ function artifactGenerator(stats) {
76511
76564
  }
76512
76565
  plugin2.artifactEnd({ config: config2, document: doc });
76513
76566
  }
76514
- const file = AST6.program([
76567
+ const file = AST5.program([
76515
76568
  moduleExport(config2, "default", serializeValue(artifact)),
76516
- AST6.expressionStatement(
76517
- AST6.stringLiteral(`HoudiniHash=${hash({ config: config2, document: doc })}`)
76569
+ AST5.expressionStatement(
76570
+ AST5.stringLiteral(`HoudiniHash=${hash({ config: config2, document: doc })}`)
76518
76571
  )
76519
76572
  ]);
76520
76573
  const artifactPath = config2.artifactPath(document);
@@ -76594,8 +76647,8 @@ function applyMask(config2, target, mask) {
76594
76647
  }
76595
76648
 
76596
76649
  // src/codegen/generators/runtime/graphqlFunction.ts
76597
- var recast7 = __toESM(require_main2(), 1);
76598
- var AST7 = recast7.types.builders;
76650
+ var recast6 = __toESM(require_main2(), 1);
76651
+ var AST6 = recast6.types.builders;
76599
76652
  async function generateGraphqlReturnTypes(config2, docs) {
76600
76653
  const indexPath = path_exports.join(config2.runtimeDirectory, "index.d.ts");
76601
76654
  const fileContent = await fs_exports.readFile(indexPath) || "";
@@ -76630,18 +76683,18 @@ async function generateGraphqlReturnTypes(config2, docs) {
76630
76683
  continue;
76631
76684
  }
76632
76685
  for (const [queryString, returnValue] of Object.entries(overloaded_returns)) {
76633
- const input = AST7.identifier("str");
76634
- input.typeAnnotation = AST7.tsTypeAnnotation(
76635
- AST7.tsLiteralType(AST7.stringLiteral(queryString))
76686
+ const input = AST6.identifier("str");
76687
+ input.typeAnnotation = AST6.tsTypeAnnotation(
76688
+ AST6.tsLiteralType(AST6.stringLiteral(queryString))
76636
76689
  );
76637
76690
  script.body.splice(
76638
76691
  i2,
76639
76692
  0,
76640
- AST7.exportNamedDeclaration(
76641
- AST7.tsDeclareFunction(
76642
- AST7.identifier("graphql"),
76693
+ AST6.exportNamedDeclaration(
76694
+ AST6.tsDeclareFunction(
76695
+ AST6.identifier("graphql"),
76643
76696
  [input],
76644
- AST7.tsTypeAnnotation(AST7.tsTypeReference(AST7.identifier(returnValue)))
76697
+ AST6.tsTypeAnnotation(AST6.tsTypeReference(AST6.identifier(returnValue)))
76645
76698
  )
76646
76699
  )
76647
76700
  );
@@ -76804,20 +76857,20 @@ async function generatePluginRuntime({
76804
76857
  }
76805
76858
 
76806
76859
  // src/codegen/generators/typescript/documentTypes.ts
76807
- var recast13 = __toESM(require_main2(), 1);
76860
+ var recast12 = __toESM(require_main2(), 1);
76808
76861
 
76809
76862
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
76810
76863
  var graphql17 = __toESM(require_graphql2(), 1);
76811
- var recast10 = __toESM(require_main2(), 1);
76864
+ var recast9 = __toESM(require_main2(), 1);
76812
76865
 
76813
76866
  // src/codegen/generators/typescript/typeReference.ts
76814
76867
  var graphql16 = __toESM(require_graphql2(), 1);
76815
- var recast9 = __toESM(require_main2(), 1);
76868
+ var recast8 = __toESM(require_main2(), 1);
76816
76869
 
76817
76870
  // src/codegen/generators/typescript/types.ts
76818
76871
  var graphql15 = __toESM(require_graphql2(), 1);
76819
- var recast8 = __toESM(require_main2(), 1);
76820
- var AST8 = recast8.types.builders;
76872
+ var recast7 = __toESM(require_main2(), 1);
76873
+ var AST7 = recast7.types.builders;
76821
76874
  function readonlyProperty(prop, enable = true) {
76822
76875
  if (enable) {
76823
76876
  prop.readonly = true;
@@ -76825,28 +76878,28 @@ function readonlyProperty(prop, enable = true) {
76825
76878
  return prop;
76826
76879
  }
76827
76880
  function nullableField(inner, input = false) {
76828
- const members = [inner, AST8.tsNullKeyword()];
76881
+ const members = [inner, AST7.tsNullKeyword()];
76829
76882
  if (input) {
76830
- members.push(AST8.tsUndefinedKeyword());
76883
+ members.push(AST7.tsUndefinedKeyword());
76831
76884
  }
76832
- return AST8.tsUnionType(members);
76885
+ return AST7.tsUnionType(members);
76833
76886
  }
76834
76887
  function scalarPropertyValue(config2, missingScalars, target) {
76835
76888
  switch (target.name) {
76836
76889
  case "String": {
76837
- return AST8.tsStringKeyword();
76890
+ return AST7.tsStringKeyword();
76838
76891
  }
76839
76892
  case "Int": {
76840
- return AST8.tsNumberKeyword();
76893
+ return AST7.tsNumberKeyword();
76841
76894
  }
76842
76895
  case "Float": {
76843
- return AST8.tsNumberKeyword();
76896
+ return AST7.tsNumberKeyword();
76844
76897
  }
76845
76898
  case "Boolean": {
76846
- return AST8.tsBooleanKeyword();
76899
+ return AST7.tsBooleanKeyword();
76847
76900
  }
76848
76901
  case "ID": {
76849
- return AST8.tsStringKeyword();
76902
+ return AST7.tsStringKeyword();
76850
76903
  }
76851
76904
  default: {
76852
76905
  if (graphql15.isNonNullType(target) && "ofType" in target) {
@@ -76857,16 +76910,16 @@ function scalarPropertyValue(config2, missingScalars, target) {
76857
76910
  );
76858
76911
  }
76859
76912
  if (config2.scalars?.[target.name]) {
76860
- return AST8.tsTypeReference(AST8.identifier(config2.scalars?.[target.name].type));
76913
+ return AST7.tsTypeReference(AST7.identifier(config2.scalars?.[target.name].type));
76861
76914
  }
76862
76915
  missingScalars.add(target.name);
76863
- return AST8.tsAnyKeyword();
76916
+ return AST7.tsAnyKeyword();
76864
76917
  }
76865
76918
  }
76866
76919
  }
76867
76920
 
76868
76921
  // src/codegen/generators/typescript/typeReference.ts
76869
- var AST9 = recast9.types.builders;
76922
+ var AST8 = recast8.types.builders;
76870
76923
  function tsTypeReference(config2, missingScalars, definition, body) {
76871
76924
  const { type, wrappers } = unwrapType(config2, definition.type);
76872
76925
  let result;
@@ -76875,7 +76928,7 @@ function tsTypeReference(config2, missingScalars, definition, body) {
76875
76928
  } else if (graphql16.isEnumType(type)) {
76876
76929
  result = enumReference(config2, body, type.name);
76877
76930
  } else {
76878
- result = AST9.tsTypeReference(AST9.identifier(type.name));
76931
+ result = AST8.tsTypeReference(AST8.identifier(type.name));
76879
76932
  }
76880
76933
  for (const toWrap of wrappers) {
76881
76934
  if (toWrap === "NonNull" /* NonNull */) {
@@ -76883,7 +76936,7 @@ function tsTypeReference(config2, missingScalars, definition, body) {
76883
76936
  } else if (toWrap === "Nullable" /* Nullable */) {
76884
76937
  result = nullableField(result, true);
76885
76938
  } else if (toWrap === "List" /* List */) {
76886
- result = AST9.tsArrayType(AST9.tsParenthesizedType(result));
76939
+ result = AST8.tsArrayType(AST8.tsParenthesizedType(result));
76887
76940
  }
76888
76941
  }
76889
76942
  return result;
@@ -76896,14 +76949,14 @@ function enumReference(config2, body, name) {
76896
76949
  importKind: "type",
76897
76950
  sourceModule: "$houdini/runtime/lib/types"
76898
76951
  });
76899
- return AST9.tsTypeReference(
76900
- AST9.identifier("ValueOf"),
76901
- AST9.tsTypeParameterInstantiation([AST9.tsTypeQuery(AST9.identifier(name))])
76952
+ return AST8.tsTypeReference(
76953
+ AST8.identifier("ValueOf"),
76954
+ AST8.tsTypeParameterInstantiation([AST8.tsTypeQuery(AST8.identifier(name))])
76902
76955
  );
76903
76956
  }
76904
76957
 
76905
76958
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
76906
- var AST10 = recast10.types.builders;
76959
+ var AST9 = recast9.types.builders;
76907
76960
  function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, rootType) {
76908
76961
  const { type } = unwrapType(config2, rootType);
76909
76962
  if (graphql17.isScalarType(type)) {
@@ -76930,20 +76983,20 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
76930
76983
  for (const field of Object.values(type.getFields())) {
76931
76984
  addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, field.type);
76932
76985
  members.push(
76933
- AST10.tsPropertySignature(
76934
- AST10.identifier(field.name),
76935
- AST10.tsTypeAnnotation(tsTypeReference(config2, missingScalars, field, body)),
76986
+ AST9.tsPropertySignature(
76987
+ AST9.identifier(field.name),
76988
+ AST9.tsTypeAnnotation(tsTypeReference(config2, missingScalars, field, body)),
76936
76989
  graphql17.isNullableType(field.type)
76937
76990
  )
76938
76991
  );
76939
76992
  }
76940
- body.push(AST10.tsTypeAliasDeclaration(AST10.identifier(type.name), AST10.tsTypeLiteral(members)));
76993
+ body.push(AST9.tsTypeAliasDeclaration(AST9.identifier(type.name), AST9.tsTypeLiteral(members)));
76941
76994
  }
76942
76995
 
76943
76996
  // src/codegen/generators/typescript/inlineType.ts
76944
76997
  var graphql18 = __toESM(require_graphql2(), 1);
76945
- var recast11 = __toESM(require_main2(), 1);
76946
- var AST11 = recast11.types.builders;
76998
+ var recast10 = __toESM(require_main2(), 1);
76999
+ var AST10 = recast10.types.builders;
76947
77000
  var fragmentKey2 = " $fragments";
76948
77001
  function inlineType({
76949
77002
  config: config2,
@@ -77041,7 +77094,7 @@ function inlineType({
77041
77094
  {}
77042
77095
  )
77043
77096
  );
77044
- result = AST11.tsTypeLiteral([
77097
+ result = AST10.tsTypeLiteral([
77045
77098
  ...fields.map((selection) => {
77046
77099
  const { field } = selectionTypeInfo(config2.schema, filepath, rootObj, selection);
77047
77100
  const attributeName = selection.alias?.value || selection.name.value;
@@ -77069,12 +77122,12 @@ function inlineType({
77069
77122
  (directive) => directive.name.value === "include" || directive.name.value === "skip"
77070
77123
  ).length > 0;
77071
77124
  if (hasIncludeOrSkipDirective) {
77072
- attributeType = AST11.tsUnionType([attributeType, AST11.tsUndefinedKeyword()]);
77125
+ attributeType = AST10.tsUnionType([attributeType, AST10.tsUndefinedKeyword()]);
77073
77126
  }
77074
77127
  const prop = readonlyProperty(
77075
- AST11.tsPropertySignature(
77076
- AST11.identifier(attributeName),
77077
- AST11.tsTypeAnnotation(attributeType)
77128
+ AST10.tsPropertySignature(
77129
+ AST10.identifier(attributeName),
77130
+ AST10.tsTypeAnnotation(attributeType)
77078
77131
  ),
77079
77132
  allowReadonly
77080
77133
  );
@@ -77088,14 +77141,14 @@ function inlineType({
77088
77141
  if (includeFragments && fragmentSpreads && fragmentSpreads.length) {
77089
77142
  result.members.push(
77090
77143
  readonlyProperty(
77091
- AST11.tsPropertySignature(
77092
- AST11.stringLiteral(fragmentKey2),
77093
- AST11.tsTypeAnnotation(
77094
- AST11.tsTypeLiteral(
77144
+ AST10.tsPropertySignature(
77145
+ AST10.stringLiteral(fragmentKey2),
77146
+ AST10.tsTypeAnnotation(
77147
+ AST10.tsTypeLiteral(
77095
77148
  (fragmentSpreads || []).map(
77096
- (fragmentSpread) => AST11.tsPropertySignature(
77097
- AST11.identifier(fragmentSpread.name.value),
77098
- AST11.tsTypeAnnotation(AST11.tsTypeLiteral([]))
77149
+ (fragmentSpread) => AST10.tsPropertySignature(
77150
+ AST10.identifier(fragmentSpread.name.value),
77151
+ AST10.tsTypeAnnotation(AST10.tsTypeLiteral([]))
77099
77152
  )
77100
77153
  )
77101
77154
  )
@@ -77140,9 +77193,9 @@ function inlineType({
77140
77193
  }
77141
77194
  objectType.members.push(
77142
77195
  readonlyProperty(
77143
- AST11.tsPropertySignature(
77144
- AST11.identifier("__typename"),
77145
- AST11.tsTypeAnnotation(AST11.tsLiteralType(AST11.stringLiteral(typeName)))
77196
+ AST10.tsPropertySignature(
77197
+ AST10.identifier("__typename"),
77198
+ AST10.tsTypeAnnotation(AST10.tsLiteralType(AST10.stringLiteral(typeName)))
77146
77199
  ),
77147
77200
  allowReadonly
77148
77201
  )
@@ -77182,8 +77235,8 @@ function inlineType({
77182
77235
  if (Object.keys(inlineFragmentSelections).length > 0) {
77183
77236
  let selectionTypes = Object.entries(inlineFragmentSelections).map(
77184
77237
  ([typeName, { type: type2, tsType }]) => {
77185
- return AST11.tsParenthesizedType(
77186
- AST11.tsIntersectionType(
77238
+ return AST10.tsParenthesizedType(
77239
+ AST10.tsIntersectionType(
77187
77240
  [tsType].flatMap((type3) => {
77188
77241
  if (type3.type === "TSUnionType") {
77189
77242
  return type3.types.filter(
@@ -77209,14 +77262,14 @@ function inlineType({
77209
77262
  );
77210
77263
  if (!areAllTypenamesCovered || anySelectionHasRequiredField) {
77211
77264
  selectionTypes.push(
77212
- AST11.tsParenthesizedType(
77213
- AST11.tsTypeLiteral([
77265
+ AST10.tsParenthesizedType(
77266
+ AST10.tsTypeLiteral([
77214
77267
  readonlyProperty(
77215
- AST11.tsPropertySignature(
77216
- AST11.identifier("__typename"),
77217
- AST11.tsTypeAnnotation(
77218
- AST11.tsLiteralType(
77219
- AST11.stringLiteral("non-exhaustive; don't match this")
77268
+ AST10.tsPropertySignature(
77269
+ AST10.identifier("__typename"),
77270
+ AST10.tsTypeAnnotation(
77271
+ AST10.tsLiteralType(
77272
+ AST10.stringLiteral("non-exhaustive; don't match this")
77220
77273
  )
77221
77274
  )
77222
77275
  ),
@@ -77226,9 +77279,9 @@ function inlineType({
77226
77279
  )
77227
77280
  );
77228
77281
  }
77229
- result = AST11.tsIntersectionType([
77282
+ result = AST10.tsIntersectionType([
77230
77283
  result,
77231
- AST11.tsParenthesizedType(AST11.tsUnionType(selectionTypes))
77284
+ AST10.tsParenthesizedType(AST10.tsUnionType(selectionTypes))
77232
77285
  ]);
77233
77286
  }
77234
77287
  } else {
@@ -77246,7 +77299,7 @@ function wrapType2(wrappers, result, root, forceNullable, forceNonNull) {
77246
77299
  } else if (toWrap === "NonNull" /* NonNull */) {
77247
77300
  continue;
77248
77301
  } else if (toWrap === "List" /* List */) {
77249
- result = AST11.tsArrayType(AST11.tsParenthesizedType(result));
77302
+ result = AST10.tsArrayType(AST10.tsParenthesizedType(result));
77250
77303
  }
77251
77304
  }
77252
77305
  return result;
@@ -77291,13 +77344,13 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
77291
77344
  }
77292
77345
 
77293
77346
  // src/codegen/generators/typescript/loadingState.ts
77294
- var recast12 = __toESM(require_main2(), 1);
77295
- var AST12 = recast12.types.builders;
77347
+ var recast11 = __toESM(require_main2(), 1);
77348
+ var AST11 = recast11.types.builders;
77296
77349
  function withLoadingState(args) {
77297
77350
  if (!("enableLoadingState" in args.document.artifact) || !args.document.artifact.enableLoadingState) {
77298
77351
  return args.base;
77299
77352
  }
77300
- return AST12.tsUnionType([
77353
+ return AST11.tsUnionType([
77301
77354
  args.base,
77302
77355
  loadingState({
77303
77356
  parentType: args.document.artifact.rootType,
@@ -77316,7 +77369,7 @@ function loadingState(args) {
77316
77369
  import: ["LoadingType"],
77317
77370
  sourceModule: "$houdini/runtime/lib/types"
77318
77371
  });
77319
- const result = AST12.tsTypeLiteral(
77372
+ const result = AST11.tsTypeLiteral(
77320
77373
  Object.entries(selection).reduce(
77321
77374
  (rest, [attributeName, value]) => {
77322
77375
  if (!value.loading) {
@@ -77324,7 +77377,7 @@ function loadingState(args) {
77324
77377
  }
77325
77378
  let keyType = null;
77326
77379
  if (value.loading.kind === "value") {
77327
- keyType = AST12.tsTypeReference(AST12.identifier("LoadingType"));
77380
+ keyType = AST11.tsTypeReference(AST11.identifier("LoadingType"));
77328
77381
  }
77329
77382
  if (value.loading.kind === "continue" && value.selection) {
77330
77383
  keyType = loadingState({
@@ -77340,15 +77393,15 @@ function loadingState(args) {
77340
77393
  }
77341
77394
  if (value.loading.list) {
77342
77395
  for (const _ of Array.from({ length: value.loading.list.depth })) {
77343
- keyType = AST12.tsArrayType(keyType);
77396
+ keyType = AST11.tsArrayType(keyType);
77344
77397
  }
77345
77398
  }
77346
77399
  return [
77347
77400
  ...rest,
77348
77401
  readonlyProperty(
77349
- AST12.tsPropertySignature(
77350
- AST12.identifier(attributeName),
77351
- AST12.tsTypeAnnotation(keyType)
77402
+ AST11.tsPropertySignature(
77403
+ AST11.identifier(attributeName),
77404
+ AST11.tsTypeAnnotation(keyType)
77352
77405
  )
77353
77406
  )
77354
77407
  ];
@@ -77359,14 +77412,14 @@ function loadingState(args) {
77359
77412
  if (args.selection.fragments) {
77360
77413
  result.members.push(
77361
77414
  readonlyProperty(
77362
- AST12.tsPropertySignature(
77363
- AST12.stringLiteral(fragmentKey),
77364
- AST12.tsTypeAnnotation(
77365
- AST12.tsTypeLiteral(
77415
+ AST11.tsPropertySignature(
77416
+ AST11.stringLiteral(fragmentKey),
77417
+ AST11.tsTypeAnnotation(
77418
+ AST11.tsTypeLiteral(
77366
77419
  Object.keys(args.selection.fragments).map((name) => {
77367
- return AST12.tsPropertySignature(
77368
- AST12.identifier(name),
77369
- AST12.tsTypeAnnotation(AST12.tsTypeLiteral([]))
77420
+ return AST11.tsPropertySignature(
77421
+ AST11.identifier(name),
77422
+ AST11.tsTypeAnnotation(AST11.tsTypeLiteral([]))
77370
77423
  );
77371
77424
  })
77372
77425
  )
@@ -77379,7 +77432,7 @@ function loadingState(args) {
77379
77432
  }
77380
77433
 
77381
77434
  // src/codegen/generators/typescript/documentTypes.ts
77382
- var AST13 = recast13.types.builders;
77435
+ var AST12 = recast12.types.builders;
77383
77436
  async function generateDocumentTypes(config2, docs) {
77384
77437
  const typePaths = [];
77385
77438
  const fragmentDefinitions = {};
@@ -77404,7 +77457,7 @@ async function generateDocumentTypes(config2, docs) {
77404
77457
  return;
77405
77458
  }
77406
77459
  const typeDefPath = config2.artifactTypePath(originalDocument);
77407
- const program3 = AST13.program([]);
77460
+ const program3 = AST12.program([]);
77408
77461
  const visitedTypes = /* @__PURE__ */ new Set();
77409
77462
  let definition = originalDocument.definitions.find(
77410
77463
  (def) => (def.kind === "OperationDefinition" || def.kind === "FragmentDefinition") && def.name?.value === name
@@ -77440,9 +77493,9 @@ async function generateDocumentTypes(config2, docs) {
77440
77493
  );
77441
77494
  }
77442
77495
  program3.body.push(
77443
- AST13.exportNamedDeclaration(
77444
- AST13.tsTypeAliasDeclaration(
77445
- AST13.identifier(`${name}$artifact`),
77496
+ AST12.exportNamedDeclaration(
77497
+ AST12.tsTypeAliasDeclaration(
77498
+ AST12.identifier(`${name}$artifact`),
77446
77499
  convertToTs(serializeValue(artifact))
77447
77500
  )
77448
77501
  )
@@ -77452,17 +77505,17 @@ async function generateDocumentTypes(config2, docs) {
77452
77505
  typePaths.push(typeDefPath);
77453
77506
  })
77454
77507
  );
77455
- const typeIndex = AST13.program(
77508
+ const typeIndex = AST12.program(
77456
77509
  typePaths.sort((a, b) => a.localeCompare(b)).map((typePath) => {
77457
- return AST13.exportAllDeclaration(
77458
- AST13.literal(
77510
+ return AST12.exportAllDeclaration(
77511
+ AST12.literal(
77459
77512
  "./" + path_exports.relative(path_exports.resolve(config2.typeIndexPath, ".."), typePath).replace(/\.[^/.]+\.[^/.]+$/, "")
77460
77513
  ),
77461
77514
  null
77462
77515
  );
77463
77516
  }).concat([
77464
- AST13.exportAllDeclaration(AST13.literal("./runtime"), null),
77465
- AST13.exportAllDeclaration(AST13.literal("./graphql"), null)
77517
+ AST12.exportAllDeclaration(AST12.literal("./runtime"), null),
77518
+ AST12.exportAllDeclaration(AST12.literal("./graphql"), null)
77466
77519
  ])
77467
77520
  );
77468
77521
  const exportDefaultAs = ({ module, as }) => `
@@ -77517,7 +77570,7 @@ For more information, please visit this link: ${siteURL}/api/config#custom-scala
77517
77570
  }
77518
77571
  function convertToTs(source) {
77519
77572
  if (source.type === "ObjectExpression") {
77520
- return AST13.tsTypeLiteral(
77573
+ return AST12.tsTypeLiteral(
77521
77574
  source.properties.reduce(
77522
77575
  (props, prop) => {
77523
77576
  if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
@@ -77525,9 +77578,9 @@ function convertToTs(source) {
77525
77578
  }
77526
77579
  return [
77527
77580
  ...props,
77528
- AST13.tsPropertySignature(
77581
+ AST12.tsPropertySignature(
77529
77582
  prop.key,
77530
- AST13.tsTypeAnnotation(convertToTs(prop.value))
77583
+ AST12.tsTypeAnnotation(convertToTs(prop.value))
77531
77584
  )
77532
77585
  ];
77533
77586
  },
@@ -77536,20 +77589,20 @@ function convertToTs(source) {
77536
77589
  );
77537
77590
  }
77538
77591
  if (source.type === "ArrayExpression") {
77539
- return AST13.tsTupleType(
77592
+ return AST12.tsTupleType(
77540
77593
  source.elements.map((element) => convertToTs(element))
77541
77594
  );
77542
77595
  }
77543
77596
  if (source.type === "Literal" && typeof source.value === "boolean") {
77544
- return AST13.tsLiteralType(AST13.booleanLiteral(source.value));
77597
+ return AST12.tsLiteralType(AST12.booleanLiteral(source.value));
77545
77598
  }
77546
77599
  if (source.type === "Literal" && typeof source.value === "number") {
77547
- return AST13.tsLiteralType(AST13.numericLiteral(source.value));
77600
+ return AST12.tsLiteralType(AST12.numericLiteral(source.value));
77548
77601
  }
77549
77602
  if (source.type === "Literal" && typeof source.value === "string") {
77550
- return AST13.tsLiteralType(AST13.stringLiteral(source.value));
77603
+ return AST12.tsLiteralType(AST12.stringLiteral(source.value));
77551
77604
  }
77552
- return AST13.tsLiteralType(source);
77605
+ return AST12.tsLiteralType(source);
77553
77606
  }
77554
77607
  async function generateOperationTypeDefs(config2, filepath, document, body, definition, selections, visitedTypes, missingScalars, artifact) {
77555
77608
  let parentType = null;
@@ -77588,23 +77641,23 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
77588
77641
  });
77589
77642
  }
77590
77643
  body.push(
77591
- AST13.exportNamedDeclaration(
77592
- AST13.tsTypeAliasDeclaration(
77593
- AST13.identifier(definition.name.value),
77594
- AST13.tsTypeLiteral([
77644
+ AST12.exportNamedDeclaration(
77645
+ AST12.tsTypeAliasDeclaration(
77646
+ AST12.identifier(definition.name.value),
77647
+ AST12.tsTypeLiteral([
77595
77648
  readonlyProperty(
77596
- AST13.tsPropertySignature(
77597
- AST13.stringLiteral("input"),
77598
- AST13.tsTypeAnnotation(AST13.tsTypeReference(AST13.identifier(inputTypeName)))
77649
+ AST12.tsPropertySignature(
77650
+ AST12.stringLiteral("input"),
77651
+ AST12.tsTypeAnnotation(AST12.tsTypeReference(AST12.identifier(inputTypeName)))
77599
77652
  )
77600
77653
  ),
77601
77654
  readonlyProperty(
77602
- AST13.tsPropertySignature(
77603
- AST13.stringLiteral("result"),
77604
- AST13.tsTypeAnnotation(
77605
- definition.operation === "mutation" ? AST13.tsTypeReference(AST13.identifier(shapeTypeName)) : AST13.tsUnionType([
77606
- AST13.tsTypeReference(AST13.identifier(shapeTypeName)),
77607
- AST13.tsUndefinedKeyword()
77655
+ AST12.tsPropertySignature(
77656
+ AST12.stringLiteral("result"),
77657
+ AST12.tsTypeAnnotation(
77658
+ definition.operation === "mutation" ? AST12.tsTypeReference(AST12.identifier(shapeTypeName)) : AST12.tsUnionType([
77659
+ AST12.tsTypeReference(AST12.identifier(shapeTypeName)),
77660
+ AST12.tsUndefinedKeyword()
77608
77661
  ])
77609
77662
  )
77610
77663
  )
@@ -77612,8 +77665,8 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
77612
77665
  ])
77613
77666
  )
77614
77667
  ),
77615
- AST13.exportNamedDeclaration(
77616
- AST13.tsTypeAliasDeclaration(AST13.identifier(shapeTypeName), resultType)
77668
+ AST12.exportNamedDeclaration(
77669
+ AST12.tsTypeAliasDeclaration(AST12.identifier(shapeTypeName), resultType)
77617
77670
  )
77618
77671
  );
77619
77672
  if (hasInputs && definition.variableDefinitions && definition.variableDefinitions.length > 0) {
@@ -77628,15 +77681,15 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
77628
77681
  );
77629
77682
  }
77630
77683
  body.push(
77631
- AST13.exportNamedDeclaration(
77632
- AST13.tsTypeAliasDeclaration(
77633
- AST13.identifier(inputTypeName),
77634
- AST13.tsTypeLiteral(
77684
+ AST12.exportNamedDeclaration(
77685
+ AST12.tsTypeAliasDeclaration(
77686
+ AST12.identifier(inputTypeName),
77687
+ AST12.tsTypeLiteral(
77635
77688
  (definition.variableDefinitions || []).map(
77636
77689
  (definition2) => {
77637
- return AST13.tsPropertySignature(
77638
- AST13.identifier(definition2.variable.name.value),
77639
- AST13.tsTypeAnnotation(
77690
+ return AST12.tsPropertySignature(
77691
+ AST12.identifier(definition2.variable.name.value),
77692
+ AST12.tsTypeAnnotation(
77640
77693
  tsTypeReference(config2, missingScalars, definition2, body)
77641
77694
  ),
77642
77695
  definition2.type.kind !== "NonNullType"
@@ -77649,16 +77702,16 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
77649
77702
  );
77650
77703
  } else {
77651
77704
  body.push(
77652
- AST13.exportNamedDeclaration(
77653
- AST13.tsTypeAliasDeclaration(AST13.identifier(inputTypeName), AST13.tsNullKeyword())
77705
+ AST12.exportNamedDeclaration(
77706
+ AST12.tsTypeAliasDeclaration(AST12.identifier(inputTypeName), AST12.tsNullKeyword())
77654
77707
  )
77655
77708
  );
77656
77709
  }
77657
77710
  if (definition.operation === "mutation") {
77658
77711
  body.push(
77659
- AST13.exportNamedDeclaration(
77660
- AST13.tsTypeAliasDeclaration(
77661
- AST13.identifier(optimisticTypeName),
77712
+ AST12.exportNamedDeclaration(
77713
+ AST12.tsTypeAliasDeclaration(
77714
+ AST12.identifier(optimisticTypeName),
77662
77715
  inlineType({
77663
77716
  config: config2,
77664
77717
  filepath,
@@ -77692,12 +77745,12 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
77692
77745
  let directive = definition.directives?.find(
77693
77746
  (directive2) => directive2.name.value === config2.argumentsDirective
77694
77747
  );
77695
- let inputValue = !directive ? AST13.tsTypeLiteral([]) : AST13.tsTypeLiteral(
77748
+ let inputValue = !directive ? AST12.tsTypeLiteral([]) : AST12.tsTypeLiteral(
77696
77749
  (fragmentArgumentsDefinitions(config2, filepath, definition) || []).map(
77697
77750
  (definition2) => {
77698
- return AST13.tsPropertySignature(
77699
- AST13.identifier(definition2.variable.name.value),
77700
- AST13.tsTypeAnnotation(
77751
+ return AST12.tsPropertySignature(
77752
+ AST12.identifier(definition2.variable.name.value),
77753
+ AST12.tsTypeAnnotation(
77701
77754
  tsTypeReference(config2, missingScalars, definition2, body)
77702
77755
  ),
77703
77756
  definition2.type.kind !== "NonNullType"
@@ -77706,30 +77759,30 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
77706
77759
  )
77707
77760
  );
77708
77761
  body.push(
77709
- AST13.exportNamedDeclaration(
77710
- AST13.tsTypeAliasDeclaration(AST13.identifier(inputTypeName), inputValue)
77762
+ AST12.exportNamedDeclaration(
77763
+ AST12.tsTypeAliasDeclaration(AST12.identifier(inputTypeName), inputValue)
77711
77764
  ),
77712
- AST13.exportNamedDeclaration(
77713
- AST13.tsTypeAliasDeclaration(
77714
- AST13.identifier(propTypeName),
77715
- AST13.tsTypeLiteral([
77765
+ AST12.exportNamedDeclaration(
77766
+ AST12.tsTypeAliasDeclaration(
77767
+ AST12.identifier(propTypeName),
77768
+ AST12.tsTypeLiteral([
77716
77769
  readonlyProperty(
77717
- AST13.tsPropertySignature(
77718
- AST13.stringLiteral("shape"),
77719
- AST13.tsTypeAnnotation(
77720
- AST13.tsTypeReference(AST13.identifier(shapeTypeName))
77770
+ AST12.tsPropertySignature(
77771
+ AST12.stringLiteral("shape"),
77772
+ AST12.tsTypeAnnotation(
77773
+ AST12.tsTypeReference(AST12.identifier(shapeTypeName))
77721
77774
  ),
77722
77775
  true
77723
77776
  )
77724
77777
  ),
77725
77778
  readonlyProperty(
77726
- AST13.tsPropertySignature(
77727
- AST13.stringLiteral(fragmentKey2),
77728
- AST13.tsTypeAnnotation(
77729
- AST13.tsTypeLiteral([
77730
- AST13.tsPropertySignature(
77731
- AST13.stringLiteral(propTypeName),
77732
- AST13.tsTypeAnnotation(AST13.tsAnyKeyword())
77779
+ AST12.tsPropertySignature(
77780
+ AST12.stringLiteral(fragmentKey2),
77781
+ AST12.tsTypeAnnotation(
77782
+ AST12.tsTypeLiteral([
77783
+ AST12.tsPropertySignature(
77784
+ AST12.stringLiteral(propTypeName),
77785
+ AST12.tsTypeAnnotation(AST12.tsAnyKeyword())
77733
77786
  )
77734
77787
  ])
77735
77788
  )
@@ -77738,9 +77791,9 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
77738
77791
  ])
77739
77792
  )
77740
77793
  ),
77741
- AST13.exportNamedDeclaration(
77742
- AST13.tsTypeAliasDeclaration(
77743
- AST13.identifier(shapeTypeName),
77794
+ AST12.exportNamedDeclaration(
77795
+ AST12.tsTypeAliasDeclaration(
77796
+ AST12.identifier(shapeTypeName),
77744
77797
  withLoadingState({
77745
77798
  config: config2,
77746
77799
  document,
@@ -77766,8 +77819,8 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
77766
77819
 
77767
77820
  // src/codegen/generators/typescript/imperativeTypeDef.ts
77768
77821
  var graphql19 = __toESM(require_graphql2(), 1);
77769
- var recast14 = __toESM(require_main2(), 1);
77770
- var AST14 = recast14.types.builders;
77822
+ var recast13 = __toESM(require_main2(), 1);
77823
+ var AST13 = recast13.types.builders;
77771
77824
  async function imperativeCacheTypef(config2, docs) {
77772
77825
  const returnType = (doc) => config2.plugins.find((plugin2) => plugin2.graphqlTagReturn)?.graphqlTagReturn?.({
77773
77826
  config: config2,
@@ -77783,87 +77836,87 @@ async function imperativeCacheTypef(config2, docs) {
77783
77836
  }) ?? "any";
77784
77837
  const target = path_exports.join(config2.runtimeDirectory, "generated.d.ts");
77785
77838
  const body = [];
77786
- const declaration = AST14.tsTypeAliasDeclaration(
77787
- AST14.identifier(CacheTypeDefName),
77788
- AST14.tsTypeLiteral([
77789
- AST14.tsPropertySignature(
77790
- AST14.identifier("types"),
77791
- AST14.tsTypeAnnotation(typeDefinitions(config2, body, docs, returnType))
77839
+ const declaration = AST13.tsTypeAliasDeclaration(
77840
+ AST13.identifier(CacheTypeDefName),
77841
+ AST13.tsTypeLiteral([
77842
+ AST13.tsPropertySignature(
77843
+ AST13.identifier("types"),
77844
+ AST13.tsTypeAnnotation(typeDefinitions(config2, body, docs, returnType))
77792
77845
  ),
77793
- AST14.tsPropertySignature(
77794
- AST14.identifier("lists"),
77795
- AST14.tsTypeAnnotation(listDefinitions(config2, body, docs))
77846
+ AST13.tsPropertySignature(
77847
+ AST13.identifier("lists"),
77848
+ AST13.tsTypeAnnotation(listDefinitions(config2, body, docs))
77796
77849
  ),
77797
- AST14.tsPropertySignature(
77798
- AST14.identifier("queries"),
77799
- AST14.tsTypeAnnotation(queryDefinitions(config2, body, docs, returnType))
77850
+ AST13.tsPropertySignature(
77851
+ AST13.identifier("queries"),
77852
+ AST13.tsTypeAnnotation(queryDefinitions(config2, body, docs, returnType))
77800
77853
  )
77801
77854
  ])
77802
77855
  );
77803
77856
  declaration.declare = true;
77804
- const importRecord = AST14.importDeclaration(
77805
- [AST14.importSpecifier(AST14.identifier("Record"))],
77806
- AST14.stringLiteral("./public/record")
77857
+ const importRecord = AST13.importDeclaration(
77858
+ [AST13.importSpecifier(AST13.identifier("Record"))],
77859
+ AST13.stringLiteral("./public/record")
77807
77860
  );
77808
77861
  importRecord.importKind = "type";
77809
77862
  await fs_exports.writeFile(
77810
77863
  target,
77811
- recast14.prettyPrint(
77812
- AST14.program([importRecord, ...body, AST14.exportNamedDeclaration(declaration)])
77864
+ recast13.prettyPrint(
77865
+ AST13.program([importRecord, ...body, AST13.exportNamedDeclaration(declaration)])
77813
77866
  ).code
77814
77867
  );
77815
77868
  }
77816
77869
  function typeDefinitions(config2, body, docs, returnType) {
77817
77870
  const operationTypes = [config2.schema.getMutationType(), config2.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
77818
77871
  const visitedTypes = /* @__PURE__ */ new Set();
77819
- const types18 = Object.values(config2.schema.getTypeMap()).filter(
77872
+ const types17 = Object.values(config2.schema.getTypeMap()).filter(
77820
77873
  (type) => !graphql19.isAbstractType(type) && !graphql19.isScalarType(type) && !graphql19.isEnumType(type) && !graphql19.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
77821
77874
  );
77822
77875
  const fragmentMap = fragmentListMap(
77823
77876
  config2,
77824
- types18.map((type) => type.name),
77877
+ types17.map((type) => type.name),
77825
77878
  body,
77826
77879
  docs,
77827
77880
  returnType
77828
77881
  );
77829
- return AST14.tsTypeLiteral(
77830
- types18.map((type) => {
77882
+ return AST13.tsTypeLiteral(
77883
+ types17.map((type) => {
77831
77884
  let typeName = type.name;
77832
77885
  if (config2.schema.getQueryType() && config2.schema.getQueryType()?.name === type.name) {
77833
77886
  typeName = "__ROOT__";
77834
77887
  }
77835
- let idFields = AST14.tsNeverKeyword();
77888
+ let idFields = AST13.tsNeverKeyword();
77836
77889
  const keys2 = keyFieldsForType(config2.configFile, type.name);
77837
77890
  if (graphql19.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
77838
- idFields = AST14.tsTypeLiteral(
77891
+ idFields = AST13.tsTypeLiteral(
77839
77892
  keys2.map((key) => {
77840
77893
  const fieldType = type.getFields()[key];
77841
77894
  const unwrapped = unwrapType(config2, fieldType.type);
77842
- return AST14.tsPropertySignature(
77843
- AST14.identifier(key),
77844
- AST14.tsTypeAnnotation(
77895
+ return AST13.tsPropertySignature(
77896
+ AST13.identifier(key),
77897
+ AST13.tsTypeAnnotation(
77845
77898
  scalarPropertyValue(config2, /* @__PURE__ */ new Set(), unwrapped.type)
77846
77899
  )
77847
77900
  );
77848
77901
  })
77849
77902
  );
77850
77903
  } else if (typeName === "__ROOT__") {
77851
- idFields = AST14.tsTypeLiteral([]);
77904
+ idFields = AST13.tsTypeLiteral([]);
77852
77905
  }
77853
- let fields = AST14.tsTypeLiteral([]);
77906
+ let fields = AST13.tsTypeLiteral([]);
77854
77907
  if (graphql19.isObjectType(type)) {
77855
- fields = AST14.tsTypeLiteral(
77908
+ fields = AST13.tsTypeLiteral(
77856
77909
  Object.entries(type.getFields()).map(
77857
77910
  ([key, fieldType]) => {
77858
77911
  const unwrapped = unwrapType(config2, fieldType.type);
77859
- let typeOptions = AST14.tsUnionType([]);
77912
+ let typeOptions = AST13.tsUnionType([]);
77860
77913
  if (graphql19.isScalarType(unwrapped.type)) {
77861
77914
  typeOptions.types.push(
77862
77915
  scalarPropertyValue(config2, /* @__PURE__ */ new Set(), unwrapped.type)
77863
77916
  );
77864
77917
  } else if (graphql19.isEnumType(unwrapped.type)) {
77865
77918
  typeOptions.types.push(
77866
- AST14.tsTypeReference(AST14.identifier(unwrapped.type.name))
77919
+ AST13.tsTypeReference(AST13.identifier(unwrapped.type.name))
77867
77920
  );
77868
77921
  } else if (!graphql19.isAbstractType(unwrapped.type)) {
77869
77922
  typeOptions.types.push(record(unwrapped.type.name));
@@ -77874,21 +77927,21 @@ function typeDefinitions(config2, body, docs, returnType) {
77874
77927
  }
77875
77928
  for (const wrapper of unwrapped.wrappers) {
77876
77929
  if (wrapper === "Nullable" /* Nullable */) {
77877
- typeOptions = AST14.tsParenthesizedType(
77878
- AST14.tsUnionType([typeOptions, AST14.tsNullKeyword()])
77930
+ typeOptions = AST13.tsParenthesizedType(
77931
+ AST13.tsUnionType([typeOptions, AST13.tsNullKeyword()])
77879
77932
  );
77880
77933
  } else if (wrapper === "List" /* List */) {
77881
- typeOptions = AST14.tsArrayType(
77882
- AST14.tsParenthesizedType(typeOptions)
77934
+ typeOptions = AST13.tsArrayType(
77935
+ AST13.tsParenthesizedType(typeOptions)
77883
77936
  );
77884
77937
  }
77885
77938
  }
77886
77939
  if (typeOptions.type === "TSParenthesizedType") {
77887
77940
  typeOptions = typeOptions.typeAnnotation;
77888
77941
  }
77889
- let args = AST14.tsNeverKeyword();
77942
+ let args = AST13.tsNeverKeyword();
77890
77943
  if (fieldType.args?.length > 0) {
77891
- args = AST14.tsTypeLiteral(
77944
+ args = AST13.tsTypeLiteral(
77892
77945
  fieldType.args.map((arg) => {
77893
77946
  addReferencedInputTypes(
77894
77947
  config2,
@@ -77898,9 +77951,9 @@ function typeDefinitions(config2, body, docs, returnType) {
77898
77951
  /* @__PURE__ */ new Set(),
77899
77952
  arg.type
77900
77953
  );
77901
- const prop = AST14.tsPropertySignature(
77902
- AST14.identifier(arg.name),
77903
- AST14.tsTypeAnnotation(
77954
+ const prop = AST13.tsPropertySignature(
77955
+ AST13.identifier(arg.name),
77956
+ AST13.tsTypeAnnotation(
77904
77957
  tsTypeReference(config2, /* @__PURE__ */ new Set(), arg, body)
77905
77958
  )
77906
77959
  );
@@ -77910,17 +77963,17 @@ function typeDefinitions(config2, body, docs, returnType) {
77910
77963
  })
77911
77964
  );
77912
77965
  }
77913
- return AST14.tsPropertySignature(
77914
- AST14.identifier(key),
77915
- AST14.tsTypeAnnotation(
77916
- AST14.tsTypeLiteral([
77917
- AST14.tsPropertySignature(
77918
- AST14.identifier("type"),
77919
- AST14.tsTypeAnnotation(typeOptions)
77966
+ return AST13.tsPropertySignature(
77967
+ AST13.identifier(key),
77968
+ AST13.tsTypeAnnotation(
77969
+ AST13.tsTypeLiteral([
77970
+ AST13.tsPropertySignature(
77971
+ AST13.identifier("type"),
77972
+ AST13.tsTypeAnnotation(typeOptions)
77920
77973
  ),
77921
- AST14.tsPropertySignature(
77922
- AST14.identifier("args"),
77923
- AST14.tsTypeAnnotation(args)
77974
+ AST13.tsPropertySignature(
77975
+ AST13.identifier("args"),
77976
+ AST13.tsTypeAnnotation(args)
77924
77977
  )
77925
77978
  ])
77926
77979
  )
@@ -77929,21 +77982,21 @@ function typeDefinitions(config2, body, docs, returnType) {
77929
77982
  )
77930
77983
  );
77931
77984
  }
77932
- return AST14.tsPropertySignature(
77933
- AST14.identifier(typeName),
77934
- AST14.tsTypeAnnotation(
77935
- AST14.tsTypeLiteral([
77936
- AST14.tsPropertySignature(
77937
- AST14.identifier("idFields"),
77938
- AST14.tsTypeAnnotation(idFields)
77985
+ return AST13.tsPropertySignature(
77986
+ AST13.identifier(typeName),
77987
+ AST13.tsTypeAnnotation(
77988
+ AST13.tsTypeLiteral([
77989
+ AST13.tsPropertySignature(
77990
+ AST13.identifier("idFields"),
77991
+ AST13.tsTypeAnnotation(idFields)
77939
77992
  ),
77940
- AST14.tsPropertySignature(
77941
- AST14.identifier("fields"),
77942
- AST14.tsTypeAnnotation(fields)
77993
+ AST13.tsPropertySignature(
77994
+ AST13.identifier("fields"),
77995
+ AST13.tsTypeAnnotation(fields)
77943
77996
  ),
77944
- AST14.tsPropertySignature(
77945
- AST14.identifier("fragments"),
77946
- AST14.tsTypeAnnotation(fragmentMap[typeName] ?? AST14.tsTupleType([]))
77997
+ AST13.tsPropertySignature(
77998
+ AST13.identifier("fragments"),
77999
+ AST13.tsTypeAnnotation(fragmentMap[typeName] ?? AST13.tsTupleType([]))
77947
78000
  )
77948
78001
  ])
77949
78002
  )
@@ -77985,28 +78038,28 @@ function listDefinitions(config2, body, docs) {
77985
78038
  possibleTypes.push(listType.name);
77986
78039
  }
77987
78040
  lists.push(
77988
- AST14.tsPropertySignature(
77989
- AST14.identifier(nameValue),
77990
- AST14.tsTypeAnnotation(
77991
- AST14.tsTypeLiteral([
77992
- AST14.tsPropertySignature(
77993
- AST14.identifier("types"),
77994
- AST14.tsTypeAnnotation(
77995
- AST14.tsUnionType(
78041
+ AST13.tsPropertySignature(
78042
+ AST13.identifier(nameValue),
78043
+ AST13.tsTypeAnnotation(
78044
+ AST13.tsTypeLiteral([
78045
+ AST13.tsPropertySignature(
78046
+ AST13.identifier("types"),
78047
+ AST13.tsTypeAnnotation(
78048
+ AST13.tsUnionType(
77996
78049
  possibleTypes.map(
77997
- (possible) => AST14.tsLiteralType(AST14.stringLiteral(possible))
78050
+ (possible) => AST13.tsLiteralType(AST13.stringLiteral(possible))
77998
78051
  )
77999
78052
  )
78000
78053
  )
78001
78054
  ),
78002
- AST14.tsPropertySignature(
78003
- AST14.identifier("filters"),
78004
- AST14.tsTypeAnnotation(
78005
- targetFieldDefinition.args.length === 0 ? AST14.tsNeverKeyword() : AST14.tsTypeLiteral(
78055
+ AST13.tsPropertySignature(
78056
+ AST13.identifier("filters"),
78057
+ AST13.tsTypeAnnotation(
78058
+ targetFieldDefinition.args.length === 0 ? AST13.tsNeverKeyword() : AST13.tsTypeLiteral(
78006
78059
  targetFieldDefinition.args.map((arg) => {
78007
- const argDef = AST14.tsPropertySignature(
78008
- AST14.identifier(arg.name),
78009
- AST14.tsTypeAnnotation(
78060
+ const argDef = AST13.tsPropertySignature(
78061
+ AST13.identifier(arg.name),
78062
+ AST13.tsTypeAnnotation(
78010
78063
  tsTypeReference(
78011
78064
  config2,
78012
78065
  /* @__PURE__ */ new Set(),
@@ -78028,10 +78081,10 @@ function listDefinitions(config2, body, docs) {
78028
78081
  }
78029
78082
  });
78030
78083
  }
78031
- return AST14.tsTypeLiteral(lists);
78084
+ return AST13.tsTypeLiteral(lists);
78032
78085
  }
78033
78086
  function queryDefinitions(config2, body, docs, returnType) {
78034
- return AST14.tsTupleType(
78087
+ return AST13.tsTupleType(
78035
78088
  docs.reduce((prev, doc) => {
78036
78089
  if (doc.kind !== ArtifactKind.Query || !doc.generateStore) {
78037
78090
  return prev;
@@ -78053,10 +78106,10 @@ function queryDefinitions(config2, body, docs, returnType) {
78053
78106
  import: [`${doc.name}$result`, `${doc.name}$input`]
78054
78107
  });
78055
78108
  return prev.concat(
78056
- AST14.tsTupleType([
78057
- AST14.tsTypeReference(AST14.identifier(runtimeType)),
78058
- AST14.tsTypeReference(AST14.identifier(shapeType)),
78059
- AST14.tsTypeReference(AST14.identifier(inputType))
78109
+ AST13.tsTupleType([
78110
+ AST13.tsTypeReference(AST13.identifier(runtimeType)),
78111
+ AST13.tsTypeReference(AST13.identifier(shapeType)),
78112
+ AST13.tsTypeReference(AST13.identifier(inputType))
78060
78113
  ])
78061
78114
  );
78062
78115
  }, [])
@@ -78085,13 +78138,13 @@ function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
78085
78138
  ),
78086
78139
  import: [`${definition.name.value}$data`]
78087
78140
  });
78088
- let inputType = AST14.tsNeverKeyword();
78141
+ let inputType = AST13.tsNeverKeyword();
78089
78142
  let directive = definition.directives?.find(
78090
78143
  (directive2) => directive2.name.value === config2.argumentsDirective
78091
78144
  );
78092
78145
  if (directive) {
78093
- inputType = AST14.tsTypeReference(
78094
- AST14.identifier(
78146
+ inputType = AST13.tsTypeReference(
78147
+ AST13.identifier(
78095
78148
  ensureImports({
78096
78149
  config: config2,
78097
78150
  body,
@@ -78106,11 +78159,11 @@ function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
78106
78159
  }
78107
78160
  return {
78108
78161
  ...prev,
78109
- [typeName]: AST14.tsTupleType(
78162
+ [typeName]: AST13.tsTupleType(
78110
78163
  previousValue.concat(
78111
- AST14.tsTupleType([
78112
- AST14.tsTypeReference(AST14.identifier(tagResult)),
78113
- AST14.tsTypeReference(AST14.identifier(shapeType)),
78164
+ AST13.tsTupleType([
78165
+ AST13.tsTypeReference(AST13.identifier(tagResult)),
78166
+ AST13.tsTypeReference(AST13.identifier(shapeType)),
78114
78167
  inputType
78115
78168
  ])
78116
78169
  )
@@ -78120,11 +78173,11 @@ function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
78120
78173
  }
78121
78174
  var CacheTypeDefName = "CacheTypeDef";
78122
78175
  function record(name) {
78123
- return AST14.tsTypeReference(
78124
- AST14.identifier("Record"),
78125
- AST14.tsTypeParameterInstantiation([
78126
- AST14.tsTypeReference(AST14.identifier(CacheTypeDefName)),
78127
- AST14.tsLiteralType(AST14.stringLiteral(name))
78176
+ return AST13.tsTypeReference(
78177
+ AST13.identifier("Record"),
78178
+ AST13.tsTypeParameterInstantiation([
78179
+ AST13.tsTypeReference(AST13.identifier(CacheTypeDefName)),
78180
+ AST13.tsLiteralType(AST13.stringLiteral(name))
78128
78181
  ])
78129
78182
  );
78130
78183
  }
@@ -78177,25 +78230,25 @@ async function persistOutputGenerator(config2, docs) {
78177
78230
 
78178
78231
  // src/codegen/generators/definitions/enums.ts
78179
78232
  var graphql21 = __toESM(require_graphql2(), 1);
78180
- var recast15 = __toESM(require_main2(), 1);
78181
- var AST15 = recast15.types.builders;
78233
+ var recast14 = __toESM(require_main2(), 1);
78234
+ var AST14 = recast14.types.builders;
78182
78235
  async function definitionsGenerator(config2) {
78183
78236
  const enums = graphql21.parse(graphql21.printSchema(config2.schema)).definitions.filter(
78184
78237
  (definition) => definition.kind === "EnumTypeDefinition"
78185
78238
  ).filter((def) => !config2.isInternalEnum(def));
78186
78239
  const { code: runtimeDefinitions } = await printJS(
78187
- AST15.program(
78240
+ AST14.program(
78188
78241
  enums.map((defn) => {
78189
78242
  const name = defn.name.value;
78190
78243
  return moduleExport(
78191
78244
  config2,
78192
78245
  name,
78193
- AST15.objectExpression(
78246
+ AST14.objectExpression(
78194
78247
  defn.values?.map((value) => {
78195
78248
  const str = value.name.value;
78196
- return AST15.objectProperty(
78197
- AST15.stringLiteral(str),
78198
- AST15.stringLiteral(str)
78249
+ return AST14.objectProperty(
78250
+ AST14.stringLiteral(str),
78251
+ AST14.stringLiteral(str)
78199
78252
  );
78200
78253
  }) || []
78201
78254
  )
@@ -80181,8 +80234,8 @@ async function updatePackageJSON(targetPath) {
80181
80234
  }
80182
80235
  packageJSON.devDependencies = {
80183
80236
  ...packageJSON.devDependencies,
80184
- houdini: "^1.2.5",
80185
- "houdini-svelte": "^1.2.5"
80237
+ houdini: "^1.2.6-next.0",
80238
+ "houdini-svelte": "^1.2.6-next.0"
80186
80239
  };
80187
80240
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
80188
80241
  }