houdini 1.2.5 → 1.2.6-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/build/cmd-cjs/index.js +607 -554
  2. package/build/cmd-esm/index.js +607 -554
  3. package/build/codegen/generators/artifacts/selection.d.ts +1 -3
  4. package/build/codegen-cjs/index.js +594 -541
  5. package/build/codegen-esm/index.js +594 -541
  6. package/build/lib-cjs/index.js +35 -2
  7. package/build/lib-esm/index.js +35 -2
  8. package/build/runtime/cache/cache.d.ts +1 -0
  9. package/build/runtime/cache/gc.d.ts +1 -0
  10. package/build/runtime/cache/lists.d.ts +1 -0
  11. package/build/runtime/cache/staleManager.d.ts +1 -0
  12. package/build/runtime/cache/storage.d.ts +1 -0
  13. package/build/runtime/cache/subscription.d.ts +2 -1
  14. package/build/runtime/public/cache.d.ts +4 -0
  15. package/build/runtime-cjs/cache/cache.d.ts +1 -0
  16. package/build/runtime-cjs/cache/cache.js +10 -2
  17. package/build/runtime-cjs/cache/gc.d.ts +1 -0
  18. package/build/runtime-cjs/cache/gc.js +3 -0
  19. package/build/runtime-cjs/cache/lists.d.ts +1 -0
  20. package/build/runtime-cjs/cache/lists.js +4 -0
  21. package/build/runtime-cjs/cache/staleManager.d.ts +1 -0
  22. package/build/runtime-cjs/cache/staleManager.js +3 -0
  23. package/build/runtime-cjs/cache/storage.d.ts +1 -0
  24. package/build/runtime-cjs/cache/storage.js +3 -0
  25. package/build/runtime-cjs/cache/subscription.d.ts +2 -1
  26. package/build/runtime-cjs/cache/subscription.js +13 -0
  27. package/build/runtime-cjs/public/cache.d.ts +4 -0
  28. package/build/runtime-cjs/public/cache.js +3 -0
  29. package/build/runtime-esm/cache/cache.d.ts +1 -0
  30. package/build/runtime-esm/cache/cache.js +10 -2
  31. package/build/runtime-esm/cache/gc.d.ts +1 -0
  32. package/build/runtime-esm/cache/gc.js +3 -0
  33. package/build/runtime-esm/cache/lists.d.ts +1 -0
  34. package/build/runtime-esm/cache/lists.js +4 -0
  35. package/build/runtime-esm/cache/staleManager.d.ts +1 -0
  36. package/build/runtime-esm/cache/staleManager.js +3 -0
  37. package/build/runtime-esm/cache/storage.d.ts +1 -0
  38. package/build/runtime-esm/cache/storage.js +3 -0
  39. package/build/runtime-esm/cache/subscription.d.ts +2 -1
  40. package/build/runtime-esm/cache/subscription.js +13 -0
  41. package/build/runtime-esm/public/cache.d.ts +4 -0
  42. package/build/runtime-esm/public/cache.js +3 -0
  43. package/build/test-cjs/index.js +597 -544
  44. package/build/test-esm/index.js +597 -544
  45. package/build/vite-cjs/index.js +612 -559
  46. package/build/vite-esm/index.js +612 -559
  47. package/package.json +1 -1
@@ -6125,12 +6125,12 @@ var require_parser = __commonJS({
6125
6125
  return [];
6126
6126
  }
6127
6127
  if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {
6128
- var types19 = [];
6128
+ var types18 = [];
6129
6129
  this.expectOptionalToken(_tokenKind.TokenKind.AMP);
6130
6130
  do {
6131
- types19.push(this.parseNamedType());
6131
+ types18.push(this.parseNamedType());
6132
6132
  } while (this.expectOptionalToken(_tokenKind.TokenKind.AMP) || this.peek(_tokenKind.TokenKind.NAME));
6133
- return types19;
6133
+ return types18;
6134
6134
  }
6135
6135
  return this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType);
6136
6136
  };
