houdini 1.2.5 → 1.2.6

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