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
@@ -3725,12 +3725,12 @@ var require_parser = __commonJS({
3725
3725
  return [];
3726
3726
  }
3727
3727
  if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {
3728
- var types18 = [];
3728
+ var types17 = [];
3729
3729
  this.expectOptionalToken(_tokenKind.TokenKind.AMP);
3730
3730
  do {
3731
- types18.push(this.parseNamedType());
3731
+ types17.push(this.parseNamedType());
3732
3732
  } while (this.expectOptionalToken(_tokenKind.TokenKind.AMP) || this.peek(_tokenKind.TokenKind.NAME));
3733
- return types18;
3733
+ return types17;
3734
3734
  }
3735
3735
  return this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType);
3736
3736
  };
@@ -3809,13 +3809,13 @@ var require_parser = __commonJS({
3809
3809
  this.expectKeyword("union");
3810
3810
  var name = this.parseName();
3811
3811
  var directives = this.parseDirectives(true);
3812
- var types18 = this.parseUnionMemberTypes();
3812
+ var types17 = this.parseUnionMemberTypes();
3813
3813
  return {
3814
3814
  kind: _kinds.Kind.UNION_TYPE_DEFINITION,
3815
3815
  description,
3816
3816
  name,
3817
3817
  directives,
3818
- types: types18,
3818
+ types: types17,
3819
3819
  loc: this.loc(start)
3820
3820
  };
3821
3821
  };
@@ -3973,15 +3973,15 @@ var require_parser = __commonJS({
3973
3973
  this.expectKeyword("union");
3974
3974
  var name = this.parseName();
3975
3975
  var directives = this.parseDirectives(true);
3976
- var types18 = this.parseUnionMemberTypes();
3977
- if (directives.length === 0 && types18.length === 0) {
3976
+ var types17 = this.parseUnionMemberTypes();
3977
+ if (directives.length === 0 && types17.length === 0) {
3978
3978
  throw this.unexpected();
3979
3979
  }
3980
3980
  return {
3981
3981
  kind: _kinds.Kind.UNION_TYPE_EXTENSION,
3982
3982
  name,
3983
3983
  directives,
3984
- types: types18,
3984
+ types: types17,
3985
3985
  loc: this.loc(start)
3986
3986
  };
3987
3987
  };
@@ -4959,8 +4959,8 @@ var require_printer = __commonJS({
4959
4959
  return join3(["interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ");
4960
4960
  }),
4961
4961
  UnionTypeDefinition: addDescription2(function(_ref27) {
4962
- var name = _ref27.name, directives = _ref27.directives, types18 = _ref27.types;
4963
- return join3(["union", name, join3(directives, " "), types18 && types18.length !== 0 ? "= " + join3(types18, " | ") : ""], " ");
4962
+ var name = _ref27.name, directives = _ref27.directives, types17 = _ref27.types;
4963
+ return join3(["union", name, join3(directives, " "), types17 && types17.length !== 0 ? "= " + join3(types17, " | ") : ""], " ");
4964
4964
  }),
4965
4965
  EnumTypeDefinition: addDescription2(function(_ref28) {
4966
4966
  var name = _ref28.name, directives = _ref28.directives, values = _ref28.values;
@@ -4995,8 +4995,8 @@ var require_printer = __commonJS({
4995
4995
  return join3(["extend interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ");
4996
4996
  },
4997
4997
  UnionTypeExtension: function UnionTypeExtension(_ref36) {
4998
- var name = _ref36.name, directives = _ref36.directives, types18 = _ref36.types;
4999
- return join3(["extend union", name, join3(directives, " "), types18 && types18.length !== 0 ? "= " + join3(types18, " | ") : ""], " ");
4998
+ var name = _ref36.name, directives = _ref36.directives, types17 = _ref36.types;
4999
+ return join3(["extend union", name, join3(directives, " "), types17 && types17.length !== 0 ? "= " + join3(types17, " | ") : ""], " ");
5000
5000
  },
5001
5001
  EnumTypeExtension: function EnumTypeExtension(_ref37) {
5002
5002
  var name = _ref37.name, directives = _ref37.directives, values = _ref37.values;
@@ -5667,9 +5667,9 @@ var require_definition = __commonJS({
5667
5667
  exports.GraphQLUnionType = GraphQLUnionType3;
5668
5668
  (0, _defineInspect.default)(GraphQLUnionType3);
5669
5669
  function defineTypes(config2) {
5670
- var types18 = resolveThunk(config2.types);
5671
- 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, "."));
5672
- return types18;
5670
+ var types17 = resolveThunk(config2.types);
5671
+ 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, "."));
5672
+ return types17;
5673
5673
  }
5674
5674
  var GraphQLEnumType4 = /* @__PURE__ */ function() {
5675
5675
  function GraphQLEnumType5(config2) {
@@ -13306,7 +13306,7 @@ var require_buildClientSchema = __commonJS({
13306
13306
  return new _definition.GraphQLUnionType({
13307
13307
  name: unionIntrospection.name,
13308
13308
  description: unionIntrospection.description,
13309
- types: function types18() {
13309
+ types: function types17() {
13310
13310
  return unionIntrospection.possibleTypes.map(getObjectType);
13311
13311
  }
13312
13312
  });
@@ -13651,7 +13651,7 @@ var require_extendSchema = __commonJS({
13651
13651
  var config2 = type.toConfig();
13652
13652
  var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config2.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
13653
13653
  return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config2), {}, {
13654
- types: function types18() {
13654
+ types: function types17() {
13655
13655
  return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
13656
13656
  },
13657
13657
  extensionASTNodes: config2.extensionASTNodes.concat(extensions)
@@ -13799,17 +13799,17 @@ var require_extendSchema = __commonJS({
13799
13799
  return interfaces;
13800
13800
  }
13801
13801
  function buildUnionTypes(nodes) {
13802
- var types18 = [];
13802
+ var types17 = [];
13803
13803
  for (var _i32 = 0; _i32 < nodes.length; _i32++) {
13804
13804
  var _node$types;
13805
13805
  var node = nodes[_i32];
13806
13806
  var typeNodes = (_node$types = node.types) !== null && _node$types !== void 0 ? _node$types : [];
13807
13807
  for (var _i34 = 0; _i34 < typeNodes.length; _i34++) {
13808
13808
  var type = typeNodes[_i34];
13809
- types18.push(getNamedType5(type));
13809
+ types17.push(getNamedType5(type));
13810
13810
  }
13811
13811
  }
13812
- return types18;
13812
+ return types17;
13813
13813
  }
13814
13814
  function buildType(astNode) {
13815
13815
  var _typeExtensionsMap$na;
@@ -13866,7 +13866,7 @@ var require_extendSchema = __commonJS({
13866
13866
  return new _definition.GraphQLUnionType({
13867
13867
  name: name2,
13868
13868
  description,
13869
- types: function types18() {
13869
+ types: function types17() {
13870
13870
  return buildUnionTypes(_allNodes3);
13871
13871
  },
13872
13872
  astNode,
@@ -14164,7 +14164,7 @@ var require_lexicographicSortSchema = __commonJS({
14164
14164
  if ((0, _definition.isUnionType)(type)) {
14165
14165
  var _config22 = type.toConfig();
14166
14166
  return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, _config22), {}, {
14167
- types: function types18() {
14167
+ types: function types17() {
14168
14168
  return sortTypes(_config22.types);
14169
14169
  }
14170
14170
  }));
@@ -14249,10 +14249,10 @@ var require_printSchema = __commonJS({
14249
14249
  }
14250
14250
  function printFilteredSchema(schema, directiveFilter, typeFilter, options) {
14251
14251
  var directives = schema.getDirectives().filter(directiveFilter);
14252
- var types18 = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter);
14252
+ var types17 = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter);
14253
14253
  return [printSchemaDefinition(schema)].concat(directives.map(function(directive) {
14254
14254
  return printDirective(directive, options);
14255
- }), types18.map(function(type) {
14255
+ }), types17.map(function(type) {
14256
14256
  return printType(type, options);
14257
14257
  })).filter(Boolean).join("\n\n") + "\n";
14258
14258
  }
@@ -14327,8 +14327,8 @@ var require_printSchema = __commonJS({
14327
14327
  return printDescription(options, type) + "interface ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);
14328
14328
  }
14329
14329
  function printUnion(type, options) {
14330
- var types18 = type.getTypes();
14331
- var possibleTypes = types18.length ? " = " + types18.join(" | ") : "";
14330
+ var types17 = type.getTypes();
14331
+ var possibleTypes = types17.length ? " = " + types17.join(" | ") : "";
14332
14332
  return printDescription(options, type) + "union " + type.name + possibleTypes;
14333
14333
  }
14334
14334
  function printEnum(type, options) {
@@ -30007,14 +30007,14 @@ var require_lib3 = __commonJS({
30007
30007
  this.preserveSpace = !!preserveSpace;
30008
30008
  }
30009
30009
  };
30010
- var types18 = {
30010
+ var types17 = {
30011
30011
  brace: new TokContext("{"),
30012
30012
  j_oTag: new TokContext("<tag"),
30013
30013
  j_cTag: new TokContext("</tag"),
30014
30014
  j_expr: new TokContext("<tag>...</tag>", true)
30015
30015
  };
30016
30016
  {
30017
- types18.template = new TokContext("`", true);
30017
+ types17.template = new TokContext("`", true);
30018
30018
  }
30019
30019
  var beforeExpr = true;
30020
30020
  var startsExpr = true;
@@ -30546,17 +30546,17 @@ var require_lib3 = __commonJS({
30546
30546
  context.pop();
30547
30547
  };
30548
30548
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
30549
- context.push(types18.brace);
30549
+ context.push(types17.brace);
30550
30550
  };
30551
30551
  tokenTypes[22].updateContext = (context) => {
30552
- if (context[context.length - 1] === types18.template) {
30552
+ if (context[context.length - 1] === types17.template) {
30553
30553
  context.pop();
30554
30554
  } else {
30555
- context.push(types18.template);
30555
+ context.push(types17.template);
30556
30556
  }
30557
30557
  };
30558
30558
  tokenTypes[140].updateContext = (context) => {
30559
- context.push(types18.j_expr, types18.j_oTag);
30559
+ context.push(types17.j_expr, types17.j_oTag);
30560
30560
  };
30561
30561
  }
30562
30562
  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";
@@ -31197,7 +31197,7 @@ var require_lib3 = __commonJS({
31197
31197
  this.lastTokEndLoc = null;
31198
31198
  this.lastTokStartLoc = null;
31199
31199
  this.lastTokStart = 0;
31200
- this.context = [types18.brace];
31200
+ this.context = [types17.brace];
31201
31201
  this.canStartJSXElement = true;
31202
31202
  this.containsEsc = false;
31203
31203
  this.firstInvalidTemplateEscapePos = null;
@@ -35121,7 +35121,7 @@ var require_lib3 = __commonJS({
35121
35121
  context
35122
35122
  } = this.state;
35123
35123
  const currentContext = context[context.length - 1];
35124
- if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
35124
+ if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
35125
35125
  context.pop();
35126
35126
  }
35127
35127
  }
@@ -36181,9 +36181,9 @@ var require_lib3 = __commonJS({
36181
36181
  switch (this.state.type) {
36182
36182
  case 5:
36183
36183
  node = this.startNode();
36184
- this.setContext(types18.brace);
36184
+ this.setContext(types17.brace);
36185
36185
  this.next();
36186
- node = this.jsxParseExpressionContainer(node, types18.j_oTag);
36186
+ node = this.jsxParseExpressionContainer(node, types17.j_oTag);
36187
36187
  if (node.expression.type === "JSXEmptyExpression") {
36188
36188
  this.raise(JsxErrors.AttributeIsEmpty, {
36189
36189
  at: node
@@ -36206,7 +36206,7 @@ var require_lib3 = __commonJS({
36206
36206
  jsxParseSpreadChild(node) {
36207
36207
  this.next();
36208
36208
  node.expression = this.parseExpression();
36209
- this.setContext(types18.j_expr);
36209
+ this.setContext(types17.j_expr);
36210
36210
  this.state.canStartJSXElement = true;
36211
36211
  this.expect(8);
36212
36212
  return this.finishNode(node, "JSXSpreadChild");
@@ -36226,11 +36226,11 @@ var require_lib3 = __commonJS({
36226
36226
  jsxParseAttribute() {
36227
36227
  const node = this.startNode();
36228
36228
  if (this.match(5)) {
36229
- this.setContext(types18.brace);
36229
+ this.setContext(types17.brace);
36230
36230
  this.next();
36231
36231
  this.expect(21);
36232
36232
  node.argument = this.parseMaybeAssignAllowIn();
36233
- this.setContext(types18.j_oTag);
36233
+ this.setContext(types17.j_oTag);
36234
36234
  this.state.canStartJSXElement = true;
36235
36235
  this.expect(8);
36236
36236
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -36289,12 +36289,12 @@ var require_lib3 = __commonJS({
36289
36289
  break;
36290
36290
  case 5: {
36291
36291
  const node2 = this.startNode();
36292
- this.setContext(types18.brace);
36292
+ this.setContext(types17.brace);
36293
36293
  this.next();
36294
36294
  if (this.match(21)) {
36295
36295
  children.push(this.jsxParseSpreadChild(node2));
36296
36296
  } else {
36297
- children.push(this.jsxParseExpressionContainer(node2, types18.j_expr));
36297
+ children.push(this.jsxParseExpressionContainer(node2, types17.j_expr));
36298
36298
  }
36299
36299
  break;
36300
36300
  }
@@ -36365,10 +36365,10 @@ var require_lib3 = __commonJS({
36365
36365
  }
36366
36366
  getTokenFromCode(code) {
36367
36367
  const context = this.curContext();
36368
- if (context === types18.j_expr) {
36368
+ if (context === types17.j_expr) {
36369
36369
  return this.jsxReadToken();
36370
36370
  }
36371
- if (context === types18.j_oTag || context === types18.j_cTag) {
36371
+ if (context === types17.j_oTag || context === types17.j_cTag) {
36372
36372
  if (isIdentifierStart(code)) {
36373
36373
  return this.jsxReadWord();
36374
36374
  }
@@ -36376,7 +36376,7 @@ var require_lib3 = __commonJS({
36376
36376
  ++this.state.pos;
36377
36377
  return this.finishToken(141);
36378
36378
  }
36379
- if ((code === 34 || code === 39) && context === types18.j_oTag) {
36379
+ if ((code === 34 || code === 39) && context === types17.j_oTag) {
36380
36380
  return this.jsxReadString(code);
36381
36381
  }
36382
36382
  }
@@ -36392,17 +36392,17 @@ var require_lib3 = __commonJS({
36392
36392
  type
36393
36393
  } = this.state;
36394
36394
  if (type === 56 && prevType === 140) {
36395
- context.splice(-2, 2, types18.j_cTag);
36395
+ context.splice(-2, 2, types17.j_cTag);
36396
36396
  this.state.canStartJSXElement = false;
36397
36397
  } else if (type === 140) {
36398
- context.push(types18.j_oTag);
36398
+ context.push(types17.j_oTag);
36399
36399
  } else if (type === 141) {
36400
36400
  const out = context[context.length - 1];
36401
- if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
36401
+ if (out === types17.j_oTag && prevType === 56 || out === types17.j_cTag) {
36402
36402
  context.pop();
36403
- this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
36403
+ this.state.canStartJSXElement = context[context.length - 1] === types17.j_expr;
36404
36404
  } else {
36405
- this.setContext(types18.j_expr);
36405
+ this.setContext(types17.j_expr);
36406
36406
  this.state.canStartJSXElement = true;
36407
36407
  }
36408
36408
  } else {
@@ -37410,14 +37410,14 @@ var require_lib3 = __commonJS({
37410
37410
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
37411
37411
  const node = this.startNode();
37412
37412
  const hasLeadingOperator = this.eat(operator);
37413
- const types19 = [];
37413
+ const types18 = [];
37414
37414
  do {
37415
- types19.push(parseConstituentType());
37415
+ types18.push(parseConstituentType());
37416
37416
  } while (this.eat(operator));
37417
- if (types19.length === 1 && !hasLeadingOperator) {
37418
- return types19[0];
37417
+ if (types18.length === 1 && !hasLeadingOperator) {
37418
+ return types18[0];
37419
37419
  }
37420
- node.types = types19;
37420
+ node.types = types18;
37421
37421
  return this.finishNode(node, kind);
37422
37422
  }
37423
37423
  tsParseIntersectionTypeOrHigher() {
@@ -38646,7 +38646,7 @@ var require_lib3 = __commonJS({
38646
38646
  context
38647
38647
  } = this.state;
38648
38648
  const currentContext = context[context.length - 1];
38649
- if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
38649
+ if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
38650
38650
  context.pop();
38651
38651
  }
38652
38652
  }
@@ -44285,9 +44285,9 @@ var require_shared = __commonJS({
44285
44285
  var tslib_1 = require_tslib();
44286
44286
  var types_1 = tslib_1.__importDefault(require_types());
44287
44287
  function default_1(fork) {
44288
- var types18 = fork.use(types_1.default);
44289
- var Type = types18.Type;
44290
- var builtin = types18.builtInTypes;
44288
+ var types17 = fork.use(types_1.default);
44289
+ var Type = types17.Type;
44290
+ var builtin = types17.builtInTypes;
44291
44291
  var isNumber = builtin.number;
44292
44292
  function geq(than) {
44293
44293
  return Type.from(function(value) {
@@ -44437,9 +44437,9 @@ var require_types = __commonJS({
44437
44437
  }(BaseType);
44438
44438
  var OrType = function(_super) {
44439
44439
  tslib_1.__extends(OrType2, _super);
44440
- function OrType2(types18) {
44440
+ function OrType2(types17) {
44441
44441
  var _this = _super.call(this) || this;
44442
- _this.types = types18;
44442
+ _this.types = types17;
44443
44443
  _this.kind = "OrType";
44444
44444
  return _this;
44445
44445
  }
@@ -44580,11 +44580,11 @@ var require_types = __commonJS({
44580
44580
  function typesPlugin(_fork) {
44581
44581
  var Type = {
44582
44582
  or: function() {
44583
- var types18 = [];
44583
+ var types17 = [];
44584
44584
  for (var _i = 0; _i < arguments.length; _i++) {
44585
- types18[_i] = arguments[_i];
44585
+ types17[_i] = arguments[_i];
44586
44586
  }
44587
- return new OrType(types18.map(function(type) {
44587
+ return new OrType(types17.map(function(type) {
44588
44588
  return Type.from(type);
44589
44589
  }));
44590
44590
  },
@@ -45029,9 +45029,9 @@ var require_path2 = __commonJS({
45029
45029
  var Op = Object.prototype;
45030
45030
  var hasOwn = Op.hasOwnProperty;
45031
45031
  function pathPlugin(fork) {
45032
- var types18 = fork.use(types_1.default);
45033
- var isArray = types18.builtInTypes.array;
45034
- var isNumber = types18.builtInTypes.number;
45032
+ var types17 = fork.use(types_1.default);
45033
+ var isArray = types17.builtInTypes.array;
45034
+ var isNumber = types17.builtInTypes.number;
45035
45035
  var Path = function Path2(value, parentPath, name) {
45036
45036
  if (!(this instanceof Path2)) {
45037
45037
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -45333,13 +45333,13 @@ var require_scope = __commonJS({
45333
45333
  var types_1 = tslib_1.__importDefault(require_types());
45334
45334
  var hasOwn = Object.prototype.hasOwnProperty;
45335
45335
  function scopePlugin(fork) {
45336
- var types18 = fork.use(types_1.default);
45337
- var Type = types18.Type;
45338
- var namedTypes = types18.namedTypes;
45336
+ var types17 = fork.use(types_1.default);
45337
+ var Type = types17.Type;
45338
+ var namedTypes = types17.namedTypes;
45339
45339
  var Node = namedTypes.Node;
45340
45340
  var Expression = namedTypes.Expression;
45341
- var isArray = types18.builtInTypes.array;
45342
- var b = types18.builders;
45341
+ var isArray = types17.builtInTypes.array;
45342
+ var b = types17.builders;
45343
45343
  var Scope = function Scope2(path2, parentScope) {
45344
45344
  if (!(this instanceof Scope2)) {
45345
45345
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -45402,7 +45402,7 @@ var require_scope = __commonJS({
45402
45402
  ++index;
45403
45403
  }
45404
45404
  var name = prefix + index;
45405
- return this.bindings[name] = types18.builders.identifier(name);
45405
+ return this.bindings[name] = types17.builders.identifier(name);
45406
45406
  };
45407
45407
  Sp.injectTemporary = function(identifier, init2) {
45408
45408
  identifier || (identifier = this.declareTemporary());
@@ -45478,7 +45478,7 @@ var require_scope = __commonJS({
45478
45478
  bindings
45479
45479
  );
45480
45480
  } else if (Node.check(node) && !Expression.check(node)) {
45481
- types18.eachField(node, function(name, child) {
45481
+ types17.eachField(node, function(name, child) {
45482
45482
  var childPath = path2.get(name);
45483
45483
  if (!pathHasValue(childPath, child)) {
45484
45484
  throw new Error("");
@@ -45556,24 +45556,24 @@ var require_scope = __commonJS({
45556
45556
  addPattern(patternPath.get("argument"), bindings);
45557
45557
  }
45558
45558
  }
45559
- function addTypePattern(patternPath, types19) {
45559
+ function addTypePattern(patternPath, types18) {
45560
45560
  var pattern = patternPath.value;
45561
45561
  namedTypes.Pattern.assert(pattern);
45562
45562
  if (namedTypes.Identifier.check(pattern)) {
45563
- if (hasOwn.call(types19, pattern.name)) {
45564
- types19[pattern.name].push(patternPath);
45563
+ if (hasOwn.call(types18, pattern.name)) {
45564
+ types18[pattern.name].push(patternPath);
45565
45565
  } else {
45566
- types19[pattern.name] = [patternPath];
45566
+ types18[pattern.name] = [patternPath];
45567
45567
  }
45568
45568
  }
45569
45569
  }
45570
- function addTypeParameter(parameterPath, types19) {
45570
+ function addTypeParameter(parameterPath, types18) {
45571
45571
  var parameter = parameterPath.value;
45572
45572
  FlowOrTSTypeParameterType.assert(parameter);
45573
- if (hasOwn.call(types19, parameter.name)) {
45574
- types19[parameter.name].push(parameterPath);
45573
+ if (hasOwn.call(types18, parameter.name)) {
45574
+ types18[parameter.name].push(parameterPath);
45575
45575
  } else {
45576
- types19[parameter.name] = [parameterPath];
45576
+ types18[parameter.name] = [parameterPath];
45577
45577
  }
45578
45578
  }
45579
45579
  Sp.lookup = function(name) {
@@ -45614,11 +45614,11 @@ var require_node_path = __commonJS({
45614
45614
  var scope_1 = tslib_1.__importDefault(require_scope());
45615
45615
  var shared_1 = require_shared();
45616
45616
  function nodePathPlugin(fork) {
45617
- var types18 = fork.use(types_1.default);
45618
- var n = types18.namedTypes;
45619
- var b = types18.builders;
45620
- var isNumber = types18.builtInTypes.number;
45621
- var isArray = types18.builtInTypes.array;
45617
+ var types17 = fork.use(types_1.default);
45618
+ var n = types17.namedTypes;
45619
+ var b = types17.builders;
45620
+ var isNumber = types17.builtInTypes.number;
45621
+ var isArray = types17.builtInTypes.array;
45622
45622
  var Path = fork.use(path_1.default);
45623
45623
  var Scope = fork.use(scope_1.default);
45624
45624
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -45709,7 +45709,7 @@ var require_node_path = __commonJS({
45709
45709
  return scope || null;
45710
45710
  };
45711
45711
  NPp.getValueProperty = function(name) {
45712
- return types18.getFieldValue(this.value, name);
45712
+ return types17.getFieldValue(this.value, name);
45713
45713
  };
45714
45714
  NPp.needsParens = function(assumeExpressionContext) {
45715
45715
  var pp = this.parentPath;
@@ -45851,7 +45851,7 @@ var require_node_path = __commonJS({
45851
45851
  return node.some(containsCallExpression);
45852
45852
  }
45853
45853
  if (n.Node.check(node)) {
45854
- return types18.someField(node, function(_name, child) {
45854
+ return types17.someField(node, function(_name, child) {
45855
45855
  return containsCallExpression(child);
45856
45856
  });
45857
45857
  }
@@ -45972,11 +45972,11 @@ var require_path_visitor = __commonJS({
45972
45972
  var shared_1 = require_shared();
45973
45973
  var hasOwn = Object.prototype.hasOwnProperty;
45974
45974
  function pathVisitorPlugin(fork) {
45975
- var types18 = fork.use(types_1.default);
45975
+ var types17 = fork.use(types_1.default);
45976
45976
  var NodePath = fork.use(node_path_1.default);
45977
- var isArray = types18.builtInTypes.array;
45978
- var isObject2 = types18.builtInTypes.object;
45979
- var isFunction = types18.builtInTypes.function;
45977
+ var isArray = types17.builtInTypes.array;
45978
+ var isObject2 = types17.builtInTypes.object;
45979
+ var isFunction = types17.builtInTypes.function;
45980
45980
  var undefined2;
45981
45981
  var PathVisitor = function PathVisitor2() {
45982
45982
  if (!(this instanceof PathVisitor2)) {
@@ -45996,7 +45996,7 @@ var require_path_visitor = __commonJS({
45996
45996
  typeNames[methodName.slice("visit".length)] = true;
45997
45997
  }
45998
45998
  }
45999
- var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
45999
+ var supertypeTable = types17.computeSupertypeLookupTable(typeNames);
46000
46000
  var methodNameTable = /* @__PURE__ */ Object.create(null);
46001
46001
  var typeNameKeys = Object.keys(supertypeTable);
46002
46002
  var typeNameCount = typeNameKeys.length;
@@ -46115,7 +46115,7 @@ var require_path_visitor = __commonJS({
46115
46115
  path2.each(visitor.visitWithoutReset, visitor);
46116
46116
  } else if (!isObject2.check(value)) {
46117
46117
  } else {
46118
- var childNames = types18.getFieldNames(value);
46118
+ var childNames = types17.getFieldNames(value);
46119
46119
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
46120
46120
  childNames.push("comments");
46121
46121
  }
@@ -46124,7 +46124,7 @@ var require_path_visitor = __commonJS({
46124
46124
  for (var i2 = 0; i2 < childCount; ++i2) {
46125
46125
  var childName = childNames[i2];
46126
46126
  if (!hasOwn.call(value, childName)) {
46127
- value[childName] = types18.getFieldValue(value, childName);
46127
+ value[childName] = types17.getFieldValue(value, childName);
46128
46128
  }
46129
46129
  childPaths.push(path2.get(childName));
46130
46130
  }
@@ -46267,13 +46267,13 @@ var require_equiv = __commonJS({
46267
46267
  var shared_1 = require_shared();
46268
46268
  var types_1 = tslib_1.__importDefault(require_types());
46269
46269
  function default_1(fork) {
46270
- var types18 = fork.use(types_1.default);
46271
- var getFieldNames = types18.getFieldNames;
46272
- var getFieldValue = types18.getFieldValue;
46273
- var isArray = types18.builtInTypes.array;
46274
- var isObject2 = types18.builtInTypes.object;
46275
- var isDate = types18.builtInTypes.Date;
46276
- var isRegExp = types18.builtInTypes.RegExp;
46270
+ var types17 = fork.use(types_1.default);
46271
+ var getFieldNames = types17.getFieldNames;
46272
+ var getFieldValue = types17.getFieldValue;
46273
+ var isArray = types17.builtInTypes.array;
46274
+ var isObject2 = types17.builtInTypes.object;
46275
+ var isDate = types17.builtInTypes.Date;
46276
+ var isRegExp = types17.builtInTypes.RegExp;
46277
46277
  var hasOwn = Object.prototype.hasOwnProperty;
46278
46278
  function astNodesAreEquivalent(a, b, problemPath) {
46279
46279
  if (isArray.check(problemPath)) {
@@ -46426,24 +46426,24 @@ var require_fork = __commonJS({
46426
46426
  var shared_1 = require_shared();
46427
46427
  function default_1(plugins) {
46428
46428
  var fork = createFork();
46429
- var types18 = fork.use(types_1.default);
46429
+ var types17 = fork.use(types_1.default);
46430
46430
  plugins.forEach(fork.use);
46431
- types18.finalize();
46431
+ types17.finalize();
46432
46432
  var PathVisitor = fork.use(path_visitor_1.default);
46433
46433
  return {
46434
- Type: types18.Type,
46435
- builtInTypes: types18.builtInTypes,
46436
- namedTypes: types18.namedTypes,
46437
- builders: types18.builders,
46438
- defineMethod: types18.defineMethod,
46439
- getFieldNames: types18.getFieldNames,
46440
- getFieldValue: types18.getFieldValue,
46441
- eachField: types18.eachField,
46442
- someField: types18.someField,
46443
- getSupertypeNames: types18.getSupertypeNames,
46444
- getBuilderName: types18.getBuilderName,
46434
+ Type: types17.Type,
46435
+ builtInTypes: types17.builtInTypes,
46436
+ namedTypes: types17.namedTypes,
46437
+ builders: types17.builders,
46438
+ defineMethod: types17.defineMethod,
46439
+ getFieldNames: types17.getFieldNames,
46440
+ getFieldValue: types17.getFieldValue,
46441
+ eachField: types17.eachField,
46442
+ someField: types17.someField,
46443
+ getSupertypeNames: types17.getSupertypeNames,
46444
+ getBuilderName: types17.getBuilderName,
46445
46445
  astNodesAreEquivalent: fork.use(equiv_1.default),
46446
- finalize: types18.finalize,
46446
+ finalize: types17.finalize,
46447
46447
  Path: fork.use(path_1.default),
46448
46448
  NodePath: fork.use(node_path_1.default),
46449
46449
  PathVisitor,
@@ -46613,8 +46613,8 @@ var require_core2 = __commonJS({
46613
46613
  var types_1 = tslib_1.__importDefault(require_types());
46614
46614
  var shared_1 = tslib_1.__importStar(require_shared());
46615
46615
  function default_1(fork) {
46616
- var types18 = fork.use(types_1.default);
46617
- var Type = types18.Type;
46616
+ var types17 = fork.use(types_1.default);
46617
+ var Type = types17.Type;
46618
46618
  var def = Type.def;
46619
46619
  var or = Type.or;
46620
46620
  var shared = fork.use(shared_1.default);
@@ -46706,9 +46706,9 @@ var require_es6 = __commonJS({
46706
46706
  var shared_1 = tslib_1.__importStar(require_shared());
46707
46707
  function default_1(fork) {
46708
46708
  fork.use(core_1.default);
46709
- var types18 = fork.use(types_1.default);
46710
- var def = types18.Type.def;
46711
- var or = types18.Type.or;
46709
+ var types17 = fork.use(types_1.default);
46710
+ var def = types17.Type.def;
46711
+ var or = types17.Type.or;
46712
46712
  var defaults = fork.use(shared_1.default).defaults;
46713
46713
  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"]);
46714
46714
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -46798,8 +46798,8 @@ var require_es2017 = __commonJS({
46798
46798
  var shared_1 = tslib_1.__importStar(require_shared());
46799
46799
  function default_1(fork) {
46800
46800
  fork.use(es2016_1.default);
46801
- var types18 = fork.use(types_1.default);
46802
- var def = types18.Type.def;
46801
+ var types17 = fork.use(types_1.default);
46802
+ var def = types17.Type.def;
46803
46803
  var defaults = fork.use(shared_1.default).defaults;
46804
46804
  def("Function").field("async", Boolean, defaults["false"]);
46805
46805
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -46822,9 +46822,9 @@ var require_es2018 = __commonJS({
46822
46822
  var shared_1 = tslib_1.__importStar(require_shared());
46823
46823
  function default_1(fork) {
46824
46824
  fork.use(es2017_1.default);
46825
- var types18 = fork.use(types_1.default);
46826
- var def = types18.Type.def;
46827
- var or = types18.Type.or;
46825
+ var types17 = fork.use(types_1.default);
46826
+ var def = types17.Type.def;
46827
+ var or = types17.Type.or;
46828
46828
  var defaults = fork.use(shared_1.default).defaults;
46829
46829
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
46830
46830
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -46855,9 +46855,9 @@ var require_es2019 = __commonJS({
46855
46855
  var shared_1 = tslib_1.__importStar(require_shared());
46856
46856
  function default_1(fork) {
46857
46857
  fork.use(es2018_1.default);
46858
- var types18 = fork.use(types_1.default);
46859
- var def = types18.Type.def;
46860
- var or = types18.Type.or;
46858
+ var types17 = fork.use(types_1.default);
46859
+ var def = types17.Type.def;
46860
+ var or = types17.Type.or;
46861
46861
  var defaults = fork.use(shared_1.default).defaults;
46862
46862
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
46863
46863
  }
@@ -46881,9 +46881,9 @@ var require_es20202 = __commonJS({
46881
46881
  function default_1(fork) {
46882
46882
  fork.use(es2020_1.default);
46883
46883
  fork.use(es2019_1.default);
46884
- var types18 = fork.use(types_1.default);
46885
- var def = types18.Type.def;
46886
- var or = types18.Type.or;
46884
+ var types17 = fork.use(types_1.default);
46885
+ var def = types17.Type.def;
46886
+ var or = types17.Type.or;
46887
46887
  var shared = fork.use(shared_1.default);
46888
46888
  var defaults = shared.defaults;
46889
46889
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -46933,8 +46933,8 @@ var require_es2022 = __commonJS({
46933
46933
  var shared_1 = require_shared();
46934
46934
  function default_1(fork) {
46935
46935
  fork.use(es2021_1.default);
46936
- var types18 = fork.use(types_1.default);
46937
- var def = types18.Type.def;
46936
+ var types17 = fork.use(types_1.default);
46937
+ var def = types17.Type.def;
46938
46938
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
46939
46939
  }
46940
46940
  exports.default = default_1;
@@ -46955,9 +46955,9 @@ var require_es_proposals = __commonJS({
46955
46955
  var es2022_1 = tslib_1.__importDefault(require_es2022());
46956
46956
  function default_1(fork) {
46957
46957
  fork.use(es2022_1.default);
46958
- var types18 = fork.use(types_1.default);
46959
- var Type = types18.Type;
46960
- var def = types18.Type.def;
46958
+ var types17 = fork.use(types_1.default);
46959
+ var Type = types17.Type;
46960
+ var def = types17.Type.def;
46961
46961
  var or = Type.or;
46962
46962
  var shared = fork.use(shared_1.default);
46963
46963
  var defaults = shared.defaults;
@@ -46997,9 +46997,9 @@ var require_jsx = __commonJS({
46997
46997
  var shared_1 = tslib_1.__importStar(require_shared());
46998
46998
  function default_1(fork) {
46999
46999
  fork.use(es_proposals_1.default);
47000
- var types18 = fork.use(types_1.default);
47001
- var def = types18.Type.def;
47002
- var or = types18.Type.or;
47000
+ var types17 = fork.use(types_1.default);
47001
+ var def = types17.Type.def;
47002
+ var or = types17.Type.or;
47003
47003
  var defaults = fork.use(shared_1.default).defaults;
47004
47004
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
47005
47005
  def("Literal"),
@@ -47057,9 +47057,9 @@ var require_type_annotations = __commonJS({
47057
47057
  var types_1 = tslib_1.__importDefault(require_types());
47058
47058
  var shared_1 = tslib_1.__importStar(require_shared());
47059
47059
  function default_1(fork) {
47060
- var types18 = fork.use(types_1.default);
47061
- var def = types18.Type.def;
47062
- var or = types18.Type.or;
47060
+ var types17 = fork.use(types_1.default);
47061
+ var def = types17.Type.def;
47062
+ var or = types17.Type.or;
47063
47063
  var defaults = fork.use(shared_1.default).defaults;
47064
47064
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
47065
47065
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -47094,9 +47094,9 @@ var require_flow = __commonJS({
47094
47094
  function default_1(fork) {
47095
47095
  fork.use(es_proposals_1.default);
47096
47096
  fork.use(type_annotations_1.default);
47097
- var types18 = fork.use(types_1.default);
47098
- var def = types18.Type.def;
47099
- var or = types18.Type.or;
47097
+ var types17 = fork.use(types_1.default);
47098
+ var def = types17.Type.def;
47099
+ var or = types17.Type.or;
47100
47100
  var defaults = fork.use(shared_1.default).defaults;
47101
47101
  def("Flow").bases("Node");
47102
47102
  def("FlowType").bases("Flow");
@@ -47210,10 +47210,10 @@ var require_esprima = __commonJS({
47210
47210
  var shared_1 = tslib_1.__importStar(require_shared());
47211
47211
  function default_1(fork) {
47212
47212
  fork.use(es_proposals_1.default);
47213
- var types18 = fork.use(types_1.default);
47213
+ var types17 = fork.use(types_1.default);
47214
47214
  var defaults = fork.use(shared_1.default).defaults;
47215
- var def = types18.Type.def;
47216
- var or = types18.Type.or;
47215
+ var def = types17.Type.def;
47216
+ var or = types17.Type.or;
47217
47217
  def("VariableDeclaration").field("declarations", [or(
47218
47218
  def("VariableDeclarator"),
47219
47219
  def("Identifier")
@@ -47258,11 +47258,11 @@ var require_babel_core = __commonJS({
47258
47258
  function default_1(fork) {
47259
47259
  var _a, _b, _c, _d, _e;
47260
47260
  fork.use(es_proposals_1.default);
47261
- var types18 = fork.use(types_1.default);
47261
+ var types17 = fork.use(types_1.default);
47262
47262
  var defaults = fork.use(shared_1.default).defaults;
47263
- var def = types18.Type.def;
47264
- var or = types18.Type.or;
47265
- var isUndefined = types18.builtInTypes.undefined;
47263
+ var def = types17.Type.def;
47264
+ var or = types17.Type.or;
47265
+ var isUndefined = types17.builtInTypes.undefined;
47266
47266
  def("Noop").bases("Statement").build();
47267
47267
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
47268
47268
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -47287,7 +47287,7 @@ var require_babel_core = __commonJS({
47287
47287
  raw: String
47288
47288
  },
47289
47289
  function getDefault() {
47290
- var value = types18.getFieldValue(this, "value");
47290
+ var value = types17.getFieldValue(this, "value");
47291
47291
  return {
47292
47292
  rawValue: value,
47293
47293
  raw: toRaw ? toRaw(value) : String(value)
@@ -47390,8 +47390,8 @@ var require_babel = __commonJS({
47390
47390
  var flow_1 = tslib_1.__importDefault(require_flow());
47391
47391
  var shared_1 = require_shared();
47392
47392
  function default_1(fork) {
47393
- var types18 = fork.use(types_1.default);
47394
- var def = types18.Type.def;
47393
+ var types17 = fork.use(types_1.default);
47394
+ var def = types17.Type.def;
47395
47395
  fork.use(babel_core_1.default);
47396
47396
  fork.use(flow_1.default);
47397
47397
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -47417,12 +47417,12 @@ var require_typescript = __commonJS({
47417
47417
  function default_1(fork) {
47418
47418
  fork.use(babel_core_1.default);
47419
47419
  fork.use(type_annotations_1.default);
47420
- var types18 = fork.use(types_1.default);
47421
- var n = types18.namedTypes;
47422
- var def = types18.Type.def;
47423
- var or = types18.Type.or;
47420
+ var types17 = fork.use(types_1.default);
47421
+ var n = types17.namedTypes;
47422
+ var def = types17.Type.def;
47423
+ var or = types17.Type.or;
47424
47424
  var defaults = fork.use(shared_1.default).defaults;
47425
- var StringLiteral = types18.Type.from(function(value, deep) {
47425
+ var StringLiteral = types17.Type.from(function(value, deep) {
47426
47426
  if (n.StringLiteral && n.StringLiteral.check(value, deep)) {
47427
47427
  return true;
47428
47428
  }
@@ -49398,8 +49398,8 @@ var require_util2 = __commonJS({
49398
49398
  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;
49399
49399
  var tslib_1 = require_tslib();
49400
49400
  var assert_1 = tslib_1.__importDefault(require("assert"));
49401
- var types18 = tslib_1.__importStar(require_main());
49402
- var n = types18.namedTypes;
49401
+ var types17 = tslib_1.__importStar(require_main());
49402
+ var n = types17.namedTypes;
49403
49403
  var source_map_1 = tslib_1.__importDefault(require_source_map());
49404
49404
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
49405
49405
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -56717,10 +56717,10 @@ var require_comments = __commonJS({
56717
56717
  exports.printComments = exports.attach = void 0;
56718
56718
  var tslib_1 = require_tslib();
56719
56719
  var assert_1 = tslib_1.__importDefault(require("assert"));
56720
- var types18 = tslib_1.__importStar(require_main());
56721
- var n = types18.namedTypes;
56722
- var isArray = types18.builtInTypes.array;
56723
- var isObject2 = types18.builtInTypes.object;
56720
+ var types17 = tslib_1.__importStar(require_main());
56721
+ var n = types17.namedTypes;
56722
+ var isArray = types17.builtInTypes.array;
56723
+ var isObject2 = types17.builtInTypes.object;
56724
56724
  var lines_1 = require_lines();
56725
56725
  var util_1 = require_util2();
56726
56726
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -56751,7 +56751,7 @@ var require_comments = __commonJS({
56751
56751
  if (isArray.check(node)) {
56752
56752
  names = Object.keys(node);
56753
56753
  } else if (isObject2.check(node)) {
56754
- names = types18.getFieldNames(node);
56754
+ names = types17.getFieldNames(node);
56755
56755
  } else {
56756
56756
  return resultArray;
56757
56757
  }
@@ -56929,7 +56929,7 @@ var require_comments = __commonJS({
56929
56929
  function printComments(path2, print9) {
56930
56930
  var value = path2.getValue();
56931
56931
  var innerLines = print9(path2);
56932
- var comments = n.Node.check(value) && types18.getFieldValue(value, "comments");
56932
+ var comments = n.Node.check(value) && types17.getFieldValue(value, "comments");
56933
56933
  if (!comments || comments.length === 0) {
56934
56934
  return innerLines;
56935
56935
  }
@@ -56937,8 +56937,8 @@ var require_comments = __commonJS({
56937
56937
  var trailingParts = [innerLines];
56938
56938
  path2.each(function(commentPath) {
56939
56939
  var comment = commentPath.getValue();
56940
- var leading = types18.getFieldValue(comment, "leading");
56941
- var trailing = types18.getFieldValue(comment, "trailing");
56940
+ var leading = types17.getFieldValue(comment, "leading");
56941
+ var trailing = types17.getFieldValue(comment, "trailing");
56942
56942
  if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
56943
56943
  leadingParts.push(printLeadingComment(commentPath, print9));
56944
56944
  } else if (trailing) {
@@ -56960,10 +56960,10 @@ var require_parser2 = __commonJS({
56960
56960
  exports.parse = void 0;
56961
56961
  var tslib_1 = require_tslib();
56962
56962
  var assert_1 = tslib_1.__importDefault(require("assert"));
56963
- var types18 = tslib_1.__importStar(require_main());
56964
- var b = types18.builders;
56965
- var isObject2 = types18.builtInTypes.object;
56966
- var isArray = types18.builtInTypes.array;
56963
+ var types17 = tslib_1.__importStar(require_main());
56964
+ var b = types17.builders;
56965
+ var isObject2 = types17.builtInTypes.object;
56966
+ var isArray = types17.builtInTypes.array;
56967
56967
  var options_1 = require_options();
56968
56968
  var lines_1 = require_lines();
56969
56969
  var comments_1 = require_comments();
@@ -57149,11 +57149,11 @@ var require_fast_path = __commonJS({
57149
57149
  Object.defineProperty(exports, "__esModule", { value: true });
57150
57150
  var tslib_1 = require_tslib();
57151
57151
  var assert_1 = tslib_1.__importDefault(require("assert"));
57152
- var types18 = tslib_1.__importStar(require_main());
57152
+ var types17 = tslib_1.__importStar(require_main());
57153
57153
  var util = tslib_1.__importStar(require_util2());
57154
- var n = types18.namedTypes;
57155
- var isArray = types18.builtInTypes.array;
57156
- var isNumber = types18.builtInTypes.number;
57154
+ var n = types17.namedTypes;
57155
+ var isArray = types17.builtInTypes.array;
57156
+ var isNumber = types17.builtInTypes.number;
57157
57157
  var PRECEDENCE = {};
57158
57158
  [
57159
57159
  ["??"],
@@ -57182,7 +57182,7 @@ var require_fast_path = __commonJS({
57182
57182
  if (obj instanceof FastPath) {
57183
57183
  return obj.copy();
57184
57184
  }
57185
- if (obj instanceof types18.NodePath) {
57185
+ if (obj instanceof types17.NodePath) {
57186
57186
  var copy = Object.create(FastPath.prototype);
57187
57187
  var stack = [obj.value];
57188
57188
  for (var pp = void 0; pp = obj.parentPath; obj = pp)
@@ -57493,7 +57493,7 @@ var require_fast_path = __commonJS({
57493
57493
  return node.some(containsCallExpression);
57494
57494
  }
57495
57495
  if (n.Node.check(node)) {
57496
- return types18.someField(node, function(_name, child) {
57496
+ return types17.someField(node, function(_name, child) {
57497
57497
  return containsCallExpression(child);
57498
57498
  });
57499
57499
  }
@@ -57583,16 +57583,16 @@ var require_patcher = __commonJS({
57583
57583
  var tslib_1 = require_tslib();
57584
57584
  var assert_1 = tslib_1.__importDefault(require("assert"));
57585
57585
  var linesModule = tslib_1.__importStar(require_lines());
57586
- var types18 = tslib_1.__importStar(require_main());
57587
- var Printable = types18.namedTypes.Printable;
57588
- var Expression = types18.namedTypes.Expression;
57589
- var ReturnStatement = types18.namedTypes.ReturnStatement;
57590
- var SourceLocation = types18.namedTypes.SourceLocation;
57586
+ var types17 = tslib_1.__importStar(require_main());
57587
+ var Printable = types17.namedTypes.Printable;
57588
+ var Expression = types17.namedTypes.Expression;
57589
+ var ReturnStatement = types17.namedTypes.ReturnStatement;
57590
+ var SourceLocation = types17.namedTypes.SourceLocation;
57591
57591
  var util_1 = require_util2();
57592
57592
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
57593
- var isObject2 = types18.builtInTypes.object;
57594
- var isArray = types18.builtInTypes.array;
57595
- var isString = types18.builtInTypes.string;
57593
+ var isObject2 = types17.builtInTypes.object;
57594
+ var isArray = types17.builtInTypes.array;
57595
+ var isString = types17.builtInTypes.string;
57596
57596
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
57597
57597
  var Patcher = function Patcher2(lines) {
57598
57598
  assert_1.default.ok(this instanceof Patcher2);
@@ -57862,8 +57862,8 @@ var require_patcher = __commonJS({
57862
57862
  if (k.charAt(0) === "_") {
57863
57863
  continue;
57864
57864
  }
57865
- newPath.stack.push(k, types18.getFieldValue(newNode, k));
57866
- oldPath.stack.push(k, types18.getFieldValue(oldNode, k));
57865
+ newPath.stack.push(k, types17.getFieldValue(newNode, k));
57866
+ oldPath.stack.push(k, types17.getFieldValue(oldNode, k));
57867
57867
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
57868
57868
  newPath.stack.length -= 2;
57869
57869
  oldPath.stack.length -= 2;
@@ -57887,16 +57887,16 @@ var require_printer2 = __commonJS({
57887
57887
  exports.Printer = void 0;
57888
57888
  var tslib_1 = require_tslib();
57889
57889
  var assert_1 = tslib_1.__importDefault(require("assert"));
57890
- var types18 = tslib_1.__importStar(require_main());
57890
+ var types17 = tslib_1.__importStar(require_main());
57891
57891
  var comments_1 = require_comments();
57892
57892
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
57893
57893
  var lines_1 = require_lines();
57894
57894
  var options_1 = require_options();
57895
57895
  var patcher_1 = require_patcher();
57896
57896
  var util = tslib_1.__importStar(require_util2());
57897
- var namedTypes = types18.namedTypes;
57898
- var isString = types18.builtInTypes.string;
57899
- var isObject2 = types18.builtInTypes.object;
57897
+ var namedTypes = types17.namedTypes;
57898
+ var isString = types17.builtInTypes.string;
57899
+ var isObject2 = types17.builtInTypes.object;
57900
57900
  var PrintResult = function PrintResult2(code, sourceMap) {
57901
57901
  assert_1.default.ok(this instanceof PrintResult2);
57902
57902
  isString.assert(code);
@@ -58058,7 +58058,7 @@ var require_printer2 = __commonJS({
58058
58058
  case "OptionalMemberExpression": {
58059
58059
  parts.push(path2.call(print9, "object"));
58060
58060
  var property = path2.call(print9, "property");
58061
- var optional = types18.getFieldValue(n, "optional");
58061
+ var optional = types17.getFieldValue(n, "optional");
58062
58062
  if (n.computed) {
58063
58063
  parts.push(optional ? "?.[" : "[", property, "]");
58064
58064
  } else {
@@ -58329,7 +58329,7 @@ var require_printer2 = __commonJS({
58329
58329
  if (n.typeArguments) {
58330
58330
  parts.push(path2.call(print9, "typeArguments"));
58331
58331
  }
58332
- if (types18.getFieldValue(n, "optional")) {
58332
+ if (types17.getFieldValue(n, "optional")) {
58333
58333
  parts.push("?.");
58334
58334
  }
58335
58335
  parts.push(printArgumentsList(path2, options, print9));
@@ -60008,8 +60008,8 @@ var require_printer2 = __commonJS({
60008
60008
  });
60009
60009
  }
60010
60010
  function getPossibleRaw(node) {
60011
- var value = types18.getFieldValue(node, "value");
60012
- var extra = types18.getFieldValue(node, "extra");
60011
+ var value = types17.getFieldValue(node, "value");
60012
+ var extra = types17.getFieldValue(node, "extra");
60013
60013
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
60014
60014
  return extra.raw;
60015
60015
  }
@@ -60057,8 +60057,8 @@ var require_main2 = __commonJS({
60057
60057
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
60058
60058
  var tslib_1 = require_tslib();
60059
60059
  var fs_1 = tslib_1.__importDefault(require("fs"));
60060
- var types18 = tslib_1.__importStar(require_main());
60061
- exports.types = types18;
60060
+ var types17 = tslib_1.__importStar(require_main());
60061
+ exports.types = types17;
60062
60062
  var parser_1 = require_parser2();
60063
60063
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
60064
60064
  return parser_1.parse;
@@ -66134,7 +66134,7 @@ var printDocASTReducer = {
66134
66134
  leave: ({ name, interfaces, directives, fields }) => join(["interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
66135
66135
  },
66136
66136
  UnionTypeDefinition: {
66137
- leave: ({ name, directives, types: types18 }) => join(["union", name, join(directives, " "), wrap("= ", join(types18, " | "))], " ")
66137
+ leave: ({ name, directives, types: types17 }) => join(["union", name, join(directives, " "), wrap("= ", join(types17, " | "))], " ")
66138
66138
  },
66139
66139
  EnumTypeDefinition: {
66140
66140
  leave: ({ name, directives, values }) => join(["enum", name, join(directives, " "), block(values)], " ")
@@ -66161,7 +66161,7 @@ var printDocASTReducer = {
66161
66161
  leave: ({ name, interfaces, directives, fields }) => join(["extend interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
66162
66162
  },
66163
66163
  UnionTypeExtension: {
66164
- leave: ({ name, directives, types: types18 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types18, " | "))], " ")
66164
+ leave: ({ name, directives, types: types17 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types17, " | "))], " ")
66165
66165
  },
66166
66166
  EnumTypeExtension: {
66167
66167
  leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
@@ -67041,8 +67041,8 @@ function healTypes(originalTypeMap, directives) {
67041
67041
  }
67042
67042
  }
67043
67043
  function healUnderlyingTypes(type) {
67044
- const types18 = type.getTypes();
67045
- types18.push(...types18.splice(0).map((t2) => healType(t2)).filter(Boolean));
67044
+ const types17 = type.getTypes();
67045
+ types17.push(...types17.splice(0).map((t2) => healType(t2)).filter(Boolean));
67046
67046
  }
67047
67047
  function healType(type) {
67048
67048
  if ((0, import_graphql11.isListType)(type)) {
@@ -67826,11 +67826,11 @@ function mergeEnum(e1, e2, config2) {
67826
67826
 
67827
67827
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.8.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
67828
67828
  var import_graphql20 = __toESM(require_graphql2(), 1);
67829
- function isStringTypes(types18) {
67830
- return typeof types18 === "string";
67829
+ function isStringTypes(types17) {
67830
+ return typeof types17 === "string";
67831
67831
  }
67832
- function isSourceTypes(types18) {
67833
- return types18 instanceof import_graphql20.Source;
67832
+ function isSourceTypes(types17) {
67833
+ return types17 instanceof import_graphql20.Source;
67834
67834
  }
67835
67835
  function extractType(type) {
67836
67836
  let visitedType = type;
@@ -70200,6 +70200,9 @@ var GarbageCollector = class {
70200
70200
  constructor(cache) {
70201
70201
  this.cache = cache;
70202
70202
  }
70203
+ reset() {
70204
+ this.lifetimes.clear();
70205
+ }
70203
70206
  resetLifetime(id, field) {
70204
70207
  if (!this.lifetimes.get(id)) {
70205
70208
  this.lifetimes.set(id, /* @__PURE__ */ new Map());
@@ -70319,6 +70322,10 @@ var ListManager = class {
70319
70322
  }
70320
70323
  this.listsByField.get(parentID).delete(field);
70321
70324
  }
70325
+ reset() {
70326
+ this.lists.clear();
70327
+ this.listsByField.clear();
70328
+ }
70322
70329
  };
70323
70330
  var List = class {
70324
70331
  recordID;
@@ -70701,6 +70708,9 @@ var StaleManager = class {
70701
70708
  }
70702
70709
  }
70703
70710
  }
70711
+ reset() {
70712
+ this.fieldsTime.clear();
70713
+ }
70704
70714
  };
70705
70715
 
70706
70716
  // src/runtime/cache/storage.ts
@@ -70881,6 +70891,9 @@ var InMemoryStorage = class {
70881
70891
  layer.fields = fields;
70882
70892
  layer.links = links;
70883
70893
  }
70894
+ reset() {
70895
+ this.data = [];
70896
+ }
70884
70897
  };
70885
70898
  var Layer = class {
70886
70899
  id;
@@ -71326,6 +71339,18 @@ var InMemorySubscriptions = class {
71326
71339
  this.remove(linkedRecordID, linkFields, targets, visited);
71327
71340
  }
71328
71341
  }
71342
+ reset() {
71343
+ const subscribers = Object.entries(this.subscribers).filter(
71344
+ ([id]) => !id.startsWith(rootID)
71345
+ );
71346
+ for (const [id, _fields] of subscribers) {
71347
+ delete this.subscribers[id];
71348
+ }
71349
+ const subscriptionSpecs = subscribers.flatMap(
71350
+ ([_id, fields]) => Object.values(fields).flatMap((field) => field.map(([spec]) => spec))
71351
+ );
71352
+ return subscriptionSpecs;
71353
+ }
71329
71354
  removeSubscribers(id, fieldName, specs) {
71330
71355
  let targets = [];
71331
71356
  for (const spec of specs) {
@@ -71515,6 +71540,14 @@ var Cache = class {
71515
71540
  }
71516
71541
  this.#notifySubscribers(toNotify);
71517
71542
  }
71543
+ reset() {
71544
+ const subSpecs = this._internal_unstable.subscriptions.reset();
71545
+ this._internal_unstable.staleManager.reset();
71546
+ this._internal_unstable.lifetimes.reset();
71547
+ this._internal_unstable.lists.reset();
71548
+ this._internal_unstable.storage.reset();
71549
+ this.#notifySubscribers(subSpecs);
71550
+ }
71518
71551
  #notifySubscribers(subs) {
71519
71552
  if (subs.length === 0) {
71520
71553
  return;
@@ -71697,7 +71730,7 @@ var CacheInternal = class {
71697
71730
  forceNotify
71698
71731
  });
71699
71732
  }
71700
- } else if (Array.isArray(value) && (typeof previousValue === "undefined" || Array.isArray(previousValue))) {
71733
+ } else if (Array.isArray(value) && (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
71701
71734
  let oldIDs = [...previousValue || []];
71702
71735
  const emptyEdges = !updates ? [] : oldIDs.map((id) => {
71703
71736
  if (!id) {
@@ -71770,7 +71803,7 @@ var CacheInternal = class {
71770
71803
  } else {
71771
71804
  linkedIDs = nestedIDs;
71772
71805
  }
71773
- const contentChanged = !deepEquals(linkedIDs, oldIDs);
71806
+ const contentChanged = !deepEquals(linkedIDs, oldIDs) || previousValue === null;
71774
71807
  if (contentChanged || forceNotify) {
71775
71808
  toNotify.push(...currentSubscribers);
71776
71809
  }
@@ -72490,7 +72523,7 @@ var Config = class {
72490
72523
  defaultListTarget = null,
72491
72524
  defaultPaginateMode = PaginateMode.Infinite,
72492
72525
  defaultKeys,
72493
- types: types18 = {},
72526
+ types: types17 = {},
72494
72527
  logLevel,
72495
72528
  defaultFragmentMasking = "enable",
72496
72529
  watchSchema,
@@ -72534,10 +72567,10 @@ var Config = class {
72534
72567
  if (defaultKeys) {
72535
72568
  this.defaultKeys = defaultKeys;
72536
72569
  }
72537
- if (types18) {
72570
+ if (types17) {
72538
72571
  this.typeConfig = {
72539
72572
  ...this.typeConfig,
72540
- ...types18
72573
+ ...types17
72541
72574
  };
72542
72575
  }
72543
72576
  }
@@ -73736,7 +73769,7 @@ var graphql27 = __toESM(require_graphql2(), 1);
73736
73769
 
73737
73770
  // src/codegen/generators/artifacts/index.ts
73738
73771
  var graphql14 = __toESM(require_graphql2(), 1);
73739
- var recast6 = __toESM(require_main2(), 1);
73772
+ var recast5 = __toESM(require_main2(), 1);
73740
73773
 
73741
73774
  // src/codegen/utils/commonjs.ts
73742
73775
  var cjsIndexFilePreamble = `"use strict";
@@ -74923,7 +74956,6 @@ function ancestorKey(ancestors) {
74923
74956
 
74924
74957
  // src/codegen/generators/artifacts/selection.ts
74925
74958
  var graphql13 = __toESM(require_graphql2(), 1);
74926
- var recast5 = __toESM(require_main2(), 1);
74927
74959
 
74928
74960
  // ../../node_modules/.pnpm/@kitql+helper@0.5.0/node_modules/@kitql/helper/index.mjs
74929
74961
  var config = {
@@ -75870,15 +75902,12 @@ function fieldKey(config2, field) {
75870
75902
  }
75871
75903
 
75872
75904
  // src/codegen/generators/artifacts/selection.ts
75873
- var AST5 = recast5.types.builders;
75874
75905
  function selection_default(args) {
75875
- const typeMap = {};
75876
- const abstractTypes = [];
75877
75906
  return mergeSelection({
75878
- object: prepareSelection({ ...args, typeMap, abstractTypes }),
75879
- filepath: args.filepath,
75880
- typeMap,
75881
- abstractTypes
75907
+ config: args.config,
75908
+ rootType: args.rootType,
75909
+ object: prepareSelection(args),
75910
+ filepath: args.filepath
75882
75911
  });
75883
75912
  }
75884
75913
  function prepareSelection({
@@ -75890,8 +75919,6 @@ function prepareSelection({
75890
75919
  path: path2 = [],
75891
75920
  document,
75892
75921
  inConnection,
75893
- typeMap,
75894
- abstractTypes,
75895
75922
  globalLoading,
75896
75923
  includeFragments
75897
75924
  }) {
@@ -75911,8 +75938,6 @@ function prepareSelection({
75911
75938
  selections: field.selectionSet.selections,
75912
75939
  path: path2,
75913
75940
  document,
75914
- typeMap,
75915
- abstractTypes,
75916
75941
  globalLoading,
75917
75942
  includeFragments
75918
75943
  }).fields || {}
@@ -75924,32 +75949,7 @@ function prepareSelection({
75924
75949
  typeMap: {}
75925
75950
  };
75926
75951
  }
75927
- const parentType = config2.schema.getType(rootType);
75928
75952
  const typeConditionName = field.typeCondition.name.value;
75929
- const typeCondition = config2.schema.getType(typeConditionName);
75930
- const possibleTypes = [];
75931
- if (!graphql13.isAbstractType(typeCondition)) {
75932
- } else if (graphql13.isAbstractType(parentType)) {
75933
- const possibleParentTypes = config2.schema.getPossibleTypes(parentType).map((type) => type.name);
75934
- for (const possible of config2.schema.getPossibleTypes(typeCondition)) {
75935
- if (possibleParentTypes.includes(possible.name)) {
75936
- possibleTypes.push(possible.name);
75937
- }
75938
- }
75939
- } else {
75940
- possibleTypes.push(rootType);
75941
- }
75942
- if (possibleTypes.length > 0) {
75943
- for (const type of possibleTypes) {
75944
- const existing = typeMap[type];
75945
- if (!existing || !existing.includes(type)) {
75946
- typeMap[type] = [typeConditionName].concat(existing || []);
75947
- }
75948
- if (!abstractTypes.includes(typeConditionName)) {
75949
- abstractTypes.push(typeConditionName);
75950
- }
75951
- }
75952
- }
75953
75953
  object.abstractFields.fields = {
75954
75954
  ...object.abstractFields.fields,
75955
75955
  [typeConditionName]: prepareSelection({
@@ -75960,8 +75960,6 @@ function prepareSelection({
75960
75960
  selections: field.selectionSet.selections,
75961
75961
  path: path2,
75962
75962
  document,
75963
- typeMap,
75964
- abstractTypes,
75965
75963
  globalLoading,
75966
75964
  includeFragments
75967
75965
  }).fields
@@ -75973,19 +75971,38 @@ function prepareSelection({
75973
75971
  } else if (field.kind === "Field") {
75974
75972
  const type = config2.schema.getType(rootType);
75975
75973
  if (!type) {
75976
- throw new HoudiniError({ filepath, message: "Could not find type" });
75974
+ throw new HoudiniError({
75975
+ filepath,
75976
+ message: "Could not find type. Looking for " + JSON.stringify(rootType)
75977
+ });
75977
75978
  }
75978
75979
  const attributeName = field.alias?.value || field.name.value;
75979
- let fieldType;
75980
+ let fieldType = null;
75980
75981
  let nullable = false;
75981
75982
  if (field.name.value === "__typename") {
75982
75983
  fieldType = config2.schema.getType("String");
75983
- } else {
75984
+ } else if ("getFields" in type) {
75984
75985
  let typeRef = type.getFields()[field.name.value].type;
75985
75986
  fieldType = getRootType(typeRef);
75986
75987
  nullable = !graphql13.isNonNullType(typeRef);
75988
+ } else if (graphql13.isAbstractType(type)) {
75989
+ for (const possible of config2.schema.getPossibleTypes(type)) {
75990
+ if (graphql13.isObjectType(possible)) {
75991
+ if (possible.getFields()[field.name.value]) {
75992
+ fieldType = possible.getFields()[field.name.value].type;
75993
+ nullable = !graphql13.isNonNullType(fieldType);
75994
+ break;
75995
+ }
75996
+ }
75997
+ }
75998
+ }
75999
+ if (!fieldType) {
76000
+ throw {
76001
+ message: "Could not identify field's type",
76002
+ description: `Missing definition for ${field.name.value} in ${type.name}`
76003
+ };
75987
76004
  }
75988
- const typeName = fieldType.toString();
76005
+ const typeName = getRootType(fieldType).name;
75989
76006
  const pathSoFar = path2.concat(attributeName);
75990
76007
  const keys2 = config2.keyFieldsForType(rootType);
75991
76008
  let fieldObj = {
@@ -76079,8 +76096,6 @@ function prepareSelection({
76079
76096
  path: pathSoFar,
76080
76097
  document,
76081
76098
  inConnection: connectionState,
76082
- typeMap,
76083
- abstractTypes,
76084
76099
  globalLoading: forceLoading,
76085
76100
  includeFragments
76086
76101
  });
@@ -76166,69 +76181,107 @@ function prepareSelection({
76166
76181
  return object;
76167
76182
  }
76168
76183
  function mergeSelection({
76184
+ config: config2,
76169
76185
  filepath,
76170
76186
  object,
76171
- typeMap,
76172
- abstractTypes
76187
+ rootType
76173
76188
  }) {
76174
76189
  if (Object.keys(object.fields || {}).length > 0 && object.abstractFields && Object.keys(object.abstractFields.fields).length > 0) {
76175
- for (const [typeName, possibles] of Object.entries(typeMap)) {
76176
- let overlap = false;
76190
+ const abstractSelection = {
76191
+ fields: {},
76192
+ typeMap: {}
76193
+ };
76194
+ const possibleSelectionTypes = {};
76195
+ for (const [typeName, typeSelection] of Object.entries(object.abstractFields.fields)) {
76196
+ const gqlType = config2.schema.getType(typeName);
76197
+ abstractSelection.fields[typeName] = deepMerge2(
76198
+ filepath,
76199
+ typeSelection,
76200
+ abstractSelection.fields[typeName] ?? {}
76201
+ );
76202
+ if (graphql13.isAbstractType(gqlType)) {
76203
+ for (const possible of config2.schema.getPossibleTypes(gqlType)) {
76204
+ if (!possibleSelectionTypes[typeName]) {
76205
+ possibleSelectionTypes[typeName] = [];
76206
+ }
76207
+ possibleSelectionTypes[typeName].push(possible.name);
76208
+ }
76209
+ }
76210
+ }
76211
+ const concreteSelectionImplements = {};
76212
+ for (const [typeName, possibles] of Object.entries(possibleSelectionTypes)) {
76213
+ for (const possible of possibles) {
76214
+ if (!concreteSelectionImplements[possible]) {
76215
+ concreteSelectionImplements[possible] = [];
76216
+ }
76217
+ concreteSelectionImplements[possible].push(typeName);
76218
+ }
76219
+ }
76220
+ for (const [concrete, implementations] of Object.entries(concreteSelectionImplements)) {
76221
+ if (implementations.length > 1) {
76222
+ abstractSelection.fields[concrete] = {};
76223
+ }
76224
+ }
76225
+ for (const [typeName, possibles] of Object.entries(possibleSelectionTypes)) {
76177
76226
  for (const possible of possibles) {
76178
- if (object.abstractFields.fields[typeName]) {
76179
- object.abstractFields.fields[typeName] = deepMerge2(
76227
+ if (abstractSelection.fields[possible]) {
76228
+ abstractSelection.fields[possible] = deepMerge2(
76180
76229
  filepath,
76181
- object.abstractFields.fields[typeName] ?? {},
76182
- object.abstractFields.fields[possible] ?? {}
76230
+ abstractSelection.fields[typeName] ?? {},
76231
+ abstractSelection.fields[possible] ?? {}
76183
76232
  );
76184
- overlap = true;
76185
76233
  }
76186
76234
  }
76187
- if (overlap) {
76188
- delete typeMap[typeName];
76189
- }
76190
76235
  }
76191
- for (const [type, options] of Object.entries(typeMap)) {
76192
- if (options.length > 1) {
76193
- object.abstractFields.fields[type] = deepMerge2(
76194
- filepath,
76195
- ...options.map((opt) => object.abstractFields.fields[opt] || {})
76196
- );
76197
- delete typeMap[type];
76236
+ const parentType = config2.schema.getType(rootType);
76237
+ const possibleParents = graphql13.isAbstractType(parentType) ? config2.schema.getPossibleTypes(parentType)?.map((t2) => t2.name) : [parentType.name];
76238
+ for (const key of Object.keys(abstractSelection.typeMap)) {
76239
+ if (!possibleParents.includes(key) && rootType !== key || abstractSelection.fields[key]) {
76240
+ delete abstractSelection.typeMap[key];
76198
76241
  }
76199
76242
  }
76200
- for (const [type, sel] of Object.entries(object.abstractFields?.fields || {})) {
76201
- object.abstractFields.fields[type] = deepMerge2(filepath, sel || {}, object.fields);
76243
+ for (const [type, sel] of Object.entries(abstractSelection.fields || {})) {
76244
+ abstractSelection.fields[type] = deepMerge2(filepath, sel || {}, object.fields);
76202
76245
  }
76203
- for (const [type, options] of Object.entries(typeMap)) {
76204
- object.abstractFields.typeMap[type] = options[0];
76246
+ for (const [typename, possibles] of Object.entries(possibleSelectionTypes)) {
76247
+ if (possibles.every((p) => abstractSelection.fields[p])) {
76248
+ delete abstractSelection.fields[typename];
76249
+ }
76205
76250
  }
76206
- const usedTypes = Object.values(object.abstractFields.typeMap);
76207
- for (const type of abstractTypes) {
76208
- if (!usedTypes.includes(type)) {
76209
- delete object.abstractFields.fields[type];
76251
+ for (const possible of possibleParents) {
76252
+ if (abstractSelection.fields[possible]) {
76253
+ continue;
76254
+ }
76255
+ for (const [abstractType, abstractTypeMembers] of Object.entries(
76256
+ possibleSelectionTypes
76257
+ )) {
76258
+ if (abstractTypeMembers.includes(possible)) {
76259
+ abstractSelection.typeMap[possible] = abstractType;
76260
+ break;
76261
+ }
76210
76262
  }
76211
76263
  }
76264
+ object.abstractFields = abstractSelection;
76212
76265
  }
76213
- for (const [key, value] of Object.entries(object.fields ?? {})) {
76266
+ for (const value of Object.values(object.fields ?? {})) {
76214
76267
  const selection = value.selection;
76215
76268
  if (selection) {
76216
76269
  mergeSelection({
76270
+ config: config2,
76271
+ rootType: value.type,
76217
76272
  filepath,
76218
- typeMap,
76219
- abstractTypes,
76220
76273
  object: selection
76221
76274
  });
76222
76275
  }
76223
76276
  }
76224
76277
  for (const [type, selection] of Object.entries(object.abstractFields?.fields ?? {})) {
76225
- for (const [key, value] of Object.entries(selection ?? {})) {
76278
+ for (const value of Object.values(selection ?? {})) {
76226
76279
  const selection2 = value.selection;
76227
76280
  if (selection2) {
76228
76281
  mergeSelection({
76282
+ config: config2,
76283
+ rootType: value.type,
76229
76284
  filepath,
76230
- typeMap,
76231
- abstractTypes,
76232
76285
  object: selection2
76233
76286
  });
76234
76287
  }
@@ -76238,7 +76291,7 @@ function mergeSelection({
76238
76291
  }
76239
76292
 
76240
76293
  // src/codegen/generators/artifacts/index.ts
76241
- var AST6 = recast6.types.builders;
76294
+ var AST5 = recast5.types.builders;
76242
76295
  function artifactGenerator(stats) {
76243
76296
  return async function(config2, docs) {
76244
76297
  const filterTypes = {};
@@ -76506,10 +76559,10 @@ function artifactGenerator(stats) {
76506
76559
  }
76507
76560
  plugin2.artifactEnd({ config: config2, document: doc });
76508
76561
  }
76509
- const file = AST6.program([
76562
+ const file = AST5.program([
76510
76563
  moduleExport(config2, "default", serializeValue(artifact)),
76511
- AST6.expressionStatement(
76512
- AST6.stringLiteral(`HoudiniHash=${hash({ config: config2, document: doc })}`)
76564
+ AST5.expressionStatement(
76565
+ AST5.stringLiteral(`HoudiniHash=${hash({ config: config2, document: doc })}`)
76513
76566
  )
76514
76567
  ]);
76515
76568
  const artifactPath = config2.artifactPath(document);
@@ -76589,8 +76642,8 @@ function applyMask(config2, target, mask) {
76589
76642
  }
76590
76643
 
76591
76644
  // src/codegen/generators/runtime/graphqlFunction.ts
76592
- var recast7 = __toESM(require_main2(), 1);
76593
- var AST7 = recast7.types.builders;
76645
+ var recast6 = __toESM(require_main2(), 1);
76646
+ var AST6 = recast6.types.builders;
76594
76647
  async function generateGraphqlReturnTypes(config2, docs) {
76595
76648
  const indexPath = path_exports.join(config2.runtimeDirectory, "index.d.ts");
76596
76649
  const fileContent = await fs_exports.readFile(indexPath) || "";
@@ -76625,18 +76678,18 @@ async function generateGraphqlReturnTypes(config2, docs) {
76625
76678
  continue;
76626
76679
  }
76627
76680
  for (const [queryString, returnValue] of Object.entries(overloaded_returns)) {
76628
- const input = AST7.identifier("str");
76629
- input.typeAnnotation = AST7.tsTypeAnnotation(
76630
- AST7.tsLiteralType(AST7.stringLiteral(queryString))
76681
+ const input = AST6.identifier("str");
76682
+ input.typeAnnotation = AST6.tsTypeAnnotation(
76683
+ AST6.tsLiteralType(AST6.stringLiteral(queryString))
76631
76684
  );
76632
76685
  script.body.splice(
76633
76686
  i2,
76634
76687
  0,
76635
- AST7.exportNamedDeclaration(
76636
- AST7.tsDeclareFunction(
76637
- AST7.identifier("graphql"),
76688
+ AST6.exportNamedDeclaration(
76689
+ AST6.tsDeclareFunction(
76690
+ AST6.identifier("graphql"),
76638
76691
  [input],
76639
- AST7.tsTypeAnnotation(AST7.tsTypeReference(AST7.identifier(returnValue)))
76692
+ AST6.tsTypeAnnotation(AST6.tsTypeReference(AST6.identifier(returnValue)))
76640
76693
  )
76641
76694
  )
76642
76695
  );
@@ -76799,20 +76852,20 @@ async function generatePluginRuntime({
76799
76852
  }
76800
76853
 
76801
76854
  // src/codegen/generators/typescript/documentTypes.ts
76802
- var recast13 = __toESM(require_main2(), 1);
76855
+ var recast12 = __toESM(require_main2(), 1);
76803
76856
 
76804
76857
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
76805
76858
  var graphql17 = __toESM(require_graphql2(), 1);
76806
- var recast10 = __toESM(require_main2(), 1);
76859
+ var recast9 = __toESM(require_main2(), 1);
76807
76860
 
76808
76861
  // src/codegen/generators/typescript/typeReference.ts
76809
76862
  var graphql16 = __toESM(require_graphql2(), 1);
76810
- var recast9 = __toESM(require_main2(), 1);
76863
+ var recast8 = __toESM(require_main2(), 1);
76811
76864
 
76812
76865
  // src/codegen/generators/typescript/types.ts
76813
76866
  var graphql15 = __toESM(require_graphql2(), 1);
76814
- var recast8 = __toESM(require_main2(), 1);
76815
- var AST8 = recast8.types.builders;
76867
+ var recast7 = __toESM(require_main2(), 1);
76868
+ var AST7 = recast7.types.builders;
76816
76869
  function readonlyProperty(prop, enable = true) {
76817
76870
  if (enable) {
76818
76871
  prop.readonly = true;
@@ -76820,28 +76873,28 @@ function readonlyProperty(prop, enable = true) {
76820
76873
  return prop;
76821
76874
  }
76822
76875
  function nullableField(inner, input = false) {
76823
- const members = [inner, AST8.tsNullKeyword()];
76876
+ const members = [inner, AST7.tsNullKeyword()];
76824
76877
  if (input) {
76825
- members.push(AST8.tsUndefinedKeyword());
76878
+ members.push(AST7.tsUndefinedKeyword());
76826
76879
  }
76827
- return AST8.tsUnionType(members);
76880
+ return AST7.tsUnionType(members);
76828
76881
  }
76829
76882
  function scalarPropertyValue(config2, missingScalars, target) {
76830
76883
  switch (target.name) {
76831
76884
  case "String": {
76832
- return AST8.tsStringKeyword();
76885
+ return AST7.tsStringKeyword();
76833
76886
  }
76834
76887
  case "Int": {
76835
- return AST8.tsNumberKeyword();
76888
+ return AST7.tsNumberKeyword();
76836
76889
  }
76837
76890
  case "Float": {
76838
- return AST8.tsNumberKeyword();
76891
+ return AST7.tsNumberKeyword();
76839
76892
  }
76840
76893
  case "Boolean": {
76841
- return AST8.tsBooleanKeyword();
76894
+ return AST7.tsBooleanKeyword();
76842
76895
  }
76843
76896
  case "ID": {
76844
- return AST8.tsStringKeyword();
76897
+ return AST7.tsStringKeyword();
76845
76898
  }
76846
76899
  default: {
76847
76900
  if (graphql15.isNonNullType(target) && "ofType" in target) {
@@ -76852,16 +76905,16 @@ function scalarPropertyValue(config2, missingScalars, target) {
76852
76905
  );
76853
76906
  }
76854
76907
  if (config2.scalars?.[target.name]) {
76855
- return AST8.tsTypeReference(AST8.identifier(config2.scalars?.[target.name].type));
76908
+ return AST7.tsTypeReference(AST7.identifier(config2.scalars?.[target.name].type));
76856
76909
  }
76857
76910
  missingScalars.add(target.name);
76858
- return AST8.tsAnyKeyword();
76911
+ return AST7.tsAnyKeyword();
76859
76912
  }
76860
76913
  }
76861
76914
  }
76862
76915
 
76863
76916
  // src/codegen/generators/typescript/typeReference.ts
76864
- var AST9 = recast9.types.builders;
76917
+ var AST8 = recast8.types.builders;
76865
76918
  function tsTypeReference(config2, missingScalars, definition, body) {
76866
76919
  const { type, wrappers } = unwrapType(config2, definition.type);
76867
76920
  let result;
@@ -76870,7 +76923,7 @@ function tsTypeReference(config2, missingScalars, definition, body) {
76870
76923
  } else if (graphql16.isEnumType(type)) {
76871
76924
  result = enumReference(config2, body, type.name);
76872
76925
  } else {
76873
- result = AST9.tsTypeReference(AST9.identifier(type.name));
76926
+ result = AST8.tsTypeReference(AST8.identifier(type.name));
76874
76927
  }
76875
76928
  for (const toWrap of wrappers) {
76876
76929
  if (toWrap === "NonNull" /* NonNull */) {
@@ -76878,7 +76931,7 @@ function tsTypeReference(config2, missingScalars, definition, body) {
76878
76931
  } else if (toWrap === "Nullable" /* Nullable */) {
76879
76932
  result = nullableField(result, true);
76880
76933
  } else if (toWrap === "List" /* List */) {
76881
- result = AST9.tsArrayType(AST9.tsParenthesizedType(result));
76934
+ result = AST8.tsArrayType(AST8.tsParenthesizedType(result));
76882
76935
  }
76883
76936
  }
76884
76937
  return result;
@@ -76891,14 +76944,14 @@ function enumReference(config2, body, name) {
76891
76944
  importKind: "type",
76892
76945
  sourceModule: "$houdini/runtime/lib/types"
76893
76946
  });
76894
- return AST9.tsTypeReference(
76895
- AST9.identifier("ValueOf"),
76896
- AST9.tsTypeParameterInstantiation([AST9.tsTypeQuery(AST9.identifier(name))])
76947
+ return AST8.tsTypeReference(
76948
+ AST8.identifier("ValueOf"),
76949
+ AST8.tsTypeParameterInstantiation([AST8.tsTypeQuery(AST8.identifier(name))])
76897
76950
  );
76898
76951
  }
76899
76952
 
76900
76953
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
76901
- var AST10 = recast10.types.builders;
76954
+ var AST9 = recast9.types.builders;
76902
76955
  function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, rootType) {
76903
76956
  const { type } = unwrapType(config2, rootType);
76904
76957
  if (graphql17.isScalarType(type)) {
@@ -76925,20 +76978,20 @@ function addReferencedInputTypes(config2, filepath, body, visitedTypes, missingS
76925
76978
  for (const field of Object.values(type.getFields())) {
76926
76979
  addReferencedInputTypes(config2, filepath, body, visitedTypes, missingScalars, field.type);
76927
76980
  members.push(
76928
- AST10.tsPropertySignature(
76929
- AST10.identifier(field.name),
76930
- AST10.tsTypeAnnotation(tsTypeReference(config2, missingScalars, field, body)),
76981
+ AST9.tsPropertySignature(
76982
+ AST9.identifier(field.name),
76983
+ AST9.tsTypeAnnotation(tsTypeReference(config2, missingScalars, field, body)),
76931
76984
  graphql17.isNullableType(field.type)
76932
76985
  )
76933
76986
  );
76934
76987
  }
76935
- body.push(AST10.tsTypeAliasDeclaration(AST10.identifier(type.name), AST10.tsTypeLiteral(members)));
76988
+ body.push(AST9.tsTypeAliasDeclaration(AST9.identifier(type.name), AST9.tsTypeLiteral(members)));
76936
76989
  }
76937
76990
 
76938
76991
  // src/codegen/generators/typescript/inlineType.ts
76939
76992
  var graphql18 = __toESM(require_graphql2(), 1);
76940
- var recast11 = __toESM(require_main2(), 1);
76941
- var AST11 = recast11.types.builders;
76993
+ var recast10 = __toESM(require_main2(), 1);
76994
+ var AST10 = recast10.types.builders;
76942
76995
  var fragmentKey2 = " $fragments";
76943
76996
  function inlineType({
76944
76997
  config: config2,
@@ -77036,7 +77089,7 @@ function inlineType({
77036
77089
  {}
77037
77090
  )
77038
77091
  );
77039
- result = AST11.tsTypeLiteral([
77092
+ result = AST10.tsTypeLiteral([
77040
77093
  ...fields.map((selection) => {
77041
77094
  const { field } = selectionTypeInfo(config2.schema, filepath, rootObj, selection);
77042
77095
  const attributeName = selection.alias?.value || selection.name.value;
@@ -77064,12 +77117,12 @@ function inlineType({
77064
77117
  (directive) => directive.name.value === "include" || directive.name.value === "skip"
77065
77118
  ).length > 0;
77066
77119
  if (hasIncludeOrSkipDirective) {
77067
- attributeType = AST11.tsUnionType([attributeType, AST11.tsUndefinedKeyword()]);
77120
+ attributeType = AST10.tsUnionType([attributeType, AST10.tsUndefinedKeyword()]);
77068
77121
  }
77069
77122
  const prop = readonlyProperty(
77070
- AST11.tsPropertySignature(
77071
- AST11.identifier(attributeName),
77072
- AST11.tsTypeAnnotation(attributeType)
77123
+ AST10.tsPropertySignature(
77124
+ AST10.identifier(attributeName),
77125
+ AST10.tsTypeAnnotation(attributeType)
77073
77126
  ),
77074
77127
  allowReadonly
77075
77128
  );
@@ -77083,14 +77136,14 @@ function inlineType({
77083
77136
  if (includeFragments && fragmentSpreads && fragmentSpreads.length) {
77084
77137
  result.members.push(
77085
77138
  readonlyProperty(
77086
- AST11.tsPropertySignature(
77087
- AST11.stringLiteral(fragmentKey2),
77088
- AST11.tsTypeAnnotation(
77089
- AST11.tsTypeLiteral(
77139
+ AST10.tsPropertySignature(
77140
+ AST10.stringLiteral(fragmentKey2),
77141
+ AST10.tsTypeAnnotation(
77142
+ AST10.tsTypeLiteral(
77090
77143
  (fragmentSpreads || []).map(
77091
- (fragmentSpread) => AST11.tsPropertySignature(
77092
- AST11.identifier(fragmentSpread.name.value),
77093
- AST11.tsTypeAnnotation(AST11.tsTypeLiteral([]))
77144
+ (fragmentSpread) => AST10.tsPropertySignature(
77145
+ AST10.identifier(fragmentSpread.name.value),
77146
+ AST10.tsTypeAnnotation(AST10.tsTypeLiteral([]))
77094
77147
  )
77095
77148
  )
77096
77149
  )
@@ -77135,9 +77188,9 @@ function inlineType({
77135
77188
  }
77136
77189
  objectType.members.push(
77137
77190
  readonlyProperty(
77138
- AST11.tsPropertySignature(
77139
- AST11.identifier("__typename"),
77140
- AST11.tsTypeAnnotation(AST11.tsLiteralType(AST11.stringLiteral(typeName)))
77191
+ AST10.tsPropertySignature(
77192
+ AST10.identifier("__typename"),
77193
+ AST10.tsTypeAnnotation(AST10.tsLiteralType(AST10.stringLiteral(typeName)))
77141
77194
  ),
77142
77195
  allowReadonly
77143
77196
  )
@@ -77177,8 +77230,8 @@ function inlineType({
77177
77230
  if (Object.keys(inlineFragmentSelections).length > 0) {
77178
77231
  let selectionTypes = Object.entries(inlineFragmentSelections).map(
77179
77232
  ([typeName, { type: type2, tsType }]) => {
77180
- return AST11.tsParenthesizedType(
77181
- AST11.tsIntersectionType(
77233
+ return AST10.tsParenthesizedType(
77234
+ AST10.tsIntersectionType(
77182
77235
  [tsType].flatMap((type3) => {
77183
77236
  if (type3.type === "TSUnionType") {
77184
77237
  return type3.types.filter(
@@ -77204,14 +77257,14 @@ function inlineType({
77204
77257
  );
77205
77258
  if (!areAllTypenamesCovered || anySelectionHasRequiredField) {
77206
77259
  selectionTypes.push(
77207
- AST11.tsParenthesizedType(
77208
- AST11.tsTypeLiteral([
77260
+ AST10.tsParenthesizedType(
77261
+ AST10.tsTypeLiteral([
77209
77262
  readonlyProperty(
77210
- AST11.tsPropertySignature(
77211
- AST11.identifier("__typename"),
77212
- AST11.tsTypeAnnotation(
77213
- AST11.tsLiteralType(
77214
- AST11.stringLiteral("non-exhaustive; don't match this")
77263
+ AST10.tsPropertySignature(
77264
+ AST10.identifier("__typename"),
77265
+ AST10.tsTypeAnnotation(
77266
+ AST10.tsLiteralType(
77267
+ AST10.stringLiteral("non-exhaustive; don't match this")
77215
77268
  )
77216
77269
  )
77217
77270
  ),
@@ -77221,9 +77274,9 @@ function inlineType({
77221
77274
  )
77222
77275
  );
77223
77276
  }
77224
- result = AST11.tsIntersectionType([
77277
+ result = AST10.tsIntersectionType([
77225
77278
  result,
77226
- AST11.tsParenthesizedType(AST11.tsUnionType(selectionTypes))
77279
+ AST10.tsParenthesizedType(AST10.tsUnionType(selectionTypes))
77227
77280
  ]);
77228
77281
  }
77229
77282
  } else {
@@ -77241,7 +77294,7 @@ function wrapType2(wrappers, result, root, forceNullable, forceNonNull) {
77241
77294
  } else if (toWrap === "NonNull" /* NonNull */) {
77242
77295
  continue;
77243
77296
  } else if (toWrap === "List" /* List */) {
77244
- result = AST11.tsArrayType(AST11.tsParenthesizedType(result));
77297
+ result = AST10.tsArrayType(AST10.tsParenthesizedType(result));
77245
77298
  }
77246
77299
  }
77247
77300
  return result;
@@ -77286,13 +77339,13 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
77286
77339
  }
77287
77340
 
77288
77341
  // src/codegen/generators/typescript/loadingState.ts
77289
- var recast12 = __toESM(require_main2(), 1);
77290
- var AST12 = recast12.types.builders;
77342
+ var recast11 = __toESM(require_main2(), 1);
77343
+ var AST11 = recast11.types.builders;
77291
77344
  function withLoadingState(args) {
77292
77345
  if (!("enableLoadingState" in args.document.artifact) || !args.document.artifact.enableLoadingState) {
77293
77346
  return args.base;
77294
77347
  }
77295
- return AST12.tsUnionType([
77348
+ return AST11.tsUnionType([
77296
77349
  args.base,
77297
77350
  loadingState({
77298
77351
  parentType: args.document.artifact.rootType,
@@ -77311,7 +77364,7 @@ function loadingState(args) {
77311
77364
  import: ["LoadingType"],
77312
77365
  sourceModule: "$houdini/runtime/lib/types"
77313
77366
  });
77314
- const result = AST12.tsTypeLiteral(
77367
+ const result = AST11.tsTypeLiteral(
77315
77368
  Object.entries(selection).reduce(
77316
77369
  (rest, [attributeName, value]) => {
77317
77370
  if (!value.loading) {
@@ -77319,7 +77372,7 @@ function loadingState(args) {
77319
77372
  }
77320
77373
  let keyType = null;
77321
77374
  if (value.loading.kind === "value") {
77322
- keyType = AST12.tsTypeReference(AST12.identifier("LoadingType"));
77375
+ keyType = AST11.tsTypeReference(AST11.identifier("LoadingType"));
77323
77376
  }
77324
77377
  if (value.loading.kind === "continue" && value.selection) {
77325
77378
  keyType = loadingState({
@@ -77335,15 +77388,15 @@ function loadingState(args) {
77335
77388
  }
77336
77389
  if (value.loading.list) {
77337
77390
  for (const _ of Array.from({ length: value.loading.list.depth })) {
77338
- keyType = AST12.tsArrayType(keyType);
77391
+ keyType = AST11.tsArrayType(keyType);
77339
77392
  }
77340
77393
  }
77341
77394
  return [
77342
77395
  ...rest,
77343
77396
  readonlyProperty(
77344
- AST12.tsPropertySignature(
77345
- AST12.identifier(attributeName),
77346
- AST12.tsTypeAnnotation(keyType)
77397
+ AST11.tsPropertySignature(
77398
+ AST11.identifier(attributeName),
77399
+ AST11.tsTypeAnnotation(keyType)
77347
77400
  )
77348
77401
  )
77349
77402
  ];
@@ -77354,14 +77407,14 @@ function loadingState(args) {
77354
77407
  if (args.selection.fragments) {
77355
77408
  result.members.push(
77356
77409
  readonlyProperty(
77357
- AST12.tsPropertySignature(
77358
- AST12.stringLiteral(fragmentKey),
77359
- AST12.tsTypeAnnotation(
77360
- AST12.tsTypeLiteral(
77410
+ AST11.tsPropertySignature(
77411
+ AST11.stringLiteral(fragmentKey),
77412
+ AST11.tsTypeAnnotation(
77413
+ AST11.tsTypeLiteral(
77361
77414
  Object.keys(args.selection.fragments).map((name) => {
77362
- return AST12.tsPropertySignature(
77363
- AST12.identifier(name),
77364
- AST12.tsTypeAnnotation(AST12.tsTypeLiteral([]))
77415
+ return AST11.tsPropertySignature(
77416
+ AST11.identifier(name),
77417
+ AST11.tsTypeAnnotation(AST11.tsTypeLiteral([]))
77365
77418
  );
77366
77419
  })
77367
77420
  )
@@ -77374,7 +77427,7 @@ function loadingState(args) {
77374
77427
  }
77375
77428
 
77376
77429
  // src/codegen/generators/typescript/documentTypes.ts
77377
- var AST13 = recast13.types.builders;
77430
+ var AST12 = recast12.types.builders;
77378
77431
  async function generateDocumentTypes(config2, docs) {
77379
77432
  const typePaths = [];
77380
77433
  const fragmentDefinitions = {};
@@ -77399,7 +77452,7 @@ async function generateDocumentTypes(config2, docs) {
77399
77452
  return;
77400
77453
  }
77401
77454
  const typeDefPath = config2.artifactTypePath(originalDocument);
77402
- const program3 = AST13.program([]);
77455
+ const program3 = AST12.program([]);
77403
77456
  const visitedTypes = /* @__PURE__ */ new Set();
77404
77457
  let definition = originalDocument.definitions.find(
77405
77458
  (def) => (def.kind === "OperationDefinition" || def.kind === "FragmentDefinition") && def.name?.value === name
@@ -77435,9 +77488,9 @@ async function generateDocumentTypes(config2, docs) {
77435
77488
  );
77436
77489
  }
77437
77490
  program3.body.push(
77438
- AST13.exportNamedDeclaration(
77439
- AST13.tsTypeAliasDeclaration(
77440
- AST13.identifier(`${name}$artifact`),
77491
+ AST12.exportNamedDeclaration(
77492
+ AST12.tsTypeAliasDeclaration(
77493
+ AST12.identifier(`${name}$artifact`),
77441
77494
  convertToTs(serializeValue(artifact))
77442
77495
  )
77443
77496
  )
@@ -77447,17 +77500,17 @@ async function generateDocumentTypes(config2, docs) {
77447
77500
  typePaths.push(typeDefPath);
77448
77501
  })
77449
77502
  );
77450
- const typeIndex = AST13.program(
77503
+ const typeIndex = AST12.program(
77451
77504
  typePaths.sort((a, b) => a.localeCompare(b)).map((typePath) => {
77452
- return AST13.exportAllDeclaration(
77453
- AST13.literal(
77505
+ return AST12.exportAllDeclaration(
77506
+ AST12.literal(
77454
77507
  "./" + path_exports.relative(path_exports.resolve(config2.typeIndexPath, ".."), typePath).replace(/\.[^/.]+\.[^/.]+$/, "")
77455
77508
  ),
77456
77509
  null
77457
77510
  );
77458
77511
  }).concat([
77459
- AST13.exportAllDeclaration(AST13.literal("./runtime"), null),
77460
- AST13.exportAllDeclaration(AST13.literal("./graphql"), null)
77512
+ AST12.exportAllDeclaration(AST12.literal("./runtime"), null),
77513
+ AST12.exportAllDeclaration(AST12.literal("./graphql"), null)
77461
77514
  ])
77462
77515
  );
77463
77516
  const exportDefaultAs = ({ module: module2, as }) => `
@@ -77512,7 +77565,7 @@ For more information, please visit this link: ${siteURL}/api/config#custom-scala
77512
77565
  }
77513
77566
  function convertToTs(source) {
77514
77567
  if (source.type === "ObjectExpression") {
77515
- return AST13.tsTypeLiteral(
77568
+ return AST12.tsTypeLiteral(
77516
77569
  source.properties.reduce(
77517
77570
  (props, prop) => {
77518
77571
  if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
@@ -77520,9 +77573,9 @@ function convertToTs(source) {
77520
77573
  }
77521
77574
  return [
77522
77575
  ...props,
77523
- AST13.tsPropertySignature(
77576
+ AST12.tsPropertySignature(
77524
77577
  prop.key,
77525
- AST13.tsTypeAnnotation(convertToTs(prop.value))
77578
+ AST12.tsTypeAnnotation(convertToTs(prop.value))
77526
77579
  )
77527
77580
  ];
77528
77581
  },
@@ -77531,20 +77584,20 @@ function convertToTs(source) {
77531
77584
  );
77532
77585
  }
77533
77586
  if (source.type === "ArrayExpression") {
77534
- return AST13.tsTupleType(
77587
+ return AST12.tsTupleType(
77535
77588
  source.elements.map((element) => convertToTs(element))
77536
77589
  );
77537
77590
  }
77538
77591
  if (source.type === "Literal" && typeof source.value === "boolean") {
77539
- return AST13.tsLiteralType(AST13.booleanLiteral(source.value));
77592
+ return AST12.tsLiteralType(AST12.booleanLiteral(source.value));
77540
77593
  }
77541
77594
  if (source.type === "Literal" && typeof source.value === "number") {
77542
- return AST13.tsLiteralType(AST13.numericLiteral(source.value));
77595
+ return AST12.tsLiteralType(AST12.numericLiteral(source.value));
77543
77596
  }
77544
77597
  if (source.type === "Literal" && typeof source.value === "string") {
77545
- return AST13.tsLiteralType(AST13.stringLiteral(source.value));
77598
+ return AST12.tsLiteralType(AST12.stringLiteral(source.value));
77546
77599
  }
77547
- return AST13.tsLiteralType(source);
77600
+ return AST12.tsLiteralType(source);
77548
77601
  }
77549
77602
  async function generateOperationTypeDefs(config2, filepath, document, body, definition, selections, visitedTypes, missingScalars, artifact) {
77550
77603
  let parentType = null;
@@ -77583,23 +77636,23 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
77583
77636
  });
77584
77637
  }
77585
77638
  body.push(
77586
- AST13.exportNamedDeclaration(
77587
- AST13.tsTypeAliasDeclaration(
77588
- AST13.identifier(definition.name.value),
77589
- AST13.tsTypeLiteral([
77639
+ AST12.exportNamedDeclaration(
77640
+ AST12.tsTypeAliasDeclaration(
77641
+ AST12.identifier(definition.name.value),
77642
+ AST12.tsTypeLiteral([
77590
77643
  readonlyProperty(
77591
- AST13.tsPropertySignature(
77592
- AST13.stringLiteral("input"),
77593
- AST13.tsTypeAnnotation(AST13.tsTypeReference(AST13.identifier(inputTypeName)))
77644
+ AST12.tsPropertySignature(
77645
+ AST12.stringLiteral("input"),
77646
+ AST12.tsTypeAnnotation(AST12.tsTypeReference(AST12.identifier(inputTypeName)))
77594
77647
  )
77595
77648
  ),
77596
77649
  readonlyProperty(
77597
- AST13.tsPropertySignature(
77598
- AST13.stringLiteral("result"),
77599
- AST13.tsTypeAnnotation(
77600
- definition.operation === "mutation" ? AST13.tsTypeReference(AST13.identifier(shapeTypeName)) : AST13.tsUnionType([
77601
- AST13.tsTypeReference(AST13.identifier(shapeTypeName)),
77602
- AST13.tsUndefinedKeyword()
77650
+ AST12.tsPropertySignature(
77651
+ AST12.stringLiteral("result"),
77652
+ AST12.tsTypeAnnotation(
77653
+ definition.operation === "mutation" ? AST12.tsTypeReference(AST12.identifier(shapeTypeName)) : AST12.tsUnionType([
77654
+ AST12.tsTypeReference(AST12.identifier(shapeTypeName)),
77655
+ AST12.tsUndefinedKeyword()
77603
77656
  ])
77604
77657
  )
77605
77658
  )
@@ -77607,8 +77660,8 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
77607
77660
  ])
77608
77661
  )
77609
77662
  ),
77610
- AST13.exportNamedDeclaration(
77611
- AST13.tsTypeAliasDeclaration(AST13.identifier(shapeTypeName), resultType)
77663
+ AST12.exportNamedDeclaration(
77664
+ AST12.tsTypeAliasDeclaration(AST12.identifier(shapeTypeName), resultType)
77612
77665
  )
77613
77666
  );
77614
77667
  if (hasInputs && definition.variableDefinitions && definition.variableDefinitions.length > 0) {
@@ -77623,15 +77676,15 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
77623
77676
  );
77624
77677
  }
77625
77678
  body.push(
77626
- AST13.exportNamedDeclaration(
77627
- AST13.tsTypeAliasDeclaration(
77628
- AST13.identifier(inputTypeName),
77629
- AST13.tsTypeLiteral(
77679
+ AST12.exportNamedDeclaration(
77680
+ AST12.tsTypeAliasDeclaration(
77681
+ AST12.identifier(inputTypeName),
77682
+ AST12.tsTypeLiteral(
77630
77683
  (definition.variableDefinitions || []).map(
77631
77684
  (definition2) => {
77632
- return AST13.tsPropertySignature(
77633
- AST13.identifier(definition2.variable.name.value),
77634
- AST13.tsTypeAnnotation(
77685
+ return AST12.tsPropertySignature(
77686
+ AST12.identifier(definition2.variable.name.value),
77687
+ AST12.tsTypeAnnotation(
77635
77688
  tsTypeReference(config2, missingScalars, definition2, body)
77636
77689
  ),
77637
77690
  definition2.type.kind !== "NonNullType"
@@ -77644,16 +77697,16 @@ async function generateOperationTypeDefs(config2, filepath, document, body, defi
77644
77697
  );
77645
77698
  } else {
77646
77699
  body.push(
77647
- AST13.exportNamedDeclaration(
77648
- AST13.tsTypeAliasDeclaration(AST13.identifier(inputTypeName), AST13.tsNullKeyword())
77700
+ AST12.exportNamedDeclaration(
77701
+ AST12.tsTypeAliasDeclaration(AST12.identifier(inputTypeName), AST12.tsNullKeyword())
77649
77702
  )
77650
77703
  );
77651
77704
  }
77652
77705
  if (definition.operation === "mutation") {
77653
77706
  body.push(
77654
- AST13.exportNamedDeclaration(
77655
- AST13.tsTypeAliasDeclaration(
77656
- AST13.identifier(optimisticTypeName),
77707
+ AST12.exportNamedDeclaration(
77708
+ AST12.tsTypeAliasDeclaration(
77709
+ AST12.identifier(optimisticTypeName),
77657
77710
  inlineType({
77658
77711
  config: config2,
77659
77712
  filepath,
@@ -77687,12 +77740,12 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
77687
77740
  let directive = definition.directives?.find(
77688
77741
  (directive2) => directive2.name.value === config2.argumentsDirective
77689
77742
  );
77690
- let inputValue = !directive ? AST13.tsTypeLiteral([]) : AST13.tsTypeLiteral(
77743
+ let inputValue = !directive ? AST12.tsTypeLiteral([]) : AST12.tsTypeLiteral(
77691
77744
  (fragmentArgumentsDefinitions(config2, filepath, definition) || []).map(
77692
77745
  (definition2) => {
77693
- return AST13.tsPropertySignature(
77694
- AST13.identifier(definition2.variable.name.value),
77695
- AST13.tsTypeAnnotation(
77746
+ return AST12.tsPropertySignature(
77747
+ AST12.identifier(definition2.variable.name.value),
77748
+ AST12.tsTypeAnnotation(
77696
77749
  tsTypeReference(config2, missingScalars, definition2, body)
77697
77750
  ),
77698
77751
  definition2.type.kind !== "NonNullType"
@@ -77701,30 +77754,30 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
77701
77754
  )
77702
77755
  );
77703
77756
  body.push(
77704
- AST13.exportNamedDeclaration(
77705
- AST13.tsTypeAliasDeclaration(AST13.identifier(inputTypeName), inputValue)
77757
+ AST12.exportNamedDeclaration(
77758
+ AST12.tsTypeAliasDeclaration(AST12.identifier(inputTypeName), inputValue)
77706
77759
  ),
77707
- AST13.exportNamedDeclaration(
77708
- AST13.tsTypeAliasDeclaration(
77709
- AST13.identifier(propTypeName),
77710
- AST13.tsTypeLiteral([
77760
+ AST12.exportNamedDeclaration(
77761
+ AST12.tsTypeAliasDeclaration(
77762
+ AST12.identifier(propTypeName),
77763
+ AST12.tsTypeLiteral([
77711
77764
  readonlyProperty(
77712
- AST13.tsPropertySignature(
77713
- AST13.stringLiteral("shape"),
77714
- AST13.tsTypeAnnotation(
77715
- AST13.tsTypeReference(AST13.identifier(shapeTypeName))
77765
+ AST12.tsPropertySignature(
77766
+ AST12.stringLiteral("shape"),
77767
+ AST12.tsTypeAnnotation(
77768
+ AST12.tsTypeReference(AST12.identifier(shapeTypeName))
77716
77769
  ),
77717
77770
  true
77718
77771
  )
77719
77772
  ),
77720
77773
  readonlyProperty(
77721
- AST13.tsPropertySignature(
77722
- AST13.stringLiteral(fragmentKey2),
77723
- AST13.tsTypeAnnotation(
77724
- AST13.tsTypeLiteral([
77725
- AST13.tsPropertySignature(
77726
- AST13.stringLiteral(propTypeName),
77727
- AST13.tsTypeAnnotation(AST13.tsAnyKeyword())
77774
+ AST12.tsPropertySignature(
77775
+ AST12.stringLiteral(fragmentKey2),
77776
+ AST12.tsTypeAnnotation(
77777
+ AST12.tsTypeLiteral([
77778
+ AST12.tsPropertySignature(
77779
+ AST12.stringLiteral(propTypeName),
77780
+ AST12.tsTypeAnnotation(AST12.tsAnyKeyword())
77728
77781
  )
77729
77782
  ])
77730
77783
  )
@@ -77733,9 +77786,9 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
77733
77786
  ])
77734
77787
  )
77735
77788
  ),
77736
- AST13.exportNamedDeclaration(
77737
- AST13.tsTypeAliasDeclaration(
77738
- AST13.identifier(shapeTypeName),
77789
+ AST12.exportNamedDeclaration(
77790
+ AST12.tsTypeAliasDeclaration(
77791
+ AST12.identifier(shapeTypeName),
77739
77792
  withLoadingState({
77740
77793
  config: config2,
77741
77794
  document,
@@ -77761,8 +77814,8 @@ async function generateFragmentTypeDefs(config2, filepath, body, selections, def
77761
77814
 
77762
77815
  // src/codegen/generators/typescript/imperativeTypeDef.ts
77763
77816
  var graphql19 = __toESM(require_graphql2(), 1);
77764
- var recast14 = __toESM(require_main2(), 1);
77765
- var AST14 = recast14.types.builders;
77817
+ var recast13 = __toESM(require_main2(), 1);
77818
+ var AST13 = recast13.types.builders;
77766
77819
  async function imperativeCacheTypef(config2, docs) {
77767
77820
  const returnType = (doc) => config2.plugins.find((plugin2) => plugin2.graphqlTagReturn)?.graphqlTagReturn?.({
77768
77821
  config: config2,
@@ -77778,87 +77831,87 @@ async function imperativeCacheTypef(config2, docs) {
77778
77831
  }) ?? "any";
77779
77832
  const target = path_exports.join(config2.runtimeDirectory, "generated.d.ts");
77780
77833
  const body = [];
77781
- const declaration = AST14.tsTypeAliasDeclaration(
77782
- AST14.identifier(CacheTypeDefName),
77783
- AST14.tsTypeLiteral([
77784
- AST14.tsPropertySignature(
77785
- AST14.identifier("types"),
77786
- AST14.tsTypeAnnotation(typeDefinitions(config2, body, docs, returnType))
77834
+ const declaration = AST13.tsTypeAliasDeclaration(
77835
+ AST13.identifier(CacheTypeDefName),
77836
+ AST13.tsTypeLiteral([
77837
+ AST13.tsPropertySignature(
77838
+ AST13.identifier("types"),
77839
+ AST13.tsTypeAnnotation(typeDefinitions(config2, body, docs, returnType))
77787
77840
  ),
77788
- AST14.tsPropertySignature(
77789
- AST14.identifier("lists"),
77790
- AST14.tsTypeAnnotation(listDefinitions(config2, body, docs))
77841
+ AST13.tsPropertySignature(
77842
+ AST13.identifier("lists"),
77843
+ AST13.tsTypeAnnotation(listDefinitions(config2, body, docs))
77791
77844
  ),
77792
- AST14.tsPropertySignature(
77793
- AST14.identifier("queries"),
77794
- AST14.tsTypeAnnotation(queryDefinitions(config2, body, docs, returnType))
77845
+ AST13.tsPropertySignature(
77846
+ AST13.identifier("queries"),
77847
+ AST13.tsTypeAnnotation(queryDefinitions(config2, body, docs, returnType))
77795
77848
  )
77796
77849
  ])
77797
77850
  );
77798
77851
  declaration.declare = true;
77799
- const importRecord = AST14.importDeclaration(
77800
- [AST14.importSpecifier(AST14.identifier("Record"))],
77801
- AST14.stringLiteral("./public/record")
77852
+ const importRecord = AST13.importDeclaration(
77853
+ [AST13.importSpecifier(AST13.identifier("Record"))],
77854
+ AST13.stringLiteral("./public/record")
77802
77855
  );
77803
77856
  importRecord.importKind = "type";
77804
77857
  await fs_exports.writeFile(
77805
77858
  target,
77806
- recast14.prettyPrint(
77807
- AST14.program([importRecord, ...body, AST14.exportNamedDeclaration(declaration)])
77859
+ recast13.prettyPrint(
77860
+ AST13.program([importRecord, ...body, AST13.exportNamedDeclaration(declaration)])
77808
77861
  ).code
77809
77862
  );
77810
77863
  }
77811
77864
  function typeDefinitions(config2, body, docs, returnType) {
77812
77865
  const operationTypes = [config2.schema.getMutationType(), config2.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
77813
77866
  const visitedTypes = /* @__PURE__ */ new Set();
77814
- const types18 = Object.values(config2.schema.getTypeMap()).filter(
77867
+ const types17 = Object.values(config2.schema.getTypeMap()).filter(
77815
77868
  (type) => !graphql19.isAbstractType(type) && !graphql19.isScalarType(type) && !graphql19.isEnumType(type) && !graphql19.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
77816
77869
  );
77817
77870
  const fragmentMap = fragmentListMap(
77818
77871
  config2,
77819
- types18.map((type) => type.name),
77872
+ types17.map((type) => type.name),
77820
77873
  body,
77821
77874
  docs,
77822
77875
  returnType
77823
77876
  );
77824
- return AST14.tsTypeLiteral(
77825
- types18.map((type) => {
77877
+ return AST13.tsTypeLiteral(
77878
+ types17.map((type) => {
77826
77879
  let typeName = type.name;
77827
77880
  if (config2.schema.getQueryType() && config2.schema.getQueryType()?.name === type.name) {
77828
77881
  typeName = "__ROOT__";
77829
77882
  }
77830
- let idFields = AST14.tsNeverKeyword();
77883
+ let idFields = AST13.tsNeverKeyword();
77831
77884
  const keys2 = keyFieldsForType(config2.configFile, type.name);
77832
77885
  if (graphql19.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
77833
- idFields = AST14.tsTypeLiteral(
77886
+ idFields = AST13.tsTypeLiteral(
77834
77887
  keys2.map((key) => {
77835
77888
  const fieldType = type.getFields()[key];
77836
77889
  const unwrapped = unwrapType(config2, fieldType.type);
77837
- return AST14.tsPropertySignature(
77838
- AST14.identifier(key),
77839
- AST14.tsTypeAnnotation(
77890
+ return AST13.tsPropertySignature(
77891
+ AST13.identifier(key),
77892
+ AST13.tsTypeAnnotation(
77840
77893
  scalarPropertyValue(config2, /* @__PURE__ */ new Set(), unwrapped.type)
77841
77894
  )
77842
77895
  );
77843
77896
  })
77844
77897
  );
77845
77898
  } else if (typeName === "__ROOT__") {
77846
- idFields = AST14.tsTypeLiteral([]);
77899
+ idFields = AST13.tsTypeLiteral([]);
77847
77900
  }
77848
- let fields = AST14.tsTypeLiteral([]);
77901
+ let fields = AST13.tsTypeLiteral([]);
77849
77902
  if (graphql19.isObjectType(type)) {
77850
- fields = AST14.tsTypeLiteral(
77903
+ fields = AST13.tsTypeLiteral(
77851
77904
  Object.entries(type.getFields()).map(
77852
77905
  ([key, fieldType]) => {
77853
77906
  const unwrapped = unwrapType(config2, fieldType.type);
77854
- let typeOptions = AST14.tsUnionType([]);
77907
+ let typeOptions = AST13.tsUnionType([]);
77855
77908
  if (graphql19.isScalarType(unwrapped.type)) {
77856
77909
  typeOptions.types.push(
77857
77910
  scalarPropertyValue(config2, /* @__PURE__ */ new Set(), unwrapped.type)
77858
77911
  );
77859
77912
  } else if (graphql19.isEnumType(unwrapped.type)) {
77860
77913
  typeOptions.types.push(
77861
- AST14.tsTypeReference(AST14.identifier(unwrapped.type.name))
77914
+ AST13.tsTypeReference(AST13.identifier(unwrapped.type.name))
77862
77915
  );
77863
77916
  } else if (!graphql19.isAbstractType(unwrapped.type)) {
77864
77917
  typeOptions.types.push(record(unwrapped.type.name));
@@ -77869,21 +77922,21 @@ function typeDefinitions(config2, body, docs, returnType) {
77869
77922
  }
77870
77923
  for (const wrapper of unwrapped.wrappers) {
77871
77924
  if (wrapper === "Nullable" /* Nullable */) {
77872
- typeOptions = AST14.tsParenthesizedType(
77873
- AST14.tsUnionType([typeOptions, AST14.tsNullKeyword()])
77925
+ typeOptions = AST13.tsParenthesizedType(
77926
+ AST13.tsUnionType([typeOptions, AST13.tsNullKeyword()])
77874
77927
  );
77875
77928
  } else if (wrapper === "List" /* List */) {
77876
- typeOptions = AST14.tsArrayType(
77877
- AST14.tsParenthesizedType(typeOptions)
77929
+ typeOptions = AST13.tsArrayType(
77930
+ AST13.tsParenthesizedType(typeOptions)
77878
77931
  );
77879
77932
  }
77880
77933
  }
77881
77934
  if (typeOptions.type === "TSParenthesizedType") {
77882
77935
  typeOptions = typeOptions.typeAnnotation;
77883
77936
  }
77884
- let args = AST14.tsNeverKeyword();
77937
+ let args = AST13.tsNeverKeyword();
77885
77938
  if (fieldType.args?.length > 0) {
77886
- args = AST14.tsTypeLiteral(
77939
+ args = AST13.tsTypeLiteral(
77887
77940
  fieldType.args.map((arg) => {
77888
77941
  addReferencedInputTypes(
77889
77942
  config2,
@@ -77893,9 +77946,9 @@ function typeDefinitions(config2, body, docs, returnType) {
77893
77946
  /* @__PURE__ */ new Set(),
77894
77947
  arg.type
77895
77948
  );
77896
- const prop = AST14.tsPropertySignature(
77897
- AST14.identifier(arg.name),
77898
- AST14.tsTypeAnnotation(
77949
+ const prop = AST13.tsPropertySignature(
77950
+ AST13.identifier(arg.name),
77951
+ AST13.tsTypeAnnotation(
77899
77952
  tsTypeReference(config2, /* @__PURE__ */ new Set(), arg, body)
77900
77953
  )
77901
77954
  );
@@ -77905,17 +77958,17 @@ function typeDefinitions(config2, body, docs, returnType) {
77905
77958
  })
77906
77959
  );
77907
77960
  }
77908
- return AST14.tsPropertySignature(
77909
- AST14.identifier(key),
77910
- AST14.tsTypeAnnotation(
77911
- AST14.tsTypeLiteral([
77912
- AST14.tsPropertySignature(
77913
- AST14.identifier("type"),
77914
- AST14.tsTypeAnnotation(typeOptions)
77961
+ return AST13.tsPropertySignature(
77962
+ AST13.identifier(key),
77963
+ AST13.tsTypeAnnotation(
77964
+ AST13.tsTypeLiteral([
77965
+ AST13.tsPropertySignature(
77966
+ AST13.identifier("type"),
77967
+ AST13.tsTypeAnnotation(typeOptions)
77915
77968
  ),
77916
- AST14.tsPropertySignature(
77917
- AST14.identifier("args"),
77918
- AST14.tsTypeAnnotation(args)
77969
+ AST13.tsPropertySignature(
77970
+ AST13.identifier("args"),
77971
+ AST13.tsTypeAnnotation(args)
77919
77972
  )
77920
77973
  ])
77921
77974
  )
@@ -77924,21 +77977,21 @@ function typeDefinitions(config2, body, docs, returnType) {
77924
77977
  )
77925
77978
  );
77926
77979
  }
77927
- return AST14.tsPropertySignature(
77928
- AST14.identifier(typeName),
77929
- AST14.tsTypeAnnotation(
77930
- AST14.tsTypeLiteral([
77931
- AST14.tsPropertySignature(
77932
- AST14.identifier("idFields"),
77933
- AST14.tsTypeAnnotation(idFields)
77980
+ return AST13.tsPropertySignature(
77981
+ AST13.identifier(typeName),
77982
+ AST13.tsTypeAnnotation(
77983
+ AST13.tsTypeLiteral([
77984
+ AST13.tsPropertySignature(
77985
+ AST13.identifier("idFields"),
77986
+ AST13.tsTypeAnnotation(idFields)
77934
77987
  ),
77935
- AST14.tsPropertySignature(
77936
- AST14.identifier("fields"),
77937
- AST14.tsTypeAnnotation(fields)
77988
+ AST13.tsPropertySignature(
77989
+ AST13.identifier("fields"),
77990
+ AST13.tsTypeAnnotation(fields)
77938
77991
  ),
77939
- AST14.tsPropertySignature(
77940
- AST14.identifier("fragments"),
77941
- AST14.tsTypeAnnotation(fragmentMap[typeName] ?? AST14.tsTupleType([]))
77992
+ AST13.tsPropertySignature(
77993
+ AST13.identifier("fragments"),
77994
+ AST13.tsTypeAnnotation(fragmentMap[typeName] ?? AST13.tsTupleType([]))
77942
77995
  )
77943
77996
  ])
77944
77997
  )
@@ -77980,28 +78033,28 @@ function listDefinitions(config2, body, docs) {
77980
78033
  possibleTypes.push(listType.name);
77981
78034
  }
77982
78035
  lists.push(
77983
- AST14.tsPropertySignature(
77984
- AST14.identifier(nameValue),
77985
- AST14.tsTypeAnnotation(
77986
- AST14.tsTypeLiteral([
77987
- AST14.tsPropertySignature(
77988
- AST14.identifier("types"),
77989
- AST14.tsTypeAnnotation(
77990
- AST14.tsUnionType(
78036
+ AST13.tsPropertySignature(
78037
+ AST13.identifier(nameValue),
78038
+ AST13.tsTypeAnnotation(
78039
+ AST13.tsTypeLiteral([
78040
+ AST13.tsPropertySignature(
78041
+ AST13.identifier("types"),
78042
+ AST13.tsTypeAnnotation(
78043
+ AST13.tsUnionType(
77991
78044
  possibleTypes.map(
77992
- (possible) => AST14.tsLiteralType(AST14.stringLiteral(possible))
78045
+ (possible) => AST13.tsLiteralType(AST13.stringLiteral(possible))
77993
78046
  )
77994
78047
  )
77995
78048
  )
77996
78049
  ),
77997
- AST14.tsPropertySignature(
77998
- AST14.identifier("filters"),
77999
- AST14.tsTypeAnnotation(
78000
- targetFieldDefinition.args.length === 0 ? AST14.tsNeverKeyword() : AST14.tsTypeLiteral(
78050
+ AST13.tsPropertySignature(
78051
+ AST13.identifier("filters"),
78052
+ AST13.tsTypeAnnotation(
78053
+ targetFieldDefinition.args.length === 0 ? AST13.tsNeverKeyword() : AST13.tsTypeLiteral(
78001
78054
  targetFieldDefinition.args.map((arg) => {
78002
- const argDef = AST14.tsPropertySignature(
78003
- AST14.identifier(arg.name),
78004
- AST14.tsTypeAnnotation(
78055
+ const argDef = AST13.tsPropertySignature(
78056
+ AST13.identifier(arg.name),
78057
+ AST13.tsTypeAnnotation(
78005
78058
  tsTypeReference(
78006
78059
  config2,
78007
78060
  /* @__PURE__ */ new Set(),
@@ -78023,10 +78076,10 @@ function listDefinitions(config2, body, docs) {
78023
78076
  }
78024
78077
  });
78025
78078
  }
78026
- return AST14.tsTypeLiteral(lists);
78079
+ return AST13.tsTypeLiteral(lists);
78027
78080
  }
78028
78081
  function queryDefinitions(config2, body, docs, returnType) {
78029
- return AST14.tsTupleType(
78082
+ return AST13.tsTupleType(
78030
78083
  docs.reduce((prev, doc) => {
78031
78084
  if (doc.kind !== ArtifactKind.Query || !doc.generateStore) {
78032
78085
  return prev;
@@ -78048,10 +78101,10 @@ function queryDefinitions(config2, body, docs, returnType) {
78048
78101
  import: [`${doc.name}$result`, `${doc.name}$input`]
78049
78102
  });
78050
78103
  return prev.concat(
78051
- AST14.tsTupleType([
78052
- AST14.tsTypeReference(AST14.identifier(runtimeType)),
78053
- AST14.tsTypeReference(AST14.identifier(shapeType)),
78054
- AST14.tsTypeReference(AST14.identifier(inputType))
78104
+ AST13.tsTupleType([
78105
+ AST13.tsTypeReference(AST13.identifier(runtimeType)),
78106
+ AST13.tsTypeReference(AST13.identifier(shapeType)),
78107
+ AST13.tsTypeReference(AST13.identifier(inputType))
78055
78108
  ])
78056
78109
  );
78057
78110
  }, [])
@@ -78080,13 +78133,13 @@ function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
78080
78133
  ),
78081
78134
  import: [`${definition.name.value}$data`]
78082
78135
  });
78083
- let inputType = AST14.tsNeverKeyword();
78136
+ let inputType = AST13.tsNeverKeyword();
78084
78137
  let directive = definition.directives?.find(
78085
78138
  (directive2) => directive2.name.value === config2.argumentsDirective
78086
78139
  );
78087
78140
  if (directive) {
78088
- inputType = AST14.tsTypeReference(
78089
- AST14.identifier(
78141
+ inputType = AST13.tsTypeReference(
78142
+ AST13.identifier(
78090
78143
  ensureImports({
78091
78144
  config: config2,
78092
78145
  body,
@@ -78101,11 +78154,11 @@ function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
78101
78154
  }
78102
78155
  return {
78103
78156
  ...prev,
78104
- [typeName]: AST14.tsTupleType(
78157
+ [typeName]: AST13.tsTupleType(
78105
78158
  previousValue.concat(
78106
- AST14.tsTupleType([
78107
- AST14.tsTypeReference(AST14.identifier(tagResult)),
78108
- AST14.tsTypeReference(AST14.identifier(shapeType)),
78159
+ AST13.tsTupleType([
78160
+ AST13.tsTypeReference(AST13.identifier(tagResult)),
78161
+ AST13.tsTypeReference(AST13.identifier(shapeType)),
78109
78162
  inputType
78110
78163
  ])
78111
78164
  )
@@ -78115,11 +78168,11 @@ function fragmentListMap(config2, concreteTypes, body, docs, return_type) {
78115
78168
  }
78116
78169
  var CacheTypeDefName = "CacheTypeDef";
78117
78170
  function record(name) {
78118
- return AST14.tsTypeReference(
78119
- AST14.identifier("Record"),
78120
- AST14.tsTypeParameterInstantiation([
78121
- AST14.tsTypeReference(AST14.identifier(CacheTypeDefName)),
78122
- AST14.tsLiteralType(AST14.stringLiteral(name))
78171
+ return AST13.tsTypeReference(
78172
+ AST13.identifier("Record"),
78173
+ AST13.tsTypeParameterInstantiation([
78174
+ AST13.tsTypeReference(AST13.identifier(CacheTypeDefName)),
78175
+ AST13.tsLiteralType(AST13.stringLiteral(name))
78123
78176
  ])
78124
78177
  );
78125
78178
  }
@@ -78172,25 +78225,25 @@ async function persistOutputGenerator(config2, docs) {
78172
78225
 
78173
78226
  // src/codegen/generators/definitions/enums.ts
78174
78227
  var graphql21 = __toESM(require_graphql2(), 1);
78175
- var recast15 = __toESM(require_main2(), 1);
78176
- var AST15 = recast15.types.builders;
78228
+ var recast14 = __toESM(require_main2(), 1);
78229
+ var AST14 = recast14.types.builders;
78177
78230
  async function definitionsGenerator(config2) {
78178
78231
  const enums = graphql21.parse(graphql21.printSchema(config2.schema)).definitions.filter(
78179
78232
  (definition) => definition.kind === "EnumTypeDefinition"
78180
78233
  ).filter((def) => !config2.isInternalEnum(def));
78181
78234
  const { code: runtimeDefinitions } = await printJS(
78182
- AST15.program(
78235
+ AST14.program(
78183
78236
  enums.map((defn) => {
78184
78237
  const name = defn.name.value;
78185
78238
  return moduleExport(
78186
78239
  config2,
78187
78240
  name,
78188
- AST15.objectExpression(
78241
+ AST14.objectExpression(
78189
78242
  defn.values?.map((value) => {
78190
78243
  const str = value.name.value;
78191
- return AST15.objectProperty(
78192
- AST15.stringLiteral(str),
78193
- AST15.stringLiteral(str)
78244
+ return AST14.objectProperty(
78245
+ AST14.stringLiteral(str),
78246
+ AST14.stringLiteral(str)
78194
78247
  );
78195
78248
  }) || []
78196
78249
  )
@@ -80176,8 +80229,8 @@ async function updatePackageJSON(targetPath) {
80176
80229
  }
80177
80230
  packageJSON.devDependencies = {
80178
80231
  ...packageJSON.devDependencies,
80179
- houdini: "^1.2.5",
80180
- "houdini-svelte": "^1.2.5"
80232
+ houdini: "^1.2.6-next.0",
80233
+ "houdini-svelte": "^1.2.6-next.0"
80181
80234
  };
80182
80235
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
80183
80236
  }