@@ -6209,13 +6209,13 @@ var require_parser = __commonJS({
6209
6209
  this.expectKeyword("union");
6210
6210
  var name = this.parseName();
6211
6211
  var directives = this.parseDirectives(true);
6212
- var types19 = this.parseUnionMemberTypes();
6212
+ var types18 = this.parseUnionMemberTypes();
6213
6213
  return {
6214
6214
  kind: _kinds.Kind.UNION_TYPE_DEFINITION,
6215
6215
  description,
6216
6216
  name,
6217
6217
  directives,
6218
- types: types19,
6218
+ types: types18,
6219
6219
  loc: this.loc(start)
6220
6220
  };
6221
6221
  };
@@ -6373,15 +6373,15 @@ var require_parser = __commonJS({
6373
6373
  this.expectKeyword("union");
6374
6374
  var name = this.parseName();
6375
6375
  var directives = this.parseDirectives(true);
6376
- var types19 = this.parseUnionMemberTypes();
6377
- if (directives.length === 0 && types19.length === 0) {
6376
+ var types18 = this.parseUnionMemberTypes();
6377
+ if (directives.length === 0 && types18.length === 0) {
6378
6378
  throw this.unexpected();
6379
6379
  }
6380
6380
  return {
6381
6381
  kind: _kinds.Kind.UNION_TYPE_EXTENSION,
6382
6382
  name,
6383
6383
  directives,
6384
- types: types19,
6384
+ types: types18,
6385
6385
  loc: this.loc(start)
6386
6386
  };
6387
6387
  };
@@ -7359,8 +7359,8 @@ var require_printer = __commonJS({
7359
7359
  return join3(["interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ");
7360
7360
  }),
7361
7361
  UnionTypeDefinition: addDescription2(function(_ref27) {
7362
- var name = _ref27.name, directives = _ref27.directives, types19 = _ref27.types;
7363
- return join3(["union", name, join3(directives, " "), types19 && types19.length !== 0 ? "= " + join3(types19, " | ") : ""], " ");
7362
+ var name = _ref27.name, directives = _ref27.directives, types18 = _ref27.types;
7363
+ return join3(["union", name, join3(directives, " "), types18 && types18.length !== 0 ? "= " + join3(types18, " | ") : ""], " ");
7364
7364
  }),
7365
7365
  EnumTypeDefinition: addDescription2(function(_ref28) {
7366
7366
  var name = _ref28.name, directives = _ref28.directives, values = _ref28.values;
@@ -7395,8 +7395,8 @@ var require_printer = __commonJS({
7395
7395
  return join3(["extend interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ");
7396
7396
  },
7397
7397
  UnionTypeExtension: function UnionTypeExtension(_ref36) {
7398
- var name = _ref36.name, directives = _ref36.directives, types19 = _ref36.types;
7399
- return join3(["extend union", name, join3(directives, " "), types19 && types19.length !== 0 ? "= " + join3(types19, " | ") : ""], " ");
7398
+ var name = _ref36.name, directives = _ref36.directives, types18 = _ref36.types;
7399
+ return join3(["extend union", name, join3(directives, " "), types18 && types18.length !== 0 ? "= " + join3(types18, " | ") : ""], " ");
7400
7400
  },
7401
7401
  EnumTypeExtension: function EnumTypeExtension(_ref37) {
7402
7402
  var name = _ref37.name, directives = _ref37.directives, values = _ref37.values;
@@ -8067,9 +8067,9 @@ var require_definition = __commonJS({
8067
8067
  exports.GraphQLUnionType = GraphQLUnionType3;
8068
8068
  (0, _defineInspect.default)(GraphQLUnionType3);
8069
8069
  function defineTypes(config4) {
8070
- var types19 = resolveThunk(config4.types);
8071
- Array.isArray(types19) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config4.name, "."));
8072
- return types19;
8070
+ var types18 = resolveThunk(config4.types);
8071
+ Array.isArray(types18) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config4.name, "."));
8072
+ return types18;
8073
8073
  }
8074
8074
  var GraphQLEnumType4 = /* @__PURE__ */ function() {
8075
8075
  function GraphQLEnumType5(config4) {
@@ -15706,7 +15706,7 @@ var require_buildClientSchema = __commonJS({
15706
15706
  return new _definition.GraphQLUnionType({
15707
15707
  name: unionIntrospection.name,
15708
15708
  description: unionIntrospection.description,
15709
- types: function types19() {
15709
+ types: function types18() {
15710
15710
  return unionIntrospection.possibleTypes.map(getObjectType);
15711
15711
  }
15712
15712
  });
@@ -16051,7 +16051,7 @@ var require_extendSchema = __commonJS({
16051
16051
  var config4 = type.toConfig();
16052
16052
  var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config4.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
16053
16053
  return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config4), {}, {
16054
- types: function types19() {
16054
+ types: function types18() {
16055
16055
  return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
16056
16056
  },
16057
16057
  extensionASTNodes: config4.extensionASTNodes.concat(extensions)
@@ -16199,17 +16199,17 @@ var require_extendSchema = __commonJS({
16199
16199
  return interfaces;
16200
16200
  }
16201
16201
  function buildUnionTypes(nodes) {
16202
- var types19 = [];
16202
+ var types18 = [];
16203
16203
  for (var _i32 = 0; _i32 < nodes.length; _i32++) {
16204
16204
  var _node$types;
16205
16205
  var node = nodes[_i32];
16206
16206
  var typeNodes = (_node$types = node.types) !== null && _node$types !== void 0 ? _node$types : [];
16207
16207
  for (var _i34 = 0; _i34 < typeNodes.length; _i34++) {
16208
16208
  var type = typeNodes[_i34];
16209
- types19.push(getNamedType5(type));
16209
+ types18.push(getNamedType5(type));
16210
16210
  }
16211
16211
  }
16212
- return types19;
16212
+ return types18;
16213
16213
  }
16214
16214
  function buildType(astNode) {
16215
16215
  var _typeExtensionsMap$na;
@@ -16266,7 +16266,7 @@ var require_extendSchema = __commonJS({
16266
16266
  return new _definition.GraphQLUnionType({
16267
16267
  name: name2,
16268
16268
  description,
16269
- types: function types19() {
16269
+ types: function types18() {
16270
16270
  return buildUnionTypes(_allNodes3);
16271
16271
  },
16272
16272
  astNode,
@@ -16564,7 +16564,7 @@ var require_lexicographicSortSchema = __commonJS({
16564
16564
  if ((0, _definition.isUnionType)(type)) {
16565
16565
  var _config22 = type.toConfig();
16566
16566
  return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, _config22), {}, {
16567
- types: function types19() {
16567
+ types: function types18() {
16568
16568
  return sortTypes(_config22.types);
16569
16569
  }
16570
16570
  }));
@@ -16649,10 +16649,10 @@ var require_printSchema = __commonJS({
16649
16649
  }
16650
16650
  function printFilteredSchema(schema, directiveFilter, typeFilter, options) {
16651
16651
  var directives = schema.getDirectives().filter(directiveFilter);
16652
- var types19 = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter);
16652
+ var types18 = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter);
16653
16653
  return [printSchemaDefinition(schema)].concat(directives.map(function(directive) {
16654
16654
  return printDirective(directive, options);
16655
- }), types19.map(function(type) {
16655
+ }), types18.map(function(type) {
16656
16656
  return printType(type, options);
16657
16657
  })).filter(Boolean).join("\n\n") + "\n";
16658
16658
  }
@@ -16727,8 +16727,8 @@ var require_printSchema = __commonJS({
16727
16727
  return printDescription(options, type) + "interface ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);
16728
16728
  }
16729
16729
  function printUnion(type, options) {
16730
- var types19 = type.getTypes();
16731
- var possibleTypes = types19.length ? " = " + types19.join(" | ") : "";
16730
+ var types18 = type.getTypes();
16731
+ var possibleTypes = types18.length ? " = " + types18.join(" | ") : "";
16732
16732
  return printDescription(options, type) + "union " + type.name + possibleTypes;
16733
16733
  }
16734
16734
  function printEnum(type, options) {
@@ -31644,14 +31644,14 @@ var require_lib3 = __commonJS({
31644
31644
  this.preserveSpace = !!preserveSpace;
31645
31645
  }
31646
31646
  };
31647
- var types19 = {
31647
+ var types18 = {
31648
31648
  brace: new TokContext("{"),
31649
31649
  j_oTag: new TokContext("<tag"),
31650
31650
  j_cTag: new TokContext("</tag"),
31651
31651
  j_expr: new TokContext("<tag>...</tag>", true)
31652
31652
  };
31653
31653
  {
31654
- types19.template = new TokContext("`", true);
31654
+ types18.template = new TokContext("`", true);
31655
31655
  }
31656
31656
  var beforeExpr = true;
31657
31657
  var startsExpr = true;
@@ -32183,17 +32183,17 @@ var require_lib3 = __commonJS({
32183
32183
  context.pop();
32184
32184
  };
32185
32185
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
32186
- context.push(types19.brace);
32186
+ context.push(types18.brace);
32187
32187
  };
32188
32188
  tokenTypes[22].updateContext = (context) => {
32189
- if (context[context.length - 1] === types19.template) {
32189
+ if (context[context.length - 1] === types18.template) {
32190
32190
  context.pop();
32191
32191
  } else {
32192
- context.push(types19.template);
32192
+ context.push(types18.template);
32193
32193
  }
32194
32194
  };
32195
32195
  tokenTypes[140].updateContext = (context) => {
32196
- context.push(types19.j_expr, types19.j_oTag);
32196
+ context.push(types18.j_expr, types18.j_oTag);
32197
32197
  };
32198
32198
  }
32199
32199
  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";
@@ -32834,7 +32834,7 @@ var require_lib3 = __commonJS({
32834
32834
  this.lastTokEndLoc = null;
32835
32835
  this.lastTokStartLoc = null;
32836
32836
  this.lastTokStart = 0;
32837
- this.context = [types19.brace];
32837
+ this.context = [types18.brace];
32838
32838
  this.canStartJSXElement = true;
32839
32839
  this.containsEsc = false;
32840
32840
  this.firstInvalidTemplateEscapePos = null;
@@ -36758,7 +36758,7 @@ var require_lib3 = __commonJS({
36758
36758
  context
36759
36759
  } = this.state;
36760
36760
  const currentContext = context[context.length - 1];
36761
- if (currentContext === types19.j_oTag || currentContext === types19.j_expr) {
36761
+ if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
36762
36762
  context.pop();
36763
36763
  }
36764
36764
  }
@@ -37818,9 +37818,9 @@ var require_lib3 = __commonJS({
37818
37818
  switch (this.state.type) {
37819
37819
  case 5:
37820
37820
  node = this.startNode();
37821
- this.setContext(types19.brace);
37821
+ this.setContext(types18.brace);
37822
37822
  this.next();
37823
- node = this.jsxParseExpressionContainer(node, types19.j_oTag);
37823
+ node = this.jsxParseExpressionContainer(node, types18.j_oTag);
37824
37824
  if (node.expression.type === "JSXEmptyExpression") {
37825
37825
  this.raise(JsxErrors.AttributeIsEmpty, {
37826
37826
  at: node
@@ -37843,7 +37843,7 @@ var require_lib3 = __commonJS({
37843
37843
  jsxParseSpreadChild(node) {
37844
37844
  this.next();
37845
37845
  node.expression = this.parseExpression();
37846
- this.setContext(types19.j_expr);
37846
+ this.setContext(types18.j_expr);
37847
37847
  this.state.canStartJSXElement = true;
37848
37848
  this.expect(8);
37849
37849
  return this.finishNode(node, "JSXSpreadChild");
@@ -37863,11 +37863,11 @@ var require_lib3 = __commonJS({
37863
37863
  jsxParseAttribute() {
37864
37864
  const node = this.startNode();
37865
37865
  if (this.match(5)) {
37866
- this.setContext(types19.brace);
37866
+ this.setContext(types18.brace);
37867
37867
  this.next();
37868
37868
  this.expect(21);
37869
37869
  node.argument = this.parseMaybeAssignAllowIn();
37870
- this.setContext(types19.j_oTag);
37870
+ this.setContext(types18.j_oTag);
37871
37871
  this.state.canStartJSXElement = true;
37872
37872
  this.expect(8);
37873
37873
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -37926,12 +37926,12 @@ var require_lib3 = __commonJS({
37926
37926
  break;
37927
37927
  case 5: {
37928
37928
  const node2 = this.startNode();
37929
- this.setContext(types19.brace);
37929
+ this.setContext(types18.brace);
37930
37930
  this.next();
37931
37931
  if (this.match(21)) {
37932
37932
  children.push(this.jsxParseSpreadChild(node2));
37933
37933
  } else {
37934
- children.push(this.jsxParseExpressionContainer(node2, types19.j_expr));
37934
+ children.push(this.jsxParseExpressionContainer(node2, types18.j_expr));
37935
37935
  }
37936
37936
  break;
37937
37937
  }
@@ -38002,10 +38002,10 @@ var require_lib3 = __commonJS({
38002
38002
  }
38003
38003
  getTokenFromCode(code) {
38004
38004
  const context = this.curContext();
38005
- if (context === types19.j_expr) {
38005
+ if (context === types18.j_expr) {
38006
38006
  return this.jsxReadToken();
38007
38007
  }
38008
- if (context === types19.j_oTag || context === types19.j_cTag) {
38008
+ if (context === types18.j_oTag || context === types18.j_cTag) {
38009
38009
  if (isIdentifierStart(code)) {
38010
38010
  return this.jsxReadWord();
38011
38011
  }
@@ -38013,7 +38013,7 @@ var require_lib3 = __commonJS({
38013
38013
  ++this.state.pos;
38014
38014
  return this.finishToken(141);
38015
38015
  }
38016
- if ((code === 34 || code === 39) && context === types19.j_oTag) {
38016
+ if ((code === 34 || code === 39) && context === types18.j_oTag) {
38017
38017
  return this.jsxReadString(code);
38018
38018
  }
38019
38019
  }
@@ -38029,17 +38029,17 @@ var require_lib3 = __commonJS({
38029
38029
  type
38030
38030
  } = this.state;
38031
38031
  if (type === 56 && prevType === 140) {
38032
- context.splice(-2, 2, types19.j_cTag);
38032
+ context.splice(-2, 2, types18.j_cTag);
38033
38033
  this.state.canStartJSXElement = false;
38034
38034
  } else if (type === 140) {
38035
- context.push(types19.j_oTag);
38035
+ context.push(types18.j_oTag);
38036
38036
  } else if (type === 141) {
38037
38037
  const out = context[context.length - 1];
38038
- if (out === types19.j_oTag && prevType === 56 || out === types19.j_cTag) {
38038
+ if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
38039
38039
  context.pop();
38040
- this.state.canStartJSXElement = context[context.length - 1] === types19.j_expr;
38040
+ this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
38041
38041
  } else {
38042
- this.setContext(types19.j_expr);
38042
+ this.setContext(types18.j_expr);
38043
38043
  this.state.canStartJSXElement = true;
38044
38044
  }
38045
38045
  } else {
@@ -39047,14 +39047,14 @@ var require_lib3 = __commonJS({
39047
39047
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
39048
39048
  const node = this.startNode();
39049
39049
  const hasLeadingOperator = this.eat(operator);
39050
- const types20 = [];
39050
+ const types19 = [];
39051
39051
  do {
39052
- types20.push(parseConstituentType());
39052
+ types19.push(parseConstituentType());
39053
39053
  } while (this.eat(operator));
39054
- if (types20.length === 1 && !hasLeadingOperator) {
39055
- return types20[0];
39054
+ if (types19.length === 1 && !hasLeadingOperator) {
39055
+ return types19[0];
39056
39056
  }
39057
- node.types = types20;
39057
+ node.types = types19;
39058
39058
  return this.finishNode(node, kind);
39059
39059
  }
39060
39060
  tsParseIntersectionTypeOrHigher() {
@@ -40283,7 +40283,7 @@ var require_lib3 = __commonJS({
40283
40283
  context
40284
40284
  } = this.state;
40285
40285
  const currentContext = context[context.length - 1];
40286
- if (currentContext === types19.j_oTag || currentContext === types19.j_expr) {
40286
+ if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
40287
40287
  context.pop();
40288
40288
  }
40289
40289
  }
@@ -45922,9 +45922,9 @@ var require_shared = __commonJS({
45922
45922
  var tslib_1 = require_tslib();
45923
45923
  var types_1 = tslib_1.__importDefault(require_types());
45924
45924
  function default_1(fork) {
45925
- var types19 = fork.use(types_1.default);
45926
- var Type = types19.Type;
45927
- var builtin = types19.builtInTypes;
45925
+ var types18 = fork.use(types_1.default);
45926
+ var Type = types18.Type;
45927
+ var builtin = types18.builtInTypes;
45928
45928
  var isNumber = builtin.number;
45929
45929
  function geq(than) {
45930
45930
  return Type.from(function(value) {
@@ -46074,9 +46074,9 @@ var require_types = __commonJS({
46074
46074
  }(BaseType);
46075
46075
  var OrType = function(_super) {
46076
46076
  tslib_1.__extends(OrType2, _super);
46077
- function OrType2(types19) {
46077
+ function OrType2(types18) {
46078
46078
  var _this = _super.call(this) || this;
46079
- _this.types = types19;
46079
+ _this.types = types18;
46080
46080
  _this.kind = "OrType";
46081
46081
  return _this;
46082
46082
  }
@@ -46217,11 +46217,11 @@ var require_types = __commonJS({
46217
46217
  function typesPlugin(_fork) {
46218
46218
  var Type = {
46219
46219
  or: function() {
46220
- var types19 = [];
46220
+ var types18 = [];
46221
46221
  for (var _i = 0; _i < arguments.length; _i++) {
46222
- types19[_i] = arguments[_i];
46222
+ types18[_i] = arguments[_i];
46223
46223
  }
46224
- return new OrType(types19.map(function(type) {
46224
+ return new OrType(types18.map(function(type) {
46225
46225
  return Type.from(type);
46226
46226
  }));
46227
46227
  },
@@ -46666,9 +46666,9 @@ var require_path2 = __commonJS({
46666
46666
  var Op = Object.prototype;
46667
46667
  var hasOwn = Op.hasOwnProperty;
46668
46668
  function pathPlugin(fork) {
46669
- var types19 = fork.use(types_1.default);
46670
- var isArray = types19.builtInTypes.array;
46671
- var isNumber = types19.builtInTypes.number;
46669
+ var types18 = fork.use(types_1.default);
46670
+ var isArray = types18.builtInTypes.array;
46671
+ var isNumber = types18.builtInTypes.number;
46672
46672
  var Path = function Path2(value, parentPath, name) {
46673
46673
  if (!(this instanceof Path2)) {
46674
46674
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -46970,13 +46970,13 @@ var require_scope = __commonJS({
46970
46970
  var types_1 = tslib_1.__importDefault(require_types());
46971
46971
  var hasOwn = Object.prototype.hasOwnProperty;
46972
46972
  function scopePlugin(fork) {
46973
- var types19 = fork.use(types_1.default);
46974
- var Type = types19.Type;
46975
- var namedTypes = types19.namedTypes;
46973
+ var types18 = fork.use(types_1.default);
46974
+ var Type = types18.Type;
46975
+ var namedTypes = types18.namedTypes;
46976
46976
  var Node = namedTypes.Node;
46977
46977
  var Expression = namedTypes.Expression;
46978
- var isArray = types19.builtInTypes.array;
46979
- var b = types19.builders;
46978
+ var isArray = types18.builtInTypes.array;
46979
+ var b = types18.builders;
46980
46980
  var Scope = function Scope2(path2, parentScope) {
46981
46981
  if (!(this instanceof Scope2)) {
46982
46982
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -47039,7 +47039,7 @@ var require_scope = __commonJS({
47039
47039
  ++index;
47040
47040
  }
47041
47041
  var name = prefix + index;
47042
- return this.bindings[name] = types19.builders.identifier(name);
47042
+ return this.bindings[name] = types18.builders.identifier(name);
47043
47043
  };
47044
47044
  Sp.injectTemporary = function(identifier, init) {
47045
47045
  identifier || (identifier = this.declareTemporary());
@@ -47115,7 +47115,7 @@ var require_scope = __commonJS({
47115
47115
  bindings
47116
47116
  );
47117
47117
  } else if (Node.check(node) && !Expression.check(node)) {
47118
- types19.eachField(node, function(name, child) {
47118
+ types18.eachField(node, function(name, child) {
47119
47119
  var childPath = path2.get(name);
47120
47120
  if (!pathHasValue(childPath, child)) {
47121
47121
  throw new Error("");
@@ -47193,24 +47193,24 @@ var require_scope = __commonJS({
47193
47193
  addPattern(patternPath.get("argument"), bindings);
47194
47194
  }
47195
47195
  }
47196
- function addTypePattern(patternPath, types20) {
47196
+ function addTypePattern(patternPath, types19) {
47197
47197
  var pattern = patternPath.value;
47198
47198
  namedTypes.Pattern.assert(pattern);
47199
47199
  if (namedTypes.Identifier.check(pattern)) {
47200
- if (hasOwn.call(types20, pattern.name)) {
47201
- types20[pattern.name].push(patternPath);
47200
+ if (hasOwn.call(types19, pattern.name)) {
47201
+ types19[pattern.name].push(patternPath);
47202
47202
  } else {
47203
- types20[pattern.name] = [patternPath];
47203
+ types19[pattern.name] = [patternPath];
47204
47204
  }
47205
47205
  }
47206
47206
  }
47207
- function addTypeParameter(parameterPath, types20) {
47207
+ function addTypeParameter(parameterPath, types19) {
47208
47208
  var parameter = parameterPath.value;
47209
47209
  FlowOrTSTypeParameterType.assert(parameter);
47210
- if (hasOwn.call(types20, parameter.name)) {
47211
- types20[parameter.name].push(parameterPath);
47210
+ if (hasOwn.call(types19, parameter.name)) {
47211
+ types19[parameter.name].push(parameterPath);
47212
47212
  } else {
47213
- types20[parameter.name] = [parameterPath];
47213
+ types19[parameter.name] = [parameterPath];
47214
47214
  }
47215
47215
  }
47216
47216
  Sp.lookup = function(name) {
@@ -47251,11 +47251,11 @@ var require_node_path = __commonJS({
47251
47251
  var scope_1 = tslib_1.__importDefault(require_scope());
47252
47252
  var shared_1 = require_shared();
47253
47253
  function nodePathPlugin(fork) {
47254
- var types19 = fork.use(types_1.default);
47255
- var n = types19.namedTypes;
47256
- var b = types19.builders;
47257
- var isNumber = types19.builtInTypes.number;
47258
- var isArray = types19.builtInTypes.array;
47254
+ var types18 = fork.use(types_1.default);
47255
+ var n = types18.namedTypes;
47256
+ var b = types18.builders;
47257
+ var isNumber = types18.builtInTypes.number;
47258
+ var isArray = types18.builtInTypes.array;
47259
47259
  var Path = fork.use(path_1.default);
47260
47260
  var Scope = fork.use(scope_1.default);
47261
47261
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -47346,7 +47346,7 @@ var require_node_path = __commonJS({
47346
47346
  return scope || null;
47347
47347
  };
47348
47348
  NPp.getValueProperty = function(name) {
47349
- return types19.getFieldValue(this.value, name);
47349
+ return types18.getFieldValue(this.value, name);
47350
47350
  };
47351
47351
  NPp.needsParens = function(assumeExpressionContext) {
47352
47352
  var pp = this.parentPath;
@@ -47488,7 +47488,7 @@ var require_node_path = __commonJS({
47488
47488
  return node.some(containsCallExpression);
47489
47489
  }
47490
47490
  if (n.Node.check(node)) {
47491
- return types19.someField(node, function(_name, child) {
47491
+ return types18.someField(node, function(_name, child) {
47492
47492
  return containsCallExpression(child);
47493
47493
  });
47494
47494
  }
@@ -47609,11 +47609,11 @@ var require_path_visitor = __commonJS({
47609
47609
  var shared_1 = require_shared();
47610
47610
  var hasOwn = Object.prototype.hasOwnProperty;
47611
47611
  function pathVisitorPlugin(fork) {
47612
- var types19 = fork.use(types_1.default);
47612
+ var types18 = fork.use(types_1.default);
47613
47613
  var NodePath = fork.use(node_path_1.default);
47614
- var isArray = types19.builtInTypes.array;
47615
- var isObject2 = types19.builtInTypes.object;
47616
- var isFunction = types19.builtInTypes.function;
47614
+ var isArray = types18.builtInTypes.array;
47615
+ var isObject2 = types18.builtInTypes.object;
47616
+ var isFunction = types18.builtInTypes.function;
47617
47617
  var undefined2;
47618
47618
  var PathVisitor = function PathVisitor2() {
47619
47619
  if (!(this instanceof PathVisitor2)) {
@@ -47633,7 +47633,7 @@ var require_path_visitor = __commonJS({
47633
47633
  typeNames[methodName.slice("visit".length)] = true;
47634
47634
  }
47635
47635
  }
47636
- var supertypeTable = types19.computeSupertypeLookupTable(typeNames);
47636
+ var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
47637
47637
  var methodNameTable = /* @__PURE__ */ Object.create(null);
47638
47638
  var typeNameKeys = Object.keys(supertypeTable);
47639
47639
  var typeNameCount = typeNameKeys.length;
@@ -47752,7 +47752,7 @@ var require_path_visitor = __commonJS({
47752
47752
  path2.each(visitor.visitWithoutReset, visitor);
47753
47753
  } else if (!isObject2.check(value)) {
47754
47754
  } else {
47755
- var childNames = types19.getFieldNames(value);
47755
+ var childNames = types18.getFieldNames(value);
47756
47756
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
47757
47757
  childNames.push("comments");
47758
47758
  }
@@ -47761,7 +47761,7 @@ var require_path_visitor = __commonJS({
47761
47761
  for (var i2 = 0; i2 < childCount; ++i2) {
47762
47762
  var childName = childNames[i2];
47763
47763
  if (!hasOwn.call(value, childName)) {
47764
- value[childName] = types19.getFieldValue(value, childName);
47764
+ value[childName] = types18.getFieldValue(value, childName);
47765
47765
  }
47766
47766
  childPaths.push(path2.get(childName));
47767
47767
  }
@@ -47904,13 +47904,13 @@ var require_equiv = __commonJS({
47904
47904
  var shared_1 = require_shared();
47905
47905
  var types_1 = tslib_1.__importDefault(require_types());
47906
47906
  function default_1(fork) {
47907
- var types19 = fork.use(types_1.default);
47908
- var getFieldNames = types19.getFieldNames;
47909
- var getFieldValue = types19.getFieldValue;
47910
- var isArray = types19.builtInTypes.array;
47911
- var isObject2 = types19.builtInTypes.object;
47912
- var isDate = types19.builtInTypes.Date;
47913
- var isRegExp = types19.builtInTypes.RegExp;
47907
+ var types18 = fork.use(types_1.default);
47908
+ var getFieldNames = types18.getFieldNames;
47909
+ var getFieldValue = types18.getFieldValue;
47910
+ var isArray = types18.builtInTypes.array;
47911
+ var isObject2 = types18.builtInTypes.object;
47912
+ var isDate = types18.builtInTypes.Date;
47913
+ var isRegExp = types18.builtInTypes.RegExp;
47914
47914
  var hasOwn = Object.prototype.hasOwnProperty;
47915
47915
  function astNodesAreEquivalent(a, b, problemPath) {
47916
47916
  if (isArray.check(problemPath)) {
@@ -48063,24 +48063,24 @@ var require_fork = __commonJS({
48063
48063
  var shared_1 = require_shared();
48064
48064
  function default_1(plugins) {
48065
48065
  var fork = createFork();
48066
- var types19 = fork.use(types_1.default);
48066
+ var types18 = fork.use(types_1.default);
48067
48067
  plugins.forEach(fork.use);
48068
- types19.finalize();
48068
+ types18.finalize();
48069
48069
  var PathVisitor = fork.use(path_visitor_1.default);
48070
48070
  return {
48071
- Type: types19.Type,
48072
- builtInTypes: types19.builtInTypes,
48073
- namedTypes: types19.namedTypes,
48074
- builders: types19.builders,
48075
- defineMethod: types19.defineMethod,
48076
- getFieldNames: types19.getFieldNames,
48077
- getFieldValue: types19.getFieldValue,
48078
- eachField: types19.eachField,
48079
- someField: types19.someField,
48080
- getSupertypeNames: types19.getSupertypeNames,
48081
- getBuilderName: types19.getBuilderName,
48071
+ Type: types18.Type,
48072
+ builtInTypes: types18.builtInTypes,
48073
+ namedTypes: types18.namedTypes,
48074
+ builders: types18.builders,
48075
+ defineMethod: types18.defineMethod,
48076
+ getFieldNames: types18.getFieldNames,
48077
+ getFieldValue: types18.getFieldValue,
48078
+ eachField: types18.eachField,
48079
+ someField: types18.someField,
48080
+ getSupertypeNames: types18.getSupertypeNames,
48081
+ getBuilderName: types18.getBuilderName,
48082
48082
  astNodesAreEquivalent: fork.use(equiv_1.default),
48083
- finalize: types19.finalize,
48083
+ finalize: types18.finalize,
48084
48084
  Path: fork.use(path_1.default),
48085
48085
  NodePath: fork.use(node_path_1.default),
48086
48086
  PathVisitor,
@@ -48250,8 +48250,8 @@ var require_core2 = __commonJS({
48250
48250
  var types_1 = tslib_1.__importDefault(require_types());
48251
48251
  var shared_1 = tslib_1.__importStar(require_shared());
48252
48252
  function default_1(fork) {
48253
- var types19 = fork.use(types_1.default);
48254
- var Type = types19.Type;
48253
+ var types18 = fork.use(types_1.default);
48254
+ var Type = types18.Type;
48255
48255
  var def = Type.def;
48256
48256
  var or = Type.or;
48257
48257
  var shared = fork.use(shared_1.default);
@@ -48343,9 +48343,9 @@ var require_es6 = __commonJS({
48343
48343
  var shared_1 = tslib_1.__importStar(require_shared());
48344
48344
  function default_1(fork) {
48345
48345
  fork.use(core_1.default);
48346
- var types19 = fork.use(types_1.default);
48347
- var def = types19.Type.def;
48348
- var or = types19.Type.or;
48346
+ var types18 = fork.use(types_1.default);
48347
+ var def = types18.Type.def;
48348
+ var or = types18.Type.or;
48349
48349
  var defaults = fork.use(shared_1.default).defaults;
48350
48350
  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"]);
48351
48351
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -48435,8 +48435,8 @@ var require_es2017 = __commonJS({
48435
48435
  var shared_1 = tslib_1.__importStar(require_shared());
48436
48436
  function default_1(fork) {
48437
48437
  fork.use(es2016_1.default);
48438
- var types19 = fork.use(types_1.default);
48439
- var def = types19.Type.def;
48438
+ var types18 = fork.use(types_1.default);
48439
+ var def = types18.Type.def;
48440
48440
  var defaults = fork.use(shared_1.default).defaults;
48441
48441
  def("Function").field("async", Boolean, defaults["false"]);
48442
48442
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -48459,9 +48459,9 @@ var require_es2018 = __commonJS({
48459
48459
  var shared_1 = tslib_1.__importStar(require_shared());
48460
48460
  function default_1(fork) {
48461
48461
  fork.use(es2017_1.default);
48462
- var types19 = fork.use(types_1.default);
48463
- var def = types19.Type.def;
48464
- var or = types19.Type.or;
48462
+ var types18 = fork.use(types_1.default);
48463
+ var def = types18.Type.def;
48464
+ var or = types18.Type.or;
48465
48465
  var defaults = fork.use(shared_1.default).defaults;
48466
48466
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
48467
48467
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -48492,9 +48492,9 @@ var require_es2019 = __commonJS({
48492
48492
  var shared_1 = tslib_1.__importStar(require_shared());
48493
48493
  function default_1(fork) {
48494
48494
  fork.use(es2018_1.default);
48495
- var types19 = fork.use(types_1.default);
48496
- var def = types19.Type.def;
48497
- var or = types19.Type.or;
48495
+ var types18 = fork.use(types_1.default);
48496
+ var def = types18.Type.def;
48497
+ var or = types18.Type.or;
48498
48498
  var defaults = fork.use(shared_1.default).defaults;
48499
48499
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
48500
48500
  }
@@ -48518,9 +48518,9 @@ var require_es20202 = __commonJS({
48518
48518
  function default_1(fork) {
48519
48519
  fork.use(es2020_1.default);
48520
48520
  fork.use(es2019_1.default);
48521
- var types19 = fork.use(types_1.default);
48522
- var def = types19.Type.def;
48523
- var or = types19.Type.or;
48521
+ var types18 = fork.use(types_1.default);
48522
+ var def = types18.Type.def;
48523
+ var or = types18.Type.or;
48524
48524
  var shared = fork.use(shared_1.default);
48525
48525
  var defaults = shared.defaults;
48526
48526
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -48570,8 +48570,8 @@ var require_es2022 = __commonJS({
48570
48570
  var shared_1 = require_shared();
48571
48571
  function default_1(fork) {
48572
48572
  fork.use(es2021_1.default);
48573
- var types19 = fork.use(types_1.default);
48574
- var def = types19.Type.def;
48573
+ var types18 = fork.use(types_1.default);
48574
+ var def = types18.Type.def;
48575
48575
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
48576
48576
  }
48577
48577
  exports.default = default_1;
@@ -48592,9 +48592,9 @@ var require_es_proposals = __commonJS({
48592
48592
  var es2022_1 = tslib_1.__importDefault(require_es2022());
48593
48593
  function default_1(fork) {
48594
48594
  fork.use(es2022_1.default);
48595
- var types19 = fork.use(types_1.default);
48596
- var Type = types19.Type;
48597
- var def = types19.Type.def;
48595
+ var types18 = fork.use(types_1.default);
48596
+ var Type = types18.Type;
48597
+ var def = types18.Type.def;
48598
48598
  var or = Type.or;
48599
48599
  var shared = fork.use(shared_1.default);
48600
48600
  var defaults = shared.defaults;
@@ -48634,9 +48634,9 @@ var require_jsx = __commonJS({
48634
48634
  var shared_1 = tslib_1.__importStar(require_shared());
48635
48635
  function default_1(fork) {
48636
48636
  fork.use(es_proposals_1.default);
48637
- var types19 = fork.use(types_1.default);
48638
- var def = types19.Type.def;
48639
- var or = types19.Type.or;
48637
+ var types18 = fork.use(types_1.default);
48638
+ var def = types18.Type.def;
48639
+ var or = types18.Type.or;
48640
48640
  var defaults = fork.use(shared_1.default).defaults;
48641
48641
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
48642
48642
  def("Literal"),
@@ -48694,9 +48694,9 @@ var require_type_annotations = __commonJS({
48694
48694
  var types_1 = tslib_1.__importDefault(require_types());
48695
48695
  var shared_1 = tslib_1.__importStar(require_shared());
48696
48696
  function default_1(fork) {
48697
- var types19 = fork.use(types_1.default);
48698
- var def = types19.Type.def;
48699
- var or = types19.Type.or;
48697
+ var types18 = fork.use(types_1.default);
48698
+ var def = types18.Type.def;
48699
+ var or = types18.Type.or;
48700
48700
  var defaults = fork.use(shared_1.default).defaults;
48701
48701
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
48702
48702
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -48731,9 +48731,9 @@ var require_flow = __commonJS({
48731
48731
  function default_1(fork) {
48732
48732
  fork.use(es_proposals_1.default);
48733
48733
  fork.use(type_annotations_1.default);
48734
- var types19 = fork.use(types_1.default);
48735
- var def = types19.Type.def;
48736
- var or = types19.Type.or;
48734
+ var types18 = fork.use(types_1.default);
48735
+ var def = types18.Type.def;
48736
+ var or = types18.Type.or;
48737
48737
  var defaults = fork.use(shared_1.default).defaults;
48738
48738
  def("Flow").bases("Node");
48739
48739
  def("FlowType").bases("Flow");
@@ -48847,10 +48847,10 @@ var require_esprima = __commonJS({
48847
48847
  var shared_1 = tslib_1.__importStar(require_shared());
48848
48848
  function default_1(fork) {
48849
48849
  fork.use(es_proposals_1.default);
48850
- var types19 = fork.use(types_1.default);
48850
+ var types18 = fork.use(types_1.default);
48851
48851
  var defaults = fork.use(shared_1.default).defaults;
48852
- var def = types19.Type.def;
48853
- var or = types19.Type.or;
48852
+ var def = types18.Type.def;
48853
+ var or = types18.Type.or;
48854
48854
  def("VariableDeclaration").field("declarations", [or(
48855
48855
  def("VariableDeclarator"),
48856
48856
  def("Identifier")
@@ -48895,11 +48895,11 @@ var require_babel_core = __commonJS({
48895
48895
  function default_1(fork) {
48896
48896
  var _a, _b, _c, _d, _e;
48897
48897
  fork.use(es_proposals_1.default);
48898
- var types19 = fork.use(types_1.default);
48898
+ var types18 = fork.use(types_1.default);
48899
48899
  var defaults = fork.use(shared_1.default).defaults;
48900
- var def = types19.Type.def;
48901
- var or = types19.Type.or;
48902
- var isUndefined = types19.builtInTypes.undefined;
48900
+ var def = types18.Type.def;
48901
+ var or = types18.Type.or;
48902
+ var isUndefined = types18.builtInTypes.undefined;
48903
48903
  def("Noop").bases("Statement").build();
48904
48904
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
48905
48905
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -48924,7 +48924,7 @@ var require_babel_core = __commonJS({
48924
48924
  raw: String
48925
48925
  },
48926
48926
  function getDefault() {
48927
- var value = types19.getFieldValue(this, "value");
48927
+ var value = types18.getFieldValue(this, "value");
48928
48928
  return {
48929
48929
  rawValue: value,
48930
48930
  raw: toRaw ? toRaw(value) : String(value)
@@ -49027,8 +49027,8 @@ var require_babel = __commonJS({
49027
49027
  var flow_1 = tslib_1.__importDefault(require_flow());
49028
49028
  var shared_1 = require_shared();
49029
49029
  function default_1(fork) {
49030
- var types19 = fork.use(types_1.default);
49031
- var def = types19.Type.def;
49030
+ var types18 = fork.use(types_1.default);
49031
+ var def = types18.Type.def;
49032
49032
  fork.use(babel_core_1.default);
49033
49033
  fork.use(flow_1.default);
49034
49034
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -49054,12 +49054,12 @@ var require_typescript = __commonJS({
49054
49054
  function default_1(fork) {
49055
49055
  fork.use(babel_core_1.default);
49056
49056
  fork.use(type_annotations_1.default);
49057
- var types19 = fork.use(types_1.default);
49058
- var n = types19.namedTypes;
49059
- var def = types19.Type.def;
49060
- var or = types19.Type.or;
49057
+ var types18 = fork.use(types_1.default);
49058
+ var n = types18.namedTypes;
49059
+ var def = types18.Type.def;
49060
+ var or = types18.Type.or;
49061
49061
  var defaults = fork.use(shared_1.default).defaults;
49062
- var StringLiteral = types19.Type.from(function(value, deep) {
49062
+ var StringLiteral = types18.Type.from(function(value, deep) {
49063
49063
  if (n.StringLiteral && n.StringLiteral.check(value, deep)) {
49064
49064
  return true;
49065
49065
  }
@@ -51035,8 +51035,8 @@ var require_util2 = __commonJS({
51035
51035
  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;
51036
51036
  var tslib_1 = require_tslib();
51037
51037
  var assert_1 = tslib_1.__importDefault(__require("assert"));
51038
- var types19 = tslib_1.__importStar(require_main());
51039
- var n = types19.namedTypes;
51038
+ var types18 = tslib_1.__importStar(require_main());
51039
+ var n = types18.namedTypes;
51040
51040
  var source_map_1 = tslib_1.__importDefault(require_source_map());
51041
51041
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
51042
51042
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -58354,10 +58354,10 @@ var require_comments = __commonJS({
58354
58354
  exports.printComments = exports.attach = void 0;
58355
58355
  var tslib_1 = require_tslib();
58356
58356
  var assert_1 = tslib_1.__importDefault(__require("assert"));
58357
- var types19 = tslib_1.__importStar(require_main());
58358
- var n = types19.namedTypes;
58359
- var isArray = types19.builtInTypes.array;
58360
- var isObject2 = types19.builtInTypes.object;
58357
+ var types18 = tslib_1.__importStar(require_main());
58358
+ var n = types18.namedTypes;
58359
+ var isArray = types18.builtInTypes.array;
58360
+ var isObject2 = types18.builtInTypes.object;
58361
58361
  var lines_1 = require_lines();
58362
58362
  var util_1 = require_util2();
58363
58363
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -58388,7 +58388,7 @@ var require_comments = __commonJS({
58388
58388
  if (isArray.check(node)) {
58389
58389
  names = Object.keys(node);
58390
58390
  } else if (isObject2.check(node)) {
58391
- names = types19.getFieldNames(node);
58391
+ names = types18.getFieldNames(node);
58392
58392
  } else {
58393
58393
  return resultArray;
58394
58394
  }
@@ -58566,7 +58566,7 @@ var require_comments = __commonJS({
58566
58566
  function printComments(path2, print9) {
58567
58567
  var value = path2.getValue();
58568
58568
  var innerLines = print9(path2);
58569
- var comments = n.Node.check(value) && types19.getFieldValue(value, "comments");
58569
+ var comments = n.Node.check(value) && types18.getFieldValue(value, "comments");
58570
58570
  if (!comments || comments.length === 0) {
58571
58571
  return innerLines;
58572
58572
  }
@@ -58574,8 +58574,8 @@ var require_comments = __commonJS({
58574
58574
  var trailingParts = [innerLines];
58575
58575
  path2.each(function(commentPath) {
58576
58576
  var comment = commentPath.getValue();
58577
- var leading = types19.getFieldValue(comment, "leading");
58578
- var trailing = types19.getFieldValue(comment, "trailing");
58577
+ var leading = types18.getFieldValue(comment, "leading");
58578
+ var trailing = types18.getFieldValue(comment, "trailing");
58579
58579
  if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
58580
58580
  leadingParts.push(printLeadingComment(commentPath, print9));
58581
58581
  } else if (trailing) {
@@ -58597,10 +58597,10 @@ var require_parser2 = __commonJS({
58597
58597
  exports.parse = void 0;
58598
58598
  var tslib_1 = require_tslib();
58599
58599
  var assert_1 = tslib_1.__importDefault(__require("assert"));
58600
- var types19 = tslib_1.__importStar(require_main());
58601
- var b = types19.builders;
58602
- var isObject2 = types19.builtInTypes.object;
58603
- var isArray = types19.builtInTypes.array;
58600
+ var types18 = tslib_1.__importStar(require_main());
58601
+ var b = types18.builders;
58602
+ var isObject2 = types18.builtInTypes.object;
58603
+ var isArray = types18.builtInTypes.array;
58604
58604
  var options_1 = require_options();
58605
58605
  var lines_1 = require_lines();
58606
58606
  var comments_1 = require_comments();
@@ -58786,11 +58786,11 @@ var require_fast_path = __commonJS({
58786
58786
  Object.defineProperty(exports, "__esModule", { value: true });
58787
58787
  var tslib_1 = require_tslib();
58788
58788
  var assert_1 = tslib_1.__importDefault(__require("assert"));
58789
- var types19 = tslib_1.__importStar(require_main());
58789
+ var types18 = tslib_1.__importStar(require_main());
58790
58790
  var util = tslib_1.__importStar(require_util2());
58791
- var n = types19.namedTypes;
58792
- var isArray = types19.builtInTypes.array;
58793
- var isNumber = types19.builtInTypes.number;
58791
+ var n = types18.namedTypes;
58792
+ var isArray = types18.builtInTypes.array;
58793
+ var isNumber = types18.builtInTypes.number;
58794
58794
  var PRECEDENCE = {};
58795
58795
  [
58796
58796
  ["??"],
@@ -58819,7 +58819,7 @@ var require_fast_path = __commonJS({
58819
58819
  if (obj instanceof FastPath) {
58820
58820
  return obj.copy();
58821
58821
  }
58822
- if (obj instanceof types19.NodePath) {
58822
+ if (obj instanceof types18.NodePath) {
58823
58823
  var copy = Object.create(FastPath.prototype);
58824
58824
  var stack = [obj.value];
58825
58825
  for (var pp = void 0; pp = obj.parentPath; obj = pp)
@@ -59130,7 +59130,7 @@ var require_fast_path = __commonJS({
59130
59130
  return node.some(containsCallExpression);
59131
59131
  }
59132
59132
  if (n.Node.check(node)) {
59133
- return types19.someField(node, function(_name, child) {
59133
+ return types18.someField(node, function(_name, child) {
59134
59134
  return containsCallExpression(child);
59135
59135
  });
59136
59136
  }
@@ -59220,16 +59220,16 @@ var require_patcher = __commonJS({
59220
59220
  var tslib_1 = require_tslib();
59221
59221
  var assert_1 = tslib_1.__importDefault(__require("assert"));
59222
59222
  var linesModule = tslib_1.__importStar(require_lines());
59223
- var types19 = tslib_1.__importStar(require_main());
59224
- var Printable = types19.namedTypes.Printable;
59225
- var Expression = types19.namedTypes.Expression;
59226
- var ReturnStatement = types19.namedTypes.ReturnStatement;
59227
- var SourceLocation = types19.namedTypes.SourceLocation;
59223
+ var types18 = tslib_1.__importStar(require_main());
59224
+ var Printable = types18.namedTypes.Printable;
59225
+ var Expression = types18.namedTypes.Expression;
59226
+ var ReturnStatement = types18.namedTypes.ReturnStatement;
59227
+ var SourceLocation = types18.namedTypes.SourceLocation;
59228
59228
  var util_1 = require_util2();
59229
59229
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
59230
- var isObject2 = types19.builtInTypes.object;
59231
- var isArray = types19.builtInTypes.array;
59232
- var isString = types19.builtInTypes.string;
59230
+ var isObject2 = types18.builtInTypes.object;
59231
+ var isArray = types18.builtInTypes.array;
59232
+ var isString = types18.builtInTypes.string;
59233
59233
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
59234
59234
  var Patcher = function Patcher2(lines) {
59235
59235
  assert_1.default.ok(this instanceof Patcher2);
@@ -59499,8 +59499,8 @@ var require_patcher = __commonJS({
59499
59499
  if (k.charAt(0) === "_") {
59500
59500
  continue;
59501
59501
  }
59502
- newPath.stack.push(k, types19.getFieldValue(newNode, k));
59503
- oldPath.stack.push(k, types19.getFieldValue(oldNode, k));
59502
+ newPath.stack.push(k, types18.getFieldValue(newNode, k));
59503
+ oldPath.stack.push(k, types18.getFieldValue(oldNode, k));
59504
59504
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
59505
59505
  newPath.stack.length -= 2;
59506
59506
  oldPath.stack.length -= 2;
@@ -59524,16 +59524,16 @@ var require_printer2 = __commonJS({
59524
59524
  exports.Printer = void 0;
59525
59525
  var tslib_1 = require_tslib();
59526
59526
  var assert_1 = tslib_1.__importDefault(__require("assert"));
59527
- var types19 = tslib_1.__importStar(require_main());
59527
+ var types18 = tslib_1.__importStar(require_main());
59528
59528
  var comments_1 = require_comments();
59529
59529
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
59530
59530
  var lines_1 = require_lines();
59531
59531
  var options_1 = require_options();
59532
59532
  var patcher_1 = require_patcher();
59533
59533
  var util = tslib_1.__importStar(require_util2());
59534
- var namedTypes = types19.namedTypes;
59535
- var isString = types19.builtInTypes.string;
59536
- var isObject2 = types19.builtInTypes.object;
59534
+ var namedTypes = types18.namedTypes;
59535
+ var isString = types18.builtInTypes.string;
59536
+ var isObject2 = types18.builtInTypes.object;
59537
59537
  var PrintResult = function PrintResult2(code, sourceMap) {
59538
59538
  assert_1.default.ok(this instanceof PrintResult2);
59539
59539
  isString.assert(code);
@@ -59695,7 +59695,7 @@ var require_printer2 = __commonJS({
59695
59695
  case "OptionalMemberExpression": {
59696
59696
  parts.push(path2.call(print9, "object"));
59697
59697
  var property = path2.call(print9, "property");
59698
- var optional = types19.getFieldValue(n, "optional");
59698
+ var optional = types18.getFieldValue(n, "optional");
59699
59699
  if (n.computed) {
59700
59700
  parts.push(optional ? "?.[" : "[", property, "]");
59701
59701
  } else {
@@ -59966,7 +59966,7 @@ var require_printer2 = __commonJS({
59966
59966
  if (n.typeArguments) {
59967
59967
  parts.push(path2.call(print9, "typeArguments"));
59968
59968
  }
59969
- if (types19.getFieldValue(n, "optional")) {
59969
+ if (types18.getFieldValue(n, "optional")) {
59970
59970
  parts.push("?.");
59971
59971
  }
59972
59972
  parts.push(printArgumentsList(path2, options, print9));
@@ -61645,8 +61645,8 @@ var require_printer2 = __commonJS({
61645
61645
  });
61646
61646
  }
61647
61647
  function getPossibleRaw(node) {
61648
- var value = types19.getFieldValue(node, "value");
61649
- var extra = types19.getFieldValue(node, "extra");
61648
+ var value = types18.getFieldValue(node, "value");
61649
+ var extra = types18.getFieldValue(node, "extra");
61650
61650
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
61651
61651
  return extra.raw;
61652
61652
  }
@@ -61694,8 +61694,8 @@ var require_main2 = __commonJS({
61694
61694
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
61695
61695
  var tslib_1 = require_tslib();
61696
61696
  var fs_1 = tslib_1.__importDefault(__require("fs"));
61697
- var types19 = tslib_1.__importStar(require_main());
61698
- exports.types = types19;
61697
+ var types18 = tslib_1.__importStar(require_main());
61698
+ exports.types = types18;
61699
61699
  var parser_1 = require_parser2();
61700
61700
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
61701
61701
  return parser_1.parse;
@@ -62994,7 +62994,7 @@ var printDocASTReducer = {
62994
62994
  leave: ({ name, interfaces, directives, fields }) => join(["interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
62995
62995
  },
62996
62996
  UnionTypeDefinition: {
62997
- leave: ({ name, directives, types: types19 }) => join(["union", name, join(directives, " "), wrap("= ", join(types19, " | "))], " ")
62997
+ leave: ({ name, directives, types: types18 }) => join(["union", name, join(directives, " "), wrap("= ", join(types18, " | "))], " ")
62998
62998
  },
62999
62999
  EnumTypeDefinition: {
63000
63000
  leave: ({ name, directives, values }) => join(["enum", name, join(directives, " "), block(values)], " ")
@@ -63021,7 +63021,7 @@ var printDocASTReducer = {
63021
63021
  leave: ({ name, interfaces, directives, fields }) => join(["extend interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
63022
63022
  },
63023
63023
  UnionTypeExtension: {
63024
- leave: ({ name, directives, types: types19 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types19, " | "))], " ")
63024
+ leave: ({ name, directives, types: types18 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types18, " | "))], " ")
63025
63025
  },
63026
63026
  EnumTypeExtension: {
63027
63027
  leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
@@ -63901,8 +63901,8 @@ function healTypes(originalTypeMap, directives) {
63901
63901
  }
63902
63902
  }
63903
63903
  function healUnderlyingTypes(type) {
63904
- const types19 = type.getTypes();
63905
- types19.push(...types19.splice(0).map((t2) => healType(t2)).filter(Boolean));
63904
+ const types18 = type.getTypes();
63905
+ types18.push(...types18.splice(0).map((t2) => healType(t2)).filter(Boolean));
63906
63906
  }
63907
63907
  function healType(type) {
63908
63908
  if ((0, import_graphql11.isListType)(type)) {
@@ -64686,11 +64686,11 @@ function mergeEnum(e1, e2, config4) {
64686
64686
 
64687
64687
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.8.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
64688
64688
  var import_graphql20 = __toESM(require_graphql2(), 1);
64689
- function isStringTypes(types19) {
64690
- return typeof types19 === "string";
64689
+ function isStringTypes(types18) {
64690
+ return typeof types18 === "string";
64691
64691
  }
64692
- function isSourceTypes(types19) {
64693
- return types19 instanceof import_graphql20.Source;
64692
+ function isSourceTypes(types18) {
64693
+ return types18 instanceof import_graphql20.Source;
64694
64694
  }
64695
64695
  function extractType(type) {
64696
64696
  let visitedType = type;
@@ -67060,6 +67060,9 @@ var GarbageCollector = class {
67060
67060
  constructor(cache) {
67061
67061
  this.cache = cache;
67062
67062
  }
67063
+ reset() {
67064
+ this.lifetimes.clear();
67065
+ }
67063
67066
  resetLifetime(id, field) {
67064
67067
  if (!this.lifetimes.get(id)) {
67065
67068
  this.lifetimes.set(id, /* @__PURE__ */ new Map());
@@ -67179,6 +67182,10 @@ var ListManager = class {
67179
67182
  }
67180
67183
  this.listsByField.get(parentID).delete(field);
67181
67184
  }
67185
+ reset() {
67186
+ this.lists.clear();
67187
+ this.listsByField.clear();
67188
+ }
67182
67189
  };
67183
67190
  var List = class {
67184
67191
  recordID;
@@ -67561,6 +67568,9 @@ var StaleManager = class {
67561
67568
  }
67562
67569
  }
67563
67570
  }
67571
+ reset() {
67572
+ this.fieldsTime.clear();
67573
+ }
67564
67574
  };
67565
67575
 
67566
67576
  // src/runtime/cache/storage.ts
@@ -67741,6 +67751,9 @@ var InMemoryStorage = class {
67741
67751
  layer.fields = fields;
67742
67752
  layer.links = links;
67743
67753
  }
67754
+ reset() {
67755
+ this.data = [];
67756
+ }
67744
67757
  };
67745
67758
  var Layer = class {
67746
67759
  id;
@@ -68186,6 +68199,18 @@ var InMemorySubscriptions = class {
68186
68199
  this.remove(linkedRecordID, linkFields, targets, visited);
68187
68200
  }
68188
68201
  }
68202
+ reset() {
68203
+ const subscribers = Object.entries(this.subscribers).filter(
68204
+ ([id]) => !id.startsWith(rootID)
68205
+ );
68206
+ for (const [id, _fields] of subscribers) {
68207
+ delete this.subscribers[id];
68208
+ }
68209
+ const subscriptionSpecs = subscribers.flatMap(
68210
+ ([_id, fields]) => Object.values(fields).flatMap((field) => field.map(([spec]) => spec))
68211
+ );
68212
+ return subscriptionSpecs;
68213
+ }
68189
68214
  removeSubscribers(id, fieldName, specs) {
68190
68215
  let targets = [];
68191
68216
  for (const spec of specs) {
@@ -68375,6 +68400,14 @@ var Cache = class {
68375
68400
  }
68376
68401
  this.#notifySubscribers(toNotify);
68377
68402
  }
68403
+ reset() {
68404
+ const subSpecs = this._internal_unstable.subscriptions.reset();
68405
+ this._internal_unstable.staleManager.reset();
68406
+ this._internal_unstable.lifetimes.reset();
68407
+ this._internal_unstable.lists.reset();
68408
+ this._internal_unstable.storage.reset();
68409
+ this.#notifySubscribers(subSpecs);
68410
+ }
68378
68411
  #notifySubscribers(subs) {
68379
68412
  if (subs.length === 0) {
68380
68413
  return;
@@ -68557,7 +68590,7 @@ var CacheInternal = class {
68557
68590
  forceNotify
68558
68591
  });
68559
68592
  }
68560
- } else if (Array.isArray(value) && (typeof previousValue === "undefined" || Array.isArray(previousValue))) {
68593
+ } else if (Array.isArray(value) && (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
68561
68594
  let oldIDs = [...previousValue || []];
68562
68595
  const emptyEdges = !updates ? [] : oldIDs.map((id) => {
68563
68596
  if (!id) {
@@ -68630,7 +68663,7 @@ var CacheInternal = class {
68630
68663
  } else {
68631
68664
  linkedIDs = nestedIDs;
68632
68665
  }
68633
- const contentChanged = !deepEquals(linkedIDs, oldIDs);
68666
+ const contentChanged = !deepEquals(linkedIDs, oldIDs) || previousValue === null;
68634
68667
  if (contentChanged || forceNotify) {
68635
68668
  toNotify.push(...currentSubscribers);
68636
68669
  }
@@ -69349,7 +69382,7 @@ var Config = class {
69349
69382
  defaultListTarget = null,
69350
69383
  defaultPaginateMode = PaginateMode.Infinite,
69351
69384
  defaultKeys,
69352
- types: types19 = {},
69385
+ types: types18 = {},
69353
69386
  logLevel,
69354
69387
  defaultFragmentMasking = "enable",
69355
69388
  watchSchema,
@@ -69393,10 +69426,10 @@ var Config = class {
69393
69426
  if (defaultKeys) {
69394
69427
  this.defaultKeys = defaultKeys;
69395
69428
  }
69396
- if (types19) {
69429
+ if (types18) {
69397
69430
  this.typeConfig = {
69398
69431
  ...this.typeConfig,
69399
- ...types19
69432
+ ...types18
69400
69433
  };
69401
69434
  }
69402
69435
  }
@@ -70537,7 +70570,7 @@ async function find_graphql(config4, parsedScript, walker) {
70537
70570
 
70538
70571
  // src/codegen/generators/artifacts/index.ts
70539
70572
  var graphql14 = __toESM(require_graphql2(), 1);
70540
- var recast6 = __toESM(require_main2(), 1);
70573
+ var recast5 = __toESM(require_main2(), 1);
70541
70574
 
70542
70575
  // src/codegen/utils/commonjs.ts
70543
70576
  var cjsIndexFilePreamble = `"use strict";
@@ -71724,7 +71757,6 @@ function ancestorKey(ancestors) {
71724
71757
 
71725
71758
  // src/codegen/generators/artifacts/selection.ts
71726
71759
  var graphql13 = __toESM(require_graphql2(), 1);
71727
- var recast5 = __toESM(require_main2(), 1);
71728
71760
 
71729
71761
  // ../../node_modules/.pnpm/@kitql+helper@0.5.0/node_modules/@kitql/helper/index.mjs
71730
71762
  var config2 = {
@@ -72677,15 +72709,12 @@ function fieldKey(config4, field) {
72677
72709
  }
72678
72710
 
72679
72711
  // src/codegen/generators/artifacts/selection.ts
72680
- var AST5 = recast5.types.builders;
72681
72712
  function selection_default(args) {
72682
- const typeMap = {};
72683
- const abstractTypes = [];
72684
72713
  return mergeSelection({
72685
- object: prepareSelection({ ...args, typeMap, abstractTypes }),
72686
- filepath: args.filepath,
72687
- typeMap,
72688
- abstractTypes
72714
+ config: args.config,
72715
+ rootType: args.rootType,
72716
+ object: prepareSelection(args),
72717
+ filepath: args.filepath
72689
72718
  });
72690
72719
  }
72691
72720
  function prepareSelection({
@@ -72697,8 +72726,6 @@ function prepareSelection({
72697
72726
  path: path2 = [],
72698
72727
  document,
72699
72728
  inConnection,
72700
- typeMap,
72701
- abstractTypes,
72702
72729
  globalLoading,
72703
72730
  includeFragments
72704
72731
  }) {
@@ -72718,8 +72745,6 @@ function prepareSelection({
72718
72745
  selections: field.selectionSet.selections,
72719
72746
  path: path2,
72720
72747
  document,
72721
- typeMap,
72722
- abstractTypes,
72723
72748
  globalLoading,
72724
72749
  includeFragments
72725
72750
  }).fields || {}
@@ -72731,32 +72756,7 @@ function prepareSelection({
72731
72756
  typeMap: {}
72732
72757
  };
72733
72758
  }
72734
- const parentType = config4.schema.getType(rootType);
72735
72759
  const typeConditionName = field.typeCondition.name.value;
72736
- const typeCondition = config4.schema.getType(typeConditionName);
72737
- const possibleTypes = [];
72738
- if (!graphql13.isAbstractType(typeCondition)) {
72739
- } else if (graphql13.isAbstractType(parentType)) {
72740
- const possibleParentTypes = config4.schema.getPossibleTypes(parentType).map((type) => type.name);
72741
- for (const possible of config4.schema.getPossibleTypes(typeCondition)) {
72742
- if (possibleParentTypes.includes(possible.name)) {
72743
- possibleTypes.push(possible.name);
72744
- }
72745
- }
72746
- } else {
72747
- possibleTypes.push(rootType);
72748
- }
72749
- if (possibleTypes.length > 0) {
72750
- for (const type of possibleTypes) {
72751
- const existing = typeMap[type];
72752
- if (!existing || !existing.includes(type)) {
72753
- typeMap[type] = [typeConditionName].concat(existing || []);
72754
- }
72755
- if (!abstractTypes.includes(typeConditionName)) {
72756
- abstractTypes.push(typeConditionName);
72757
- }
72758
- }
72759
- }
72760
72760
  object.abstractFields.fields = {
72761
72761
  ...object.abstractFields.fields,
72762
72762
  [typeConditionName]: prepareSelection({
@@ -72767,8 +72767,6 @@ function prepareSelection({
72767
72767
  selections: field.selectionSet.selections,
72768
72768
  path: path2,
72769
72769
  document,
72770
- typeMap,
72771
- abstractTypes,
72772
72770
  globalLoading,
72773
72771
  includeFragments
72774
72772
  }).fields
@@ -72780,19 +72778,38 @@ function prepareSelection({
72780
72778
  } else if (field.kind === "Field") {
72781
72779
  const type = config4.schema.getType(rootType);
72782
72780
  if (!type) {
72783
- throw new HoudiniError({ filepath, message: "Could not find type" });
72781
+ throw new HoudiniError({
72782
+ filepath,
72783
+ message: "Could not find type. Looking for " + JSON.stringify(rootType)
72784
+ });
72784
72785
  }
72785
72786
  const attributeName = field.alias?.value || field.name.value;
72786
- let fieldType;
72787
+ let fieldType = null;
72787
72788
  let nullable = false;
72788
72789
  if (field.name.value === "__typename") {
72789
72790
  fieldType = config4.schema.getType("String");
72790
- } else {
72791
+ } else if ("getFields" in type) {
72791
72792
  let typeRef = type.getFields()[field.name.value].type;
72792
72793
  fieldType = getRootType(typeRef);
72793
72794
  nullable = !graphql13.isNonNullType(typeRef);
72795
+ } else if (graphql13.isAbstractType(type)) {
72796
+ for (const possible of config4.schema.getPossibleTypes(type)) {
72797
+ if (graphql13.isObjectType(possible)) {
72798
+ if (possible.getFields()[field.name.value]) {
72799
+ fieldType = possible.getFields()[field.name.value].type;
72800
+ nullable = !graphql13.isNonNullType(fieldType);
72801
+ break;
72802
+ }
72803
+ }
72804
+ }
72794
72805
  }
72795
- const typeName = fieldType.toString();
72806
+ if (!fieldType) {
72807
+ throw {
72808
+ message: "Could not identify field's type",
72809
+ description: `Missing definition for ${field.name.value} in ${type.name}`
72810
+ };
72811
+ }
72812
+ const typeName = getRootType(fieldType).name;
72796
72813
  const pathSoFar = path2.concat(attributeName);
72797
72814
  const keys2 = config4.keyFieldsForType(rootType);
72798
72815
  let fieldObj = {
@@ -72886,8 +72903,6 @@ function prepareSelection({
72886
72903
  path: pathSoFar,
72887
72904
  document,
72888
72905
  inConnection: connectionState,
72889
- typeMap,
72890
- abstractTypes,
72891
72906
  globalLoading: forceLoading,
72892
72907
  includeFragments
72893
72908
  });
@@ -72973,69 +72988,107 @@ function prepareSelection({
72973
72988
  return object;
72974
72989
  }
72975
72990
  function mergeSelection({
72991
+ config: config4,
72976
72992
  filepath,
72977
72993
  object,
72978
- typeMap,
72979
- abstractTypes
72994
+ rootType
72980
72995
  }) {
72981
72996
  if (Object.keys(object.fields || {}).length > 0 && object.abstractFields && Object.keys(object.abstractFields.fields).length > 0) {
72982
- for (const [typeName, possibles] of Object.entries(typeMap)) {
72983
- let overlap = false;
72997
+ const abstractSelection = {
72998
+ fields: {},
72999
+ typeMap: {}
73000
+ };
73001
+ const possibleSelectionTypes = {};
73002
+ for (const [typeName, typeSelection] of Object.entries(object.abstractFields.fields)) {
73003
+ const gqlType = config4.schema.getType(typeName);
73004
+ abstractSelection.fields[typeName] = deepMerge2(
73005
+ filepath,
73006
+ typeSelection,
73007
+ abstractSelection.fields[typeName] ?? {}
73008
+ );
73009
+ if (graphql13.isAbstractType(gqlType)) {
73010
+ for (const possible of config4.schema.getPossibleTypes(gqlType)) {
73011
+ if (!possibleSelectionTypes[typeName]) {
73012
+ possibleSelectionTypes[typeName] = [];
73013
+ }
73014
+ possibleSelectionTypes[typeName].push(possible.name);
73015
+ }
73016
+ }
73017
+ }
73018
+ const concreteSelectionImplements = {};
73019
+ for (const [typeName, possibles] of Object.entries(possibleSelectionTypes)) {
73020
+ for (const possible of possibles) {
73021
+ if (!concreteSelectionImplements[possible]) {
73022
+ concreteSelectionImplements[possible] = [];
73023
+ }
73024
+ concreteSelectionImplements[possible].push(typeName);
73025
+ }
73026
+ }
73027
+ for (const [concrete, implementations] of Object.entries(concreteSelectionImplements)) {
73028
+ if (implementations.length > 1) {
73029
+ abstractSelection.fields[concrete] = {};
73030
+ }
73031
+ }
73032
+ for (const [typeName, possibles] of Object.entries(possibleSelectionTypes)) {
72984
73033
  for (const possible of possibles) {
72985
- if (object.abstractFields.fields[typeName]) {
72986
- object.abstractFields.fields[typeName] = deepMerge2(
73034
+ if (abstractSelection.fields[possible]) {
73035
+ abstractSelection.fields[possible] = deepMerge2(
72987
73036
  filepath,
72988
- object.abstractFields.fields[typeName] ?? {},
72989
- object.abstractFields.fields[possible] ?? {}
73037
+ abstractSelection.fields[typeName] ?? {},
73038
+ abstractSelection.fields[possible] ?? {}
72990
73039
  );
72991
- overlap = true;
72992
73040
  }
72993
73041
  }
72994
- if (overlap) {
72995
- delete typeMap[typeName];
72996
- }
72997
73042
  }
72998
- for (const [type, options] of Object.entries(typeMap)) {
72999
- if (options.length > 1) {
73000
- object.abstractFields.fields[type] = deepMerge2(
73001
- filepath,
73002
- ...options.map((opt) => object.abstractFields.fields[opt] || {})
73003
- );
73004
- delete typeMap[type];
73043
+ const parentType = config4.schema.getType(rootType);
73044
+ const possibleParents = graphql13.isAbstractType(parentType) ? config4.schema.getPossibleTypes(parentType)?.map((t2) => t2.name) : [parentType.name];
73045
+ for (const key of Object.keys(abstractSelection.typeMap)) {
73046
+ if (!possibleParents.includes(key) && rootType !== key || abstractSelection.fields[key]) {
73047
+ delete abstractSelection.typeMap[key];
73005
73048
  }
73006
73049
  }
73007
- for (const [type, sel] of Object.entries(object.abstractFields?.fields || {})) {
73008
- object.abstractFields.fields[type] = deepMerge2(filepath, sel || {}, object.fields);
73050
+ for (const [type, sel] of Object.entries(abstractSelection.fields || {})) {
73051
+ abstractSelection.fields[type] = deepMerge2(filepath, sel || {}, object.fields);
73009
73052
  }
73010
- for (const [type, options] of Object.entries(typeMap)) {
73011
- object.abstractFields.typeMap[type] = options[0];
73053
+ for (const [typename, possibles] of Object.entries(possibleSelectionTypes)) {
73054
+ if (possibles.every((p) => abstractSelection.fields[p])) {
73055
+ delete abstractSelection.fields[typename];
73056
+ }
73012
73057
  }
73013
- const usedTypes = Object.values(object.abstractFields.typeMap);
73014
- for (const type of abstractTypes) {
73015
- if (!usedTypes.includes(type)) {
73016
- delete object.abstractFields.fields[type];
73058
+ for (const possible of possibleParents) {
73059
+ if (abstractSelection.fields[possible]) {
73060
+ continue;
73061
+ }
73062
+ for (const [abstractType, abstractTypeMembers] of Object.entries(
73063
+ possibleSelectionTypes
73064
+ )) {
73065
+ if (abstractTypeMembers.includes(possible)) {
73066
+ abstractSelection.typeMap[possible] = abstractType;
73067
+ break;
73068
+ }
73017
73069
  }
73018
73070
  }
73071
+ object.abstractFields = abstractSelection;
73019
73072
  }
73020
- for (const [key, value] of Object.entries(object.fields ?? {})) {
73073
+ for (const value of Object.values(object.fields ?? {})) {
73021
73074
  const selection = value.selection;
73022
73075
  if (selection) {
73023
73076
  mergeSelection({
73077
+ config: config4,
73078
+ rootType: value.type,
73024
73079
  filepath,
73025
- typeMap,
73026
- abstractTypes,
73027
73080
  object: selection
73028
73081
  });
73029
73082
  }
73030
73083
  }
73031
73084
  for (const [type, selection] of Object.entries(object.abstractFields?.fields ?? {})) {
73032
- for (const [key, value] of Object.entries(selection ?? {})) {
73085
+ for (const value of Object.values(selection ?? {})) {
73033
73086
  const selection2 = value.selection;
73034
73087
  if (selection2) {
73035
73088
  mergeSelection({
73089
+ config: config4,
73090
+ rootType: value.type,
73036
73091
  filepath,
73037
- typeMap,
73038
- abstractTypes,
73039
73092
  object: selection2
73040
73093
  });
73041
73094
  }
@@ -73045,7 +73098,7 @@ function mergeSelection({
73045
73098
  }
73046
73099
 
73047
73100
  // src/codegen/generators/artifacts/index.ts
73048
- var AST6 = recast6.types.builders;
73101
+ var AST5 = recast5.types.builders;
73049
73102
  function artifactGenerator(stats) {
73050
73103
  return async function(config4, docs) {
73051
73104
  const filterTypes = {};
@@ -73313,10 +73366,10 @@ function artifactGenerator(stats) {
73313
73366
  }
73314
73367
  plugin2.artifactEnd({ config: config4, document: doc });
73315
73368
  }
73316
- const file = AST6.program([
73369
+ const file = AST5.program([
73317
73370
  moduleExport(config4, "default", serializeValue(artifact)),
73318
- AST6.expressionStatement(
73319
- AST6.stringLiteral(`HoudiniHash=${hash({ config: config4, document: doc })}`)
73371
+ AST5.expressionStatement(
73372
+ AST5.stringLiteral(`HoudiniHash=${hash({ config: config4, document: doc })}`)
73320
73373
  )
73321
73374
  ]);
73322
73375
  const artifactPath = config4.artifactPath(document);
@@ -73396,8 +73449,8 @@ function applyMask(config4, target, mask) {
73396
73449
  }
73397
73450
 
73398
73451
  // src/codegen/generators/runtime/graphqlFunction.ts
73399
- var recast7 = __toESM(require_main2(), 1);
73400
- var AST7 = recast7.types.builders;
73452
+ var recast6 = __toESM(require_main2(), 1);
73453
+ var AST6 = recast6.types.builders;
73401
73454
  async function generateGraphqlReturnTypes(config4, docs) {
73402
73455
  const indexPath = path_exports.join(config4.runtimeDirectory, "index.d.ts");
73403
73456
  const fileContent = await fs_exports.readFile(indexPath) || "";
@@ -73432,18 +73485,18 @@ async function generateGraphqlReturnTypes(config4, docs) {
73432
73485
  continue;
73433
73486
  }
73434
73487
  for (const [queryString, returnValue] of Object.entries(overloaded_returns)) {
73435
- const input = AST7.identifier("str");
73436
- input.typeAnnotation = AST7.tsTypeAnnotation(
73437
- AST7.tsLiteralType(AST7.stringLiteral(queryString))
73488
+ const input = AST6.identifier("str");
73489
+ input.typeAnnotation = AST6.tsTypeAnnotation(
73490
+ AST6.tsLiteralType(AST6.stringLiteral(queryString))
73438
73491
  );
73439
73492
  script.body.splice(
73440
73493
  i2,
73441
73494
  0,
73442
- AST7.exportNamedDeclaration(
73443
- AST7.tsDeclareFunction(
73444
- AST7.identifier("graphql"),
73495
+ AST6.exportNamedDeclaration(
73496
+ AST6.tsDeclareFunction(
73497
+ AST6.identifier("graphql"),
73445
73498
  [input],
73446
- AST7.tsTypeAnnotation(AST7.tsTypeReference(AST7.identifier(returnValue)))
73499
+ AST6.tsTypeAnnotation(AST6.tsTypeReference(AST6.identifier(returnValue)))
73447
73500
  )
73448
73501
  )
73449
73502
  );
@@ -73606,20 +73659,20 @@ async function generatePluginRuntime({
73606
73659
  }
73607
73660
 
73608
73661
  // src/codegen/generators/typescript/documentTypes.ts
73609
- var recast13 = __toESM(require_main2(), 1);
73662
+ var recast12 = __toESM(require_main2(), 1);
73610
73663
 
73611
73664
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
73612
73665
  var graphql17 = __toESM(require_graphql2(), 1);
73613
- var recast10 = __toESM(require_main2(), 1);
73666
+ var recast9 = __toESM(require_main2(), 1);
73614
73667
 
73615
73668
  // src/codegen/generators/typescript/typeReference.ts
73616
73669
  var graphql16 = __toESM(require_graphql2(), 1);
73617
- var recast9 = __toESM(require_main2(), 1);
73670
+ var recast8 = __toESM(require_main2(), 1);
73618
73671
 
73619
73672
  // src/codegen/generators/typescript/types.ts
73620
73673
  var graphql15 = __toESM(require_graphql2(), 1);
73621
- var recast8 = __toESM(require_main2(), 1);
73622
- var AST8 = recast8.types.builders;
73674
+ var recast7 = __toESM(require_main2(), 1);
73675
+ var AST7 = recast7.types.builders;
73623
73676
  function readonlyProperty(prop, enable = true) {
73624
73677
  if (enable) {
73625
73678
  prop.readonly = true;
@@ -73627,28 +73680,28 @@ function readonlyProperty(prop, enable = true) {
73627
73680
  return prop;
73628
73681
  }
73629
73682
  function nullableField(inner, input = false) {
73630
- const members = [inner, AST8.tsNullKeyword()];
73683
+ const members = [inner, AST7.tsNullKeyword()];
73631
73684
  if (input) {
73632
- members.push(AST8.tsUndefinedKeyword());
73685
+ members.push(AST7.tsUndefinedKeyword());
73633
73686
  }
73634
- return AST8.tsUnionType(members);
73687
+ return AST7.tsUnionType(members);
73635
73688
  }
73636
73689
  function scalarPropertyValue(config4, missingScalars, target) {
73637
73690
  switch (target.name) {
73638
73691
  case "String": {
73639
- return AST8.tsStringKeyword();
73692
+ return AST7.tsStringKeyword();
73640
73693
  }
73641
73694
  case "Int": {
73642
- return AST8.tsNumberKeyword();
73695
+ return AST7.tsNumberKeyword();
73643
73696
  }
73644
73697
  case "Float": {
73645
- return AST8.tsNumberKeyword();
73698
+ return AST7.tsNumberKeyword();
73646
73699
  }
73647
73700
  case "Boolean": {
73648
- return AST8.tsBooleanKeyword();
73701
+ return AST7.tsBooleanKeyword();
73649
73702
  }
73650
73703
  case "ID": {
73651
- return AST8.tsStringKeyword();
73704
+ return AST7.tsStringKeyword();
73652
73705
  }
73653
73706
  default: {
73654
73707
  if (graphql15.isNonNullType(target) && "ofType" in target) {
@@ -73659,16 +73712,16 @@ function scalarPropertyValue(config4, missingScalars, target) {
73659
73712
  );
73660
73713
  }
73661
73714
  if (config4.scalars?.[target.name]) {
73662
- return AST8.tsTypeReference(AST8.identifier(config4.scalars?.[target.name].type));
73715
+ return AST7.tsTypeReference(AST7.identifier(config4.scalars?.[target.name].type));
73663
73716
  }
73664
73717
  missingScalars.add(target.name);
73665
- return AST8.tsAnyKeyword();
73718
+ return AST7.tsAnyKeyword();
73666
73719
  }
73667
73720
  }
73668
73721
  }
73669
73722
 
73670
73723
  // src/codegen/generators/typescript/typeReference.ts
73671
- var AST9 = recast9.types.builders;
73724
+ var AST8 = recast8.types.builders;
73672
73725
  function tsTypeReference(config4, missingScalars, definition, body) {
73673
73726
  const { type, wrappers } = unwrapType(config4, definition.type);
73674
73727
  let result;
@@ -73677,7 +73730,7 @@ function tsTypeReference(config4, missingScalars, definition, body) {
73677
73730
  } else if (graphql16.isEnumType(type)) {
73678
73731
  result = enumReference(config4, body, type.name);
73679
73732
  } else {
73680
- result = AST9.tsTypeReference(AST9.identifier(type.name));
73733
+ result = AST8.tsTypeReference(AST8.identifier(type.name));
73681
73734
  }
73682
73735
  for (const toWrap of wrappers) {
73683
73736
  if (toWrap === "NonNull" /* NonNull */) {
@@ -73685,7 +73738,7 @@ function tsTypeReference(config4, missingScalars, definition, body) {
73685
73738
  } else if (toWrap === "Nullable" /* Nullable */) {
73686
73739
  result = nullableField(result, true);
73687
73740
  } else if (toWrap === "List" /* List */) {
73688
- result = AST9.tsArrayType(AST9.tsParenthesizedType(result));
73741
+ result = AST8.tsArrayType(AST8.tsParenthesizedType(result));
73689
73742
  }
73690
73743
  }
73691
73744
  return result;
@@ -73698,14 +73751,14 @@ function enumReference(config4, body, name) {
73698
73751
  importKind: "type",
73699
73752
  sourceModule: "$houdini/runtime/lib/types"
73700
73753
  });
73701
- return AST9.tsTypeReference(
73702
- AST9.identifier("ValueOf"),
73703
- AST9.tsTypeParameterInstantiation([AST9.tsTypeQuery(AST9.identifier(name))])
73754
+ return AST8.tsTypeReference(
73755
+ AST8.identifier("ValueOf"),
73756
+ AST8.tsTypeParameterInstantiation([AST8.tsTypeQuery(AST8.identifier(name))])
73704
73757
  );
73705
73758
  }
73706
73759
 
73707
73760
  // src/codegen/generators/typescript/addReferencedInputTypes.ts
73708
- var AST10 = recast10.types.builders;
73761
+ var AST9 = recast9.types.builders;
73709
73762
  function addReferencedInputTypes(config4, filepath, body, visitedTypes, missingScalars, rootType) {
73710
73763
  const { type } = unwrapType(config4, rootType);
73711
73764
  if (graphql17.isScalarType(type)) {
@@ -73732,20 +73785,20 @@ function addReferencedInputTypes(config4, filepath, body, visitedTypes, missingS
73732
73785
  for (const field of Object.values(type.getFields())) {
73733
73786
  addReferencedInputTypes(config4, filepath, body, visitedTypes, missingScalars, field.type);
73734
73787
  members.push(
73735
- AST10.tsPropertySignature(
73736
- AST10.identifier(field.name),
73737
- AST10.tsTypeAnnotation(tsTypeReference(config4, missingScalars, field, body)),
73788
+ AST9.tsPropertySignature(
73789
+ AST9.identifier(field.name),
73790
+ AST9.tsTypeAnnotation(tsTypeReference(config4, missingScalars, field, body)),
73738
73791
  graphql17.isNullableType(field.type)
73739
73792
  )
73740
73793
  );
73741
73794
  }
73742
- body.push(AST10.tsTypeAliasDeclaration(AST10.identifier(type.name), AST10.tsTypeLiteral(members)));
73795
+ body.push(AST9.tsTypeAliasDeclaration(AST9.identifier(type.name), AST9.tsTypeLiteral(members)));
73743
73796
  }
73744
73797
 
73745
73798
  // src/codegen/generators/typescript/inlineType.ts
73746
73799
  var graphql18 = __toESM(require_graphql2(), 1);
73747
- var recast11 = __toESM(require_main2(), 1);
73748
- var AST11 = recast11.types.builders;
73800
+ var recast10 = __toESM(require_main2(), 1);
73801
+ var AST10 = recast10.types.builders;
73749
73802
  var fragmentKey2 = " $fragments";
73750
73803
  function inlineType({
73751
73804
  config: config4,
@@ -73843,7 +73896,7 @@ function inlineType({
73843
73896
  {}
73844
73897
  )
73845
73898
  );
73846
- result = AST11.tsTypeLiteral([
73899
+ result = AST10.tsTypeLiteral([
73847
73900
  ...fields.map((selection) => {
73848
73901
  const { field } = selectionTypeInfo(config4.schema, filepath, rootObj, selection);
73849
73902
  const attributeName = selection.alias?.value || selection.name.value;
@@ -73871,12 +73924,12 @@ function inlineType({
73871
73924
  (directive) => directive.name.value === "include" || directive.name.value === "skip"
73872
73925
  ).length > 0;
73873
73926
  if (hasIncludeOrSkipDirective) {
73874
- attributeType = AST11.tsUnionType([attributeType, AST11.tsUndefinedKeyword()]);
73927
+ attributeType = AST10.tsUnionType([attributeType, AST10.tsUndefinedKeyword()]);
73875
73928
  }
73876
73929
  const prop = readonlyProperty(
73877
- AST11.tsPropertySignature(
73878
- AST11.identifier(attributeName),
73879
- AST11.tsTypeAnnotation(attributeType)
73930
+ AST10.tsPropertySignature(
73931
+ AST10.identifier(attributeName),
73932
+ AST10.tsTypeAnnotation(attributeType)
73880
73933
  ),
73881
73934
  allowReadonly
73882
73935
  );
@@ -73890,14 +73943,14 @@ function inlineType({
73890
73943
  if (includeFragments && fragmentSpreads && fragmentSpreads.length) {
73891
73944
  result.members.push(
73892
73945
  readonlyProperty(
73893
- AST11.tsPropertySignature(
73894
- AST11.stringLiteral(fragmentKey2),
73895
- AST11.tsTypeAnnotation(
73896
- AST11.tsTypeLiteral(
73946
+ AST10.tsPropertySignature(
73947
+ AST10.stringLiteral(fragmentKey2),
73948
+ AST10.tsTypeAnnotation(
73949
+ AST10.tsTypeLiteral(
73897
73950
  (fragmentSpreads || []).map(
73898
- (fragmentSpread) => AST11.tsPropertySignature(
73899
- AST11.identifier(fragmentSpread.name.value),
73900
- AST11.tsTypeAnnotation(AST11.tsTypeLiteral([]))
73951
+ (fragmentSpread) => AST10.tsPropertySignature(
73952
+ AST10.identifier(fragmentSpread.name.value),
73953
+ AST10.tsTypeAnnotation(AST10.tsTypeLiteral([]))
73901
73954
  )
73902
73955
  )
73903
73956
  )
@@ -73942,9 +73995,9 @@ function inlineType({
73942
73995
  }
73943
73996
  objectType.members.push(
73944
73997
  readonlyProperty(
73945
- AST11.tsPropertySignature(
73946
- AST11.identifier("__typename"),
73947
- AST11.tsTypeAnnotation(AST11.tsLiteralType(AST11.stringLiteral(typeName)))
73998
+ AST10.tsPropertySignature(
73999
+ AST10.identifier("__typename"),
74000
+ AST10.tsTypeAnnotation(AST10.tsLiteralType(AST10.stringLiteral(typeName)))
73948
74001
  ),
73949
74002
  allowReadonly
73950
74003
  )
@@ -73984,8 +74037,8 @@ function inlineType({
73984
74037
  if (Object.keys(inlineFragmentSelections).length > 0) {
73985
74038
  let selectionTypes = Object.entries(inlineFragmentSelections).map(
73986
74039
  ([typeName, { type: type2, tsType }]) => {
73987
- return AST11.tsParenthesizedType(
73988
- AST11.tsIntersectionType(
74040
+ return AST10.tsParenthesizedType(
74041
+ AST10.tsIntersectionType(
73989
74042
  [tsType].flatMap((type3) => {
73990
74043
  if (type3.type === "TSUnionType") {
73991
74044
  return type3.types.filter(
@@ -74011,14 +74064,14 @@ function inlineType({
74011
74064
  );
74012
74065
  if (!areAllTypenamesCovered || anySelectionHasRequiredField) {
74013
74066
  selectionTypes.push(
74014
- AST11.tsParenthesizedType(
74015
- AST11.tsTypeLiteral([
74067
+ AST10.tsParenthesizedType(
74068
+ AST10.tsTypeLiteral([
74016
74069
  readonlyProperty(
74017
- AST11.tsPropertySignature(
74018
- AST11.identifier("__typename"),
74019
- AST11.tsTypeAnnotation(
74020
- AST11.tsLiteralType(
74021
- AST11.stringLiteral("non-exhaustive; don't match this")
74070
+ AST10.tsPropertySignature(
74071
+ AST10.identifier("__typename"),
74072
+ AST10.tsTypeAnnotation(
74073
+ AST10.tsLiteralType(
74074
+ AST10.stringLiteral("non-exhaustive; don't match this")
74022
74075
  )
74023
74076
  )
74024
74077
  ),
@@ -74028,9 +74081,9 @@ function inlineType({
74028
74081
  )
74029
74082
  );
74030
74083
  }
74031
- result = AST11.tsIntersectionType([
74084
+ result = AST10.tsIntersectionType([
74032
74085
  result,
74033
- AST11.tsParenthesizedType(AST11.tsUnionType(selectionTypes))
74086
+ AST10.tsParenthesizedType(AST10.tsUnionType(selectionTypes))
74034
74087
  ]);
74035
74088
  }
74036
74089
  } else {
@@ -74048,7 +74101,7 @@ function wrapType2(wrappers, result, root, forceNullable, forceNonNull) {
74048
74101
  } else if (toWrap === "NonNull" /* NonNull */) {
74049
74102
  continue;
74050
74103
  } else if (toWrap === "List" /* List */) {
74051
- result = AST11.tsArrayType(AST11.tsParenthesizedType(result));
74104
+ result = AST10.tsArrayType(AST10.tsParenthesizedType(result));
74052
74105
  }
74053
74106
  }
74054
74107
  return result;
@@ -74093,13 +74146,13 @@ function selectionTypeInfo(schema, filepath, rootType, selection) {
74093
74146
  }
74094
74147
 
74095
74148
  // src/codegen/generators/typescript/loadingState.ts
74096
- var recast12 = __toESM(require_main2(), 1);
74097
- var AST12 = recast12.types.builders;
74149
+ var recast11 = __toESM(require_main2(), 1);
74150
+ var AST11 = recast11.types.builders;
74098
74151
  function withLoadingState(args) {
74099
74152
  if (!("enableLoadingState" in args.document.artifact) || !args.document.artifact.enableLoadingState) {
74100
74153
  return args.base;
74101
74154
  }
74102
- return AST12.tsUnionType([
74155
+ return AST11.tsUnionType([
74103
74156
  args.base,
74104
74157
  loadingState({
74105
74158
  parentType: args.document.artifact.rootType,
@@ -74118,7 +74171,7 @@ function loadingState(args) {
74118
74171
  import: ["LoadingType"],
74119
74172
  sourceModule: "$houdini/runtime/lib/types"
74120
74173
  });
74121
- const result = AST12.tsTypeLiteral(
74174
+ const result = AST11.tsTypeLiteral(
74122
74175
  Object.entries(selection).reduce(
74123
74176
  (rest, [attributeName, value]) => {
74124
74177
  if (!value.loading) {
@@ -74126,7 +74179,7 @@ function loadingState(args) {
74126
74179
  }
74127
74180
  let keyType = null;
74128
74181
  if (value.loading.kind === "value") {
74129
- keyType = AST12.tsTypeReference(AST12.identifier("LoadingType"));
74182
+ keyType = AST11.tsTypeReference(AST11.identifier("LoadingType"));
74130
74183
  }
74131
74184
  if (value.loading.kind === "continue" && value.selection) {
74132
74185
  keyType = loadingState({
@@ -74142,15 +74195,15 @@ function loadingState(args) {
74142
74195
  }
74143
74196
  if (value.loading.list) {
74144
74197
  for (const _ of Array.from({ length: value.loading.list.depth })) {
74145
- keyType = AST12.tsArrayType(keyType);
74198
+ keyType = AST11.tsArrayType(keyType);
74146
74199
  }
74147
74200
  }
74148
74201
  return [
74149
74202
  ...rest,
74150
74203
  readonlyProperty(
74151
- AST12.tsPropertySignature(
74152
- AST12.identifier(attributeName),
74153
- AST12.tsTypeAnnotation(keyType)
74204
+ AST11.tsPropertySignature(
74205
+ AST11.identifier(attributeName),
74206
+ AST11.tsTypeAnnotation(keyType)
74154
74207
  )
74155
74208
  )
74156
74209
  ];
@@ -74161,14 +74214,14 @@ function loadingState(args) {
74161
74214
  if (args.selection.fragments) {
74162
74215
  result.members.push(
74163
74216
  readonlyProperty(
74164
- AST12.tsPropertySignature(
74165
- AST12.stringLiteral(fragmentKey),
74166
- AST12.tsTypeAnnotation(
74167
- AST12.tsTypeLiteral(
74217
+ AST11.tsPropertySignature(
74218
+ AST11.stringLiteral(fragmentKey),
74219
+ AST11.tsTypeAnnotation(
74220
+ AST11.tsTypeLiteral(
74168
74221
  Object.keys(args.selection.fragments).map((name) => {
74169
- return AST12.tsPropertySignature(
74170
- AST12.identifier(name),
74171
- AST12.tsTypeAnnotation(AST12.tsTypeLiteral([]))
74222
+ return AST11.tsPropertySignature(
74223
+ AST11.identifier(name),
74224
+ AST11.tsTypeAnnotation(AST11.tsTypeLiteral([]))
74172
74225
  );
74173
74226
  })
74174
74227
  )
@@ -74181,7 +74234,7 @@ function loadingState(args) {
74181
74234
  }
74182
74235
 
74183
74236
  // src/codegen/generators/typescript/documentTypes.ts
74184
- var AST13 = recast13.types.builders;
74237
+ var AST12 = recast12.types.builders;
74185
74238
  async function generateDocumentTypes(config4, docs) {
74186
74239
  const typePaths = [];
74187
74240
  const fragmentDefinitions = {};
@@ -74206,7 +74259,7 @@ async function generateDocumentTypes(config4, docs) {
74206
74259
  return;
74207
74260
  }
74208
74261
  const typeDefPath = config4.artifactTypePath(originalDocument);
74209
- const program = AST13.program([]);
74262
+ const program = AST12.program([]);
74210
74263
  const visitedTypes = /* @__PURE__ */ new Set();
74211
74264
  let definition = originalDocument.definitions.find(
74212
74265
  (def) => (def.kind === "OperationDefinition" || def.kind === "FragmentDefinition") && def.name?.value === name
@@ -74242,9 +74295,9 @@ async function generateDocumentTypes(config4, docs) {
74242
74295
  );
74243
74296
  }
74244
74297
  program.body.push(
74245
- AST13.exportNamedDeclaration(
74246
- AST13.tsTypeAliasDeclaration(
74247
- AST13.identifier(`${name}$artifact`),
74298
+ AST12.exportNamedDeclaration(
74299
+ AST12.tsTypeAliasDeclaration(
74300
+ AST12.identifier(`${name}$artifact`),
74248
74301
  convertToTs(serializeValue(artifact))
74249
74302
  )
74250
74303
  )
@@ -74254,17 +74307,17 @@ async function generateDocumentTypes(config4, docs) {
74254
74307
  typePaths.push(typeDefPath);
74255
74308
  })
74256
74309
  );
74257
- const typeIndex = AST13.program(
74310
+ const typeIndex = AST12.program(
74258
74311
  typePaths.sort((a, b) => a.localeCompare(b)).map((typePath) => {
74259
- return AST13.exportAllDeclaration(
74260
- AST13.literal(
74312
+ return AST12.exportAllDeclaration(
74313
+ AST12.literal(
74261
74314
  "./" + path_exports.relative(path_exports.resolve(config4.typeIndexPath, ".."), typePath).replace(/\.[^/.]+\.[^/.]+$/, "")
74262
74315
  ),
74263
74316
  null
74264
74317
  );
74265
74318
  }).concat([
74266
- AST13.exportAllDeclaration(AST13.literal("./runtime"), null),
74267
- AST13.exportAllDeclaration(AST13.literal("./graphql"), null)
74319
+ AST12.exportAllDeclaration(AST12.literal("./runtime"), null),
74320
+ AST12.exportAllDeclaration(AST12.literal("./graphql"), null)
74268
74321
  ])
74269
74322
  );
74270
74323
  const exportDefaultAs = ({ module, as }) => `
@@ -74319,7 +74372,7 @@ For more information, please visit this link: ${siteURL}/api/config#custom-scala
74319
74372
  }
74320
74373
  function convertToTs(source) {
74321
74374
  if (source.type === "ObjectExpression") {
74322
- return AST13.tsTypeLiteral(
74375
+ return AST12.tsTypeLiteral(
74323
74376
  source.properties.reduce(
74324
74377
  (props, prop) => {
74325
74378
  if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
@@ -74327,9 +74380,9 @@ function convertToTs(source) {
74327
74380
  }
74328
74381
  return [
74329
74382
  ...props,
74330
- AST13.tsPropertySignature(
74383
+ AST12.tsPropertySignature(
74331
74384
  prop.key,
74332
- AST13.tsTypeAnnotation(convertToTs(prop.value))
74385
+ AST12.tsTypeAnnotation(convertToTs(prop.value))
74333
74386
  )
74334
74387
  ];
74335
74388
  },
@@ -74338,20 +74391,20 @@ function convertToTs(source) {
74338
74391
  );
74339
74392
  }
74340
74393
  if (source.type === "ArrayExpression") {
74341
- return AST13.tsTupleType(
74394
+ return AST12.tsTupleType(
74342
74395
  source.elements.map((element) => convertToTs(element))
74343
74396
  );
74344
74397
  }
74345
74398
  if (source.type === "Literal" && typeof source.value === "boolean") {
74346
- return AST13.tsLiteralType(AST13.booleanLiteral(source.value));
74399
+ return AST12.tsLiteralType(AST12.booleanLiteral(source.value));
74347
74400
  }
74348
74401
  if (source.type === "Literal" && typeof source.value === "number") {
74349
- return AST13.tsLiteralType(AST13.numericLiteral(source.value));
74402
+ return AST12.tsLiteralType(AST12.numericLiteral(source.value));
74350
74403
  }
74351
74404
  if (source.type === "Literal" && typeof source.value === "string") {
74352
- return AST13.tsLiteralType(AST13.stringLiteral(source.value));
74405
+ return AST12.tsLiteralType(AST12.stringLiteral(source.value));
74353
74406
  }
74354
- return AST13.tsLiteralType(source);
74407
+ return AST12.tsLiteralType(source);
74355
74408
  }
74356
74409
  async function generateOperationTypeDefs(config4, filepath, document, body, definition, selections, visitedTypes, missingScalars, artifact) {
74357
74410
  let parentType = null;
@@ -74390,23 +74443,23 @@ async function generateOperationTypeDefs(config4, filepath, document, body, defi
74390
74443
  });
74391
74444
  }
74392
74445
  body.push(
74393
- AST13.exportNamedDeclaration(
74394
- AST13.tsTypeAliasDeclaration(
74395
- AST13.identifier(definition.name.value),
74396
- AST13.tsTypeLiteral([
74446
+ AST12.exportNamedDeclaration(
74447
+ AST12.tsTypeAliasDeclaration(
74448
+ AST12.identifier(definition.name.value),
74449
+ AST12.tsTypeLiteral([
74397
74450
  readonlyProperty(
74398
- AST13.tsPropertySignature(
74399
- AST13.stringLiteral("input"),
74400
- AST13.tsTypeAnnotation(AST13.tsTypeReference(AST13.identifier(inputTypeName)))
74451
+ AST12.tsPropertySignature(
74452
+ AST12.stringLiteral("input"),
74453
+ AST12.tsTypeAnnotation(AST12.tsTypeReference(AST12.identifier(inputTypeName)))
74401
74454
  )
74402
74455
  ),
74403
74456
  readonlyProperty(
74404
- AST13.tsPropertySignature(
74405
- AST13.stringLiteral("result"),
74406
- AST13.tsTypeAnnotation(
74407
- definition.operation === "mutation" ? AST13.tsTypeReference(AST13.identifier(shapeTypeName)) : AST13.tsUnionType([
74408
- AST13.tsTypeReference(AST13.identifier(shapeTypeName)),
74409
- AST13.tsUndefinedKeyword()
74457
+ AST12.tsPropertySignature(
74458
+ AST12.stringLiteral("result"),
74459
+ AST12.tsTypeAnnotation(
74460
+ definition.operation === "mutation" ? AST12.tsTypeReference(AST12.identifier(shapeTypeName)) : AST12.tsUnionType([
74461
+ AST12.tsTypeReference(AST12.identifier(shapeTypeName)),
74462
+ AST12.tsUndefinedKeyword()
74410
74463
  ])
74411
74464
  )
74412
74465
  )
@@ -74414,8 +74467,8 @@ async function generateOperationTypeDefs(config4, filepath, document, body, defi
74414
74467
  ])
74415
74468
  )
74416
74469
  ),
74417
- AST13.exportNamedDeclaration(
74418
- AST13.tsTypeAliasDeclaration(AST13.identifier(shapeTypeName), resultType)
74470
+ AST12.exportNamedDeclaration(
74471
+ AST12.tsTypeAliasDeclaration(AST12.identifier(shapeTypeName), resultType)
74419
74472
  )
74420
74473
  );
74421
74474
  if (hasInputs && definition.variableDefinitions && definition.variableDefinitions.length > 0) {
@@ -74430,15 +74483,15 @@ async function generateOperationTypeDefs(config4, filepath, document, body, defi
74430
74483
  );
74431
74484
  }
74432
74485
  body.push(
74433
- AST13.exportNamedDeclaration(
74434
- AST13.tsTypeAliasDeclaration(
74435
- AST13.identifier(inputTypeName),
74436
- AST13.tsTypeLiteral(
74486
+ AST12.exportNamedDeclaration(
74487
+ AST12.tsTypeAliasDeclaration(
74488
+ AST12.identifier(inputTypeName),
74489
+ AST12.tsTypeLiteral(
74437
74490
  (definition.variableDefinitions || []).map(
74438
74491
  (definition2) => {
74439
- return AST13.tsPropertySignature(
74440
- AST13.identifier(definition2.variable.name.value),
74441
- AST13.tsTypeAnnotation(
74492
+ return AST12.tsPropertySignature(
74493
+ AST12.identifier(definition2.variable.name.value),
74494
+ AST12.tsTypeAnnotation(
74442
74495
  tsTypeReference(config4, missingScalars, definition2, body)
74443
74496
  ),
74444
74497
  definition2.type.kind !== "NonNullType"
@@ -74451,16 +74504,16 @@ async function generateOperationTypeDefs(config4, filepath, document, body, defi
74451
74504
  );
74452
74505
  } else {
74453
74506
  body.push(
74454
- AST13.exportNamedDeclaration(
74455
- AST13.tsTypeAliasDeclaration(AST13.identifier(inputTypeName), AST13.tsNullKeyword())
74507
+ AST12.exportNamedDeclaration(
74508
+ AST12.tsTypeAliasDeclaration(AST12.identifier(inputTypeName), AST12.tsNullKeyword())
74456
74509
  )
74457
74510
  );
74458
74511
  }
74459
74512
  if (definition.operation === "mutation") {
74460
74513
  body.push(
74461
- AST13.exportNamedDeclaration(
74462
- AST13.tsTypeAliasDeclaration(
74463
- AST13.identifier(optimisticTypeName),
74514
+ AST12.exportNamedDeclaration(
74515
+ AST12.tsTypeAliasDeclaration(
74516
+ AST12.identifier(optimisticTypeName),
74464
74517
  inlineType({
74465
74518
  config: config4,
74466
74519
  filepath,
@@ -74494,12 +74547,12 @@ async function generateFragmentTypeDefs(config4, filepath, body, selections, def
74494
74547
  let directive = definition.directives?.find(
74495
74548
  (directive2) => directive2.name.value === config4.argumentsDirective
74496
74549
  );
74497
- let inputValue = !directive ? AST13.tsTypeLiteral([]) : AST13.tsTypeLiteral(
74550
+ let inputValue = !directive ? AST12.tsTypeLiteral([]) : AST12.tsTypeLiteral(
74498
74551
  (fragmentArgumentsDefinitions(config4, filepath, definition) || []).map(
74499
74552
  (definition2) => {
74500
- return AST13.tsPropertySignature(
74501
- AST13.identifier(definition2.variable.name.value),
74502
- AST13.tsTypeAnnotation(
74553
+ return AST12.tsPropertySignature(
74554
+ AST12.identifier(definition2.variable.name.value),
74555
+ AST12.tsTypeAnnotation(
74503
74556
  tsTypeReference(config4, missingScalars, definition2, body)
74504
74557
  ),
74505
74558
  definition2.type.kind !== "NonNullType"
@@ -74508,30 +74561,30 @@ async function generateFragmentTypeDefs(config4, filepath, body, selections, def
74508
74561
  )
74509
74562
  );
74510
74563
  body.push(
74511
- AST13.exportNamedDeclaration(
74512
- AST13.tsTypeAliasDeclaration(AST13.identifier(inputTypeName), inputValue)
74564
+ AST12.exportNamedDeclaration(
74565
+ AST12.tsTypeAliasDeclaration(AST12.identifier(inputTypeName), inputValue)
74513
74566
  ),
74514
- AST13.exportNamedDeclaration(
74515
- AST13.tsTypeAliasDeclaration(
74516
- AST13.identifier(propTypeName),
74517
- AST13.tsTypeLiteral([
74567
+ AST12.exportNamedDeclaration(
74568
+ AST12.tsTypeAliasDeclaration(
74569
+ AST12.identifier(propTypeName),
74570
+ AST12.tsTypeLiteral([
74518
74571
  readonlyProperty(
74519
- AST13.tsPropertySignature(
74520
- AST13.stringLiteral("shape"),
74521
- AST13.tsTypeAnnotation(
74522
- AST13.tsTypeReference(AST13.identifier(shapeTypeName))
74572
+ AST12.tsPropertySignature(
74573
+ AST12.stringLiteral("shape"),
74574
+ AST12.tsTypeAnnotation(
74575
+ AST12.tsTypeReference(AST12.identifier(shapeTypeName))
74523
74576
  ),
74524
74577
  true
74525
74578
  )
74526
74579
  ),
74527
74580
  readonlyProperty(
74528
- AST13.tsPropertySignature(
74529
- AST13.stringLiteral(fragmentKey2),
74530
- AST13.tsTypeAnnotation(
74531
- AST13.tsTypeLiteral([
74532
- AST13.tsPropertySignature(
74533
- AST13.stringLiteral(propTypeName),
74534
- AST13.tsTypeAnnotation(AST13.tsAnyKeyword())
74581
+ AST12.tsPropertySignature(
74582
+ AST12.stringLiteral(fragmentKey2),
74583
+ AST12.tsTypeAnnotation(
74584
+ AST12.tsTypeLiteral([
74585
+ AST12.tsPropertySignature(
74586
+ AST12.stringLiteral(propTypeName),
74587
+ AST12.tsTypeAnnotation(AST12.tsAnyKeyword())
74535
74588
  )
74536
74589
  ])
74537
74590
  )
@@ -74540,9 +74593,9 @@ async function generateFragmentTypeDefs(config4, filepath, body, selections, def
74540
74593
  ])
74541
74594
  )
74542
74595
  ),
74543
- AST13.exportNamedDeclaration(
74544
- AST13.tsTypeAliasDeclaration(
74545
- AST13.identifier(shapeTypeName),
74596
+ AST12.exportNamedDeclaration(
74597
+ AST12.tsTypeAliasDeclaration(
74598
+ AST12.identifier(shapeTypeName),
74546
74599
  withLoadingState({
74547
74600
  config: config4,
74548
74601
  document,
@@ -74568,8 +74621,8 @@ async function generateFragmentTypeDefs(config4, filepath, body, selections, def
74568
74621
 
74569
74622
  // src/codegen/generators/typescript/imperativeTypeDef.ts
74570
74623
  var graphql19 = __toESM(require_graphql2(), 1);
74571
- var recast14 = __toESM(require_main2(), 1);
74572
- var AST14 = recast14.types.builders;
74624
+ var recast13 = __toESM(require_main2(), 1);
74625
+ var AST13 = recast13.types.builders;
74573
74626
  async function imperativeCacheTypef(config4, docs) {
74574
74627
  const returnType = (doc) => config4.plugins.find((plugin2) => plugin2.graphqlTagReturn)?.graphqlTagReturn?.({
74575
74628
  config: config4,
@@ -74585,87 +74638,87 @@ async function imperativeCacheTypef(config4, docs) {
74585
74638
  }) ?? "any";
74586
74639
  const target = path_exports.join(config4.runtimeDirectory, "generated.d.ts");
74587
74640
  const body = [];
74588
- const declaration = AST14.tsTypeAliasDeclaration(
74589
- AST14.identifier(CacheTypeDefName),
74590
- AST14.tsTypeLiteral([
74591
- AST14.tsPropertySignature(
74592
- AST14.identifier("types"),
74593
- AST14.tsTypeAnnotation(typeDefinitions(config4, body, docs, returnType))
74641
+ const declaration = AST13.tsTypeAliasDeclaration(
74642
+ AST13.identifier(CacheTypeDefName),
74643
+ AST13.tsTypeLiteral([
74644
+ AST13.tsPropertySignature(
74645
+ AST13.identifier("types"),
74646
+ AST13.tsTypeAnnotation(typeDefinitions(config4, body, docs, returnType))
74594
74647
  ),
74595
- AST14.tsPropertySignature(
74596
- AST14.identifier("lists"),
74597
- AST14.tsTypeAnnotation(listDefinitions(config4, body, docs))
74648
+ AST13.tsPropertySignature(
74649
+ AST13.identifier("lists"),
74650
+ AST13.tsTypeAnnotation(listDefinitions(config4, body, docs))
74598
74651
  ),
74599
- AST14.tsPropertySignature(
74600
- AST14.identifier("queries"),
74601
- AST14.tsTypeAnnotation(queryDefinitions(config4, body, docs, returnType))
74652
+ AST13.tsPropertySignature(
74653
+ AST13.identifier("queries"),
74654
+ AST13.tsTypeAnnotation(queryDefinitions(config4, body, docs, returnType))
74602
74655
  )
74603
74656
  ])
74604
74657
  );
74605
74658
  declaration.declare = true;
74606
- const importRecord = AST14.importDeclaration(
74607
- [AST14.importSpecifier(AST14.identifier("Record"))],
74608
- AST14.stringLiteral("./public/record")
74659
+ const importRecord = AST13.importDeclaration(
74660
+ [AST13.importSpecifier(AST13.identifier("Record"))],
74661
+ AST13.stringLiteral("./public/record")
74609
74662
  );
74610
74663
  importRecord.importKind = "type";
74611
74664
  await fs_exports.writeFile(
74612
74665
  target,
74613
- recast14.prettyPrint(
74614
- AST14.program([importRecord, ...body, AST14.exportNamedDeclaration(declaration)])
74666
+ recast13.prettyPrint(
74667
+ AST13.program([importRecord, ...body, AST13.exportNamedDeclaration(declaration)])
74615
74668
  ).code
74616
74669
  );
74617
74670
  }
74618
74671
  function typeDefinitions(config4, body, docs, returnType) {
74619
74672
  const operationTypes = [config4.schema.getMutationType(), config4.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
74620
74673
  const visitedTypes = /* @__PURE__ */ new Set();
74621
- const types19 = Object.values(config4.schema.getTypeMap()).filter(
74674
+ const types18 = Object.values(config4.schema.getTypeMap()).filter(
74622
74675
  (type) => !graphql19.isAbstractType(type) && !graphql19.isScalarType(type) && !graphql19.isEnumType(type) && !graphql19.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
74623
74676
  );
74624
74677
  const fragmentMap = fragmentListMap(
74625
74678
  config4,
74626
- types19.map((type) => type.name),
74679
+ types18.map((type) => type.name),
74627
74680
  body,
74628
74681
  docs,
74629
74682
  returnType
74630
74683
  );
74631
- return AST14.tsTypeLiteral(
74632
- types19.map((type) => {
74684
+ return AST13.tsTypeLiteral(
74685
+ types18.map((type) => {
74633
74686
  let typeName = type.name;
74634
74687
  if (config4.schema.getQueryType() && config4.schema.getQueryType()?.name === type.name) {
74635
74688
  typeName = "__ROOT__";
74636
74689
  }
74637
- let idFields = AST14.tsNeverKeyword();
74690
+ let idFields = AST13.tsNeverKeyword();
74638
74691
  const keys2 = keyFieldsForType(config4.configFile, type.name);
74639
74692
  if (graphql19.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
74640
- idFields = AST14.tsTypeLiteral(
74693
+ idFields = AST13.tsTypeLiteral(
74641
74694
  keys2.map((key) => {
74642
74695
  const fieldType = type.getFields()[key];
74643
74696
  const unwrapped = unwrapType(config4, fieldType.type);
74644
- return AST14.tsPropertySignature(
74645
- AST14.identifier(key),
74646
- AST14.tsTypeAnnotation(
74697
+ return AST13.tsPropertySignature(
74698
+ AST13.identifier(key),
74699
+ AST13.tsTypeAnnotation(
74647
74700
  scalarPropertyValue(config4, /* @__PURE__ */ new Set(), unwrapped.type)
74648
74701
  )
74649
74702
  );
74650
74703
  })
74651
74704
  );
74652
74705
  } else if (typeName === "__ROOT__") {
74653
- idFields = AST14.tsTypeLiteral([]);
74706
+ idFields = AST13.tsTypeLiteral([]);
74654
74707
  }
74655
- let fields = AST14.tsTypeLiteral([]);
74708
+ let fields = AST13.tsTypeLiteral([]);
74656
74709
  if (graphql19.isObjectType(type)) {
74657
- fields = AST14.tsTypeLiteral(
74710
+ fields = AST13.tsTypeLiteral(
74658
74711
  Object.entries(type.getFields()).map(
74659
74712
  ([key, fieldType]) => {
74660
74713
  const unwrapped = unwrapType(config4, fieldType.type);
74661
- let typeOptions = AST14.tsUnionType([]);
74714
+ let typeOptions = AST13.tsUnionType([]);
74662
74715
  if (graphql19.isScalarType(unwrapped.type)) {
74663
74716
  typeOptions.types.push(
74664
74717
  scalarPropertyValue(config4, /* @__PURE__ */ new Set(), unwrapped.type)
74665
74718
  );
74666
74719
  } else if (graphql19.isEnumType(unwrapped.type)) {
74667
74720
  typeOptions.types.push(
74668
- AST14.tsTypeReference(AST14.identifier(unwrapped.type.name))
74721
+ AST13.tsTypeReference(AST13.identifier(unwrapped.type.name))
74669
74722
  );
74670
74723
  } else if (!graphql19.isAbstractType(unwrapped.type)) {
74671
74724
  typeOptions.types.push(record(unwrapped.type.name));
@@ -74676,21 +74729,21 @@ function typeDefinitions(config4, body, docs, returnType) {
74676
74729
  }
74677
74730
  for (const wrapper of unwrapped.wrappers) {
74678
74731
  if (wrapper === "Nullable" /* Nullable */) {
74679
- typeOptions = AST14.tsParenthesizedType(
74680
- AST14.tsUnionType([typeOptions, AST14.tsNullKeyword()])
74732
+ typeOptions = AST13.tsParenthesizedType(
74733
+ AST13.tsUnionType([typeOptions, AST13.tsNullKeyword()])
74681
74734
  );
74682
74735
  } else if (wrapper === "List" /* List */) {
74683
- typeOptions = AST14.tsArrayType(
74684
- AST14.tsParenthesizedType(typeOptions)
74736
+ typeOptions = AST13.tsArrayType(
74737
+ AST13.tsParenthesizedType(typeOptions)
74685
74738
  );
74686
74739
  }
74687
74740
  }
74688
74741
  if (typeOptions.type === "TSParenthesizedType") {
74689
74742
  typeOptions = typeOptions.typeAnnotation;
74690
74743
  }
74691
- let args = AST14.tsNeverKeyword();
74744
+ let args = AST13.tsNeverKeyword();
74692
74745
  if (fieldType.args?.length > 0) {
74693
- args = AST14.tsTypeLiteral(
74746
+ args = AST13.tsTypeLiteral(
74694
74747
  fieldType.args.map((arg) => {
74695
74748
  addReferencedInputTypes(
74696
74749
  config4,
@@ -74700,9 +74753,9 @@ function typeDefinitions(config4, body, docs, returnType) {
74700
74753
  /* @__PURE__ */ new Set(),
74701
74754
  arg.type
74702
74755
  );
74703
- const prop = AST14.tsPropertySignature(
74704
- AST14.identifier(arg.name),
74705
- AST14.tsTypeAnnotation(
74756
+ const prop = AST13.tsPropertySignature(
74757
+ AST13.identifier(arg.name),
74758
+ AST13.tsTypeAnnotation(
74706
74759
  tsTypeReference(config4, /* @__PURE__ */ new Set(), arg, body)
74707
74760
  )
74708
74761
  );
@@ -74712,17 +74765,17 @@ function typeDefinitions(config4, body, docs, returnType) {
74712
74765
  })
74713
74766
  );
74714
74767
  }
74715
- return AST14.tsPropertySignature(
74716
- AST14.identifier(key),
74717
- AST14.tsTypeAnnotation(
74718
- AST14.tsTypeLiteral([
74719
- AST14.tsPropertySignature(
74720
- AST14.identifier("type"),
74721
- AST14.tsTypeAnnotation(typeOptions)
74768
+ return AST13.tsPropertySignature(
74769
+ AST13.identifier(key),
74770
+ AST13.tsTypeAnnotation(
74771
+ AST13.tsTypeLiteral([
74772
+ AST13.tsPropertySignature(
74773
+ AST13.identifier("type"),
74774
+ AST13.tsTypeAnnotation(typeOptions)
74722
74775
  ),
74723
- AST14.tsPropertySignature(
74724
- AST14.identifier("args"),
74725
- AST14.tsTypeAnnotation(args)
74776
+ AST13.tsPropertySignature(
74777
+ AST13.identifier("args"),
74778
+ AST13.tsTypeAnnotation(args)
74726
74779
  )
74727
74780
  ])
74728
74781
  )
@@ -74731,21 +74784,21 @@ function typeDefinitions(config4, body, docs, returnType) {
74731
74784
  )
74732
74785
  );
74733
74786
  }
74734
- return AST14.tsPropertySignature(
74735
- AST14.identifier(typeName),
74736
- AST14.tsTypeAnnotation(
74737
- AST14.tsTypeLiteral([
74738
- AST14.tsPropertySignature(
74739
- AST14.identifier("idFields"),
74740
- AST14.tsTypeAnnotation(idFields)
74787
+ return AST13.tsPropertySignature(
74788
+ AST13.identifier(typeName),
74789
+ AST13.tsTypeAnnotation(
74790
+ AST13.tsTypeLiteral([
74791
+ AST13.tsPropertySignature(
74792
+ AST13.identifier("idFields"),
74793
+ AST13.tsTypeAnnotation(idFields)
74741
74794
  ),
74742
- AST14.tsPropertySignature(
74743
- AST14.identifier("fields"),
74744
- AST14.tsTypeAnnotation(fields)
74795
+ AST13.tsPropertySignature(
74796
+ AST13.identifier("fields"),
74797
+ AST13.tsTypeAnnotation(fields)
74745
74798
  ),
74746
- AST14.tsPropertySignature(
74747
- AST14.identifier("fragments"),
74748
- AST14.tsTypeAnnotation(fragmentMap[typeName] ?? AST14.tsTupleType([]))
74799
+ AST13.tsPropertySignature(
74800
+ AST13.identifier("fragments"),
74801
+ AST13.tsTypeAnnotation(fragmentMap[typeName] ?? AST13.tsTupleType([]))
74749
74802
  )
74750
74803
  ])
74751
74804
  )
@@ -74787,28 +74840,28 @@ function listDefinitions(config4, body, docs) {
74787
74840
  possibleTypes.push(listType.name);
74788
74841
  }
74789
74842
  lists.push(
74790
- AST14.tsPropertySignature(
74791
- AST14.identifier(nameValue),
74792
- AST14.tsTypeAnnotation(
74793
- AST14.tsTypeLiteral([
74794
- AST14.tsPropertySignature(
74795
- AST14.identifier("types"),
74796
- AST14.tsTypeAnnotation(
74797
- AST14.tsUnionType(
74843
+ AST13.tsPropertySignature(
74844
+ AST13.identifier(nameValue),
74845
+ AST13.tsTypeAnnotation(
74846
+ AST13.tsTypeLiteral([
74847
+ AST13.tsPropertySignature(
74848
+ AST13.identifier("types"),
74849
+ AST13.tsTypeAnnotation(
74850
+ AST13.tsUnionType(
74798
74851
  possibleTypes.map(
74799
- (possible) => AST14.tsLiteralType(AST14.stringLiteral(possible))
74852
+ (possible) => AST13.tsLiteralType(AST13.stringLiteral(possible))
74800
74853
  )
74801
74854
  )
74802
74855
  )
74803
74856
  ),
74804
- AST14.tsPropertySignature(
74805
- AST14.identifier("filters"),
74806
- AST14.tsTypeAnnotation(
74807
- targetFieldDefinition.args.length === 0 ? AST14.tsNeverKeyword() : AST14.tsTypeLiteral(
74857
+ AST13.tsPropertySignature(
74858
+ AST13.identifier("filters"),
74859
+ AST13.tsTypeAnnotation(
74860
+ targetFieldDefinition.args.length === 0 ? AST13.tsNeverKeyword() : AST13.tsTypeLiteral(
74808
74861
  targetFieldDefinition.args.map((arg) => {
74809
- const argDef = AST14.tsPropertySignature(
74810
- AST14.identifier(arg.name),
74811
- AST14.tsTypeAnnotation(
74862
+ const argDef = AST13.tsPropertySignature(
74863
+ AST13.identifier(arg.name),
74864
+ AST13.tsTypeAnnotation(
74812
74865
  tsTypeReference(
74813
74866
  config4,
74814
74867
  /* @__PURE__ */ new Set(),
@@ -74830,10 +74883,10 @@ function listDefinitions(config4, body, docs) {
74830
74883
  }
74831
74884
  });
74832
74885
  }
74833
- return AST14.tsTypeLiteral(lists);
74886
+ return AST13.tsTypeLiteral(lists);
74834
74887
  }
74835
74888
  function queryDefinitions(config4, body, docs, returnType) {
74836
- return AST14.tsTupleType(
74889
+ return AST13.tsTupleType(
74837
74890
  docs.reduce((prev, doc) => {
74838
74891
  if (doc.kind !== ArtifactKind.Query || !doc.generateStore) {
74839
74892
  return prev;
@@ -74855,10 +74908,10 @@ function queryDefinitions(config4, body, docs, returnType) {
74855
74908
  import: [`${doc.name}$result`, `${doc.name}$input`]
74856
74909
  });
74857
74910
  return prev.concat(
74858
- AST14.tsTupleType([
74859
- AST14.tsTypeReference(AST14.identifier(runtimeType)),
74860
- AST14.tsTypeReference(AST14.identifier(shapeType)),
74861
- AST14.tsTypeReference(AST14.identifier(inputType))
74911
+ AST13.tsTupleType([
74912
+ AST13.tsTypeReference(AST13.identifier(runtimeType)),
74913
+ AST13.tsTypeReference(AST13.identifier(shapeType)),
74914
+ AST13.tsTypeReference(AST13.identifier(inputType))
74862
74915
  ])
74863
74916
  );
74864
74917
  }, [])
@@ -74887,13 +74940,13 @@ function fragmentListMap(config4, concreteTypes, body, docs, return_type) {
74887
74940
  ),
74888
74941
  import: [`${definition.name.value}$data`]
74889
74942
  });
74890
- let inputType = AST14.tsNeverKeyword();
74943
+ let inputType = AST13.tsNeverKeyword();
74891
74944
  let directive = definition.directives?.find(
74892
74945
  (directive2) => directive2.name.value === config4.argumentsDirective
74893
74946
  );
74894
74947
  if (directive) {
74895
- inputType = AST14.tsTypeReference(
74896
- AST14.identifier(
74948
+ inputType = AST13.tsTypeReference(
74949
+ AST13.identifier(
74897
74950
  ensureImports({
74898
74951
  config: config4,
74899
74952
  body,
@@ -74908,11 +74961,11 @@ function fragmentListMap(config4, concreteTypes, body, docs, return_type) {
74908
74961
  }
74909
74962
  return {
74910
74963
  ...prev,
74911
- [typeName]: AST14.tsTupleType(
74964
+ [typeName]: AST13.tsTupleType(
74912
74965
  previousValue.concat(
74913
- AST14.tsTupleType([
74914
- AST14.tsTypeReference(AST14.identifier(tagResult)),
74915
- AST14.tsTypeReference(AST14.identifier(shapeType)),
74966
+ AST13.tsTupleType([
74967
+ AST13.tsTypeReference(AST13.identifier(tagResult)),
74968
+ AST13.tsTypeReference(AST13.identifier(shapeType)),
74916
74969
  inputType
74917
74970
  ])
74918
74971
  )
@@ -74922,11 +74975,11 @@ function fragmentListMap(config4, concreteTypes, body, docs, return_type) {
74922
74975
  }
74923
74976
  var CacheTypeDefName = "CacheTypeDef";
74924
74977
  function record(name) {
74925
- return AST14.tsTypeReference(
74926
- AST14.identifier("Record"),
74927
- AST14.tsTypeParameterInstantiation([
74928
- AST14.tsTypeReference(AST14.identifier(CacheTypeDefName)),
74929
- AST14.tsLiteralType(AST14.stringLiteral(name))
74978
+ return AST13.tsTypeReference(
74979
+ AST13.identifier("Record"),
74980
+ AST13.tsTypeParameterInstantiation([
74981
+ AST13.tsTypeReference(AST13.identifier(CacheTypeDefName)),
74982
+ AST13.tsLiteralType(AST13.stringLiteral(name))
74930
74983
  ])
74931
74984
  );
74932
74985
  }
@@ -74979,25 +75032,25 @@ async function persistOutputGenerator(config4, docs) {
74979
75032
 
74980
75033
  // src/codegen/generators/definitions/enums.ts
74981
75034
  var graphql21 = __toESM(require_graphql2(), 1);
74982
- var recast15 = __toESM(require_main2(), 1);
74983
- var AST15 = recast15.types.builders;
75035
+ var recast14 = __toESM(require_main2(), 1);
75036
+ var AST14 = recast14.types.builders;
74984
75037
  async function definitionsGenerator(config4) {
74985
75038
  const enums = graphql21.parse(graphql21.printSchema(config4.schema)).definitions.filter(
74986
75039
  (definition) => definition.kind === "EnumTypeDefinition"
74987
75040
  ).filter((def) => !config4.isInternalEnum(def));
74988
75041
  const { code: runtimeDefinitions } = await printJS(
74989
- AST15.program(
75042
+ AST14.program(
74990
75043
  enums.map((defn) => {
74991
75044
  const name = defn.name.value;
74992
75045
  return moduleExport(
74993
75046
  config4,
74994
75047
  name,
74995
- AST15.objectExpression(
75048
+ AST14.objectExpression(
74996
75049
  defn.values?.map((value) => {
74997
75050
  const str = value.name.value;
74998
- return AST15.objectProperty(
74999
- AST15.stringLiteral(str),
75000
- AST15.stringLiteral(str)
75051
+ return AST14.objectProperty(
75052
+ AST14.stringLiteral(str),
75053
+ AST14.stringLiteral(str)
75001
75054
  );
75002
75055
  }) || []
75003
75056
  )
@@ -76761,8 +76814,8 @@ function find_exported_id(program, name) {
76761
76814
  }
76762
76815
 
76763
76816
  // src/vite/imports.ts
76764
- var recast16 = __toESM(require_main2(), 1);
76765
- var AST16 = recast16.types.builders;
76817
+ var recast15 = __toESM(require_main2(), 1);
76818
+ var AST15 = recast15.types.builders;
76766
76819
  function ensure_imports({
76767
76820
  config: config4,
76768
76821
  script,
@@ -76778,13 +76831,13 @@ function ensure_imports({
76778
76831
  if (!has_import) {
76779
76832
  script.body.unshift({
76780
76833
  type: "ImportDeclaration",
76781
- source: AST16.stringLiteral(sourceModule),
76834
+ source: AST15.stringLiteral(sourceModule),
76782
76835
  importKind
76783
76836
  });
76784
76837
  }
76785
76838
  return { ids: [], added: has_import ? 0 : 1 };
76786
76839
  }
76787
- const idList = (Array.isArray(importID) ? importID : [importID]).map((id) => AST16.identifier(id));
76840
+ const idList = (Array.isArray(importID) ? importID : [importID]).map((id) => AST15.identifier(id));
76788
76841
  const toImport = idList.filter(
76789
76842
  (identifier) => !script.body.find(
76790
76843
  (statement) => statement.type === "ImportDeclaration" && statement.specifiers?.find(
@@ -76795,16 +76848,16 @@ function ensure_imports({
76795
76848
  if (toImport.length > 0) {
76796
76849
  script.body.unshift({
76797
76850
  type: "ImportDeclaration",
76798
- source: AST16.stringLiteral(sourceModule),
76851
+ source: AST15.stringLiteral(sourceModule),
76799
76852
  specifiers: toImport.map(
76800
- (identifier, i2) => !Array.isArray(importID) ? AST16.importDefaultSpecifier(identifier) : AST16.importSpecifier(identifier, as?.[i2] ? AST16.identifier(as[i2]) : identifier)
76853
+ (identifier, i2) => !Array.isArray(importID) ? AST15.importDefaultSpecifier(identifier) : AST15.importSpecifier(identifier, as?.[i2] ? AST15.identifier(as[i2]) : identifier)
76801
76854
  ),
76802
76855
  importKind
76803
76856
  });
76804
76857
  }
76805
76858
  for (const [i2, target] of (as ?? []).entries()) {
76806
76859
  if (target) {
76807
- idList[i2] = AST16.identifier(target);
76860
+ idList[i2] = AST15.identifier(target);
76808
76861
  }
76809
76862
  }
76810
76863
  return {