houdini 1.2.27 → 1.2.29

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 (71) hide show
  1. package/build/adapter/index.d.ts +1 -1
  2. package/build/cmd-cjs/index.js +4169 -1854
  3. package/build/cmd-esm/index.js +4169 -1854
  4. package/build/codegen/generators/artifacts/selection.d.ts +2 -1
  5. package/build/codegen/generators/typescript/inlineType.d.ts +5 -1
  6. package/build/codegen/generators/typescript/typeReference.d.ts +1 -1
  7. package/build/codegen/generators/typescript/types.d.ts +6 -3
  8. package/build/codegen/transforms/collectDefinitions.d.ts +1 -1
  9. package/build/codegen/transforms/componentFields.d.ts +8 -0
  10. package/build/codegen/transforms/fragmentVariables.d.ts +1 -1
  11. package/build/codegen/transforms/index.d.ts +1 -0
  12. package/build/codegen/validators/componentFields.d.ts +2 -0
  13. package/build/codegen/validators/index.d.ts +1 -0
  14. package/build/codegen-cjs/index.js +3674 -1393
  15. package/build/codegen-esm/index.js +3674 -1393
  16. package/build/lib/config.d.ts +21 -1
  17. package/build/lib/detectTools.d.ts +1 -1
  18. package/build/lib/graphql.d.ts +6 -0
  19. package/build/lib/imports.d.ts +1 -1
  20. package/build/lib/router/conventions.d.ts +1 -0
  21. package/build/lib/types.d.ts +4 -2
  22. package/build/lib/walk.d.ts +1 -0
  23. package/build/lib-cjs/index.js +1120 -747
  24. package/build/lib-esm/index.js +1119 -747
  25. package/build/runtime/cache/cache.d.ts +24 -3
  26. package/build/runtime/cache/storage.d.ts +1 -1
  27. package/build/runtime/client/index.d.ts +1 -0
  28. package/build/runtime/index.d.ts +1 -1
  29. package/build/runtime/lib/config.d.ts +9 -0
  30. package/build/runtime/lib/index.d.ts +1 -0
  31. package/build/runtime/lib/types.d.ts +18 -1
  32. package/build/runtime/router/server.d.ts +3 -1
  33. package/build/runtime/router/types.d.ts +1 -0
  34. package/build/runtime-cjs/cache/cache.d.ts +24 -3
  35. package/build/runtime-cjs/cache/cache.js +78 -8
  36. package/build/runtime-cjs/cache/storage.d.ts +1 -1
  37. package/build/runtime-cjs/cache/storage.js +16 -3
  38. package/build/runtime-cjs/client/index.d.ts +1 -0
  39. package/build/runtime-cjs/client/index.js +1 -0
  40. package/build/runtime-cjs/index.d.ts +1 -1
  41. package/build/runtime-cjs/lib/config.d.ts +9 -0
  42. package/build/runtime-cjs/lib/index.d.ts +1 -0
  43. package/build/runtime-cjs/lib/index.js +1 -0
  44. package/build/runtime-cjs/lib/types.d.ts +18 -1
  45. package/build/runtime-cjs/public/cache.js +3 -2
  46. package/build/runtime-cjs/router/server.d.ts +3 -1
  47. package/build/runtime-cjs/router/server.js +5 -2
  48. package/build/runtime-cjs/router/session.js +9 -6
  49. package/build/runtime-cjs/router/types.d.ts +1 -0
  50. package/build/runtime-esm/cache/cache.d.ts +24 -3
  51. package/build/runtime-esm/cache/cache.js +76 -8
  52. package/build/runtime-esm/cache/storage.d.ts +1 -1
  53. package/build/runtime-esm/cache/storage.js +16 -3
  54. package/build/runtime-esm/client/index.d.ts +1 -0
  55. package/build/runtime-esm/client/index.js +1 -0
  56. package/build/runtime-esm/index.d.ts +1 -1
  57. package/build/runtime-esm/lib/config.d.ts +9 -0
  58. package/build/runtime-esm/lib/index.d.ts +1 -0
  59. package/build/runtime-esm/lib/index.js +1 -0
  60. package/build/runtime-esm/lib/types.d.ts +18 -1
  61. package/build/runtime-esm/public/cache.js +3 -2
  62. package/build/runtime-esm/router/server.d.ts +3 -1
  63. package/build/runtime-esm/router/server.js +5 -2
  64. package/build/runtime-esm/router/session.js +9 -6
  65. package/build/runtime-esm/router/types.d.ts +1 -0
  66. package/build/test-cjs/index.js +3556 -1373
  67. package/build/test-esm/index.js +3556 -1373
  68. package/build/vite/schema.d.ts +4 -1
  69. package/build/vite-cjs/index.js +4543 -2823
  70. package/build/vite-esm/index.js +4540 -2822
  71. package/package.json +4 -3
@@ -28118,11 +28118,11 @@ var require_types = __commonJS({
28118
28118
  }();
28119
28119
  exports.Def = Def;
28120
28120
  var Field = function() {
28121
- function Field2(name, type, defaultFn, hidden) {
28121
+ function Field2(name, type, defaultFn, hidden3) {
28122
28122
  this.name = name;
28123
28123
  this.type = type;
28124
28124
  this.defaultFn = defaultFn;
28125
- this.hidden = !!hidden;
28125
+ this.hidden = !!hidden3;
28126
28126
  }
28127
28127
  Field2.prototype.toString = function() {
28128
28128
  return JSON.stringify(this.name) + ": " + this.type;
@@ -28371,12 +28371,12 @@ var require_types = __commonJS({
28371
28371
  });
28372
28372
  return this;
28373
28373
  };
28374
- DefImpl2.prototype.field = function(name, type, defaultFn, hidden) {
28374
+ DefImpl2.prototype.field = function(name, type, defaultFn, hidden3) {
28375
28375
  if (this.finalized) {
28376
28376
  console.error("Ignoring attempt to redefine field " + JSON.stringify(name) + " of finalized type " + JSON.stringify(this.typeName));
28377
28377
  return this;
28378
28378
  }
28379
- this.ownFields[name] = new Field(name, Type.from(type), defaultFn, hidden);
28379
+ this.ownFields[name] = new Field(name, Type.from(type), defaultFn, hidden3);
28380
28380
  return this;
28381
28381
  };
28382
28382
  DefImpl2.prototype.finalize = function() {
@@ -29756,7 +29756,7 @@ var require_path_visitor = __commonJS({
29756
29756
  return Context;
29757
29757
  }
29758
29758
  var sharedContextProtoMethods = /* @__PURE__ */ Object.create(null);
29759
- sharedContextProtoMethods.reset = function reset(path3) {
29759
+ sharedContextProtoMethods.reset = function reset3(path3) {
29760
29760
  if (!(this instanceof this.Context)) {
29761
29761
  throw new Error("");
29762
29762
  }
@@ -39314,13 +39314,13 @@ var require_esprima2 = __commonJS({
39314
39314
  return Reader2;
39315
39315
  }();
39316
39316
  var Tokenizer = function() {
39317
- function Tokenizer2(code, config2) {
39317
+ function Tokenizer2(code, config) {
39318
39318
  this.errorHandler = new error_handler_1.ErrorHandler();
39319
- this.errorHandler.tolerant = config2 ? typeof config2.tolerant === "boolean" && config2.tolerant : false;
39319
+ this.errorHandler.tolerant = config ? typeof config.tolerant === "boolean" && config.tolerant : false;
39320
39320
  this.scanner = new scanner_1.Scanner(code, this.errorHandler);
39321
- this.scanner.trackComment = config2 ? typeof config2.comment === "boolean" && config2.comment : false;
39322
- this.trackRange = config2 ? typeof config2.range === "boolean" && config2.range : false;
39323
- this.trackLoc = config2 ? typeof config2.loc === "boolean" && config2.loc : false;
39321
+ this.scanner.trackComment = config ? typeof config.comment === "boolean" && config.comment : false;
39322
+ this.trackRange = config ? typeof config.range === "boolean" && config.range : false;
39323
+ this.trackLoc = config ? typeof config.loc === "boolean" && config.loc : false;
39324
39324
  this.buffer = [];
39325
39325
  this.reader = new Reader();
39326
39326
  }
@@ -40461,12 +40461,12 @@ var require_comments = __commonJS({
40461
40461
  comment.trailing = true;
40462
40462
  addCommentHelper(node, comment);
40463
40463
  }
40464
- function printLeadingComment(commentPath, print5) {
40464
+ function printLeadingComment(commentPath, print6) {
40465
40465
  var comment = commentPath.getValue();
40466
40466
  n.Comment.assert(comment);
40467
40467
  var loc = comment.loc;
40468
40468
  var lines = loc && loc.lines;
40469
- var parts = [print5(commentPath)];
40469
+ var parts = [print6(commentPath)];
40470
40470
  if (comment.trailing) {
40471
40471
  parts.push("\n");
40472
40472
  } else if (lines instanceof lines_1.Lines) {
@@ -40481,7 +40481,7 @@ var require_comments = __commonJS({
40481
40481
  }
40482
40482
  return (0, lines_1.concat)(parts);
40483
40483
  }
40484
- function printTrailingComment(commentPath, print5) {
40484
+ function printTrailingComment(commentPath, print6) {
40485
40485
  var comment = commentPath.getValue(commentPath);
40486
40486
  n.Comment.assert(comment);
40487
40487
  var loc = comment.loc;
@@ -40496,12 +40496,12 @@ var require_comments = __commonJS({
40496
40496
  parts.push(new Array(leadingSpace.length).join("\n"));
40497
40497
  }
40498
40498
  }
40499
- parts.push(print5(commentPath));
40499
+ parts.push(print6(commentPath));
40500
40500
  return (0, lines_1.concat)(parts);
40501
40501
  }
40502
- function printComments(path3, print5) {
40502
+ function printComments(path3, print6) {
40503
40503
  var value = path3.getValue();
40504
- var innerLines = print5(path3);
40504
+ var innerLines = print6(path3);
40505
40505
  var comments = n.Node.check(value) && types4.getFieldValue(value, "comments");
40506
40506
  if (!comments || comments.length === 0) {
40507
40507
  return innerLines;
@@ -40513,9 +40513,9 @@ var require_comments = __commonJS({
40513
40513
  var leading = types4.getFieldValue(comment, "leading");
40514
40514
  var trailing = types4.getFieldValue(comment, "trailing");
40515
40515
  if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
40516
- leadingParts.push(printLeadingComment(commentPath, print5));
40516
+ leadingParts.push(printLeadingComment(commentPath, print6));
40517
40517
  } else if (trailing) {
40518
- trailingParts.push(printTrailingComment(commentPath, print5));
40518
+ trailingParts.push(printTrailingComment(commentPath, print6));
40519
40519
  }
40520
40520
  }, "comments");
40521
40521
  leadingParts.push.apply(leadingParts, trailingParts);
@@ -41206,7 +41206,7 @@ var require_patcher = __commonJS({
41206
41206
  };
41207
41207
  exports.Patcher = Patcher;
41208
41208
  var Pp = Patcher.prototype;
41209
- Pp.tryToReprintComments = function(newNode, oldNode, print5) {
41209
+ Pp.tryToReprintComments = function(newNode, oldNode, print6) {
41210
41210
  var patcher = this;
41211
41211
  if (!newNode.comments && !oldNode.comments) {
41212
41212
  return true;
@@ -41223,7 +41223,7 @@ var require_patcher = __commonJS({
41223
41223
  assert_1.default.ok(oldComment.leading || oldComment.trailing);
41224
41224
  patcher.replace(
41225
41225
  oldComment.loc,
41226
- print5(reprint.newPath).indentTail(oldComment.loc.indent)
41226
+ print6(reprint.newPath).indentTail(oldComment.loc.indent)
41227
41227
  );
41228
41228
  });
41229
41229
  }
@@ -41270,17 +41270,17 @@ var require_patcher = __commonJS({
41270
41270
  var reprints = [];
41271
41271
  if (!lines || !findReprints(path3, reprints))
41272
41272
  return;
41273
- return function(print5) {
41273
+ return function(print6) {
41274
41274
  var patcher = new Patcher(lines);
41275
41275
  reprints.forEach(function(reprint) {
41276
41276
  var newNode = reprint.newPath.getValue();
41277
41277
  var oldNode = reprint.oldPath.getValue();
41278
41278
  SourceLocation.assert(oldNode.loc, true);
41279
- var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode, print5);
41279
+ var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode, print6);
41280
41280
  if (needToPrintNewPathWithComments) {
41281
41281
  patcher.deleteComments(oldNode);
41282
41282
  }
41283
- var newLines = print5(reprint.newPath, {
41283
+ var newLines = print6(reprint.newPath, {
41284
41284
  includeComments: needToPrintNewPathWithComments,
41285
41285
  avoidRootParens: oldNode.type === newNode.type && reprint.oldPath.hasParens()
41286
41286
  }).indentTail(oldNode.loc.indent);
@@ -41489,18 +41489,18 @@ var require_printer = __commonJS({
41489
41489
  return this.code;
41490
41490
  };
41491
41491
  var emptyPrintResult = new PrintResult("");
41492
- var Printer = function Printer2(config2) {
41492
+ var Printer = function Printer2(config) {
41493
41493
  assert_1.default.ok(this instanceof Printer2);
41494
- var explicitTabWidth = config2 && config2.tabWidth;
41495
- config2 = (0, options_1.normalize)(config2);
41496
- config2.sourceFileName = null;
41494
+ var explicitTabWidth = config && config.tabWidth;
41495
+ config = (0, options_1.normalize)(config);
41496
+ config.sourceFileName = null;
41497
41497
  function makePrintFunctionWith(options, overrides) {
41498
41498
  options = Object.assign({}, options, overrides);
41499
41499
  return function(path3) {
41500
- return print5(path3, options);
41500
+ return print6(path3, options);
41501
41501
  };
41502
41502
  }
41503
- function print5(path3, options) {
41503
+ function print6(path3, options) {
41504
41504
  assert_1.default.ok(path3 instanceof fast_path_1.default);
41505
41505
  options = options || {};
41506
41506
  if (options.includeComments) {
@@ -41508,30 +41508,30 @@ var require_printer = __commonJS({
41508
41508
  includeComments: false
41509
41509
  }));
41510
41510
  }
41511
- var oldTabWidth = config2.tabWidth;
41511
+ var oldTabWidth = config.tabWidth;
41512
41512
  if (!explicitTabWidth) {
41513
41513
  var loc = path3.getNode().loc;
41514
41514
  if (loc && loc.lines && loc.lines.guessTabWidth) {
41515
- config2.tabWidth = loc.lines.guessTabWidth();
41515
+ config.tabWidth = loc.lines.guessTabWidth();
41516
41516
  }
41517
41517
  }
41518
41518
  var reprinter = (0, patcher_1.getReprinter)(path3);
41519
- var lines = reprinter ? reprinter(print5) : genericPrint(path3, config2, options, makePrintFunctionWith(options, {
41519
+ var lines = reprinter ? reprinter(print6) : genericPrint(path3, config, options, makePrintFunctionWith(options, {
41520
41520
  includeComments: true,
41521
41521
  avoidRootParens: false
41522
41522
  }));
41523
- config2.tabWidth = oldTabWidth;
41523
+ config.tabWidth = oldTabWidth;
41524
41524
  return lines;
41525
41525
  }
41526
41526
  this.print = function(ast) {
41527
41527
  if (!ast) {
41528
41528
  return emptyPrintResult;
41529
41529
  }
41530
- var lines = print5(fast_path_1.default.from(ast), {
41530
+ var lines = print6(fast_path_1.default.from(ast), {
41531
41531
  includeComments: true,
41532
41532
  avoidRootParens: false
41533
41533
  });
41534
- return new PrintResult(lines.toString(config2), util.composeSourceMaps(config2.inputSourceMap, lines.getSourceMap(config2.sourceMapName, config2.sourceRoot)));
41534
+ return new PrintResult(lines.toString(config), util.composeSourceMaps(config.inputSourceMap, lines.getSourceMap(config.sourceMapName, config.sourceRoot)));
41535
41535
  };
41536
41536
  this.printGenerically = function(ast) {
41537
41537
  if (!ast) {
@@ -41539,26 +41539,26 @@ var require_printer = __commonJS({
41539
41539
  }
41540
41540
  function printGenerically(path4) {
41541
41541
  return (0, comments_1.printComments)(path4, function(path5) {
41542
- return genericPrint(path5, config2, {
41542
+ return genericPrint(path5, config, {
41543
41543
  includeComments: true,
41544
41544
  avoidRootParens: false
41545
41545
  }, printGenerically);
41546
41546
  });
41547
41547
  }
41548
41548
  var path3 = fast_path_1.default.from(ast);
41549
- var oldReuseWhitespace = config2.reuseWhitespace;
41550
- config2.reuseWhitespace = false;
41551
- var pr = new PrintResult(printGenerically(path3).toString(config2));
41552
- config2.reuseWhitespace = oldReuseWhitespace;
41549
+ var oldReuseWhitespace = config.reuseWhitespace;
41550
+ config.reuseWhitespace = false;
41551
+ var pr = new PrintResult(printGenerically(path3).toString(config));
41552
+ config.reuseWhitespace = oldReuseWhitespace;
41553
41553
  return pr;
41554
41554
  };
41555
41555
  };
41556
41556
  exports.Printer = Printer;
41557
- function genericPrint(path3, config2, options, printPath) {
41557
+ function genericPrint(path3, config, options, printPath) {
41558
41558
  assert_1.default.ok(path3 instanceof fast_path_1.default);
41559
41559
  var node = path3.getValue();
41560
41560
  var parts = [];
41561
- var linesWithoutParens = genericPrintNoParens(path3, config2, printPath);
41561
+ var linesWithoutParens = genericPrintNoParens(path3, config, printPath);
41562
41562
  if (!node || linesWithoutParens.isEmpty()) {
41563
41563
  return linesWithoutParens;
41564
41564
  }
@@ -41580,7 +41580,7 @@ var require_printer = __commonJS({
41580
41580
  }
41581
41581
  return (0, lines_1.concat)(parts);
41582
41582
  }
41583
- function genericPrintNoParens(path3, options, print5) {
41583
+ function genericPrintNoParens(path3, options, print6) {
41584
41584
  var n = path3.getValue();
41585
41585
  if (!n) {
41586
41586
  return (0, lines_1.fromString)("");
@@ -41592,45 +41592,45 @@ var require_printer = __commonJS({
41592
41592
  var parts = [];
41593
41593
  switch (n.type) {
41594
41594
  case "File":
41595
- return path3.call(print5, "program");
41595
+ return path3.call(print6, "program");
41596
41596
  case "Program":
41597
41597
  if (n.directives) {
41598
41598
  path3.each(function(childPath) {
41599
- parts.push(print5(childPath), ";\n");
41599
+ parts.push(print6(childPath), ";\n");
41600
41600
  }, "directives");
41601
41601
  }
41602
41602
  if (n.interpreter) {
41603
- parts.push(path3.call(print5, "interpreter"));
41603
+ parts.push(path3.call(print6, "interpreter"));
41604
41604
  }
41605
41605
  parts.push(path3.call(function(bodyPath) {
41606
- return printStatementSequence(bodyPath, options, print5);
41606
+ return printStatementSequence(bodyPath, options, print6);
41607
41607
  }, "body"));
41608
41608
  return (0, lines_1.concat)(parts);
41609
41609
  case "Noop":
41610
41610
  case "EmptyStatement":
41611
41611
  return (0, lines_1.fromString)("");
41612
41612
  case "ExpressionStatement":
41613
- return (0, lines_1.concat)([path3.call(print5, "expression"), ";"]);
41613
+ return (0, lines_1.concat)([path3.call(print6, "expression"), ";"]);
41614
41614
  case "ParenthesizedExpression":
41615
- return (0, lines_1.concat)(["(", path3.call(print5, "expression"), ")"]);
41615
+ return (0, lines_1.concat)(["(", path3.call(print6, "expression"), ")"]);
41616
41616
  case "BinaryExpression":
41617
41617
  case "LogicalExpression":
41618
41618
  case "AssignmentExpression":
41619
41619
  return (0, lines_1.fromString)(" ").join([
41620
- path3.call(print5, "left"),
41620
+ path3.call(print6, "left"),
41621
41621
  n.operator,
41622
- path3.call(print5, "right")
41622
+ path3.call(print6, "right")
41623
41623
  ]);
41624
41624
  case "AssignmentPattern":
41625
41625
  return (0, lines_1.concat)([
41626
- path3.call(print5, "left"),
41626
+ path3.call(print6, "left"),
41627
41627
  " = ",
41628
- path3.call(print5, "right")
41628
+ path3.call(print6, "right")
41629
41629
  ]);
41630
41630
  case "MemberExpression":
41631
41631
  case "OptionalMemberExpression": {
41632
- parts.push(path3.call(print5, "object"));
41633
- var property = path3.call(print5, "property");
41632
+ parts.push(path3.call(print6, "object"));
41633
+ var property = path3.call(print6, "property");
41634
41634
  var optional = types4.getFieldValue(n, "optional");
41635
41635
  if (n.computed) {
41636
41636
  parts.push(optional ? "?.[" : "[", property, "]");
@@ -41640,18 +41640,18 @@ var require_printer = __commonJS({
41640
41640
  return (0, lines_1.concat)(parts);
41641
41641
  }
41642
41642
  case "ChainExpression":
41643
- return path3.call(print5, "expression");
41643
+ return path3.call(print6, "expression");
41644
41644
  case "MetaProperty":
41645
41645
  return (0, lines_1.concat)([
41646
- path3.call(print5, "meta"),
41646
+ path3.call(print6, "meta"),
41647
41647
  ".",
41648
- path3.call(print5, "property")
41648
+ path3.call(print6, "property")
41649
41649
  ]);
41650
41650
  case "BindExpression":
41651
41651
  if (n.object) {
41652
- parts.push(path3.call(print5, "object"));
41652
+ parts.push(path3.call(print6, "object"));
41653
41653
  }
41654
- parts.push("::", path3.call(print5, "callee"));
41654
+ parts.push("::", path3.call(print6, "callee"));
41655
41655
  return (0, lines_1.concat)(parts);
41656
41656
  case "Path":
41657
41657
  return (0, lines_1.fromString)(".").join(n.body);
@@ -41659,7 +41659,7 @@ var require_printer = __commonJS({
41659
41659
  return (0, lines_1.concat)([
41660
41660
  (0, lines_1.fromString)(n.name, options),
41661
41661
  n.optional ? "?" : "",
41662
- path3.call(print5, "typeAnnotation")
41662
+ path3.call(print6, "typeAnnotation")
41663
41663
  ]);
41664
41664
  case "SpreadElement":
41665
41665
  case "SpreadElementPattern":
@@ -41670,8 +41670,8 @@ var require_printer = __commonJS({
41670
41670
  case "RestElement":
41671
41671
  return (0, lines_1.concat)([
41672
41672
  "...",
41673
- path3.call(print5, "argument"),
41674
- path3.call(print5, "typeAnnotation")
41673
+ path3.call(print6, "argument"),
41674
+ path3.call(print6, "typeAnnotation")
41675
41675
  ]);
41676
41676
  case "FunctionDeclaration":
41677
41677
  case "FunctionExpression":
@@ -41686,15 +41686,15 @@ var require_printer = __commonJS({
41686
41686
  if (n.generator)
41687
41687
  parts.push("*");
41688
41688
  if (n.id) {
41689
- parts.push(" ", path3.call(print5, "id"), path3.call(print5, "typeParameters"));
41689
+ parts.push(" ", path3.call(print6, "id"), path3.call(print6, "typeParameters"));
41690
41690
  } else {
41691
41691
  if (n.typeParameters) {
41692
- parts.push(path3.call(print5, "typeParameters"));
41692
+ parts.push(path3.call(print6, "typeParameters"));
41693
41693
  }
41694
41694
  }
41695
- parts.push("(", printFunctionParams(path3, options, print5), ")", path3.call(print5, "returnType"));
41695
+ parts.push("(", printFunctionParams(path3, options, print6), ")", path3.call(print6, "returnType"));
41696
41696
  if (n.body) {
41697
- parts.push(" ", path3.call(print5, "body"));
41697
+ parts.push(" ", path3.call(print6, "body"));
41698
41698
  }
41699
41699
  return (0, lines_1.concat)(parts);
41700
41700
  case "ArrowFunctionExpression":
@@ -41702,44 +41702,44 @@ var require_printer = __commonJS({
41702
41702
  parts.push("async ");
41703
41703
  }
41704
41704
  if (n.typeParameters) {
41705
- parts.push(path3.call(print5, "typeParameters"));
41705
+ parts.push(path3.call(print6, "typeParameters"));
41706
41706
  }
41707
41707
  if (!options.arrowParensAlways && n.params.length === 1 && !n.rest && n.params[0].type === "Identifier" && !n.params[0].typeAnnotation && !n.returnType) {
41708
- parts.push(path3.call(print5, "params", 0));
41708
+ parts.push(path3.call(print6, "params", 0));
41709
41709
  } else {
41710
- parts.push("(", printFunctionParams(path3, options, print5), ")", path3.call(print5, "returnType"));
41710
+ parts.push("(", printFunctionParams(path3, options, print6), ")", path3.call(print6, "returnType"));
41711
41711
  }
41712
- parts.push(" => ", path3.call(print5, "body"));
41712
+ parts.push(" => ", path3.call(print6, "body"));
41713
41713
  return (0, lines_1.concat)(parts);
41714
41714
  case "MethodDefinition":
41715
- return printMethod(path3, options, print5);
41715
+ return printMethod(path3, options, print6);
41716
41716
  case "YieldExpression":
41717
41717
  parts.push("yield");
41718
41718
  if (n.delegate)
41719
41719
  parts.push("*");
41720
41720
  if (n.argument)
41721
- parts.push(" ", path3.call(print5, "argument"));
41721
+ parts.push(" ", path3.call(print6, "argument"));
41722
41722
  return (0, lines_1.concat)(parts);
41723
41723
  case "AwaitExpression":
41724
41724
  parts.push("await");
41725
41725
  if (n.all)
41726
41726
  parts.push("*");
41727
41727
  if (n.argument)
41728
- parts.push(" ", path3.call(print5, "argument"));
41728
+ parts.push(" ", path3.call(print6, "argument"));
41729
41729
  return (0, lines_1.concat)(parts);
41730
41730
  case "ModuleExpression":
41731
41731
  return (0, lines_1.concat)([
41732
41732
  "module {\n",
41733
- path3.call(print5, "body").indent(options.tabWidth),
41733
+ path3.call(print6, "body").indent(options.tabWidth),
41734
41734
  "\n}"
41735
41735
  ]);
41736
41736
  case "ModuleDeclaration":
41737
- parts.push("module", path3.call(print5, "id"));
41737
+ parts.push("module", path3.call(print6, "id"));
41738
41738
  if (n.source) {
41739
41739
  assert_1.default.ok(!n.body);
41740
- parts.push("from", path3.call(print5, "source"));
41740
+ parts.push("from", path3.call(print6, "source"));
41741
41741
  } else {
41742
- parts.push(path3.call(print5, "body"));
41742
+ parts.push(path3.call(print6, "body"));
41743
41743
  }
41744
41744
  return (0, lines_1.fromString)(" ").join(parts);
41745
41745
  case "ImportSpecifier":
@@ -41747,27 +41747,27 @@ var require_printer = __commonJS({
41747
41747
  parts.push(n.importKind + " ");
41748
41748
  }
41749
41749
  if (n.imported) {
41750
- parts.push(path3.call(print5, "imported"));
41750
+ parts.push(path3.call(print6, "imported"));
41751
41751
  if (n.local && n.local.name !== n.imported.name) {
41752
- parts.push(" as ", path3.call(print5, "local"));
41752
+ parts.push(" as ", path3.call(print6, "local"));
41753
41753
  }
41754
41754
  } else if (n.id) {
41755
- parts.push(path3.call(print5, "id"));
41755
+ parts.push(path3.call(print6, "id"));
41756
41756
  if (n.name) {
41757
- parts.push(" as ", path3.call(print5, "name"));
41757
+ parts.push(" as ", path3.call(print6, "name"));
41758
41758
  }
41759
41759
  }
41760
41760
  return (0, lines_1.concat)(parts);
41761
41761
  case "ExportSpecifier":
41762
41762
  if (n.local) {
41763
- parts.push(path3.call(print5, "local"));
41763
+ parts.push(path3.call(print6, "local"));
41764
41764
  if (n.exported && n.exported.name !== n.local.name) {
41765
- parts.push(" as ", path3.call(print5, "exported"));
41765
+ parts.push(" as ", path3.call(print6, "exported"));
41766
41766
  }
41767
41767
  } else if (n.id) {
41768
- parts.push(path3.call(print5, "id"));
41768
+ parts.push(path3.call(print6, "id"));
41769
41769
  if (n.name) {
41770
- parts.push(" as ", path3.call(print5, "name"));
41770
+ parts.push(" as ", path3.call(print6, "name"));
41771
41771
  }
41772
41772
  }
41773
41773
  return (0, lines_1.concat)(parts);
@@ -41776,40 +41776,40 @@ var require_printer = __commonJS({
41776
41776
  case "ImportNamespaceSpecifier":
41777
41777
  parts.push("* as ");
41778
41778
  if (n.local) {
41779
- parts.push(path3.call(print5, "local"));
41779
+ parts.push(path3.call(print6, "local"));
41780
41780
  } else if (n.id) {
41781
- parts.push(path3.call(print5, "id"));
41781
+ parts.push(path3.call(print6, "id"));
41782
41782
  }
41783
41783
  return (0, lines_1.concat)(parts);
41784
41784
  case "ImportDefaultSpecifier":
41785
41785
  if (n.local) {
41786
- return path3.call(print5, "local");
41786
+ return path3.call(print6, "local");
41787
41787
  }
41788
- return path3.call(print5, "id");
41788
+ return path3.call(print6, "id");
41789
41789
  case "TSExportAssignment":
41790
- return (0, lines_1.concat)(["export = ", path3.call(print5, "expression")]);
41790
+ return (0, lines_1.concat)(["export = ", path3.call(print6, "expression")]);
41791
41791
  case "ExportDeclaration":
41792
41792
  case "ExportDefaultDeclaration":
41793
41793
  case "ExportNamedDeclaration":
41794
- return printExportDeclaration(path3, options, print5);
41794
+ return printExportDeclaration(path3, options, print6);
41795
41795
  case "ExportAllDeclaration":
41796
41796
  parts.push("export *");
41797
41797
  if (n.exported) {
41798
- parts.push(" as ", path3.call(print5, "exported"));
41798
+ parts.push(" as ", path3.call(print6, "exported"));
41799
41799
  }
41800
- parts.push(" from ", path3.call(print5, "source"), ";");
41800
+ parts.push(" from ", path3.call(print6, "source"), ";");
41801
41801
  return (0, lines_1.concat)(parts);
41802
41802
  case "TSNamespaceExportDeclaration":
41803
- parts.push("export as namespace ", path3.call(print5, "id"));
41803
+ parts.push("export as namespace ", path3.call(print6, "id"));
41804
41804
  return maybeAddSemicolon((0, lines_1.concat)(parts));
41805
41805
  case "ExportNamespaceSpecifier":
41806
- return (0, lines_1.concat)(["* as ", path3.call(print5, "exported")]);
41806
+ return (0, lines_1.concat)(["* as ", path3.call(print6, "exported")]);
41807
41807
  case "ExportDefaultSpecifier":
41808
- return path3.call(print5, "exported");
41808
+ return path3.call(print6, "exported");
41809
41809
  case "Import":
41810
41810
  return (0, lines_1.fromString)("import", options);
41811
41811
  case "ImportExpression":
41812
- return (0, lines_1.concat)(["import(", path3.call(print5, "source"), ")"]);
41812
+ return (0, lines_1.concat)(["import(", path3.call(print6, "source"), ")"]);
41813
41813
  case "ImportDeclaration": {
41814
41814
  parts.push("import ");
41815
41815
  if (n.importKind && n.importKind !== "value") {
@@ -41821,9 +41821,9 @@ var require_printer = __commonJS({
41821
41821
  path3.each(function(specifierPath) {
41822
41822
  var spec = specifierPath.getValue();
41823
41823
  if (spec.type === "ImportSpecifier") {
41824
- bracedSpecifiers_1.push(print5(specifierPath));
41824
+ bracedSpecifiers_1.push(print6(specifierPath));
41825
41825
  } else if (spec.type === "ImportDefaultSpecifier" || spec.type === "ImportNamespaceSpecifier") {
41826
- unbracedSpecifiers_1.push(print5(specifierPath));
41826
+ unbracedSpecifiers_1.push(print6(specifierPath));
41827
41827
  }
41828
41828
  }, "specifiers");
41829
41829
  unbracedSpecifiers_1.forEach(function(lines2, i2) {
@@ -41853,16 +41853,16 @@ var require_printer = __commonJS({
41853
41853
  }
41854
41854
  parts.push(" from ");
41855
41855
  }
41856
- parts.push(path3.call(print5, "source"), maybePrintImportAssertions(path3, options, print5), ";");
41856
+ parts.push(path3.call(print6, "source"), maybePrintImportAssertions(path3, options, print6), ";");
41857
41857
  return (0, lines_1.concat)(parts);
41858
41858
  }
41859
41859
  case "ImportAttribute":
41860
- return (0, lines_1.concat)([path3.call(print5, "key"), ": ", path3.call(print5, "value")]);
41860
+ return (0, lines_1.concat)([path3.call(print6, "key"), ": ", path3.call(print6, "value")]);
41861
41861
  case "StaticBlock":
41862
41862
  parts.push("static ");
41863
41863
  case "BlockStatement": {
41864
41864
  var naked_1 = path3.call(function(bodyPath) {
41865
- return printStatementSequence(bodyPath, options, print5);
41865
+ return printStatementSequence(bodyPath, options, print6);
41866
41866
  }, "body");
41867
41867
  if (naked_1.isEmpty()) {
41868
41868
  if (!n.directives || n.directives.length === 0) {
@@ -41873,7 +41873,7 @@ var require_printer = __commonJS({
41873
41873
  parts.push("{\n");
41874
41874
  if (n.directives) {
41875
41875
  path3.each(function(childPath) {
41876
- parts.push(maybeAddSemicolon(print5(childPath).indent(options.tabWidth)), n.directives.length > 1 || !naked_1.isEmpty() ? "\n" : "");
41876
+ parts.push(maybeAddSemicolon(print6(childPath).indent(options.tabWidth)), n.directives.length > 1 || !naked_1.isEmpty() ? "\n" : "");
41877
41877
  }, "directives");
41878
41878
  }
41879
41879
  parts.push(naked_1.indent(options.tabWidth));
@@ -41883,7 +41883,7 @@ var require_printer = __commonJS({
41883
41883
  case "ReturnStatement": {
41884
41884
  parts.push("return");
41885
41885
  if (n.argument) {
41886
- var argLines = path3.call(print5, "argument");
41886
+ var argLines = path3.call(print6, "argument");
41887
41887
  if (argLines.startsWithComment() || argLines.length > 1 && namedTypes.JSXElement && namedTypes.JSXElement.check(n.argument)) {
41888
41888
  parts.push(" (\n", argLines.indent(options.tabWidth), "\n)");
41889
41889
  } else {
@@ -41895,17 +41895,17 @@ var require_printer = __commonJS({
41895
41895
  }
41896
41896
  case "CallExpression":
41897
41897
  case "OptionalCallExpression":
41898
- parts.push(path3.call(print5, "callee"));
41898
+ parts.push(path3.call(print6, "callee"));
41899
41899
  if (n.typeParameters) {
41900
- parts.push(path3.call(print5, "typeParameters"));
41900
+ parts.push(path3.call(print6, "typeParameters"));
41901
41901
  }
41902
41902
  if (n.typeArguments) {
41903
- parts.push(path3.call(print5, "typeArguments"));
41903
+ parts.push(path3.call(print6, "typeArguments"));
41904
41904
  }
41905
41905
  if (types4.getFieldValue(n, "optional")) {
41906
41906
  parts.push("?.");
41907
41907
  }
41908
- parts.push(printArgumentsList(path3, options, print5));
41908
+ parts.push(printArgumentsList(path3, options, print6));
41909
41909
  return (0, lines_1.concat)(parts);
41910
41910
  case "RecordExpression":
41911
41911
  parts.push("#");
@@ -41935,7 +41935,7 @@ var require_printer = __commonJS({
41935
41935
  var i_1 = 0;
41936
41936
  fields.forEach(function(field) {
41937
41937
  path3.each(function(childPath) {
41938
- var lines2 = print5(childPath);
41938
+ var lines2 = print6(childPath);
41939
41939
  if (!oneLine_1) {
41940
41940
  lines2 = lines2.indent(options.tabWidth);
41941
41941
  }
@@ -41972,32 +41972,32 @@ var require_printer = __commonJS({
41972
41972
  parts[parts.length - 1] = " " + rightBrace;
41973
41973
  }
41974
41974
  if (n.typeAnnotation) {
41975
- parts.push(path3.call(print5, "typeAnnotation"));
41975
+ parts.push(path3.call(print6, "typeAnnotation"));
41976
41976
  }
41977
41977
  return (0, lines_1.concat)(parts);
41978
41978
  }
41979
41979
  case "PropertyPattern":
41980
41980
  return (0, lines_1.concat)([
41981
- path3.call(print5, "key"),
41981
+ path3.call(print6, "key"),
41982
41982
  ": ",
41983
- path3.call(print5, "pattern")
41983
+ path3.call(print6, "pattern")
41984
41984
  ]);
41985
41985
  case "ObjectProperty":
41986
41986
  case "Property": {
41987
41987
  if (n.method || n.kind === "get" || n.kind === "set") {
41988
- return printMethod(path3, options, print5);
41988
+ return printMethod(path3, options, print6);
41989
41989
  }
41990
41990
  if (n.shorthand && n.value.type === "AssignmentPattern") {
41991
- return path3.call(print5, "value");
41991
+ return path3.call(print6, "value");
41992
41992
  }
41993
- var key = path3.call(print5, "key");
41993
+ var key = path3.call(print6, "key");
41994
41994
  if (n.computed) {
41995
41995
  parts.push("[", key, "]");
41996
41996
  } else {
41997
41997
  parts.push(key);
41998
41998
  }
41999
41999
  if (!n.shorthand || n.key.name !== n.value.name) {
42000
- parts.push(": ", path3.call(print5, "value"));
42000
+ parts.push(": ", path3.call(print6, "value"));
42001
42001
  }
42002
42002
  return (0, lines_1.concat)(parts);
42003
42003
  }
@@ -42005,18 +42005,18 @@ var require_printer = __commonJS({
42005
42005
  case "ObjectMethod":
42006
42006
  case "ClassPrivateMethod":
42007
42007
  case "TSDeclareMethod":
42008
- return printMethod(path3, options, print5);
42008
+ return printMethod(path3, options, print6);
42009
42009
  case "PrivateName":
42010
- return (0, lines_1.concat)(["#", path3.call(print5, "id")]);
42010
+ return (0, lines_1.concat)(["#", path3.call(print6, "id")]);
42011
42011
  case "Decorator":
42012
- return (0, lines_1.concat)(["@", path3.call(print5, "expression")]);
42012
+ return (0, lines_1.concat)(["@", path3.call(print6, "expression")]);
42013
42013
  case "TupleExpression":
42014
42014
  parts.push("#");
42015
42015
  case "ArrayExpression":
42016
42016
  case "ArrayPattern": {
42017
42017
  var elems = n.elements;
42018
42018
  var len_2 = elems.length;
42019
- var printed_1 = path3.map(print5, "elements");
42019
+ var printed_1 = path3.map(print6, "elements");
42020
42020
  var joined = (0, lines_1.fromString)(", ").join(printed_1);
42021
42021
  var oneLine_2 = joined.getLineLength(1) <= options.wrapColumn;
42022
42022
  if (oneLine_2) {
@@ -42054,12 +42054,12 @@ var require_printer = __commonJS({
42054
42054
  parts.push("]");
42055
42055
  }
42056
42056
  if (n.typeAnnotation) {
42057
- parts.push(path3.call(print5, "typeAnnotation"));
42057
+ parts.push(path3.call(print6, "typeAnnotation"));
42058
42058
  }
42059
42059
  return (0, lines_1.concat)(parts);
42060
42060
  }
42061
42061
  case "SequenceExpression":
42062
- return (0, lines_1.fromString)(", ").join(path3.map(print5, "expressions"));
42062
+ return (0, lines_1.fromString)(", ").join(path3.map(print6, "expressions"));
42063
42063
  case "ThisExpression":
42064
42064
  return (0, lines_1.fromString)("this");
42065
42065
  case "Super":
@@ -42080,7 +42080,7 @@ var require_printer = __commonJS({
42080
42080
  case "Literal":
42081
42081
  return (0, lines_1.fromString)(getPossibleRaw(n) || (typeof n.value === "string" ? nodeStr(n.value, options) : n.value), options);
42082
42082
  case "Directive":
42083
- return path3.call(print5, "value");
42083
+ return path3.call(print6, "value");
42084
42084
  case "DirectiveLiteral":
42085
42085
  return (0, lines_1.fromString)(getPossibleRaw(n) || nodeStr(n.value, options), options);
42086
42086
  case "InterpreterDirective":
@@ -42094,32 +42094,32 @@ var require_printer = __commonJS({
42094
42094
  parts.push(n.operator);
42095
42095
  if (/[a-z]$/.test(n.operator))
42096
42096
  parts.push(" ");
42097
- parts.push(path3.call(print5, "argument"));
42097
+ parts.push(path3.call(print6, "argument"));
42098
42098
  return (0, lines_1.concat)(parts);
42099
42099
  case "UpdateExpression":
42100
- parts.push(path3.call(print5, "argument"), n.operator);
42100
+ parts.push(path3.call(print6, "argument"), n.operator);
42101
42101
  if (n.prefix)
42102
42102
  parts.reverse();
42103
42103
  return (0, lines_1.concat)(parts);
42104
42104
  case "ConditionalExpression":
42105
42105
  return (0, lines_1.concat)([
42106
- path3.call(print5, "test"),
42106
+ path3.call(print6, "test"),
42107
42107
  " ? ",
42108
- path3.call(print5, "consequent"),
42108
+ path3.call(print6, "consequent"),
42109
42109
  " : ",
42110
- path3.call(print5, "alternate")
42110
+ path3.call(print6, "alternate")
42111
42111
  ]);
42112
42112
  case "NewExpression": {
42113
- parts.push("new ", path3.call(print5, "callee"));
42113
+ parts.push("new ", path3.call(print6, "callee"));
42114
42114
  if (n.typeParameters) {
42115
- parts.push(path3.call(print5, "typeParameters"));
42115
+ parts.push(path3.call(print6, "typeParameters"));
42116
42116
  }
42117
42117
  if (n.typeArguments) {
42118
- parts.push(path3.call(print5, "typeArguments"));
42118
+ parts.push(path3.call(print6, "typeArguments"));
42119
42119
  }
42120
42120
  var args = n.arguments;
42121
42121
  if (args) {
42122
- parts.push(printArgumentsList(path3, options, print5));
42122
+ parts.push(printArgumentsList(path3, options, print6));
42123
42123
  }
42124
42124
  return (0, lines_1.concat)(parts);
42125
42125
  }
@@ -42130,7 +42130,7 @@ var require_printer = __commonJS({
42130
42130
  parts.push(n.kind, " ");
42131
42131
  var maxLen_1 = 0;
42132
42132
  var printed = path3.map(function(childPath) {
42133
- var lines2 = print5(childPath);
42133
+ var lines2 = print6(childPath);
42134
42134
  maxLen_1 = Math.max(lines2.length, maxLen_1);
42135
42135
  return lines2;
42136
42136
  }, "declarations");
@@ -42149,30 +42149,30 @@ var require_printer = __commonJS({
42149
42149
  }
42150
42150
  case "VariableDeclarator":
42151
42151
  return n.init ? (0, lines_1.fromString)(" = ").join([
42152
- path3.call(print5, "id"),
42153
- path3.call(print5, "init")
42154
- ]) : path3.call(print5, "id");
42152
+ path3.call(print6, "id"),
42153
+ path3.call(print6, "init")
42154
+ ]) : path3.call(print6, "id");
42155
42155
  case "WithStatement":
42156
42156
  return (0, lines_1.concat)([
42157
42157
  "with (",
42158
- path3.call(print5, "object"),
42158
+ path3.call(print6, "object"),
42159
42159
  ") ",
42160
- path3.call(print5, "body")
42160
+ path3.call(print6, "body")
42161
42161
  ]);
42162
42162
  case "IfStatement": {
42163
- var con = adjustClause(path3.call(print5, "consequent"), options);
42164
- parts.push("if (", path3.call(print5, "test"), ")", con);
42163
+ var con = adjustClause(path3.call(print6, "consequent"), options);
42164
+ parts.push("if (", path3.call(print6, "test"), ")", con);
42165
42165
  if (n.alternate)
42166
- parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path3.call(print5, "alternate"), options));
42166
+ parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path3.call(print6, "alternate"), options));
42167
42167
  return (0, lines_1.concat)(parts);
42168
42168
  }
42169
42169
  case "ForStatement": {
42170
- var init = path3.call(print5, "init");
42170
+ var init = path3.call(print6, "init");
42171
42171
  var sep2 = init.length > 1 ? ";\n" : "; ";
42172
42172
  var forParen = "for (";
42173
- var indented = (0, lines_1.fromString)(sep2).join([init, path3.call(print5, "test"), path3.call(print5, "update")]).indentTail(forParen.length);
42173
+ var indented = (0, lines_1.fromString)(sep2).join([init, path3.call(print6, "test"), path3.call(print6, "update")]).indentTail(forParen.length);
42174
42174
  var head = (0, lines_1.concat)([forParen, indented, ")"]);
42175
- var clause = adjustClause(path3.call(print5, "body"), options);
42175
+ var clause = adjustClause(path3.call(print6, "body"), options);
42176
42176
  parts.push(head);
42177
42177
  if (head.length > 1) {
42178
42178
  parts.push("\n");
@@ -42184,18 +42184,18 @@ var require_printer = __commonJS({
42184
42184
  case "WhileStatement":
42185
42185
  return (0, lines_1.concat)([
42186
42186
  "while (",
42187
- path3.call(print5, "test"),
42187
+ path3.call(print6, "test"),
42188
42188
  ")",
42189
- adjustClause(path3.call(print5, "body"), options)
42189
+ adjustClause(path3.call(print6, "body"), options)
42190
42190
  ]);
42191
42191
  case "ForInStatement":
42192
42192
  return (0, lines_1.concat)([
42193
42193
  n.each ? "for each (" : "for (",
42194
- path3.call(print5, "left"),
42194
+ path3.call(print6, "left"),
42195
42195
  " in ",
42196
- path3.call(print5, "right"),
42196
+ path3.call(print6, "right"),
42197
42197
  ")",
42198
- adjustClause(path3.call(print5, "body"), options)
42198
+ adjustClause(path3.call(print6, "body"), options)
42199
42199
  ]);
42200
42200
  case "ForOfStatement":
42201
42201
  case "ForAwaitStatement":
@@ -42203,122 +42203,122 @@ var require_printer = __commonJS({
42203
42203
  if (n.await || n.type === "ForAwaitStatement") {
42204
42204
  parts.push("await ");
42205
42205
  }
42206
- parts.push("(", path3.call(print5, "left"), " of ", path3.call(print5, "right"), ")", adjustClause(path3.call(print5, "body"), options));
42206
+ parts.push("(", path3.call(print6, "left"), " of ", path3.call(print6, "right"), ")", adjustClause(path3.call(print6, "body"), options));
42207
42207
  return (0, lines_1.concat)(parts);
42208
42208
  case "DoWhileStatement": {
42209
42209
  var doBody = (0, lines_1.concat)([
42210
42210
  "do",
42211
- adjustClause(path3.call(print5, "body"), options)
42211
+ adjustClause(path3.call(print6, "body"), options)
42212
42212
  ]);
42213
42213
  parts.push(doBody);
42214
42214
  if (endsWithBrace(doBody))
42215
42215
  parts.push(" while");
42216
42216
  else
42217
42217
  parts.push("\nwhile");
42218
- parts.push(" (", path3.call(print5, "test"), ");");
42218
+ parts.push(" (", path3.call(print6, "test"), ");");
42219
42219
  return (0, lines_1.concat)(parts);
42220
42220
  }
42221
42221
  case "DoExpression": {
42222
42222
  var statements = path3.call(function(bodyPath) {
42223
- return printStatementSequence(bodyPath, options, print5);
42223
+ return printStatementSequence(bodyPath, options, print6);
42224
42224
  }, "body");
42225
42225
  return (0, lines_1.concat)(["do {\n", statements.indent(options.tabWidth), "\n}"]);
42226
42226
  }
42227
42227
  case "BreakStatement":
42228
42228
  parts.push("break");
42229
42229
  if (n.label)
42230
- parts.push(" ", path3.call(print5, "label"));
42230
+ parts.push(" ", path3.call(print6, "label"));
42231
42231
  parts.push(";");
42232
42232
  return (0, lines_1.concat)(parts);
42233
42233
  case "ContinueStatement":
42234
42234
  parts.push("continue");
42235
42235
  if (n.label)
42236
- parts.push(" ", path3.call(print5, "label"));
42236
+ parts.push(" ", path3.call(print6, "label"));
42237
42237
  parts.push(";");
42238
42238
  return (0, lines_1.concat)(parts);
42239
42239
  case "LabeledStatement":
42240
42240
  return (0, lines_1.concat)([
42241
- path3.call(print5, "label"),
42241
+ path3.call(print6, "label"),
42242
42242
  ":\n",
42243
- path3.call(print5, "body")
42243
+ path3.call(print6, "body")
42244
42244
  ]);
42245
42245
  case "TryStatement":
42246
- parts.push("try ", path3.call(print5, "block"));
42246
+ parts.push("try ", path3.call(print6, "block"));
42247
42247
  if (n.handler) {
42248
- parts.push(" ", path3.call(print5, "handler"));
42248
+ parts.push(" ", path3.call(print6, "handler"));
42249
42249
  } else if (n.handlers) {
42250
42250
  path3.each(function(handlerPath) {
42251
- parts.push(" ", print5(handlerPath));
42251
+ parts.push(" ", print6(handlerPath));
42252
42252
  }, "handlers");
42253
42253
  }
42254
42254
  if (n.finalizer) {
42255
- parts.push(" finally ", path3.call(print5, "finalizer"));
42255
+ parts.push(" finally ", path3.call(print6, "finalizer"));
42256
42256
  }
42257
42257
  return (0, lines_1.concat)(parts);
42258
42258
  case "CatchClause":
42259
42259
  parts.push("catch ");
42260
42260
  if (n.param) {
42261
- parts.push("(", path3.call(print5, "param"));
42261
+ parts.push("(", path3.call(print6, "param"));
42262
42262
  }
42263
42263
  if (n.guard) {
42264
- parts.push(" if ", path3.call(print5, "guard"));
42264
+ parts.push(" if ", path3.call(print6, "guard"));
42265
42265
  }
42266
42266
  if (n.param) {
42267
42267
  parts.push(") ");
42268
42268
  }
42269
- parts.push(path3.call(print5, "body"));
42269
+ parts.push(path3.call(print6, "body"));
42270
42270
  return (0, lines_1.concat)(parts);
42271
42271
  case "ThrowStatement":
42272
- return (0, lines_1.concat)(["throw ", path3.call(print5, "argument"), ";"]);
42272
+ return (0, lines_1.concat)(["throw ", path3.call(print6, "argument"), ";"]);
42273
42273
  case "SwitchStatement":
42274
42274
  return (0, lines_1.concat)([
42275
42275
  "switch (",
42276
- path3.call(print5, "discriminant"),
42276
+ path3.call(print6, "discriminant"),
42277
42277
  ") {\n",
42278
- (0, lines_1.fromString)("\n").join(path3.map(print5, "cases")),
42278
+ (0, lines_1.fromString)("\n").join(path3.map(print6, "cases")),
42279
42279
  "\n}"
42280
42280
  ]);
42281
42281
  case "SwitchCase":
42282
42282
  if (n.test)
42283
- parts.push("case ", path3.call(print5, "test"), ":");
42283
+ parts.push("case ", path3.call(print6, "test"), ":");
42284
42284
  else
42285
42285
  parts.push("default:");
42286
42286
  if (n.consequent.length > 0) {
42287
42287
  parts.push("\n", path3.call(function(consequentPath) {
42288
- return printStatementSequence(consequentPath, options, print5);
42288
+ return printStatementSequence(consequentPath, options, print6);
42289
42289
  }, "consequent").indent(options.tabWidth));
42290
42290
  }
42291
42291
  return (0, lines_1.concat)(parts);
42292
42292
  case "DebuggerStatement":
42293
42293
  return (0, lines_1.fromString)("debugger;");
42294
42294
  case "JSXAttribute":
42295
- parts.push(path3.call(print5, "name"));
42295
+ parts.push(path3.call(print6, "name"));
42296
42296
  if (n.value)
42297
- parts.push("=", path3.call(print5, "value"));
42297
+ parts.push("=", path3.call(print6, "value"));
42298
42298
  return (0, lines_1.concat)(parts);
42299
42299
  case "JSXIdentifier":
42300
42300
  return (0, lines_1.fromString)(n.name, options);
42301
42301
  case "JSXNamespacedName":
42302
42302
  return (0, lines_1.fromString)(":").join([
42303
- path3.call(print5, "namespace"),
42304
- path3.call(print5, "name")
42303
+ path3.call(print6, "namespace"),
42304
+ path3.call(print6, "name")
42305
42305
  ]);
42306
42306
  case "JSXMemberExpression":
42307
42307
  return (0, lines_1.fromString)(".").join([
42308
- path3.call(print5, "object"),
42309
- path3.call(print5, "property")
42308
+ path3.call(print6, "object"),
42309
+ path3.call(print6, "property")
42310
42310
  ]);
42311
42311
  case "JSXSpreadAttribute":
42312
- return (0, lines_1.concat)(["{...", path3.call(print5, "argument"), "}"]);
42312
+ return (0, lines_1.concat)(["{...", path3.call(print6, "argument"), "}"]);
42313
42313
  case "JSXSpreadChild":
42314
- return (0, lines_1.concat)(["{...", path3.call(print5, "expression"), "}"]);
42314
+ return (0, lines_1.concat)(["{...", path3.call(print6, "expression"), "}"]);
42315
42315
  case "JSXExpressionContainer":
42316
- return (0, lines_1.concat)(["{", path3.call(print5, "expression"), "}"]);
42316
+ return (0, lines_1.concat)(["{", path3.call(print6, "expression"), "}"]);
42317
42317
  case "JSXElement":
42318
42318
  case "JSXFragment": {
42319
42319
  var openingPropName = "opening" + (n.type === "JSXElement" ? "Element" : "Fragment");
42320
42320
  var closingPropName = "closing" + (n.type === "JSXElement" ? "Element" : "Fragment");
42321
- var openingLines = path3.call(print5, openingPropName);
42321
+ var openingLines = path3.call(print6, openingPropName);
42322
42322
  if (n[openingPropName].selfClosing) {
42323
42323
  assert_1.default.ok(!n[closingPropName], "unexpected " + closingPropName + " element in self-closing " + n.type);
42324
42324
  return openingLines;
@@ -42332,16 +42332,16 @@ var require_printer = __commonJS({
42332
42332
  return "\n";
42333
42333
  }
42334
42334
  }
42335
- return print5(childPath);
42335
+ return print6(childPath);
42336
42336
  }, "children")).indentTail(options.tabWidth);
42337
- var closingLines = path3.call(print5, closingPropName);
42337
+ var closingLines = path3.call(print6, closingPropName);
42338
42338
  return (0, lines_1.concat)([openingLines, childLines, closingLines]);
42339
42339
  }
42340
42340
  case "JSXOpeningElement": {
42341
- parts.push("<", path3.call(print5, "name"));
42341
+ parts.push("<", path3.call(print6, "name"));
42342
42342
  var attrParts_1 = [];
42343
42343
  path3.each(function(attrPath) {
42344
- attrParts_1.push(" ", print5(attrPath));
42344
+ attrParts_1.push(" ", print6(attrPath));
42345
42345
  }, "attributes");
42346
42346
  var attrLines = (0, lines_1.concat)(attrParts_1);
42347
42347
  var needLineWrap = attrLines.length > 1 || attrLines.getLineLength(1) > options.wrapColumn;
@@ -42358,7 +42358,7 @@ var require_printer = __commonJS({
42358
42358
  return (0, lines_1.concat)(parts);
42359
42359
  }
42360
42360
  case "JSXClosingElement":
42361
- return (0, lines_1.concat)(["</", path3.call(print5, "name"), ">"]);
42361
+ return (0, lines_1.concat)(["</", path3.call(print6, "name"), ">"]);
42362
42362
  case "JSXOpeningFragment":
42363
42363
  return (0, lines_1.fromString)("<>");
42364
42364
  case "JSXClosingFragment":
@@ -42369,9 +42369,9 @@ var require_printer = __commonJS({
42369
42369
  return (0, lines_1.fromString)("");
42370
42370
  case "TypeAnnotatedIdentifier":
42371
42371
  return (0, lines_1.concat)([
42372
- path3.call(print5, "annotation"),
42372
+ path3.call(print6, "annotation"),
42373
42373
  " ",
42374
- path3.call(print5, "identifier")
42374
+ path3.call(print6, "identifier")
42375
42375
  ]);
42376
42376
  case "ClassBody":
42377
42377
  if (n.body.length === 0) {
@@ -42380,12 +42380,12 @@ var require_printer = __commonJS({
42380
42380
  return (0, lines_1.concat)([
42381
42381
  "{\n",
42382
42382
  path3.call(function(bodyPath) {
42383
- return printStatementSequence(bodyPath, options, print5);
42383
+ return printStatementSequence(bodyPath, options, print6);
42384
42384
  }, "body").indent(options.tabWidth),
42385
42385
  "\n}"
42386
42386
  ]);
42387
42387
  case "ClassPropertyDefinition":
42388
- parts.push("static ", path3.call(print5, "definition"));
42388
+ parts.push("static ", path3.call(print6, "definition"));
42389
42389
  if (!namedTypes.MethodDefinition.check(n.definition))
42390
42390
  parts.push(";");
42391
42391
  return (0, lines_1.concat)(parts);
@@ -42406,12 +42406,12 @@ var require_printer = __commonJS({
42406
42406
  if (n.readonly) {
42407
42407
  parts.push("readonly ");
42408
42408
  }
42409
- var key = path3.call(print5, "key");
42409
+ var key = path3.call(print6, "key");
42410
42410
  if (n.computed) {
42411
42411
  key = (0, lines_1.concat)(["[", key, "]"]);
42412
42412
  }
42413
42413
  if (n.variance) {
42414
- key = (0, lines_1.concat)([printVariance(path3, print5), key]);
42414
+ key = (0, lines_1.concat)([printVariance(path3, print6), key]);
42415
42415
  }
42416
42416
  parts.push(key);
42417
42417
  if (n.optional) {
@@ -42421,10 +42421,10 @@ var require_printer = __commonJS({
42421
42421
  parts.push("!");
42422
42422
  }
42423
42423
  if (n.typeAnnotation) {
42424
- parts.push(path3.call(print5, "typeAnnotation"));
42424
+ parts.push(path3.call(print6, "typeAnnotation"));
42425
42425
  }
42426
42426
  if (n.value) {
42427
- parts.push(" = ", path3.call(print5, "value"));
42427
+ parts.push(" = ", path3.call(print6, "value"));
42428
42428
  }
42429
42429
  parts.push(";");
42430
42430
  return (0, lines_1.concat)(parts);
@@ -42433,21 +42433,21 @@ var require_printer = __commonJS({
42433
42433
  if (n.static) {
42434
42434
  parts.push("static ");
42435
42435
  }
42436
- parts.push(path3.call(print5, "key"));
42436
+ parts.push(path3.call(print6, "key"));
42437
42437
  if (n.typeAnnotation) {
42438
- parts.push(path3.call(print5, "typeAnnotation"));
42438
+ parts.push(path3.call(print6, "typeAnnotation"));
42439
42439
  }
42440
42440
  if (n.value) {
42441
- parts.push(" = ", path3.call(print5, "value"));
42441
+ parts.push(" = ", path3.call(print6, "value"));
42442
42442
  }
42443
42443
  parts.push(";");
42444
42444
  return (0, lines_1.concat)(parts);
42445
42445
  case "ClassAccessorProperty": {
42446
42446
  parts.push.apply(parts, tslib_1.__spreadArray(tslib_1.__spreadArray([], printClassMemberModifiers(n), false), ["accessor "], false));
42447
42447
  if (n.computed) {
42448
- parts.push("[", path3.call(print5, "key"), "]");
42448
+ parts.push("[", path3.call(print6, "key"), "]");
42449
42449
  } else {
42450
- parts.push(path3.call(print5, "key"));
42450
+ parts.push(path3.call(print6, "key"));
42451
42451
  }
42452
42452
  if (n.optional) {
42453
42453
  parts.push("?");
@@ -42456,10 +42456,10 @@ var require_printer = __commonJS({
42456
42456
  parts.push("!");
42457
42457
  }
42458
42458
  if (n.typeAnnotation) {
42459
- parts.push(path3.call(print5, "typeAnnotation"));
42459
+ parts.push(path3.call(print6, "typeAnnotation"));
42460
42460
  }
42461
42461
  if (n.value) {
42462
- parts.push(" = ", path3.call(print5, "value"));
42462
+ parts.push(" = ", path3.call(print6, "value"));
42463
42463
  }
42464
42464
  parts.push(";");
42465
42465
  return (0, lines_1.concat)(parts);
@@ -42475,21 +42475,21 @@ var require_printer = __commonJS({
42475
42475
  }
42476
42476
  parts.push("class");
42477
42477
  if (n.id) {
42478
- parts.push(" ", path3.call(print5, "id"));
42478
+ parts.push(" ", path3.call(print6, "id"));
42479
42479
  }
42480
42480
  if (n.typeParameters) {
42481
- parts.push(path3.call(print5, "typeParameters"));
42481
+ parts.push(path3.call(print6, "typeParameters"));
42482
42482
  }
42483
42483
  if (n.superClass) {
42484
- parts.push(" extends ", path3.call(print5, "superClass"), path3.call(print5, "superTypeParameters"));
42484
+ parts.push(" extends ", path3.call(print6, "superClass"), path3.call(print6, "superTypeParameters"));
42485
42485
  }
42486
42486
  if (n.extends && n.extends.length > 0) {
42487
- parts.push(" extends ", (0, lines_1.fromString)(", ").join(path3.map(print5, "extends")));
42487
+ parts.push(" extends ", (0, lines_1.fromString)(", ").join(path3.map(print6, "extends")));
42488
42488
  }
42489
42489
  if (n["implements"] && n["implements"].length > 0) {
42490
- parts.push(" implements ", (0, lines_1.fromString)(", ").join(path3.map(print5, "implements")));
42490
+ parts.push(" implements ", (0, lines_1.fromString)(", ").join(path3.map(print6, "implements")));
42491
42491
  }
42492
- parts.push(" ", path3.call(print5, "body"));
42492
+ parts.push(" ", path3.call(print6, "body"));
42493
42493
  if (n.type === "DeclareClass") {
42494
42494
  return printFlowDeclaration(path3, parts);
42495
42495
  } else {
@@ -42498,11 +42498,11 @@ var require_printer = __commonJS({
42498
42498
  case "TemplateElement":
42499
42499
  return (0, lines_1.fromString)(n.value.raw, options).lockIndentTail();
42500
42500
  case "TemplateLiteral": {
42501
- var expressions_1 = path3.map(print5, "expressions");
42501
+ var expressions_1 = path3.map(print6, "expressions");
42502
42502
  parts.push("`");
42503
42503
  path3.each(function(childPath) {
42504
42504
  var i2 = childPath.getName();
42505
- parts.push(print5(childPath));
42505
+ parts.push(print6(childPath));
42506
42506
  if (i2 < expressions_1.length) {
42507
42507
  parts.push("${", expressions_1[i2], "}");
42508
42508
  }
@@ -42511,7 +42511,7 @@ var require_printer = __commonJS({
42511
42511
  return (0, lines_1.concat)(parts).lockIndentTail();
42512
42512
  }
42513
42513
  case "TaggedTemplateExpression":
42514
- return (0, lines_1.concat)([path3.call(print5, "tag"), path3.call(print5, "quasi")]);
42514
+ return (0, lines_1.concat)([path3.call(print6, "tag"), path3.call(print6, "quasi")]);
42515
42515
  case "Node":
42516
42516
  case "Printable":
42517
42517
  case "SourceLocation":
@@ -42545,7 +42545,7 @@ var require_printer = __commonJS({
42545
42545
  if (n.typeAnnotation.type !== "FunctionTypeAnnotation") {
42546
42546
  parts.push(": ");
42547
42547
  }
42548
- parts.push(path3.call(print5, "typeAnnotation"));
42548
+ parts.push(path3.call(print6, "typeAnnotation"));
42549
42549
  return (0, lines_1.concat)(parts);
42550
42550
  }
42551
42551
  return (0, lines_1.fromString)("");
@@ -42559,9 +42559,9 @@ var require_printer = __commonJS({
42559
42559
  case "MixedTypeAnnotation":
42560
42560
  return (0, lines_1.fromString)("mixed", options);
42561
42561
  case "ArrayTypeAnnotation":
42562
- return (0, lines_1.concat)([path3.call(print5, "elementType"), "[]"]);
42562
+ return (0, lines_1.concat)([path3.call(print6, "elementType"), "[]"]);
42563
42563
  case "TupleTypeAnnotation": {
42564
- var printed_2 = path3.map(print5, "types");
42564
+ var printed_2 = path3.map(print6, "types");
42565
42565
  var joined = (0, lines_1.fromString)(", ").join(printed_2);
42566
42566
  var oneLine_3 = joined.getLineLength(1) <= options.wrapColumn;
42567
42567
  if (oneLine_3) {
@@ -42608,38 +42608,38 @@ var require_printer = __commonJS({
42608
42608
  case "InterfaceTypeAnnotation":
42609
42609
  parts.push("interface");
42610
42610
  if (n.extends && n.extends.length > 0) {
42611
- parts.push(" extends ", (0, lines_1.fromString)(", ").join(path3.map(print5, "extends")));
42611
+ parts.push(" extends ", (0, lines_1.fromString)(", ").join(path3.map(print6, "extends")));
42612
42612
  }
42613
- parts.push(" ", path3.call(print5, "body"));
42613
+ parts.push(" ", path3.call(print6, "body"));
42614
42614
  return (0, lines_1.concat)(parts);
42615
42615
  case "DeclareFunction":
42616
42616
  return printFlowDeclaration(path3, [
42617
42617
  "function ",
42618
- path3.call(print5, "id"),
42618
+ path3.call(print6, "id"),
42619
42619
  ";"
42620
42620
  ]);
42621
42621
  case "DeclareModule":
42622
42622
  return printFlowDeclaration(path3, [
42623
42623
  "module ",
42624
- path3.call(print5, "id"),
42624
+ path3.call(print6, "id"),
42625
42625
  " ",
42626
- path3.call(print5, "body")
42626
+ path3.call(print6, "body")
42627
42627
  ]);
42628
42628
  case "DeclareModuleExports":
42629
42629
  return printFlowDeclaration(path3, [
42630
42630
  "module.exports",
42631
- path3.call(print5, "typeAnnotation")
42631
+ path3.call(print6, "typeAnnotation")
42632
42632
  ]);
42633
42633
  case "DeclareVariable":
42634
- return printFlowDeclaration(path3, ["var ", path3.call(print5, "id"), ";"]);
42634
+ return printFlowDeclaration(path3, ["var ", path3.call(print6, "id"), ";"]);
42635
42635
  case "DeclareExportDeclaration":
42636
42636
  case "DeclareExportAllDeclaration":
42637
- return (0, lines_1.concat)(["declare ", printExportDeclaration(path3, options, print5)]);
42637
+ return (0, lines_1.concat)(["declare ", printExportDeclaration(path3, options, print6)]);
42638
42638
  case "EnumDeclaration":
42639
42639
  return (0, lines_1.concat)([
42640
42640
  "enum ",
42641
- path3.call(print5, "id"),
42642
- path3.call(print5, "body")
42641
+ path3.call(print6, "id"),
42642
+ path3.call(print6, "body")
42643
42643
  ]);
42644
42644
  case "EnumBooleanBody":
42645
42645
  case "EnumNumberBody":
@@ -42651,24 +42651,24 @@ var require_printer = __commonJS({
42651
42651
  n.type.slice(4, -4).toLowerCase()
42652
42652
  );
42653
42653
  }
42654
- parts.push(" {\n", (0, lines_1.fromString)("\n").join(path3.map(print5, "members")).indent(options.tabWidth), "\n}");
42654
+ parts.push(" {\n", (0, lines_1.fromString)("\n").join(path3.map(print6, "members")).indent(options.tabWidth), "\n}");
42655
42655
  return (0, lines_1.concat)(parts);
42656
42656
  }
42657
42657
  case "EnumDefaultedMember":
42658
- return (0, lines_1.concat)([path3.call(print5, "id"), ","]);
42658
+ return (0, lines_1.concat)([path3.call(print6, "id"), ","]);
42659
42659
  case "EnumBooleanMember":
42660
42660
  case "EnumNumberMember":
42661
42661
  case "EnumStringMember":
42662
42662
  return (0, lines_1.concat)([
42663
- path3.call(print5, "id"),
42663
+ path3.call(print6, "id"),
42664
42664
  " = ",
42665
- path3.call(print5, "init"),
42665
+ path3.call(print6, "init"),
42666
42666
  ","
42667
42667
  ]);
42668
42668
  case "InferredPredicate":
42669
42669
  return (0, lines_1.fromString)("%checks", options);
42670
42670
  case "DeclaredPredicate":
42671
- return (0, lines_1.concat)(["%checks(", path3.call(print5, "value"), ")"]);
42671
+ return (0, lines_1.concat)(["%checks(", path3.call(print6, "value"), ")"]);
42672
42672
  case "FunctionTypeAnnotation": {
42673
42673
  var parent = path3.getParentNode(0);
42674
42674
  var isArrowFunctionTypeAnnotation = !(namedTypes.ObjectTypeCallProperty.check(parent) || namedTypes.ObjectTypeInternalSlot.check(parent) && parent.method || namedTypes.DeclareFunction.check(path3.getParentNode(2)));
@@ -42678,14 +42678,14 @@ var require_printer = __commonJS({
42678
42678
  }
42679
42679
  var hasTypeParameters = !!n.typeParameters;
42680
42680
  var needsParens = hasTypeParameters || n.params.length !== 1 || n.params[0].name;
42681
- parts.push(hasTypeParameters ? path3.call(print5, "typeParameters") : "", needsParens ? "(" : "", printFunctionParams(path3, options, print5), needsParens ? ")" : "");
42681
+ parts.push(hasTypeParameters ? path3.call(print6, "typeParameters") : "", needsParens ? "(" : "", printFunctionParams(path3, options, print6), needsParens ? ")" : "");
42682
42682
  if (n.returnType) {
42683
- parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path3.call(print5, "returnType"));
42683
+ parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path3.call(print6, "returnType"));
42684
42684
  }
42685
42685
  return (0, lines_1.concat)(parts);
42686
42686
  }
42687
42687
  case "FunctionTypeParam": {
42688
- var name = path3.call(print5, "name");
42688
+ var name = path3.call(print6, "name");
42689
42689
  parts.push(name);
42690
42690
  if (n.optional) {
42691
42691
  parts.push("?");
@@ -42693,13 +42693,13 @@ var require_printer = __commonJS({
42693
42693
  if (name.infos[0].line) {
42694
42694
  parts.push(": ");
42695
42695
  }
42696
- parts.push(path3.call(print5, "typeAnnotation"));
42696
+ parts.push(path3.call(print6, "typeAnnotation"));
42697
42697
  return (0, lines_1.concat)(parts);
42698
42698
  }
42699
42699
  case "GenericTypeAnnotation":
42700
42700
  return (0, lines_1.concat)([
42701
- path3.call(print5, "id"),
42702
- path3.call(print5, "typeParameters")
42701
+ path3.call(print6, "id"),
42702
+ path3.call(print6, "typeParameters")
42703
42703
  ]);
42704
42704
  case "DeclareInterface":
42705
42705
  parts.push("declare ");
@@ -42708,24 +42708,24 @@ var require_printer = __commonJS({
42708
42708
  if (n.declare) {
42709
42709
  parts.push("declare ");
42710
42710
  }
42711
- parts.push("interface ", path3.call(print5, "id"), path3.call(print5, "typeParameters"), " ");
42711
+ parts.push("interface ", path3.call(print6, "id"), path3.call(print6, "typeParameters"), " ");
42712
42712
  if (n["extends"] && n["extends"].length > 0) {
42713
- parts.push("extends ", (0, lines_1.fromString)(", ").join(path3.map(print5, "extends")), " ");
42713
+ parts.push("extends ", (0, lines_1.fromString)(", ").join(path3.map(print6, "extends")), " ");
42714
42714
  }
42715
42715
  if (n.body) {
42716
- parts.push(path3.call(print5, "body"));
42716
+ parts.push(path3.call(print6, "body"));
42717
42717
  }
42718
42718
  return (0, lines_1.concat)(parts);
42719
42719
  case "ClassImplements":
42720
42720
  case "InterfaceExtends":
42721
42721
  return (0, lines_1.concat)([
42722
- path3.call(print5, "id"),
42723
- path3.call(print5, "typeParameters")
42722
+ path3.call(print6, "id"),
42723
+ path3.call(print6, "typeParameters")
42724
42724
  ]);
42725
42725
  case "IntersectionTypeAnnotation":
42726
- return (0, lines_1.fromString)(" & ").join(path3.map(print5, "types"));
42726
+ return (0, lines_1.fromString)(" & ").join(path3.map(print6, "types"));
42727
42727
  case "NullableTypeAnnotation":
42728
- return (0, lines_1.concat)(["?", path3.call(print5, "typeAnnotation")]);
42728
+ return (0, lines_1.concat)(["?", path3.call(print6, "typeAnnotation")]);
42729
42729
  case "NullLiteralTypeAnnotation":
42730
42730
  return (0, lines_1.fromString)("null", options);
42731
42731
  case "ThisTypeAnnotation":
@@ -42733,40 +42733,40 @@ var require_printer = __commonJS({
42733
42733
  case "NumberTypeAnnotation":
42734
42734
  return (0, lines_1.fromString)("number", options);
42735
42735
  case "ObjectTypeCallProperty":
42736
- return path3.call(print5, "value");
42736
+ return path3.call(print6, "value");
42737
42737
  case "ObjectTypeIndexer":
42738
42738
  if (n.static) {
42739
42739
  parts.push("static ");
42740
42740
  }
42741
- parts.push(printVariance(path3, print5), "[");
42741
+ parts.push(printVariance(path3, print6), "[");
42742
42742
  if (n.id) {
42743
- parts.push(path3.call(print5, "id"), ": ");
42743
+ parts.push(path3.call(print6, "id"), ": ");
42744
42744
  }
42745
- parts.push(path3.call(print5, "key"), "]: ", path3.call(print5, "value"));
42745
+ parts.push(path3.call(print6, "key"), "]: ", path3.call(print6, "value"));
42746
42746
  return (0, lines_1.concat)(parts);
42747
42747
  case "ObjectTypeProperty":
42748
42748
  return (0, lines_1.concat)([
42749
- printVariance(path3, print5),
42750
- path3.call(print5, "key"),
42749
+ printVariance(path3, print6),
42750
+ path3.call(print6, "key"),
42751
42751
  n.optional ? "?" : "",
42752
42752
  ": ",
42753
- path3.call(print5, "value")
42753
+ path3.call(print6, "value")
42754
42754
  ]);
42755
42755
  case "ObjectTypeInternalSlot":
42756
42756
  return (0, lines_1.concat)([
42757
42757
  n.static ? "static " : "",
42758
42758
  "[[",
42759
- path3.call(print5, "id"),
42759
+ path3.call(print6, "id"),
42760
42760
  "]]",
42761
42761
  n.optional ? "?" : "",
42762
42762
  n.value.type !== "FunctionTypeAnnotation" ? ": " : "",
42763
- path3.call(print5, "value")
42763
+ path3.call(print6, "value")
42764
42764
  ]);
42765
42765
  case "QualifiedTypeIdentifier":
42766
42766
  return (0, lines_1.concat)([
42767
- path3.call(print5, "qualification"),
42767
+ path3.call(print6, "qualification"),
42768
42768
  ".",
42769
- path3.call(print5, "id")
42769
+ path3.call(print6, "id")
42770
42770
  ]);
42771
42771
  case "StringLiteralTypeAnnotation":
42772
42772
  return (0, lines_1.fromString)(nodeStr(n.value, options), options);
@@ -42783,36 +42783,36 @@ var require_printer = __commonJS({
42783
42783
  case "TypeAlias":
42784
42784
  return (0, lines_1.concat)([
42785
42785
  "type ",
42786
- path3.call(print5, "id"),
42787
- path3.call(print5, "typeParameters"),
42786
+ path3.call(print6, "id"),
42787
+ path3.call(print6, "typeParameters"),
42788
42788
  " = ",
42789
- path3.call(print5, "right"),
42789
+ path3.call(print6, "right"),
42790
42790
  ";"
42791
42791
  ]);
42792
42792
  case "DeclareOpaqueType":
42793
42793
  parts.push("declare ");
42794
42794
  case "OpaqueType":
42795
- parts.push("opaque type ", path3.call(print5, "id"), path3.call(print5, "typeParameters"));
42795
+ parts.push("opaque type ", path3.call(print6, "id"), path3.call(print6, "typeParameters"));
42796
42796
  if (n["supertype"]) {
42797
- parts.push(": ", path3.call(print5, "supertype"));
42797
+ parts.push(": ", path3.call(print6, "supertype"));
42798
42798
  }
42799
42799
  if (n["impltype"]) {
42800
- parts.push(" = ", path3.call(print5, "impltype"));
42800
+ parts.push(" = ", path3.call(print6, "impltype"));
42801
42801
  }
42802
42802
  parts.push(";");
42803
42803
  return (0, lines_1.concat)(parts);
42804
42804
  case "TypeCastExpression":
42805
42805
  return (0, lines_1.concat)([
42806
42806
  "(",
42807
- path3.call(print5, "expression"),
42808
- path3.call(print5, "typeAnnotation"),
42807
+ path3.call(print6, "expression"),
42808
+ path3.call(print6, "typeAnnotation"),
42809
42809
  ")"
42810
42810
  ]);
42811
42811
  case "TypeParameterDeclaration":
42812
42812
  case "TypeParameterInstantiation":
42813
42813
  return (0, lines_1.concat)([
42814
42814
  "<",
42815
- (0, lines_1.fromString)(", ").join(path3.map(print5, "params")),
42815
+ (0, lines_1.fromString)(", ").join(path3.map(print6, "params")),
42816
42816
  ">"
42817
42817
  ]);
42818
42818
  case "Variance":
@@ -42825,32 +42825,32 @@ var require_printer = __commonJS({
42825
42825
  return (0, lines_1.fromString)("");
42826
42826
  case "TypeParameter":
42827
42827
  if (n.variance) {
42828
- parts.push(printVariance(path3, print5));
42828
+ parts.push(printVariance(path3, print6));
42829
42829
  }
42830
- parts.push(path3.call(print5, "name"));
42830
+ parts.push(path3.call(print6, "name"));
42831
42831
  if (n.bound) {
42832
- parts.push(path3.call(print5, "bound"));
42832
+ parts.push(path3.call(print6, "bound"));
42833
42833
  }
42834
42834
  if (n["default"]) {
42835
- parts.push("=", path3.call(print5, "default"));
42835
+ parts.push("=", path3.call(print6, "default"));
42836
42836
  }
42837
42837
  return (0, lines_1.concat)(parts);
42838
42838
  case "TypeofTypeAnnotation":
42839
42839
  return (0, lines_1.concat)([
42840
42840
  (0, lines_1.fromString)("typeof ", options),
42841
- path3.call(print5, "argument")
42841
+ path3.call(print6, "argument")
42842
42842
  ]);
42843
42843
  case "IndexedAccessType":
42844
42844
  case "OptionalIndexedAccessType":
42845
42845
  return (0, lines_1.concat)([
42846
- path3.call(print5, "objectType"),
42846
+ path3.call(print6, "objectType"),
42847
42847
  n.optional ? "?." : "",
42848
42848
  "[",
42849
- path3.call(print5, "indexType"),
42849
+ path3.call(print6, "indexType"),
42850
42850
  "]"
42851
42851
  ]);
42852
42852
  case "UnionTypeAnnotation":
42853
- return (0, lines_1.fromString)(" | ").join(path3.map(print5, "types"));
42853
+ return (0, lines_1.fromString)(" | ").join(path3.map(print6, "types"));
42854
42854
  case "VoidTypeAnnotation":
42855
42855
  return (0, lines_1.fromString)("void", options);
42856
42856
  case "NullTypeAnnotation":
@@ -42890,77 +42890,77 @@ var require_printer = __commonJS({
42890
42890
  case "TSNeverKeyword":
42891
42891
  return (0, lines_1.fromString)("never", options);
42892
42892
  case "TSArrayType":
42893
- return (0, lines_1.concat)([path3.call(print5, "elementType"), "[]"]);
42893
+ return (0, lines_1.concat)([path3.call(print6, "elementType"), "[]"]);
42894
42894
  case "TSLiteralType":
42895
- return path3.call(print5, "literal");
42895
+ return path3.call(print6, "literal");
42896
42896
  case "TSUnionType":
42897
- return (0, lines_1.fromString)(" | ").join(path3.map(print5, "types"));
42897
+ return (0, lines_1.fromString)(" | ").join(path3.map(print6, "types"));
42898
42898
  case "TSIntersectionType":
42899
- return (0, lines_1.fromString)(" & ").join(path3.map(print5, "types"));
42899
+ return (0, lines_1.fromString)(" & ").join(path3.map(print6, "types"));
42900
42900
  case "TSConditionalType":
42901
- parts.push(path3.call(print5, "checkType"), " extends ", path3.call(print5, "extendsType"), " ? ", path3.call(print5, "trueType"), " : ", path3.call(print5, "falseType"));
42901
+ parts.push(path3.call(print6, "checkType"), " extends ", path3.call(print6, "extendsType"), " ? ", path3.call(print6, "trueType"), " : ", path3.call(print6, "falseType"));
42902
42902
  return (0, lines_1.concat)(parts);
42903
42903
  case "TSInferType":
42904
- parts.push("infer ", path3.call(print5, "typeParameter"));
42904
+ parts.push("infer ", path3.call(print6, "typeParameter"));
42905
42905
  return (0, lines_1.concat)(parts);
42906
42906
  case "TSParenthesizedType":
42907
- return (0, lines_1.concat)(["(", path3.call(print5, "typeAnnotation"), ")"]);
42907
+ return (0, lines_1.concat)(["(", path3.call(print6, "typeAnnotation"), ")"]);
42908
42908
  case "TSFunctionType":
42909
42909
  return (0, lines_1.concat)([
42910
- path3.call(print5, "typeParameters"),
42910
+ path3.call(print6, "typeParameters"),
42911
42911
  "(",
42912
- printFunctionParams(path3, options, print5),
42912
+ printFunctionParams(path3, options, print6),
42913
42913
  ") => ",
42914
- path3.call(print5, "typeAnnotation", "typeAnnotation")
42914
+ path3.call(print6, "typeAnnotation", "typeAnnotation")
42915
42915
  ]);
42916
42916
  case "TSConstructorType":
42917
42917
  return (0, lines_1.concat)([
42918
42918
  "new ",
42919
- path3.call(print5, "typeParameters"),
42919
+ path3.call(print6, "typeParameters"),
42920
42920
  "(",
42921
- printFunctionParams(path3, options, print5),
42921
+ printFunctionParams(path3, options, print6),
42922
42922
  ") => ",
42923
- path3.call(print5, "typeAnnotation", "typeAnnotation")
42923
+ path3.call(print6, "typeAnnotation", "typeAnnotation")
42924
42924
  ]);
42925
42925
  case "TSMappedType": {
42926
- parts.push(n.readonly ? "readonly " : "", "[", path3.call(print5, "typeParameter"), "]", n.optional ? "?" : "");
42926
+ parts.push(n.readonly ? "readonly " : "", "[", path3.call(print6, "typeParameter"), "]", n.optional ? "?" : "");
42927
42927
  if (n.typeAnnotation) {
42928
- parts.push(": ", path3.call(print5, "typeAnnotation"), ";");
42928
+ parts.push(": ", path3.call(print6, "typeAnnotation"), ";");
42929
42929
  }
42930
42930
  return (0, lines_1.concat)(["{\n", (0, lines_1.concat)(parts).indent(options.tabWidth), "\n}"]);
42931
42931
  }
42932
42932
  case "TSTupleType":
42933
42933
  return (0, lines_1.concat)([
42934
42934
  "[",
42935
- (0, lines_1.fromString)(", ").join(path3.map(print5, "elementTypes")),
42935
+ (0, lines_1.fromString)(", ").join(path3.map(print6, "elementTypes")),
42936
42936
  "]"
42937
42937
  ]);
42938
42938
  case "TSNamedTupleMember":
42939
- parts.push(path3.call(print5, "label"));
42939
+ parts.push(path3.call(print6, "label"));
42940
42940
  if (n.optional) {
42941
42941
  parts.push("?");
42942
42942
  }
42943
- parts.push(": ", path3.call(print5, "elementType"));
42943
+ parts.push(": ", path3.call(print6, "elementType"));
42944
42944
  return (0, lines_1.concat)(parts);
42945
42945
  case "TSRestType":
42946
- return (0, lines_1.concat)(["...", path3.call(print5, "typeAnnotation")]);
42946
+ return (0, lines_1.concat)(["...", path3.call(print6, "typeAnnotation")]);
42947
42947
  case "TSOptionalType":
42948
- return (0, lines_1.concat)([path3.call(print5, "typeAnnotation"), "?"]);
42948
+ return (0, lines_1.concat)([path3.call(print6, "typeAnnotation"), "?"]);
42949
42949
  case "TSIndexedAccessType":
42950
42950
  return (0, lines_1.concat)([
42951
- path3.call(print5, "objectType"),
42951
+ path3.call(print6, "objectType"),
42952
42952
  "[",
42953
- path3.call(print5, "indexType"),
42953
+ path3.call(print6, "indexType"),
42954
42954
  "]"
42955
42955
  ]);
42956
42956
  case "TSTypeOperator":
42957
42957
  return (0, lines_1.concat)([
42958
- path3.call(print5, "operator"),
42958
+ path3.call(print6, "operator"),
42959
42959
  " ",
42960
- path3.call(print5, "typeAnnotation")
42960
+ path3.call(print6, "typeAnnotation")
42961
42961
  ]);
42962
42962
  case "TSTypeLiteral": {
42963
- var members = (0, lines_1.fromString)("\n").join(path3.map(print5, "members").map(function(member) {
42963
+ var members = (0, lines_1.fromString)("\n").join(path3.map(print6, "members").map(function(member) {
42964
42964
  if (lastNonSpaceCharacter(member) !== ";") {
42965
42965
  return member.concat(";");
42966
42966
  }
@@ -42973,13 +42973,13 @@ var require_printer = __commonJS({
42973
42973
  return (0, lines_1.concat)(parts);
42974
42974
  }
42975
42975
  case "TSEnumMember":
42976
- parts.push(path3.call(print5, "id"));
42976
+ parts.push(path3.call(print6, "id"));
42977
42977
  if (n.initializer) {
42978
- parts.push(" = ", path3.call(print5, "initializer"));
42978
+ parts.push(" = ", path3.call(print6, "initializer"));
42979
42979
  }
42980
42980
  return (0, lines_1.concat)(parts);
42981
42981
  case "TSTypeQuery":
42982
- return (0, lines_1.concat)(["typeof ", path3.call(print5, "exprName")]);
42982
+ return (0, lines_1.concat)(["typeof ", path3.call(print6, "exprName")]);
42983
42983
  case "TSParameterProperty":
42984
42984
  if (n.accessibility) {
42985
42985
  parts.push(n.accessibility, " ");
@@ -42993,119 +42993,119 @@ var require_printer = __commonJS({
42993
42993
  if (n.readonly) {
42994
42994
  parts.push("readonly ");
42995
42995
  }
42996
- parts.push(path3.call(print5, "parameter"));
42996
+ parts.push(path3.call(print6, "parameter"));
42997
42997
  return (0, lines_1.concat)(parts);
42998
42998
  case "TSTypeReference":
42999
42999
  return (0, lines_1.concat)([
43000
- path3.call(print5, "typeName"),
43001
- path3.call(print5, "typeParameters")
43000
+ path3.call(print6, "typeName"),
43001
+ path3.call(print6, "typeParameters")
43002
43002
  ]);
43003
43003
  case "TSQualifiedName":
43004
- return (0, lines_1.concat)([path3.call(print5, "left"), ".", path3.call(print5, "right")]);
43004
+ return (0, lines_1.concat)([path3.call(print6, "left"), ".", path3.call(print6, "right")]);
43005
43005
  case "TSAsExpression":
43006
43006
  case "TSSatisfiesExpression": {
43007
- var expression = path3.call(print5, "expression");
43008
- parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path3.call(print5, "typeAnnotation"));
43007
+ var expression = path3.call(print6, "expression");
43008
+ parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path3.call(print6, "typeAnnotation"));
43009
43009
  return (0, lines_1.concat)(parts);
43010
43010
  }
43011
43011
  case "TSTypeCastExpression":
43012
43012
  return (0, lines_1.concat)([
43013
- path3.call(print5, "expression"),
43014
- path3.call(print5, "typeAnnotation")
43013
+ path3.call(print6, "expression"),
43014
+ path3.call(print6, "typeAnnotation")
43015
43015
  ]);
43016
43016
  case "TSNonNullExpression":
43017
- return (0, lines_1.concat)([path3.call(print5, "expression"), "!"]);
43017
+ return (0, lines_1.concat)([path3.call(print6, "expression"), "!"]);
43018
43018
  case "TSTypeAnnotation":
43019
- return (0, lines_1.concat)([": ", path3.call(print5, "typeAnnotation")]);
43019
+ return (0, lines_1.concat)([": ", path3.call(print6, "typeAnnotation")]);
43020
43020
  case "TSIndexSignature":
43021
43021
  return (0, lines_1.concat)([
43022
43022
  n.readonly ? "readonly " : "",
43023
43023
  "[",
43024
- path3.map(print5, "parameters"),
43024
+ path3.map(print6, "parameters"),
43025
43025
  "]",
43026
- path3.call(print5, "typeAnnotation")
43026
+ path3.call(print6, "typeAnnotation")
43027
43027
  ]);
43028
43028
  case "TSPropertySignature":
43029
- parts.push(printVariance(path3, print5), n.readonly ? "readonly " : "");
43029
+ parts.push(printVariance(path3, print6), n.readonly ? "readonly " : "");
43030
43030
  if (n.computed) {
43031
- parts.push("[", path3.call(print5, "key"), "]");
43031
+ parts.push("[", path3.call(print6, "key"), "]");
43032
43032
  } else {
43033
- parts.push(path3.call(print5, "key"));
43033
+ parts.push(path3.call(print6, "key"));
43034
43034
  }
43035
- parts.push(n.optional ? "?" : "", path3.call(print5, "typeAnnotation"));
43035
+ parts.push(n.optional ? "?" : "", path3.call(print6, "typeAnnotation"));
43036
43036
  return (0, lines_1.concat)(parts);
43037
43037
  case "TSMethodSignature":
43038
43038
  if (n.computed) {
43039
- parts.push("[", path3.call(print5, "key"), "]");
43039
+ parts.push("[", path3.call(print6, "key"), "]");
43040
43040
  } else {
43041
- parts.push(path3.call(print5, "key"));
43041
+ parts.push(path3.call(print6, "key"));
43042
43042
  }
43043
43043
  if (n.optional) {
43044
43044
  parts.push("?");
43045
43045
  }
43046
- parts.push(path3.call(print5, "typeParameters"), "(", printFunctionParams(path3, options, print5), ")", path3.call(print5, "typeAnnotation"));
43046
+ parts.push(path3.call(print6, "typeParameters"), "(", printFunctionParams(path3, options, print6), ")", path3.call(print6, "typeAnnotation"));
43047
43047
  return (0, lines_1.concat)(parts);
43048
43048
  case "TSTypePredicate":
43049
43049
  if (n.asserts) {
43050
43050
  parts.push("asserts ");
43051
43051
  }
43052
- parts.push(path3.call(print5, "parameterName"));
43052
+ parts.push(path3.call(print6, "parameterName"));
43053
43053
  if (n.typeAnnotation) {
43054
- parts.push(" is ", path3.call(print5, "typeAnnotation", "typeAnnotation"));
43054
+ parts.push(" is ", path3.call(print6, "typeAnnotation", "typeAnnotation"));
43055
43055
  }
43056
43056
  return (0, lines_1.concat)(parts);
43057
43057
  case "TSCallSignatureDeclaration":
43058
43058
  return (0, lines_1.concat)([
43059
- path3.call(print5, "typeParameters"),
43059
+ path3.call(print6, "typeParameters"),
43060
43060
  "(",
43061
- printFunctionParams(path3, options, print5),
43061
+ printFunctionParams(path3, options, print6),
43062
43062
  ")",
43063
- path3.call(print5, "typeAnnotation")
43063
+ path3.call(print6, "typeAnnotation")
43064
43064
  ]);
43065
43065
  case "TSConstructSignatureDeclaration":
43066
43066
  if (n.typeParameters) {
43067
- parts.push("new", path3.call(print5, "typeParameters"));
43067
+ parts.push("new", path3.call(print6, "typeParameters"));
43068
43068
  } else {
43069
43069
  parts.push("new ");
43070
43070
  }
43071
- parts.push("(", printFunctionParams(path3, options, print5), ")", path3.call(print5, "typeAnnotation"));
43071
+ parts.push("(", printFunctionParams(path3, options, print6), ")", path3.call(print6, "typeAnnotation"));
43072
43072
  return (0, lines_1.concat)(parts);
43073
43073
  case "TSTypeAliasDeclaration":
43074
43074
  return (0, lines_1.concat)([
43075
43075
  n.declare ? "declare " : "",
43076
43076
  "type ",
43077
- path3.call(print5, "id"),
43078
- path3.call(print5, "typeParameters"),
43077
+ path3.call(print6, "id"),
43078
+ path3.call(print6, "typeParameters"),
43079
43079
  " = ",
43080
- path3.call(print5, "typeAnnotation"),
43080
+ path3.call(print6, "typeAnnotation"),
43081
43081
  ";"
43082
43082
  ]);
43083
43083
  case "TSTypeParameter": {
43084
- parts.push(path3.call(print5, "name"));
43084
+ parts.push(path3.call(print6, "name"));
43085
43085
  var parent = path3.getParentNode(0);
43086
43086
  var isInMappedType = namedTypes.TSMappedType.check(parent);
43087
43087
  if (n.constraint) {
43088
- parts.push(isInMappedType ? " in " : " extends ", path3.call(print5, "constraint"));
43088
+ parts.push(isInMappedType ? " in " : " extends ", path3.call(print6, "constraint"));
43089
43089
  }
43090
43090
  if (n["default"]) {
43091
- parts.push(" = ", path3.call(print5, "default"));
43091
+ parts.push(" = ", path3.call(print6, "default"));
43092
43092
  }
43093
43093
  return (0, lines_1.concat)(parts);
43094
43094
  }
43095
43095
  case "TSTypeAssertion": {
43096
- parts.push("<", path3.call(print5, "typeAnnotation"), "> ", path3.call(print5, "expression"));
43096
+ parts.push("<", path3.call(print6, "typeAnnotation"), "> ", path3.call(print6, "expression"));
43097
43097
  return (0, lines_1.concat)(parts);
43098
43098
  }
43099
43099
  case "TSTypeParameterDeclaration":
43100
43100
  case "TSTypeParameterInstantiation":
43101
43101
  return (0, lines_1.concat)([
43102
43102
  "<",
43103
- (0, lines_1.fromString)(", ").join(path3.map(print5, "params")),
43103
+ (0, lines_1.fromString)(", ").join(path3.map(print6, "params")),
43104
43104
  ">"
43105
43105
  ]);
43106
43106
  case "TSEnumDeclaration": {
43107
- parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path3.call(print5, "id"));
43108
- var memberLines = (0, lines_1.fromString)(",\n").join(path3.map(print5, "members"));
43107
+ parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path3.call(print6, "id"));
43108
+ var memberLines = (0, lines_1.fromString)(",\n").join(path3.map(print6, "members"));
43109
43109
  if (memberLines.isEmpty()) {
43110
43110
  parts.push(" {}");
43111
43111
  } else {
@@ -43115,11 +43115,11 @@ var require_printer = __commonJS({
43115
43115
  }
43116
43116
  case "TSExpressionWithTypeArguments":
43117
43117
  return (0, lines_1.concat)([
43118
- path3.call(print5, "expression"),
43119
- path3.call(print5, "typeParameters")
43118
+ path3.call(print6, "expression"),
43119
+ path3.call(print6, "typeParameters")
43120
43120
  ]);
43121
43121
  case "TSInterfaceBody": {
43122
- var lines = (0, lines_1.fromString)("\n").join(path3.map(print5, "body").map(function(element) {
43122
+ var lines = (0, lines_1.fromString)("\n").join(path3.map(print6, "body").map(function(element) {
43123
43123
  if (lastNonSpaceCharacter(element) !== ";") {
43124
43124
  return element.concat(";");
43125
43125
  }
@@ -43131,22 +43131,22 @@ var require_printer = __commonJS({
43131
43131
  return (0, lines_1.concat)(["{\n", lines.indent(options.tabWidth), "\n}"]);
43132
43132
  }
43133
43133
  case "TSImportType":
43134
- parts.push("import(", path3.call(print5, "argument"), ")");
43134
+ parts.push("import(", path3.call(print6, "argument"), ")");
43135
43135
  if (n.qualifier) {
43136
- parts.push(".", path3.call(print5, "qualifier"));
43136
+ parts.push(".", path3.call(print6, "qualifier"));
43137
43137
  }
43138
43138
  if (n.typeParameters) {
43139
- parts.push(path3.call(print5, "typeParameters"));
43139
+ parts.push(path3.call(print6, "typeParameters"));
43140
43140
  }
43141
43141
  return (0, lines_1.concat)(parts);
43142
43142
  case "TSImportEqualsDeclaration":
43143
43143
  if (n.isExport) {
43144
43144
  parts.push("export ");
43145
43145
  }
43146
- parts.push("import ", path3.call(print5, "id"), " = ", path3.call(print5, "moduleReference"));
43146
+ parts.push("import ", path3.call(print6, "id"), " = ", path3.call(print6, "moduleReference"));
43147
43147
  return maybeAddSemicolon((0, lines_1.concat)(parts));
43148
43148
  case "TSExternalModuleReference":
43149
- return (0, lines_1.concat)(["require(", path3.call(print5, "expression"), ")"]);
43149
+ return (0, lines_1.concat)(["require(", path3.call(print6, "expression"), ")"]);
43150
43150
  case "TSModuleDeclaration": {
43151
43151
  var parent = path3.getParentNode();
43152
43152
  if (parent.type === "TSModuleDeclaration") {
@@ -43171,16 +43171,16 @@ var require_printer = __commonJS({
43171
43171
  }
43172
43172
  }
43173
43173
  }
43174
- parts.push(path3.call(print5, "id"));
43174
+ parts.push(path3.call(print6, "id"));
43175
43175
  if (n.body) {
43176
43176
  parts.push(" ");
43177
- parts.push(path3.call(print5, "body"));
43177
+ parts.push(path3.call(print6, "body"));
43178
43178
  }
43179
43179
  return (0, lines_1.concat)(parts);
43180
43180
  }
43181
43181
  case "TSModuleBlock": {
43182
43182
  var naked = path3.call(function(bodyPath) {
43183
- return printStatementSequence(bodyPath, options, print5);
43183
+ return printStatementSequence(bodyPath, options, print6);
43184
43184
  }, "body");
43185
43185
  if (naked.isEmpty()) {
43186
43186
  parts.push("{}");
@@ -43190,11 +43190,11 @@ var require_printer = __commonJS({
43190
43190
  return (0, lines_1.concat)(parts);
43191
43191
  }
43192
43192
  case "TSInstantiationExpression": {
43193
- parts.push(path3.call(print5, "expression"), path3.call(print5, "typeParameters"));
43193
+ parts.push(path3.call(print6, "expression"), path3.call(print6, "typeParameters"));
43194
43194
  return (0, lines_1.concat)(parts);
43195
43195
  }
43196
43196
  case "V8IntrinsicIdentifier":
43197
- return (0, lines_1.concat)(["%", path3.call(print5, "name")]);
43197
+ return (0, lines_1.concat)(["%", path3.call(print6, "name")]);
43198
43198
  case "TopicReference":
43199
43199
  return (0, lines_1.fromString)("#");
43200
43200
  case "ClassHeritage":
@@ -43244,7 +43244,7 @@ var require_printer = __commonJS({
43244
43244
  }
43245
43245
  return (0, lines_1.concat)(parts);
43246
43246
  }
43247
- function printStatementSequence(path3, options, print5) {
43247
+ function printStatementSequence(path3, options, print6) {
43248
43248
  var filtered = [];
43249
43249
  var sawComment = false;
43250
43250
  var sawStatement = false;
@@ -43265,7 +43265,7 @@ var require_printer = __commonJS({
43265
43265
  }
43266
43266
  filtered.push({
43267
43267
  node: stmt,
43268
- printed: print5(stmtPath)
43268
+ printed: print6(stmtPath)
43269
43269
  });
43270
43270
  });
43271
43271
  if (sawComment) {
@@ -43357,7 +43357,7 @@ var require_printer = __commonJS({
43357
43357
  }
43358
43358
  return parts;
43359
43359
  }
43360
- function printMethod(path3, options, print5) {
43360
+ function printMethod(path3, options, print6) {
43361
43361
  var node = path3.getNode();
43362
43362
  var kind = node.kind;
43363
43363
  var parts = [];
@@ -43375,7 +43375,7 @@ var require_printer = __commonJS({
43375
43375
  if (kind === "get" || kind === "set") {
43376
43376
  parts.push(kind, " ");
43377
43377
  }
43378
- var key = path3.call(print5, "key");
43378
+ var key = path3.call(print6, "key");
43379
43379
  if (node.computed) {
43380
43380
  key = (0, lines_1.concat)(["[", key, "]"]);
43381
43381
  }
@@ -43384,26 +43384,26 @@ var require_printer = __commonJS({
43384
43384
  parts.push("?");
43385
43385
  }
43386
43386
  if (node === nodeValue) {
43387
- parts.push(path3.call(print5, "typeParameters"), "(", printFunctionParams(path3, options, print5), ")", path3.call(print5, "returnType"));
43387
+ parts.push(path3.call(print6, "typeParameters"), "(", printFunctionParams(path3, options, print6), ")", path3.call(print6, "returnType"));
43388
43388
  if (node.body) {
43389
- parts.push(" ", path3.call(print5, "body"));
43389
+ parts.push(" ", path3.call(print6, "body"));
43390
43390
  } else {
43391
43391
  parts.push(";");
43392
43392
  }
43393
43393
  } else {
43394
- parts.push(path3.call(print5, "value", "typeParameters"), "(", path3.call(function(valuePath) {
43395
- return printFunctionParams(valuePath, options, print5);
43396
- }, "value"), ")", path3.call(print5, "value", "returnType"));
43394
+ parts.push(path3.call(print6, "value", "typeParameters"), "(", path3.call(function(valuePath) {
43395
+ return printFunctionParams(valuePath, options, print6);
43396
+ }, "value"), ")", path3.call(print6, "value", "returnType"));
43397
43397
  if (nodeValue.body) {
43398
- parts.push(" ", path3.call(print5, "value", "body"));
43398
+ parts.push(" ", path3.call(print6, "value", "body"));
43399
43399
  } else {
43400
43400
  parts.push(";");
43401
43401
  }
43402
43402
  }
43403
43403
  return (0, lines_1.concat)(parts);
43404
43404
  }
43405
- function printArgumentsList(path3, options, print5) {
43406
- var printed = path3.map(print5, "arguments");
43405
+ function printArgumentsList(path3, options, print6) {
43406
+ var printed = path3.map(print6, "arguments");
43407
43407
  var trailingComma = util.isTrailingCommaEnabled(options, "parameters");
43408
43408
  var joined = (0, lines_1.fromString)(", ").join(printed);
43409
43409
  if (joined.getLineLength(1) > options.wrapColumn) {
@@ -43416,28 +43416,28 @@ var require_printer = __commonJS({
43416
43416
  }
43417
43417
  return (0, lines_1.concat)(["(", joined, ")"]);
43418
43418
  }
43419
- function printFunctionParams(path3, options, print5) {
43419
+ function printFunctionParams(path3, options, print6) {
43420
43420
  var fun = path3.getValue();
43421
43421
  var params;
43422
43422
  var printed = [];
43423
43423
  if (fun.params) {
43424
43424
  params = fun.params;
43425
- printed = path3.map(print5, "params");
43425
+ printed = path3.map(print6, "params");
43426
43426
  } else if (fun.parameters) {
43427
43427
  params = fun.parameters;
43428
- printed = path3.map(print5, "parameters");
43428
+ printed = path3.map(print6, "parameters");
43429
43429
  }
43430
43430
  if (fun.defaults) {
43431
43431
  path3.each(function(defExprPath) {
43432
43432
  var i2 = defExprPath.getName();
43433
43433
  var p = printed[i2];
43434
43434
  if (p && defExprPath.getValue()) {
43435
- printed[i2] = (0, lines_1.concat)([p, " = ", print5(defExprPath)]);
43435
+ printed[i2] = (0, lines_1.concat)([p, " = ", print6(defExprPath)]);
43436
43436
  }
43437
43437
  }, "defaults");
43438
43438
  }
43439
43439
  if (fun.rest) {
43440
- printed.push((0, lines_1.concat)(["...", path3.call(print5, "rest")]));
43440
+ printed.push((0, lines_1.concat)(["...", path3.call(print6, "rest")]));
43441
43441
  }
43442
43442
  var joined = (0, lines_1.fromString)(", ").join(printed);
43443
43443
  if (joined.length > 1 || joined.getLineLength(1) > options.wrapColumn) {
@@ -43451,11 +43451,11 @@ var require_printer = __commonJS({
43451
43451
  }
43452
43452
  return joined;
43453
43453
  }
43454
- function maybePrintImportAssertions(path3, options, print5) {
43454
+ function maybePrintImportAssertions(path3, options, print6) {
43455
43455
  var n = path3.getValue();
43456
43456
  if (n.assertions && n.assertions.length > 0) {
43457
43457
  var parts = [" assert {"];
43458
- var printed = path3.map(print5, "assertions");
43458
+ var printed = path3.map(print6, "assertions");
43459
43459
  var flat = (0, lines_1.fromString)(", ").join(printed);
43460
43460
  if (flat.length > 1 || flat.getLineLength(1) > options.wrapColumn) {
43461
43461
  parts.push("\n", (0, lines_1.fromString)(",\n").join(printed).indent(options.tabWidth), "\n}");
@@ -43466,7 +43466,7 @@ var require_printer = __commonJS({
43466
43466
  }
43467
43467
  return (0, lines_1.fromString)("");
43468
43468
  }
43469
- function printExportDeclaration(path3, options, print5) {
43469
+ function printExportDeclaration(path3, options, print6) {
43470
43470
  var decl = path3.getValue();
43471
43471
  var parts = ["export "];
43472
43472
  if (decl.exportKind && decl.exportKind === "type") {
@@ -43480,7 +43480,7 @@ var require_printer = __commonJS({
43480
43480
  parts.push("default ");
43481
43481
  }
43482
43482
  if (decl.declaration) {
43483
- parts.push(path3.call(print5, "declaration"));
43483
+ parts.push(path3.call(print6, "declaration"));
43484
43484
  } else if (decl.specifiers) {
43485
43485
  if (decl.specifiers.length === 1 && decl.specifiers[0].type === "ExportBatchSpecifier") {
43486
43486
  parts.push("*");
@@ -43492,9 +43492,9 @@ var require_printer = __commonJS({
43492
43492
  path3.each(function(specifierPath) {
43493
43493
  var spec = specifierPath.getValue();
43494
43494
  if (spec.type === "ExportDefaultSpecifier") {
43495
- unbracedSpecifiers_2.push(print5(specifierPath));
43495
+ unbracedSpecifiers_2.push(print6(specifierPath));
43496
43496
  } else {
43497
- bracedSpecifiers_2.push(print5(specifierPath));
43497
+ bracedSpecifiers_2.push(print6(specifierPath));
43498
43498
  }
43499
43499
  }, "specifiers");
43500
43500
  unbracedSpecifiers_2.forEach(function(lines2, i2) {
@@ -43523,10 +43523,10 @@ var require_printer = __commonJS({
43523
43523
  }
43524
43524
  }
43525
43525
  } else {
43526
- parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path3.map(print5, "specifiers")), shouldPrintSpaces ? " }" : "}");
43526
+ parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path3.map(print6, "specifiers")), shouldPrintSpaces ? " }" : "}");
43527
43527
  }
43528
43528
  if (decl.source) {
43529
- parts.push(" from ", path3.call(print5, "source"), maybePrintImportAssertions(path3, options, print5));
43529
+ parts.push(" from ", path3.call(print6, "source"), maybePrintImportAssertions(path3, options, print6));
43530
43530
  }
43531
43531
  }
43532
43532
  var lines = (0, lines_1.concat)(parts);
@@ -43544,7 +43544,7 @@ var require_printer = __commonJS({
43544
43544
  }
43545
43545
  return (0, lines_1.concat)(parts);
43546
43546
  }
43547
- function printVariance(path3, print5) {
43547
+ function printVariance(path3, print6) {
43548
43548
  return path3.call(function(variancePath) {
43549
43549
  var value = variancePath.getValue();
43550
43550
  if (value) {
@@ -43554,7 +43554,7 @@ var require_printer = __commonJS({
43554
43554
  if (value === "minus") {
43555
43555
  return (0, lines_1.fromString)("-");
43556
43556
  }
43557
- return print5(variancePath);
43557
+ return print6(variancePath);
43558
43558
  }
43559
43559
  return (0, lines_1.fromString)("");
43560
43560
  }, "variance");
@@ -43641,10 +43641,10 @@ var require_main2 = __commonJS({
43641
43641
  Object.defineProperty(exports, "visit", { enumerable: true, get: function() {
43642
43642
  return ast_types_1.visit;
43643
43643
  } });
43644
- function print5(node, options) {
43644
+ function print6(node, options) {
43645
43645
  return new printer_1.Printer(options).print(node);
43646
43646
  }
43647
- exports.print = print5;
43647
+ exports.print = print6;
43648
43648
  function prettyPrint2(node, options) {
43649
43649
  return new printer_1.Printer(options).printGenerically(node);
43650
43650
  }
@@ -43668,7 +43668,7 @@ var require_main2 = __commonJS({
43668
43668
  function runString(code, transformer, options) {
43669
43669
  var writeback = options && options.writeback || defaultWriteback;
43670
43670
  transformer((0, parser_1.parse)(code, options), function(node) {
43671
- writeback(print5(node, options).code);
43671
+ writeback(print6(node, options).code);
43672
43672
  });
43673
43673
  }
43674
43674
  }
@@ -58584,9 +58584,9 @@ var require_lib6 = __commonJS({
58584
58584
  });
58585
58585
 
58586
58586
  // src/lib/pipeline.ts
58587
- async function runPipeline(config2, pipeline2, target) {
58587
+ async function runPipeline(config, pipeline2, target) {
58588
58588
  for (const transform of pipeline2) {
58589
- await transform?.(config2, target);
58589
+ await transform?.(config, target);
58590
58590
  }
58591
58591
  }
58592
58592
 
@@ -59698,35 +59698,35 @@ function rewireTypes(originalTypeMap, directives) {
59698
59698
  }
59699
59699
  function rewireNamedType(type) {
59700
59700
  if (isObjectType3(type)) {
59701
- const config2 = type.toConfig();
59701
+ const config = type.toConfig();
59702
59702
  const newConfig = {
59703
- ...config2,
59704
- fields: () => rewireFields(config2.fields),
59705
- interfaces: () => rewireNamedTypes(config2.interfaces)
59703
+ ...config,
59704
+ fields: () => rewireFields(config.fields),
59705
+ interfaces: () => rewireNamedTypes(config.interfaces)
59706
59706
  };
59707
59707
  return new GraphQLObjectType2(newConfig);
59708
59708
  } else if (isInterfaceType2(type)) {
59709
- const config2 = type.toConfig();
59709
+ const config = type.toConfig();
59710
59710
  const newConfig = {
59711
- ...config2,
59712
- fields: () => rewireFields(config2.fields)
59711
+ ...config,
59712
+ fields: () => rewireFields(config.fields)
59713
59713
  };
59714
59714
  if ("interfaces" in newConfig) {
59715
- newConfig.interfaces = () => rewireNamedTypes(config2.interfaces);
59715
+ newConfig.interfaces = () => rewireNamedTypes(config.interfaces);
59716
59716
  }
59717
59717
  return new GraphQLInterfaceType2(newConfig);
59718
59718
  } else if (isUnionType2(type)) {
59719
- const config2 = type.toConfig();
59719
+ const config = type.toConfig();
59720
59720
  const newConfig = {
59721
- ...config2,
59722
- types: () => rewireNamedTypes(config2.types)
59721
+ ...config,
59722
+ types: () => rewireNamedTypes(config.types)
59723
59723
  };
59724
59724
  return new GraphQLUnionType(newConfig);
59725
59725
  } else if (isInputObjectType2(type)) {
59726
- const config2 = type.toConfig();
59726
+ const config = type.toConfig();
59727
59727
  const newConfig = {
59728
- ...config2,
59729
- fields: () => rewireInputFields(config2.fields)
59728
+ ...config,
59729
+ fields: () => rewireInputFields(config.fields)
59730
59730
  };
59731
59731
  return new GraphQLInputObjectType2(newConfig);
59732
59732
  } else if (isEnumType2(type)) {
@@ -59883,8 +59883,8 @@ function mapEnumValues(originalTypeMap, schema, schemaMapper) {
59883
59883
  }
59884
59884
  return mapTypes(originalTypeMap, schema, {
59885
59885
  [MapperKind.ENUM_TYPE]: (type) => {
59886
- const config2 = type.toConfig();
59887
- const originalEnumValueConfigMap = config2.values;
59886
+ const config = type.toConfig();
59887
+ const originalEnumValueConfigMap = config.values;
59888
59888
  const newEnumValueConfigMap = {};
59889
59889
  for (const externalValue in originalEnumValueConfigMap) {
59890
59890
  const originalEnumValueConfig = originalEnumValueConfigMap[externalValue];
@@ -59899,7 +59899,7 @@ function mapEnumValues(originalTypeMap, schema, schemaMapper) {
59899
59899
  }
59900
59900
  }
59901
59901
  return correctASTNodes(new GraphQLEnumType2({
59902
- ...config2,
59902
+ ...config,
59903
59903
  values: newEnumValueConfigMap
59904
59904
  }));
59905
59905
  }
@@ -59962,8 +59962,8 @@ function mapFields(originalTypeMap, schema, schemaMapper) {
59962
59962
  newTypeMap[typeName] = originalType;
59963
59963
  continue;
59964
59964
  }
59965
- const config2 = originalType.toConfig();
59966
- const originalFieldConfigMap = config2.fields;
59965
+ const config = originalType.toConfig();
59966
+ const originalFieldConfigMap = config.fields;
59967
59967
  const newFieldConfigMap = {};
59968
59968
  for (const fieldName in originalFieldConfigMap) {
59969
59969
  const originalFieldConfig = originalFieldConfigMap[fieldName];
@@ -59988,17 +59988,17 @@ function mapFields(originalTypeMap, schema, schemaMapper) {
59988
59988
  }
59989
59989
  if (isObjectType4(originalType)) {
59990
59990
  newTypeMap[typeName] = correctASTNodes(new GraphQLObjectType3({
59991
- ...config2,
59991
+ ...config,
59992
59992
  fields: newFieldConfigMap
59993
59993
  }));
59994
59994
  } else if (isInterfaceType3(originalType)) {
59995
59995
  newTypeMap[typeName] = correctASTNodes(new GraphQLInterfaceType3({
59996
- ...config2,
59996
+ ...config,
59997
59997
  fields: newFieldConfigMap
59998
59998
  }));
59999
59999
  } else {
60000
60000
  newTypeMap[typeName] = correctASTNodes(new GraphQLInputObjectType3({
60001
- ...config2,
60001
+ ...config,
60002
60002
  fields: newFieldConfigMap
60003
60003
  }));
60004
60004
  }
@@ -60020,8 +60020,8 @@ function mapArguments(originalTypeMap, schema, schemaMapper) {
60020
60020
  newTypeMap[typeName] = originalType;
60021
60021
  continue;
60022
60022
  }
60023
- const config2 = originalType.toConfig();
60024
- const originalFieldConfigMap = config2.fields;
60023
+ const config = originalType.toConfig();
60024
+ const originalFieldConfigMap = config.fields;
60025
60025
  const newFieldConfigMap = {};
60026
60026
  for (const fieldName in originalFieldConfigMap) {
60027
60027
  const originalFieldConfig = originalFieldConfigMap[fieldName];
@@ -60055,17 +60055,17 @@ function mapArguments(originalTypeMap, schema, schemaMapper) {
60055
60055
  }
60056
60056
  if (isObjectType4(originalType)) {
60057
60057
  newTypeMap[typeName] = new GraphQLObjectType3({
60058
- ...config2,
60058
+ ...config,
60059
60059
  fields: newFieldConfigMap
60060
60060
  });
60061
60061
  } else if (isInterfaceType3(originalType)) {
60062
60062
  newTypeMap[typeName] = new GraphQLInterfaceType3({
60063
- ...config2,
60063
+ ...config,
60064
60064
  fields: newFieldConfigMap
60065
60065
  });
60066
60066
  } else {
60067
60067
  newTypeMap[typeName] = new GraphQLInputObjectType3({
60068
- ...config2,
60068
+ ...config,
60069
60069
  fields: newFieldConfigMap
60070
60070
  });
60071
60071
  }
@@ -60169,99 +60169,99 @@ function getEnumValueMapper(schemaMapper) {
60169
60169
  }
60170
60170
  function correctASTNodes(type) {
60171
60171
  if (isObjectType4(type)) {
60172
- const config2 = type.toConfig();
60173
- if (config2.astNode != null) {
60172
+ const config = type.toConfig();
60173
+ if (config.astNode != null) {
60174
60174
  const fields = [];
60175
- for (const fieldName in config2.fields) {
60176
- const fieldConfig = config2.fields[fieldName];
60175
+ for (const fieldName in config.fields) {
60176
+ const fieldConfig = config.fields[fieldName];
60177
60177
  if (fieldConfig.astNode != null) {
60178
60178
  fields.push(fieldConfig.astNode);
60179
60179
  }
60180
60180
  }
60181
- config2.astNode = {
60182
- ...config2.astNode,
60181
+ config.astNode = {
60182
+ ...config.astNode,
60183
60183
  kind: Kind5.OBJECT_TYPE_DEFINITION,
60184
60184
  fields
60185
60185
  };
60186
60186
  }
60187
- if (config2.extensionASTNodes != null) {
60188
- config2.extensionASTNodes = config2.extensionASTNodes.map((node) => ({
60187
+ if (config.extensionASTNodes != null) {
60188
+ config.extensionASTNodes = config.extensionASTNodes.map((node) => ({
60189
60189
  ...node,
60190
60190
  kind: Kind5.OBJECT_TYPE_EXTENSION,
60191
60191
  fields: void 0
60192
60192
  }));
60193
60193
  }
60194
- return new GraphQLObjectType3(config2);
60194
+ return new GraphQLObjectType3(config);
60195
60195
  } else if (isInterfaceType3(type)) {
60196
- const config2 = type.toConfig();
60197
- if (config2.astNode != null) {
60196
+ const config = type.toConfig();
60197
+ if (config.astNode != null) {
60198
60198
  const fields = [];
60199
- for (const fieldName in config2.fields) {
60200
- const fieldConfig = config2.fields[fieldName];
60199
+ for (const fieldName in config.fields) {
60200
+ const fieldConfig = config.fields[fieldName];
60201
60201
  if (fieldConfig.astNode != null) {
60202
60202
  fields.push(fieldConfig.astNode);
60203
60203
  }
60204
60204
  }
60205
- config2.astNode = {
60206
- ...config2.astNode,
60205
+ config.astNode = {
60206
+ ...config.astNode,
60207
60207
  kind: Kind5.INTERFACE_TYPE_DEFINITION,
60208
60208
  fields
60209
60209
  };
60210
60210
  }
60211
- if (config2.extensionASTNodes != null) {
60212
- config2.extensionASTNodes = config2.extensionASTNodes.map((node) => ({
60211
+ if (config.extensionASTNodes != null) {
60212
+ config.extensionASTNodes = config.extensionASTNodes.map((node) => ({
60213
60213
  ...node,
60214
60214
  kind: Kind5.INTERFACE_TYPE_EXTENSION,
60215
60215
  fields: void 0
60216
60216
  }));
60217
60217
  }
60218
- return new GraphQLInterfaceType3(config2);
60218
+ return new GraphQLInterfaceType3(config);
60219
60219
  } else if (isInputObjectType4(type)) {
60220
- const config2 = type.toConfig();
60221
- if (config2.astNode != null) {
60220
+ const config = type.toConfig();
60221
+ if (config.astNode != null) {
60222
60222
  const fields = [];
60223
- for (const fieldName in config2.fields) {
60224
- const fieldConfig = config2.fields[fieldName];
60223
+ for (const fieldName in config.fields) {
60224
+ const fieldConfig = config.fields[fieldName];
60225
60225
  if (fieldConfig.astNode != null) {
60226
60226
  fields.push(fieldConfig.astNode);
60227
60227
  }
60228
60228
  }
60229
- config2.astNode = {
60230
- ...config2.astNode,
60229
+ config.astNode = {
60230
+ ...config.astNode,
60231
60231
  kind: Kind5.INPUT_OBJECT_TYPE_DEFINITION,
60232
60232
  fields
60233
60233
  };
60234
60234
  }
60235
- if (config2.extensionASTNodes != null) {
60236
- config2.extensionASTNodes = config2.extensionASTNodes.map((node) => ({
60235
+ if (config.extensionASTNodes != null) {
60236
+ config.extensionASTNodes = config.extensionASTNodes.map((node) => ({
60237
60237
  ...node,
60238
60238
  kind: Kind5.INPUT_OBJECT_TYPE_EXTENSION,
60239
60239
  fields: void 0
60240
60240
  }));
60241
60241
  }
60242
- return new GraphQLInputObjectType3(config2);
60242
+ return new GraphQLInputObjectType3(config);
60243
60243
  } else if (isEnumType3(type)) {
60244
- const config2 = type.toConfig();
60245
- if (config2.astNode != null) {
60244
+ const config = type.toConfig();
60245
+ if (config.astNode != null) {
60246
60246
  const values = [];
60247
- for (const enumKey in config2.values) {
60248
- const enumValueConfig = config2.values[enumKey];
60247
+ for (const enumKey in config.values) {
60248
+ const enumValueConfig = config.values[enumKey];
60249
60249
  if (enumValueConfig.astNode != null) {
60250
60250
  values.push(enumValueConfig.astNode);
60251
60251
  }
60252
60252
  }
60253
- config2.astNode = {
60254
- ...config2.astNode,
60253
+ config.astNode = {
60254
+ ...config.astNode,
60255
60255
  values
60256
60256
  };
60257
60257
  }
60258
- if (config2.extensionASTNodes != null) {
60259
- config2.extensionASTNodes = config2.extensionASTNodes.map((node) => ({
60258
+ if (config.extensionASTNodes != null) {
60259
+ config.extensionASTNodes = config.extensionASTNodes.map((node) => ({
60260
60260
  ...node,
60261
60261
  values: void 0
60262
60262
  }));
60263
60263
  }
60264
- return new GraphQLEnumType2(config2);
60264
+ return new GraphQLEnumType2(config);
60265
60265
  } else {
60266
60266
  return type;
60267
60267
  }
@@ -60395,9 +60395,9 @@ function getResolversFromSchema(schema, includeDefaultMergedResolver) {
60395
60395
  const type = typeMap[typeName];
60396
60396
  if (isScalarType4(type)) {
60397
60397
  if (!isSpecifiedScalarType3(type)) {
60398
- const config2 = type.toConfig();
60399
- delete config2.astNode;
60400
- resolvers[typeName] = new GraphQLScalarType2(config2);
60398
+ const config = type.toConfig();
60399
+ delete config.astNode;
60400
+ resolvers[typeName] = new GraphQLScalarType2(config);
60401
60401
  }
60402
60402
  } else if (isEnumType4(type)) {
60403
60403
  resolvers[typeName] = {};
@@ -60773,26 +60773,26 @@ function addResolversToExistingSchema(schema, resolvers, defaultFieldResolver) {
60773
60773
  }
60774
60774
  }
60775
60775
  } else if (isEnumType5(type)) {
60776
- const config2 = type.toConfig();
60777
- const enumValueConfigMap = config2.values;
60776
+ const config = type.toConfig();
60777
+ const enumValueConfigMap = config.values;
60778
60778
  for (const fieldName in resolverValue) {
60779
60779
  if (fieldName.startsWith("__")) {
60780
- config2[fieldName.substring(2)] = resolverValue[fieldName];
60781
- } else if (fieldName === "astNode" && config2.astNode != null) {
60782
- config2.astNode = {
60783
- ...config2.astNode,
60784
- description: (_h = (_g = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _g === void 0 ? void 0 : _g.description) !== null && _h !== void 0 ? _h : config2.astNode.description,
60785
- directives: ((_j = config2.astNode.directives) !== null && _j !== void 0 ? _j : []).concat((_l = (_k = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _k === void 0 ? void 0 : _k.directives) !== null && _l !== void 0 ? _l : [])
60780
+ config[fieldName.substring(2)] = resolverValue[fieldName];
60781
+ } else if (fieldName === "astNode" && config.astNode != null) {
60782
+ config.astNode = {
60783
+ ...config.astNode,
60784
+ description: (_h = (_g = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _g === void 0 ? void 0 : _g.description) !== null && _h !== void 0 ? _h : config.astNode.description,
60785
+ directives: ((_j = config.astNode.directives) !== null && _j !== void 0 ? _j : []).concat((_l = (_k = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _k === void 0 ? void 0 : _k.directives) !== null && _l !== void 0 ? _l : [])
60786
60786
  };
60787
- } else if (fieldName === "extensionASTNodes" && config2.extensionASTNodes != null) {
60788
- config2.extensionASTNodes = config2.extensionASTNodes.concat((_m = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.extensionASTNodes) !== null && _m !== void 0 ? _m : []);
60787
+ } else if (fieldName === "extensionASTNodes" && config.extensionASTNodes != null) {
60788
+ config.extensionASTNodes = config.extensionASTNodes.concat((_m = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.extensionASTNodes) !== null && _m !== void 0 ? _m : []);
60789
60789
  } else if (fieldName === "extensions" && type.extensions != null && resolverValue.extensions != null) {
60790
60790
  type.extensions = Object.assign(/* @__PURE__ */ Object.create(null), type.extensions, resolverValue.extensions);
60791
60791
  } else if (enumValueConfigMap[fieldName]) {
60792
60792
  enumValueConfigMap[fieldName].value = resolverValue[fieldName];
60793
60793
  }
60794
60794
  }
60795
- typeMap[typeName] = new GraphQLEnumType3(config2);
60795
+ typeMap[typeName] = new GraphQLEnumType3(config);
60796
60796
  } else if (isUnionType6(type)) {
60797
60797
  for (const fieldName in resolverValue) {
60798
60798
  if (fieldName.startsWith("__")) {
@@ -60834,83 +60834,83 @@ function createNewSchemaWithResolvers(schema, resolvers, defaultFieldResolver) {
60834
60834
  schema = mapSchema(schema, {
60835
60835
  [MapperKind.SCALAR_TYPE]: (type) => {
60836
60836
  var _a, _b, _c, _d, _e, _f;
60837
- const config2 = type.toConfig();
60837
+ const config = type.toConfig();
60838
60838
  const resolverValue = resolvers[type.name];
60839
60839
  if (!isSpecifiedScalarType4(type) && resolverValue != null) {
60840
60840
  for (const fieldName in resolverValue) {
60841
60841
  if (fieldName.startsWith("__")) {
60842
- config2[fieldName.substring(2)] = resolverValue[fieldName];
60843
- } else if (fieldName === "astNode" && config2.astNode != null) {
60844
- config2.astNode = {
60845
- ...config2.astNode,
60846
- description: (_b = (_a = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : config2.astNode.description,
60847
- directives: ((_c = config2.astNode.directives) !== null && _c !== void 0 ? _c : []).concat((_e = (_d = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _d === void 0 ? void 0 : _d.directives) !== null && _e !== void 0 ? _e : [])
60842
+ config[fieldName.substring(2)] = resolverValue[fieldName];
60843
+ } else if (fieldName === "astNode" && config.astNode != null) {
60844
+ config.astNode = {
60845
+ ...config.astNode,
60846
+ description: (_b = (_a = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : config.astNode.description,
60847
+ directives: ((_c = config.astNode.directives) !== null && _c !== void 0 ? _c : []).concat((_e = (_d = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _d === void 0 ? void 0 : _d.directives) !== null && _e !== void 0 ? _e : [])
60848
60848
  };
60849
- } else if (fieldName === "extensionASTNodes" && config2.extensionASTNodes != null) {
60850
- config2.extensionASTNodes = config2.extensionASTNodes.concat((_f = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.extensionASTNodes) !== null && _f !== void 0 ? _f : []);
60851
- } else if (fieldName === "extensions" && config2.extensions != null && resolverValue.extensions != null) {
60852
- config2.extensions = Object.assign(/* @__PURE__ */ Object.create(null), type.extensions, resolverValue.extensions);
60849
+ } else if (fieldName === "extensionASTNodes" && config.extensionASTNodes != null) {
60850
+ config.extensionASTNodes = config.extensionASTNodes.concat((_f = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.extensionASTNodes) !== null && _f !== void 0 ? _f : []);
60851
+ } else if (fieldName === "extensions" && config.extensions != null && resolverValue.extensions != null) {
60852
+ config.extensions = Object.assign(/* @__PURE__ */ Object.create(null), type.extensions, resolverValue.extensions);
60853
60853
  } else {
60854
- config2[fieldName] = resolverValue[fieldName];
60854
+ config[fieldName] = resolverValue[fieldName];
60855
60855
  }
60856
60856
  }
60857
- return new GraphQLScalarType3(config2);
60857
+ return new GraphQLScalarType3(config);
60858
60858
  }
60859
60859
  },
60860
60860
  [MapperKind.ENUM_TYPE]: (type) => {
60861
60861
  var _a, _b, _c, _d, _e, _f;
60862
60862
  const resolverValue = resolvers[type.name];
60863
- const config2 = type.toConfig();
60864
- const enumValueConfigMap = config2.values;
60863
+ const config = type.toConfig();
60864
+ const enumValueConfigMap = config.values;
60865
60865
  if (resolverValue != null) {
60866
60866
  for (const fieldName in resolverValue) {
60867
60867
  if (fieldName.startsWith("__")) {
60868
- config2[fieldName.substring(2)] = resolverValue[fieldName];
60869
- } else if (fieldName === "astNode" && config2.astNode != null) {
60870
- config2.astNode = {
60871
- ...config2.astNode,
60872
- description: (_b = (_a = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : config2.astNode.description,
60873
- directives: ((_c = config2.astNode.directives) !== null && _c !== void 0 ? _c : []).concat((_e = (_d = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _d === void 0 ? void 0 : _d.directives) !== null && _e !== void 0 ? _e : [])
60868
+ config[fieldName.substring(2)] = resolverValue[fieldName];
60869
+ } else if (fieldName === "astNode" && config.astNode != null) {
60870
+ config.astNode = {
60871
+ ...config.astNode,
60872
+ description: (_b = (_a = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : config.astNode.description,
60873
+ directives: ((_c = config.astNode.directives) !== null && _c !== void 0 ? _c : []).concat((_e = (_d = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.astNode) === null || _d === void 0 ? void 0 : _d.directives) !== null && _e !== void 0 ? _e : [])
60874
60874
  };
60875
- } else if (fieldName === "extensionASTNodes" && config2.extensionASTNodes != null) {
60876
- config2.extensionASTNodes = config2.extensionASTNodes.concat((_f = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.extensionASTNodes) !== null && _f !== void 0 ? _f : []);
60877
- } else if (fieldName === "extensions" && config2.extensions != null && resolverValue.extensions != null) {
60878
- config2.extensions = Object.assign(/* @__PURE__ */ Object.create(null), type.extensions, resolverValue.extensions);
60875
+ } else if (fieldName === "extensionASTNodes" && config.extensionASTNodes != null) {
60876
+ config.extensionASTNodes = config.extensionASTNodes.concat((_f = resolverValue === null || resolverValue === void 0 ? void 0 : resolverValue.extensionASTNodes) !== null && _f !== void 0 ? _f : []);
60877
+ } else if (fieldName === "extensions" && config.extensions != null && resolverValue.extensions != null) {
60878
+ config.extensions = Object.assign(/* @__PURE__ */ Object.create(null), type.extensions, resolverValue.extensions);
60879
60879
  } else if (enumValueConfigMap[fieldName]) {
60880
60880
  enumValueConfigMap[fieldName].value = resolverValue[fieldName];
60881
60881
  }
60882
60882
  }
60883
- return new GraphQLEnumType3(config2);
60883
+ return new GraphQLEnumType3(config);
60884
60884
  }
60885
60885
  },
60886
60886
  [MapperKind.UNION_TYPE]: (type) => {
60887
60887
  const resolverValue = resolvers[type.name];
60888
60888
  if (resolverValue != null) {
60889
- const config2 = type.toConfig();
60889
+ const config = type.toConfig();
60890
60890
  if (resolverValue["__resolveType"]) {
60891
- config2.resolveType = resolverValue["__resolveType"];
60891
+ config.resolveType = resolverValue["__resolveType"];
60892
60892
  }
60893
- return new GraphQLUnionType2(config2);
60893
+ return new GraphQLUnionType2(config);
60894
60894
  }
60895
60895
  },
60896
60896
  [MapperKind.OBJECT_TYPE]: (type) => {
60897
60897
  const resolverValue = resolvers[type.name];
60898
60898
  if (resolverValue != null) {
60899
- const config2 = type.toConfig();
60899
+ const config = type.toConfig();
60900
60900
  if (resolverValue["__isTypeOf"]) {
60901
- config2.isTypeOf = resolverValue["__isTypeOf"];
60901
+ config.isTypeOf = resolverValue["__isTypeOf"];
60902
60902
  }
60903
- return new GraphQLObjectType4(config2);
60903
+ return new GraphQLObjectType4(config);
60904
60904
  }
60905
60905
  },
60906
60906
  [MapperKind.INTERFACE_TYPE]: (type) => {
60907
60907
  const resolverValue = resolvers[type.name];
60908
60908
  if (resolverValue != null) {
60909
- const config2 = type.toConfig();
60909
+ const config = type.toConfig();
60910
60910
  if (resolverValue["__resolveType"]) {
60911
- config2.resolveType = resolverValue["__resolveType"];
60911
+ config.resolveType = resolverValue["__resolveType"];
60912
60912
  }
60913
- return new GraphQLInterfaceType4(config2);
60913
+ return new GraphQLInterfaceType4(config);
60914
60914
  }
60915
60915
  },
60916
60916
  [MapperKind.COMPOSITE_FIELD]: (fieldConfig, fieldName, typeName) => {
@@ -60983,9 +60983,9 @@ function mergeResolvers(resolversDefinitions, options) {
60983
60983
  }
60984
60984
 
60985
60985
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/arguments.js
60986
- function mergeArguments(args1, args2, config2) {
60986
+ function mergeArguments(args1, args2, config) {
60987
60987
  const result = deduplicateArguments([...args2, ...args1].filter(isSome));
60988
- if (config2 && config2.sort) {
60988
+ if (config && config.sort) {
60989
60989
  result.sort(compareNodes);
60990
60990
  }
60991
60991
  return result;
@@ -61041,8 +61041,8 @@ function deduplicateDirectives(directives) {
61041
61041
  return directive;
61042
61042
  }).filter(isSome);
61043
61043
  }
61044
- function mergeDirectives(d1 = [], d2 = [], config2) {
61045
- const reverseOrder = config2 && config2.reverseDirectives;
61044
+ function mergeDirectives(d1 = [], d2 = [], config) {
61045
+ const reverseOrder = config && config.reverseDirectives;
61046
61046
  const asNext = reverseOrder ? d1 : d2;
61047
61047
  const asFirst = reverseOrder ? d2 : d1;
61048
61048
  const result = deduplicateDirectives([...asNext]);
@@ -61094,8 +61094,8 @@ function deduplicateLists(source, target, filterFn) {
61094
61094
  }
61095
61095
 
61096
61096
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum-values.js
61097
- function mergeEnumValues(first, second, config2) {
61098
- if (config2 === null || config2 === void 0 ? void 0 : config2.consistentEnumMerge) {
61097
+ function mergeEnumValues(first, second, config) {
61098
+ if (config === null || config === void 0 ? void 0 : config.consistentEnumMerge) {
61099
61099
  const reversed = [];
61100
61100
  if (first) {
61101
61101
  reversed.push(...first);
@@ -61122,7 +61122,7 @@ function mergeEnumValues(first, second, config2) {
61122
61122
  }
61123
61123
  }
61124
61124
  const result = [...enumValueMap.values()];
61125
- if (config2 && config2.sort) {
61125
+ if (config && config.sort) {
61126
61126
  result.sort(compareNodes);
61127
61127
  }
61128
61128
  return result;
@@ -61130,18 +61130,18 @@ function mergeEnumValues(first, second, config2) {
61130
61130
 
61131
61131
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/enum.js
61132
61132
  import { Kind as Kind7 } from "graphql";
61133
- function mergeEnum(e1, e2, config2) {
61133
+ function mergeEnum(e1, e2, config) {
61134
61134
  if (e2) {
61135
61135
  return {
61136
61136
  name: e1.name,
61137
61137
  description: e1["description"] || e2["description"],
61138
- kind: (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) || e1.kind === "EnumTypeDefinition" || e2.kind === "EnumTypeDefinition" ? "EnumTypeDefinition" : "EnumTypeExtension",
61138
+ kind: (config === null || config === void 0 ? void 0 : config.convertExtensions) || e1.kind === "EnumTypeDefinition" || e2.kind === "EnumTypeDefinition" ? "EnumTypeDefinition" : "EnumTypeExtension",
61139
61139
  loc: e1.loc,
61140
- directives: mergeDirectives(e1.directives, e2.directives, config2),
61141
- values: mergeEnumValues(e1.values, e2.values, config2)
61140
+ directives: mergeDirectives(e1.directives, e2.directives, config),
61141
+ values: mergeEnumValues(e1.values, e2.values, config)
61142
61142
  };
61143
61143
  }
61144
- return (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) ? {
61144
+ return (config === null || config === void 0 ? void 0 : config.convertExtensions) ? {
61145
61145
  ...e1,
61146
61146
  kind: Kind7.ENUM_TYPE_DEFINITION
61147
61147
  } : e1;
@@ -61204,9 +61204,9 @@ function defaultStringComparator(a, b) {
61204
61204
  }
61205
61205
 
61206
61206
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/fields.js
61207
- function fieldAlreadyExists(fieldsArr, otherField, config2) {
61207
+ function fieldAlreadyExists(fieldsArr, otherField, config) {
61208
61208
  const result = fieldsArr.find((field) => field.name.value === otherField.name.value);
61209
- if (result && !(config2 === null || config2 === void 0 ? void 0 : config2.ignoreFieldConflicts)) {
61209
+ if (result && !(config === null || config === void 0 ? void 0 : config.ignoreFieldConflicts)) {
61210
61210
  const t1 = extractType(result.type);
61211
61211
  const t22 = extractType(otherField.type);
61212
61212
  if (t1.name.value !== t22.name.value) {
@@ -61215,17 +61215,17 @@ function fieldAlreadyExists(fieldsArr, otherField, config2) {
61215
61215
  }
61216
61216
  return !!result;
61217
61217
  }
61218
- function mergeFields(type, f1, f22, config2) {
61218
+ function mergeFields(type, f1, f22, config) {
61219
61219
  const result = [];
61220
61220
  if (f22 != null) {
61221
61221
  result.push(...f22);
61222
61222
  }
61223
61223
  if (f1 != null) {
61224
61224
  for (const field of f1) {
61225
- if (fieldAlreadyExists(result, field, config2)) {
61225
+ if (fieldAlreadyExists(result, field, config)) {
61226
61226
  const existing = result.find((f3) => f3.name.value === field.name.value);
61227
- if (!(config2 === null || config2 === void 0 ? void 0 : config2.ignoreFieldConflicts)) {
61228
- if (config2 === null || config2 === void 0 ? void 0 : config2.throwOnConflict) {
61227
+ if (!(config === null || config === void 0 ? void 0 : config.ignoreFieldConflicts)) {
61228
+ if (config === null || config === void 0 ? void 0 : config.throwOnConflict) {
61229
61229
  preventConflicts(type, existing, field, false);
61230
61230
  } else {
61231
61231
  preventConflicts(type, existing, field, true);
@@ -61234,19 +61234,19 @@ function mergeFields(type, f1, f22, config2) {
61234
61234
  existing.type = field.type;
61235
61235
  }
61236
61236
  }
61237
- existing.arguments = mergeArguments(field["arguments"] || [], existing.arguments || [], config2);
61238
- existing.directives = mergeDirectives(field.directives, existing.directives, config2);
61237
+ existing.arguments = mergeArguments(field["arguments"] || [], existing.arguments || [], config);
61238
+ existing.directives = mergeDirectives(field.directives, existing.directives, config);
61239
61239
  existing.description = field.description || existing.description;
61240
61240
  } else {
61241
61241
  result.push(field);
61242
61242
  }
61243
61243
  }
61244
61244
  }
61245
- if (config2 && config2.sort) {
61245
+ if (config && config.sort) {
61246
61246
  result.sort(compareNodes);
61247
61247
  }
61248
- if (config2 && config2.exclusions) {
61249
- const exclusions = config2.exclusions;
61248
+ if (config && config.exclusions) {
61249
+ const exclusions = config.exclusions;
61250
61250
  return result.filter((field) => !exclusions.includes(`${type.name.value}.${field.name.value}`));
61251
61251
  }
61252
61252
  return result;
@@ -61277,22 +61277,22 @@ function safeChangeForFieldType(oldType, newType, ignoreNullability = false) {
61277
61277
 
61278
61278
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/input-type.js
61279
61279
  import { Kind as Kind9 } from "graphql";
61280
- function mergeInputType(node, existingNode, config2) {
61280
+ function mergeInputType(node, existingNode, config) {
61281
61281
  if (existingNode) {
61282
61282
  try {
61283
61283
  return {
61284
61284
  name: node.name,
61285
61285
  description: node["description"] || existingNode["description"],
61286
- kind: (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) || node.kind === "InputObjectTypeDefinition" || existingNode.kind === "InputObjectTypeDefinition" ? "InputObjectTypeDefinition" : "InputObjectTypeExtension",
61286
+ kind: (config === null || config === void 0 ? void 0 : config.convertExtensions) || node.kind === "InputObjectTypeDefinition" || existingNode.kind === "InputObjectTypeDefinition" ? "InputObjectTypeDefinition" : "InputObjectTypeExtension",
61287
61287
  loc: node.loc,
61288
- fields: mergeFields(node, node.fields, existingNode.fields, config2),
61289
- directives: mergeDirectives(node.directives, existingNode.directives, config2)
61288
+ fields: mergeFields(node, node.fields, existingNode.fields, config),
61289
+ directives: mergeDirectives(node.directives, existingNode.directives, config)
61290
61290
  };
61291
61291
  } catch (e2) {
61292
61292
  throw new Error(`Unable to merge GraphQL input type "${node.name.value}": ${e2.message}`);
61293
61293
  }
61294
61294
  }
61295
- return (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) ? {
61295
+ return (config === null || config === void 0 ? void 0 : config.convertExtensions) ? {
61296
61296
  ...node,
61297
61297
  kind: Kind9.INPUT_OBJECT_TYPE_DEFINITION
61298
61298
  } : node;
@@ -61300,23 +61300,23 @@ function mergeInputType(node, existingNode, config2) {
61300
61300
 
61301
61301
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/interface.js
61302
61302
  import { Kind as Kind10 } from "graphql";
61303
- function mergeInterface(node, existingNode, config2) {
61303
+ function mergeInterface(node, existingNode, config) {
61304
61304
  if (existingNode) {
61305
61305
  try {
61306
61306
  return {
61307
61307
  name: node.name,
61308
61308
  description: node["description"] || existingNode["description"],
61309
- kind: (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) || node.kind === "InterfaceTypeDefinition" || existingNode.kind === "InterfaceTypeDefinition" ? "InterfaceTypeDefinition" : "InterfaceTypeExtension",
61309
+ kind: (config === null || config === void 0 ? void 0 : config.convertExtensions) || node.kind === "InterfaceTypeDefinition" || existingNode.kind === "InterfaceTypeDefinition" ? "InterfaceTypeDefinition" : "InterfaceTypeExtension",
61310
61310
  loc: node.loc,
61311
- fields: mergeFields(node, node.fields, existingNode.fields, config2),
61312
- directives: mergeDirectives(node.directives, existingNode.directives, config2),
61313
- interfaces: node["interfaces"] ? mergeNamedTypeArray(node["interfaces"], existingNode["interfaces"], config2) : void 0
61311
+ fields: mergeFields(node, node.fields, existingNode.fields, config),
61312
+ directives: mergeDirectives(node.directives, existingNode.directives, config),
61313
+ interfaces: node["interfaces"] ? mergeNamedTypeArray(node["interfaces"], existingNode["interfaces"], config) : void 0
61314
61314
  };
61315
61315
  } catch (e2) {
61316
61316
  throw new Error(`Unable to merge GraphQL interface "${node.name.value}": ${e2.message}`);
61317
61317
  }
61318
61318
  }
61319
- return (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) ? {
61319
+ return (config === null || config === void 0 ? void 0 : config.convertExtensions) ? {
61320
61320
  ...node,
61321
61321
  kind: Kind10.INTERFACE_TYPE_DEFINITION
61322
61322
  } : node;
@@ -61326,9 +61326,9 @@ function mergeInterface(node, existingNode, config2) {
61326
61326
  function alreadyExists(arr, other) {
61327
61327
  return !!arr.find((i2) => i2.name.value === other.name.value);
61328
61328
  }
61329
- function mergeNamedTypeArray(first = [], second = [], config2 = {}) {
61329
+ function mergeNamedTypeArray(first = [], second = [], config = {}) {
61330
61330
  const result = [...second, ...first.filter((d) => !alreadyExists(second, d))];
61331
- if (config2 && config2.sort) {
61331
+ if (config && config.sort) {
61332
61332
  result.sort(compareNodes);
61333
61333
  }
61334
61334
  return result;
@@ -61339,23 +61339,23 @@ import { Kind as Kind15 } from "graphql";
61339
61339
 
61340
61340
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/type.js
61341
61341
  import { Kind as Kind11 } from "graphql";
61342
- function mergeType(node, existingNode, config2) {
61342
+ function mergeType(node, existingNode, config) {
61343
61343
  if (existingNode) {
61344
61344
  try {
61345
61345
  return {
61346
61346
  name: node.name,
61347
61347
  description: node["description"] || existingNode["description"],
61348
- kind: (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) || node.kind === "ObjectTypeDefinition" || existingNode.kind === "ObjectTypeDefinition" ? "ObjectTypeDefinition" : "ObjectTypeExtension",
61348
+ kind: (config === null || config === void 0 ? void 0 : config.convertExtensions) || node.kind === "ObjectTypeDefinition" || existingNode.kind === "ObjectTypeDefinition" ? "ObjectTypeDefinition" : "ObjectTypeExtension",
61349
61349
  loc: node.loc,
61350
- fields: mergeFields(node, node.fields, existingNode.fields, config2),
61351
- directives: mergeDirectives(node.directives, existingNode.directives, config2),
61352
- interfaces: mergeNamedTypeArray(node.interfaces, existingNode.interfaces, config2)
61350
+ fields: mergeFields(node, node.fields, existingNode.fields, config),
61351
+ directives: mergeDirectives(node.directives, existingNode.directives, config),
61352
+ interfaces: mergeNamedTypeArray(node.interfaces, existingNode.interfaces, config)
61353
61353
  };
61354
61354
  } catch (e2) {
61355
61355
  throw new Error(`Unable to merge GraphQL type "${node.name.value}": ${e2.message}`);
61356
61356
  }
61357
61357
  }
61358
- return (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) ? {
61358
+ return (config === null || config === void 0 ? void 0 : config.convertExtensions) ? {
61359
61359
  ...node,
61360
61360
  kind: Kind11.OBJECT_TYPE_DEFINITION
61361
61361
  } : node;
@@ -61363,17 +61363,17 @@ function mergeType(node, existingNode, config2) {
61363
61363
 
61364
61364
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/scalar.js
61365
61365
  import { Kind as Kind12 } from "graphql";
61366
- function mergeScalar(node, existingNode, config2) {
61366
+ function mergeScalar(node, existingNode, config) {
61367
61367
  if (existingNode) {
61368
61368
  return {
61369
61369
  name: node.name,
61370
61370
  description: node["description"] || existingNode["description"],
61371
- kind: (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) || node.kind === "ScalarTypeDefinition" || existingNode.kind === "ScalarTypeDefinition" ? "ScalarTypeDefinition" : "ScalarTypeExtension",
61371
+ kind: (config === null || config === void 0 ? void 0 : config.convertExtensions) || node.kind === "ScalarTypeDefinition" || existingNode.kind === "ScalarTypeDefinition" ? "ScalarTypeDefinition" : "ScalarTypeExtension",
61372
61372
  loc: node.loc,
61373
- directives: mergeDirectives(node.directives, existingNode.directives, config2)
61373
+ directives: mergeDirectives(node.directives, existingNode.directives, config)
61374
61374
  };
61375
61375
  }
61376
- return (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) ? {
61376
+ return (config === null || config === void 0 ? void 0 : config.convertExtensions) ? {
61377
61377
  ...node,
61378
61378
  kind: Kind12.SCALAR_TYPE_DEFINITION
61379
61379
  } : node;
@@ -61381,18 +61381,18 @@ function mergeScalar(node, existingNode, config2) {
61381
61381
 
61382
61382
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/union.js
61383
61383
  import { Kind as Kind13 } from "graphql";
61384
- function mergeUnion(first, second, config2) {
61384
+ function mergeUnion(first, second, config) {
61385
61385
  if (second) {
61386
61386
  return {
61387
61387
  name: first.name,
61388
61388
  description: first["description"] || second["description"],
61389
- directives: mergeDirectives(first.directives, second.directives, config2),
61390
- kind: (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? Kind13.UNION_TYPE_DEFINITION : Kind13.UNION_TYPE_EXTENSION,
61389
+ directives: mergeDirectives(first.directives, second.directives, config),
61390
+ kind: (config === null || config === void 0 ? void 0 : config.convertExtensions) || first.kind === "UnionTypeDefinition" || second.kind === "UnionTypeDefinition" ? Kind13.UNION_TYPE_DEFINITION : Kind13.UNION_TYPE_EXTENSION,
61391
61391
  loc: first.loc,
61392
- types: mergeNamedTypeArray(first.types, second.types, config2)
61392
+ types: mergeNamedTypeArray(first.types, second.types, config)
61393
61393
  };
61394
61394
  }
61395
- return (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) ? {
61395
+ return (config === null || config === void 0 ? void 0 : config.convertExtensions) ? {
61396
61396
  ...first,
61397
61397
  kind: Kind13.UNION_TYPE_DEFINITION
61398
61398
  } : first;
@@ -61415,16 +61415,16 @@ function mergeOperationTypes(opNodeList = [], existingOpNodeList = []) {
61415
61415
  }
61416
61416
  return finalOpNodeList;
61417
61417
  }
61418
- function mergeSchemaDefs(node, existingNode, config2) {
61418
+ function mergeSchemaDefs(node, existingNode, config) {
61419
61419
  if (existingNode) {
61420
61420
  return {
61421
61421
  kind: node.kind === Kind14.SCHEMA_DEFINITION || existingNode.kind === Kind14.SCHEMA_DEFINITION ? Kind14.SCHEMA_DEFINITION : Kind14.SCHEMA_EXTENSION,
61422
61422
  description: node["description"] || existingNode["description"],
61423
- directives: mergeDirectives(node.directives, existingNode.directives, config2),
61423
+ directives: mergeDirectives(node.directives, existingNode.directives, config),
61424
61424
  operationTypes: mergeOperationTypes(node.operationTypes, existingNode.operationTypes)
61425
61425
  };
61426
61426
  }
61427
- return (config2 === null || config2 === void 0 ? void 0 : config2.convertExtensions) ? {
61427
+ return (config === null || config === void 0 ? void 0 : config.convertExtensions) ? {
61428
61428
  ...node,
61429
61429
  kind: Kind14.SCHEMA_DEFINITION
61430
61430
  } : node;
@@ -61435,45 +61435,45 @@ var schemaDefSymbol = "SCHEMA_DEF_SYMBOL";
61435
61435
  function isNamedDefinitionNode(definitionNode) {
61436
61436
  return "name" in definitionNode;
61437
61437
  }
61438
- function mergeGraphQLNodes(nodes, config2) {
61438
+ function mergeGraphQLNodes(nodes, config) {
61439
61439
  var _a, _b, _c;
61440
61440
  const mergedResultMap = {};
61441
61441
  for (const nodeDefinition of nodes) {
61442
61442
  if (isNamedDefinitionNode(nodeDefinition)) {
61443
61443
  const name = (_a = nodeDefinition.name) === null || _a === void 0 ? void 0 : _a.value;
61444
- if (config2 === null || config2 === void 0 ? void 0 : config2.commentDescriptions) {
61444
+ if (config === null || config === void 0 ? void 0 : config.commentDescriptions) {
61445
61445
  collectComment(nodeDefinition);
61446
61446
  }
61447
61447
  if (name == null) {
61448
61448
  continue;
61449
61449
  }
61450
- if (((_b = config2 === null || config2 === void 0 ? void 0 : config2.exclusions) === null || _b === void 0 ? void 0 : _b.includes(name + ".*")) || ((_c = config2 === null || config2 === void 0 ? void 0 : config2.exclusions) === null || _c === void 0 ? void 0 : _c.includes(name))) {
61450
+ if (((_b = config === null || config === void 0 ? void 0 : config.exclusions) === null || _b === void 0 ? void 0 : _b.includes(name + ".*")) || ((_c = config === null || config === void 0 ? void 0 : config.exclusions) === null || _c === void 0 ? void 0 : _c.includes(name))) {
61451
61451
  delete mergedResultMap[name];
61452
61452
  } else {
61453
61453
  switch (nodeDefinition.kind) {
61454
61454
  case Kind15.OBJECT_TYPE_DEFINITION:
61455
61455
  case Kind15.OBJECT_TYPE_EXTENSION:
61456
- mergedResultMap[name] = mergeType(nodeDefinition, mergedResultMap[name], config2);
61456
+ mergedResultMap[name] = mergeType(nodeDefinition, mergedResultMap[name], config);
61457
61457
  break;
61458
61458
  case Kind15.ENUM_TYPE_DEFINITION:
61459
61459
  case Kind15.ENUM_TYPE_EXTENSION:
61460
- mergedResultMap[name] = mergeEnum(nodeDefinition, mergedResultMap[name], config2);
61460
+ mergedResultMap[name] = mergeEnum(nodeDefinition, mergedResultMap[name], config);
61461
61461
  break;
61462
61462
  case Kind15.UNION_TYPE_DEFINITION:
61463
61463
  case Kind15.UNION_TYPE_EXTENSION:
61464
- mergedResultMap[name] = mergeUnion(nodeDefinition, mergedResultMap[name], config2);
61464
+ mergedResultMap[name] = mergeUnion(nodeDefinition, mergedResultMap[name], config);
61465
61465
  break;
61466
61466
  case Kind15.SCALAR_TYPE_DEFINITION:
61467
61467
  case Kind15.SCALAR_TYPE_EXTENSION:
61468
- mergedResultMap[name] = mergeScalar(nodeDefinition, mergedResultMap[name], config2);
61468
+ mergedResultMap[name] = mergeScalar(nodeDefinition, mergedResultMap[name], config);
61469
61469
  break;
61470
61470
  case Kind15.INPUT_OBJECT_TYPE_DEFINITION:
61471
61471
  case Kind15.INPUT_OBJECT_TYPE_EXTENSION:
61472
- mergedResultMap[name] = mergeInputType(nodeDefinition, mergedResultMap[name], config2);
61472
+ mergedResultMap[name] = mergeInputType(nodeDefinition, mergedResultMap[name], config);
61473
61473
  break;
61474
61474
  case Kind15.INTERFACE_TYPE_DEFINITION:
61475
61475
  case Kind15.INTERFACE_TYPE_EXTENSION:
61476
- mergedResultMap[name] = mergeInterface(nodeDefinition, mergedResultMap[name], config2);
61476
+ mergedResultMap[name] = mergeInterface(nodeDefinition, mergedResultMap[name], config);
61477
61477
  break;
61478
61478
  case Kind15.DIRECTIVE_DEFINITION:
61479
61479
  mergedResultMap[name] = mergeDirective(nodeDefinition, mergedResultMap[name]);
@@ -61481,7 +61481,7 @@ function mergeGraphQLNodes(nodes, config2) {
61481
61481
  }
61482
61482
  }
61483
61483
  } else if (nodeDefinition.kind === Kind15.SCHEMA_DEFINITION || nodeDefinition.kind === Kind15.SCHEMA_EXTENSION) {
61484
- mergedResultMap[schemaDefSymbol] = mergeSchemaDefs(nodeDefinition, mergedResultMap[schemaDefSymbol], config2);
61484
+ mergedResultMap[schemaDefSymbol] = mergeSchemaDefs(nodeDefinition, mergedResultMap[schemaDefSymbol], config);
61485
61485
  }
61486
61486
  }
61487
61487
  return mergedResultMap;
@@ -61489,7 +61489,7 @@ function mergeGraphQLNodes(nodes, config2) {
61489
61489
 
61490
61490
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/merge-typedefs.js
61491
61491
  import { parse as parse2, Kind as Kind16, isSchema, isDefinitionNode } from "graphql";
61492
- function mergeTypeDefs(typeSource, config2) {
61492
+ function mergeTypeDefs(typeSource, config) {
61493
61493
  resetComments();
61494
61494
  const doc = {
61495
61495
  kind: Kind16.DOCUMENT,
@@ -61498,11 +61498,11 @@ function mergeTypeDefs(typeSource, config2) {
61498
61498
  forceSchemaDefinition: false,
61499
61499
  throwOnConflict: false,
61500
61500
  commentDescriptions: false,
61501
- ...config2
61501
+ ...config
61502
61502
  })
61503
61503
  };
61504
61504
  let result;
61505
- if (config2 === null || config2 === void 0 ? void 0 : config2.commentDescriptions) {
61505
+ if (config === null || config === void 0 ? void 0 : config.commentDescriptions) {
61506
61506
  result = printWithComments(doc);
61507
61507
  } else {
61508
61508
  result = doc;
@@ -61535,12 +61535,12 @@ function visitTypeSources(typeSource, options, allNodes = [], visitedTypeSources
61535
61535
  }
61536
61536
  return allNodes;
61537
61537
  }
61538
- function mergeGraphQLTypes(typeSource, config2) {
61538
+ function mergeGraphQLTypes(typeSource, config) {
61539
61539
  var _a, _b, _c;
61540
61540
  resetComments();
61541
- const allNodes = visitTypeSources(typeSource, config2);
61542
- const mergedNodes = mergeGraphQLNodes(allNodes, config2);
61543
- if (config2 === null || config2 === void 0 ? void 0 : config2.useSchemaDefinition) {
61541
+ const allNodes = visitTypeSources(typeSource, config);
61542
+ const mergedNodes = mergeGraphQLNodes(allNodes, config);
61543
+ if (config === null || config === void 0 ? void 0 : config.useSchemaDefinition) {
61544
61544
  const schemaDef = mergedNodes[schemaDefSymbol] || {
61545
61545
  kind: Kind16.SCHEMA_DEFINITION,
61546
61546
  operationTypes: []
@@ -61567,7 +61567,7 @@ function mergeGraphQLTypes(typeSource, config2) {
61567
61567
  mergedNodes[schemaDefSymbol] = schemaDef;
61568
61568
  }
61569
61569
  }
61570
- if ((config2 === null || config2 === void 0 ? void 0 : config2.forceSchemaDefinition) && !((_c = (_b = mergedNodes[schemaDefSymbol]) === null || _b === void 0 ? void 0 : _b.operationTypes) === null || _c === void 0 ? void 0 : _c.length)) {
61570
+ if ((config === null || config === void 0 ? void 0 : config.forceSchemaDefinition) && !((_c = (_b = mergedNodes[schemaDefSymbol]) === null || _b === void 0 ? void 0 : _b.operationTypes) === null || _c === void 0 ? void 0 : _c.length)) {
61571
61571
  mergedNodes[schemaDefSymbol] = {
61572
61572
  kind: Kind16.SCHEMA_DEFINITION,
61573
61573
  operationTypes: [
@@ -61586,8 +61586,8 @@ function mergeGraphQLTypes(typeSource, config2) {
61586
61586
  };
61587
61587
  }
61588
61588
  const mergedNodeDefinitions = Object.values(mergedNodes);
61589
- if (config2 === null || config2 === void 0 ? void 0 : config2.sort) {
61590
- const sortFn = typeof config2.sort === "function" ? config2.sort : defaultStringComparator;
61589
+ if (config === null || config === void 0 ? void 0 : config.sort) {
61590
+ const sortFn = typeof config.sort === "function" ? config.sort : defaultStringComparator;
61591
61591
  mergedNodeDefinitions.sort((a, b) => {
61592
61592
  var _a2, _b2;
61593
61593
  return sortFn((_a2 = a.name) === null || _a2 === void 0 ? void 0 : _a2.value, (_b2 = b.name) === null || _b2 === void 0 ? void 0 : _b2.value);
@@ -61677,30 +61677,30 @@ function makeExecutableSchema({ typeDefs, resolvers = {}, resolverValidationOpti
61677
61677
  }
61678
61678
 
61679
61679
  // ../../node_modules/.pnpm/@graphql-tools+schema@9.0.12_graphql@15.5.0/node_modules/@graphql-tools/schema/esm/merge-schemas.js
61680
- function mergeSchemas(config2) {
61680
+ function mergeSchemas(config) {
61681
61681
  const extractedTypeDefs = [];
61682
61682
  const extractedResolvers = [];
61683
61683
  const extractedSchemaExtensions = [];
61684
- if (config2.schemas != null) {
61685
- for (const schema of config2.schemas) {
61684
+ if (config.schemas != null) {
61685
+ for (const schema of config.schemas) {
61686
61686
  extractedTypeDefs.push(schema);
61687
61687
  extractedResolvers.push(getResolversFromSchema(schema));
61688
61688
  extractedSchemaExtensions.push(extractExtensionsFromSchema(schema));
61689
61689
  }
61690
61690
  }
61691
- if (config2.typeDefs != null) {
61692
- extractedTypeDefs.push(config2.typeDefs);
61691
+ if (config.typeDefs != null) {
61692
+ extractedTypeDefs.push(config.typeDefs);
61693
61693
  }
61694
- if (config2.resolvers != null) {
61695
- const additionalResolvers = asArray(config2.resolvers);
61694
+ if (config.resolvers != null) {
61695
+ const additionalResolvers = asArray(config.resolvers);
61696
61696
  extractedResolvers.push(...additionalResolvers);
61697
61697
  }
61698
- if (config2.schemaExtensions != null) {
61699
- const additionalSchemaExtensions = asArray(config2.schemaExtensions);
61698
+ if (config.schemaExtensions != null) {
61699
+ const additionalSchemaExtensions = asArray(config.schemaExtensions);
61700
61700
  extractedSchemaExtensions.push(...additionalSchemaExtensions);
61701
61701
  }
61702
61702
  return makeExecutableSchema({
61703
- ...config2,
61703
+ ...config,
61704
61704
  typeDefs: extractedTypeDefs,
61705
61705
  resolvers: extractedResolvers,
61706
61706
  schemaExtensions: extractedSchemaExtensions
@@ -61724,8 +61724,8 @@ var mockConfig = null;
61724
61724
  function getMockConfig() {
61725
61725
  return mockConfig;
61726
61726
  }
61727
- function setMockConfig(config2) {
61728
- mockConfig = config2;
61727
+ function setMockConfig(config) {
61728
+ mockConfig = config;
61729
61729
  }
61730
61730
  function defaultConfigValues(file) {
61731
61731
  return {
@@ -61853,7 +61853,7 @@ async function marshalSelection({
61853
61853
  selection,
61854
61854
  data
61855
61855
  }) {
61856
- const config2 = getCurrentConfig();
61856
+ const config = getCurrentConfig();
61857
61857
  if (data === null || typeof data === "undefined") {
61858
61858
  return data;
61859
61859
  }
@@ -61871,8 +61871,8 @@ async function marshalSelection({
61871
61871
  if (selection2) {
61872
61872
  return [fieldName, await marshalSelection({ selection: selection2, data: value })];
61873
61873
  }
61874
- if (config2.scalars?.[type]) {
61875
- const marshalFn = config2.scalars[type].marshal;
61874
+ if (config.scalars?.[type]) {
61875
+ const marshalFn = config.scalars[type].marshal;
61876
61876
  if (!marshalFn) {
61877
61877
  throw new Error(
61878
61878
  `scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
@@ -61891,7 +61891,7 @@ async function marshalSelection({
61891
61891
  function marshalInputs({
61892
61892
  artifact,
61893
61893
  input,
61894
- config: config2,
61894
+ config,
61895
61895
  rootType = "@root"
61896
61896
  }) {
61897
61897
  if (input === null || typeof input === "undefined") {
@@ -61902,7 +61902,7 @@ function marshalInputs({
61902
61902
  }
61903
61903
  const fields = rootType === "@root" ? artifact.input.fields : artifact.input.types[rootType];
61904
61904
  if (Array.isArray(input)) {
61905
- return input.map((val) => marshalInputs({ artifact, input: val, rootType, config: config2 }));
61905
+ return input.map((val) => marshalInputs({ artifact, input: val, rootType, config }));
61906
61906
  }
61907
61907
  return Object.fromEntries(
61908
61908
  Object.entries(input).map(([fieldName, value]) => {
@@ -61910,22 +61910,22 @@ function marshalInputs({
61910
61910
  if (!type) {
61911
61911
  return [fieldName, value];
61912
61912
  }
61913
- const marshalFn = config2.scalars?.[type]?.marshal;
61913
+ const marshalFn = config.scalars?.[type]?.marshal;
61914
61914
  if (marshalFn) {
61915
61915
  if (Array.isArray(value)) {
61916
61916
  return [fieldName, value.map(marshalFn)];
61917
61917
  }
61918
61918
  return [fieldName, marshalFn(value)];
61919
61919
  }
61920
- if (isScalar(config2, type) || !artifact.input.types[type]) {
61920
+ if (isScalar(config, type) || !artifact.input.types[type]) {
61921
61921
  return [fieldName, value];
61922
61922
  }
61923
- return [fieldName, marshalInputs({ artifact, input: value, rootType: type, config: config2 })];
61923
+ return [fieldName, marshalInputs({ artifact, input: value, rootType: type, config })];
61924
61924
  })
61925
61925
  );
61926
61926
  }
61927
- function isScalar(config2, type) {
61928
- return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(config2.scalars || {})).includes(type);
61927
+ function isScalar(config, type) {
61928
+ return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(config.scalars || {})).includes(type);
61929
61929
  }
61930
61930
 
61931
61931
  // src/runtime/lib/types.ts
@@ -62348,36 +62348,115 @@ async function glob(pattern) {
62348
62348
  }
62349
62349
  glob.hasMagic = import_glob.glob.hasMagic;
62350
62350
 
62351
- // ../../node_modules/.pnpm/@kitql+helper@0.5.0/node_modules/@kitql/helper/index.mjs
62352
- var config = {
62353
- reset: {
62354
- node: `\x1B[37m\x1B[0m`,
62355
- browser: ""
62356
- },
62357
- green: {
62358
- node: `\x1B[32m`,
62359
- browser: "color: green"
62360
- },
62361
- magneta: {
62362
- node: `\x1B[35m`,
62363
- browser: "color: #ff00ff"
62364
- },
62365
- red: {
62366
- node: `\x1B[31m`,
62367
- browser: "color: red"
62368
- },
62369
- cyan: {
62370
- node: `\x1B[36m`,
62371
- browser: "color: cyan"
62372
- },
62373
- yellow: {
62374
- node: `\x1B[33m`,
62375
- browser: "color: yellow"
62376
- }
62351
+ // ../../node_modules/.pnpm/esm-env@1.0.0/node_modules/esm-env/prod-ssr.js
62352
+ var BROWSER = false;
62353
+
62354
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/stylesNode.js
62355
+ var stylesNode_exports = {};
62356
+ __export(stylesNode_exports, {
62357
+ bgBlack: () => bgBlack,
62358
+ bgBlackBright: () => bgBlackBright,
62359
+ bgBlue: () => bgBlue,
62360
+ bgBlueBright: () => bgBlueBright,
62361
+ bgCyan: () => bgCyan,
62362
+ bgCyanBright: () => bgCyanBright,
62363
+ bgGreen: () => bgGreen,
62364
+ bgGreenBright: () => bgGreenBright,
62365
+ bgMagenta: () => bgMagenta,
62366
+ bgMagentaBright: () => bgMagentaBright,
62367
+ bgRed: () => bgRed,
62368
+ bgRedBright: () => bgRedBright,
62369
+ bgWhite: () => bgWhite,
62370
+ bgWhiteBright: () => bgWhiteBright,
62371
+ bgYellow: () => bgYellow,
62372
+ bgYellowBright: () => bgYellowBright,
62373
+ black: () => black,
62374
+ blackBright: () => blackBright,
62375
+ blue: () => blue,
62376
+ blueBright: () => blueBright,
62377
+ bold: () => bold,
62378
+ cyan: () => cyan,
62379
+ cyanBright: () => cyanBright,
62380
+ dim: () => dim,
62381
+ gray: () => gray,
62382
+ green: () => green,
62383
+ greenBright: () => greenBright,
62384
+ hidden: () => hidden,
62385
+ inverse: () => inverse,
62386
+ italic: () => italic,
62387
+ magenta: () => magenta,
62388
+ magentaBright: () => magentaBright,
62389
+ red: () => red,
62390
+ redBright: () => redBright,
62391
+ reset: () => reset,
62392
+ strikethrough: () => strikethrough,
62393
+ underline: () => underline,
62394
+ white: () => white,
62395
+ whiteBright: () => whiteBright,
62396
+ yellow: () => yellow,
62397
+ yellowBright: () => yellowBright
62398
+ });
62399
+ var reset = { start: "\x1B[0m", end: "\x1B[0m" };
62400
+ var bold = { start: "\x1B[1m", end: "\x1B[22m" };
62401
+ var dim = { start: "\x1B[2m", end: "\x1B[22m" };
62402
+ var italic = { start: "\x1B[3m", end: "\x1B[23m" };
62403
+ var underline = { start: "\x1B[4m", end: "\x1B[24m" };
62404
+ var inverse = { start: "\x1B[7m", end: "\x1B[27m" };
62405
+ var hidden = { start: "\x1B[8m", end: "\x1B[28m" };
62406
+ var strikethrough = { start: "\x1B[9m", end: "\x1B[29m" };
62407
+ var black = { start: "\x1B[30m", end: "\x1B[39m" };
62408
+ var red = { start: "\x1B[31m", end: "\x1B[39m" };
62409
+ var green = { start: "\x1B[32m", end: "\x1B[39m" };
62410
+ var yellow = { start: "\x1B[33m", end: "\x1B[39m" };
62411
+ var blue = { start: "\x1B[34m", end: "\x1B[39m" };
62412
+ var magenta = { start: "\x1B[35m", end: "\x1B[39m" };
62413
+ var cyan = { start: "\x1B[36m", end: "\x1B[39m" };
62414
+ var white = { start: "\x1B[37m", end: "\x1B[39m" };
62415
+ var gray = { start: "\x1B[90m", end: "\x1B[39m" };
62416
+ var bgBlack = { start: "\x1B[40m", end: "\x1B[49m" };
62417
+ var bgRed = { start: "\x1B[41m", end: "\x1B[49m" };
62418
+ var bgGreen = { start: "\x1B[42m", end: "\x1B[49m" };
62419
+ var bgYellow = { start: "\x1B[43m", end: "\x1B[49m" };
62420
+ var bgBlue = { start: "\x1B[44m", end: "\x1B[49m" };
62421
+ var bgMagenta = { start: "\x1B[45m", end: "\x1B[49m" };
62422
+ var bgCyan = { start: "\x1B[46m", end: "\x1B[49m" };
62423
+ var bgWhite = { start: "\x1B[47m", end: "\x1B[49m" };
62424
+ var blackBright = { start: "\x1B[90m", end: "\x1B[39m" };
62425
+ var redBright = { start: "\x1B[91m", end: "\x1B[39m" };
62426
+ var greenBright = { start: "\x1B[92m", end: "\x1B[39m" };
62427
+ var yellowBright = { start: "\x1B[93m", end: "\x1B[39m" };
62428
+ var blueBright = { start: "\x1B[94m", end: "\x1B[39m" };
62429
+ var magentaBright = { start: "\x1B[95m", end: "\x1B[39m" };
62430
+ var cyanBright = { start: "\x1B[96m", end: "\x1B[39m" };
62431
+ var whiteBright = { start: "\x1B[97m", end: "\x1B[39m" };
62432
+ var bgBlackBright = { start: "\x1B[100m", end: "\x1B[49m" };
62433
+ var bgRedBright = { start: "\x1B[101m", end: "\x1B[49m" };
62434
+ var bgGreenBright = { start: "\x1B[102m", end: "\x1B[49m" };
62435
+ var bgYellowBright = { start: "\x1B[103m", end: "\x1B[49m" };
62436
+ var bgBlueBright = { start: "\x1B[104m", end: "\x1B[49m" };
62437
+ var bgMagentaBright = { start: "\x1B[105m", end: "\x1B[49m" };
62438
+ var bgCyanBright = { start: "\x1B[106m", end: "\x1B[49m" };
62439
+ var bgWhiteBright = { start: "\x1B[107m", end: "\x1B[49m" };
62440
+
62441
+ // ../../node_modules/.pnpm/@kitql+helpers@0.8.2/node_modules/@kitql/helpers/dist/colors/index.js
62442
+ var getStyleNode = (styleKey) => {
62443
+ return stylesNode_exports[styleKey] ?? void 0;
62444
+ };
62445
+ var color = (style, str) => {
62446
+ return BROWSER ? colorBrowser(style, str) : colorNode(style, str);
62447
+ };
62448
+ var colorNode = (style, str) => {
62449
+ return `${getStyleNode(style).start}${str}${getStyleNode(style).end}`;
62450
+ };
62451
+ var START1 = `$$KitQL_`;
62452
+ var START2 = `_KitQL$$`;
62453
+ var END = `$$KitQLEND$$`;
62454
+ var colorBrowser = (style, str) => {
62455
+ return `${START1}${style}${START2}${str}${END}`;
62456
+ };
62457
+ var cyan2 = (str) => {
62458
+ return color("cyan", str);
62377
62459
  };
62378
- function logCyan(str) {
62379
- return `${config.cyan.node}${str}${config.reset.node}`;
62380
- }
62381
62460
 
62382
62461
  // src/lib/introspection.ts
62383
62462
  import * as graphql from "graphql";
@@ -63621,8 +63700,8 @@ async function pullSchema(url, schemaPath, headers, skipWriting) {
63621
63700
  if (content) {
63622
63701
  console.warn(
63623
63702
  `\u26A0\uFE0F Couldn't pull your schema.
63624
- ${logCyan(" Reponse:")} ${content}
63625
- ${logCyan(" Error :")} ${e2.message}`
63703
+ ${cyan2(" Reponse:")} ${content}
63704
+ ${cyan2(" Error :")} ${e2.message}`
63626
63705
  );
63627
63706
  } else {
63628
63707
  console.warn(`\u26A0\uFE0F Couldn't pull your schema: ${e2.message}`);
@@ -63658,10 +63737,10 @@ function plugin(name, hooks) {
63658
63737
  name,
63659
63738
  plugin: hooks,
63660
63739
  __plugin_init__: true,
63661
- with(config2) {
63740
+ with(config) {
63662
63741
  return {
63663
63742
  ...data,
63664
- config: config2
63743
+ config
63665
63744
  };
63666
63745
  }
63667
63746
  };
@@ -64413,7 +64492,7 @@ var InMemoryStorage = class {
64413
64492
  layer.replaceID(replacement);
64414
64493
  }
64415
64494
  }
64416
- get(id, field) {
64495
+ get(id, field, defaultValue) {
64417
64496
  const operations = {
64418
64497
  [OperationKind.insert]: {
64419
64498
  [OperationLocation.start]: [],
@@ -64424,7 +64503,7 @@ var InMemoryStorage = class {
64424
64503
  const layerIDs = [];
64425
64504
  for (let i2 = this.data.length - 1; i2 >= 0; i2--) {
64426
64505
  const layer = this.data[i2];
64427
- const [layerValue, kind] = layer.get(id, field);
64506
+ let [layerValue, kind] = layer.get(id, field);
64428
64507
  const layerOperations = layer.getOperations(id, field) || [];
64429
64508
  layer.deletedIDs.forEach((v) => {
64430
64509
  if (layer.operations[v]?.undoDeletesInList?.includes(field)) {
@@ -64432,6 +64511,12 @@ var InMemoryStorage = class {
64432
64511
  }
64433
64512
  operations.remove.add(v);
64434
64513
  });
64514
+ if (typeof layerValue === "undefined" && defaultValue) {
64515
+ const targetLayer = this.topLayer;
64516
+ const layerID = targetLayer.id;
64517
+ targetLayer.writeField(id, field, defaultValue);
64518
+ layerValue = defaultValue;
64519
+ }
64435
64520
  if (typeof layerValue === "undefined" && layerOperations.length === 0) {
64436
64521
  if (layer.deletedIDs.size > 0) {
64437
64522
  layerIDs.push(layer.id);
@@ -64532,7 +64617,14 @@ var InMemoryStorage = class {
64532
64617
  serialize() {
64533
64618
  return JSON.stringify({
64534
64619
  rank: this.rank,
64535
- fields: this.topLayer.fields,
64620
+ fields: Object.fromEntries(
64621
+ Object.entries(this.topLayer.fields).map(([id, fieldMap]) => [
64622
+ id,
64623
+ Object.fromEntries(
64624
+ Object.entries(fieldMap).filter(([_, value]) => typeof value !== "function")
64625
+ )
64626
+ ])
64627
+ ),
64536
64628
  links: this.topLayer.links
64537
64629
  });
64538
64630
  }
@@ -65049,7 +65141,12 @@ var InMemorySubscriptions = class {
65049
65141
  // src/runtime/cache/cache.ts
65050
65142
  var Cache = class {
65051
65143
  _internal_unstable;
65052
- constructor({ disabled, ...config2 } = {}) {
65144
+ constructor({
65145
+ disabled,
65146
+ componentCache,
65147
+ createComponent,
65148
+ ...config
65149
+ } = {}) {
65053
65150
  this._internal_unstable = new CacheInternal({
65054
65151
  cache: this,
65055
65152
  storage: new InMemoryStorage(),
@@ -65057,10 +65154,12 @@ var Cache = class {
65057
65154
  lists: new ListManager(this, rootID),
65058
65155
  lifetimes: new GarbageCollector(this),
65059
65156
  staleManager: new StaleManager(this),
65060
- disabled: disabled ?? typeof globalThis.window === "undefined"
65157
+ disabled: disabled ?? typeof globalThis.window === "undefined",
65158
+ componentCache,
65159
+ createComponent
65061
65160
  });
65062
- if (Object.keys(config2).length > 0) {
65063
- this.setConfig(defaultConfigValues(config2));
65161
+ if (Object.keys(config).length > 0) {
65162
+ this.setConfig(defaultConfigValues(config));
65064
65163
  }
65065
65164
  }
65066
65165
  write({
@@ -65114,8 +65213,8 @@ var Cache = class {
65114
65213
  this._internal_unstable.lists.removeIDFromAllLists(id, layer);
65115
65214
  this._internal_unstable.storage.delete(id, layer);
65116
65215
  }
65117
- setConfig(config2) {
65118
- this._internal_unstable.setConfig(config2);
65216
+ setConfig(config) {
65217
+ this._internal_unstable.setConfig(config);
65119
65218
  }
65120
65219
  markTypeStale(options) {
65121
65220
  if (!options) {
@@ -65232,6 +65331,8 @@ var CacheInternal = class {
65232
65331
  cache;
65233
65332
  lifetimes;
65234
65333
  staleManager;
65334
+ componentCache;
65335
+ createComponent;
65235
65336
  constructor({
65236
65337
  storage,
65237
65338
  subscriptions,
@@ -65240,7 +65341,9 @@ var CacheInternal = class {
65240
65341
  lifetimes,
65241
65342
  staleManager,
65242
65343
  disabled,
65243
- config: config2
65344
+ config,
65345
+ componentCache,
65346
+ createComponent
65244
65347
  }) {
65245
65348
  this.storage = storage;
65246
65349
  this.subscriptions = subscriptions;
@@ -65248,7 +65351,9 @@ var CacheInternal = class {
65248
65351
  this.cache = cache;
65249
65352
  this.lifetimes = lifetimes;
65250
65353
  this.staleManager = staleManager;
65251
- this._config = config2;
65354
+ this._config = config;
65355
+ this.componentCache = componentCache ?? {};
65356
+ this.createComponent = createComponent ?? (() => ({}));
65252
65357
  this._disabled = disabled;
65253
65358
  try {
65254
65359
  if (process.env.HOUDINI_TEST === "true") {
@@ -65260,8 +65365,8 @@ var CacheInternal = class {
65260
65365
  get config() {
65261
65366
  return this._config ?? getCurrentConfig();
65262
65367
  }
65263
- setConfig(config2) {
65264
- this._config = config2;
65368
+ setConfig(config) {
65369
+ this._config = config;
65265
65370
  }
65266
65371
  writeSelection({
65267
65372
  data,
@@ -65578,7 +65683,8 @@ var CacheInternal = class {
65578
65683
  visible,
65579
65684
  directives,
65580
65685
  loading: fieldLoading,
65581
- abstractHasRequired
65686
+ abstractHasRequired,
65687
+ component
65582
65688
  }
65583
65689
  ] of Object.entries(targetSelection)) {
65584
65690
  if (!visible && !ignoreMasking && !fullCheck) {
@@ -65605,7 +65711,13 @@ var CacheInternal = class {
65605
65711
  if (generateLoading && !fieldLoading) {
65606
65712
  continue;
65607
65713
  }
65608
- let { value } = this.storage.get(parent, key);
65714
+ const defaultValue = !component ? void 0 : defaultComponentField({
65715
+ cache: this.cache,
65716
+ component,
65717
+ variables,
65718
+ parent
65719
+ });
65720
+ let { value } = this.storage.get(parent, key, defaultValue);
65609
65721
  const dt_field = this.staleManager.getFieldTime(parent, key);
65610
65722
  if (dt_field === null) {
65611
65723
  stale = true;
@@ -65652,12 +65764,16 @@ var CacheInternal = class {
65652
65764
  stepsFromConnection: nextStep,
65653
65765
  ignoreMasking: !!ignoreMasking,
65654
65766
  fullCheck,
65655
- loading: generateLoading
65767
+ loading: generateLoading,
65768
+ nullable: !!nullable
65656
65769
  });
65657
65770
  fieldTarget[attributeName] = listValue.data;
65658
65771
  if (listValue.partial) {
65659
65772
  partial = true;
65660
65773
  }
65774
+ if (listValue.cascadeNull) {
65775
+ cascadeNull = true;
65776
+ }
65661
65777
  if (listValue.stale) {
65662
65778
  stale = true;
65663
65779
  }
@@ -65737,16 +65853,19 @@ var CacheInternal = class {
65737
65853
  stepsFromConnection,
65738
65854
  ignoreMasking,
65739
65855
  fullCheck,
65740
- loading
65856
+ loading,
65857
+ nullable
65741
65858
  }) {
65742
65859
  const result = [];
65743
65860
  let partialData = false;
65744
65861
  let stale = false;
65745
65862
  let hasValues = false;
65863
+ let cascadeNull = false;
65746
65864
  for (const entry of linkedList) {
65747
65865
  if (Array.isArray(entry)) {
65748
65866
  const nestedValue = this.hydrateNestedList({
65749
65867
  fields,
65868
+ nullable,
65750
65869
  variables,
65751
65870
  linkedList: entry,
65752
65871
  stepsFromConnection,
@@ -65758,6 +65877,9 @@ var CacheInternal = class {
65758
65877
  if (nestedValue.partial) {
65759
65878
  partialData = true;
65760
65879
  }
65880
+ if (nestedValue.cascadeNull) {
65881
+ cascadeNull = true;
65882
+ }
65761
65883
  continue;
65762
65884
  }
65763
65885
  if (entry === null) {
@@ -65778,6 +65900,9 @@ var CacheInternal = class {
65778
65900
  fullCheck,
65779
65901
  loading
65780
65902
  });
65903
+ if (data === null && !nullable) {
65904
+ cascadeNull = true;
65905
+ }
65781
65906
  result.push(data);
65782
65907
  if (partial) {
65783
65908
  partialData = true;
@@ -65793,7 +65918,8 @@ var CacheInternal = class {
65793
65918
  data: result,
65794
65919
  partial: partialData,
65795
65920
  stale,
65796
- hasData: hasValues
65921
+ hasData: hasValues,
65922
+ cascadeNull
65797
65923
  };
65798
65924
  }
65799
65925
  extractNestedListIDs({
@@ -65922,6 +66048,32 @@ function fragmentVariableValue(value, args) {
65922
66048
  }
65923
66049
  }
65924
66050
  var rootID = "_ROOT_";
66051
+ function defaultComponentField({
66052
+ cache,
66053
+ component,
66054
+ loading,
66055
+ variables,
66056
+ parent
66057
+ }) {
66058
+ return (props) => {
66059
+ const componentFn = cache._internal_unstable.componentCache[component.key];
66060
+ const args = evaluateFragmentVariables(component.variables ?? {}, variables ?? {});
66061
+ return cache._internal_unstable.createComponent(componentFn, {
66062
+ ...props,
66063
+ [component.prop]: {
66064
+ [fragmentKey]: {
66065
+ loading,
66066
+ values: {
66067
+ [component.fragment]: {
66068
+ variables: args,
66069
+ parent
66070
+ }
66071
+ }
66072
+ }
66073
+ }
66074
+ });
66075
+ };
66076
+ }
65925
66077
 
65926
66078
  // src/runtime/cache/index.ts
65927
66079
  var cache_default = new Cache();
@@ -66727,6 +66879,7 @@ var HoudiniClient = class {
66727
66879
  plugins;
66728
66880
  throwOnError_operations;
66729
66881
  proxies = {};
66882
+ componentCache = {};
66730
66883
  constructor({
66731
66884
  url,
66732
66885
  fetchParams: fetchParams2,
@@ -66840,6 +66993,7 @@ var Config = class {
66840
66993
  schemaPollHeaders;
66841
66994
  pluginMode = false;
66842
66995
  plugins = [];
66996
+ componentFields = {};
66843
66997
  constructor({
66844
66998
  filepath,
66845
66999
  loadFrameworkConfig,
@@ -66996,10 +67150,13 @@ var Config = class {
66996
67150
  )
66997
67151
  ];
66998
67152
  }
67153
+ get componentScalar() {
67154
+ return "Component";
67155
+ }
66999
67156
  #newSchemaInstance = null;
67000
- #schemaString = "";
67157
+ schemaString = "";
67001
67158
  set newSchema(value) {
67002
- this.#schemaString = value;
67159
+ this.schemaString = value;
67003
67160
  if (value) {
67004
67161
  this.#newSchemaInstance = graphql2.buildSchema(value);
67005
67162
  } else {
@@ -67007,7 +67164,7 @@ var Config = class {
67007
67164
  }
67008
67165
  }
67009
67166
  get newSchema() {
67010
- return this.#schemaString;
67167
+ return this.schemaString;
67011
67168
  }
67012
67169
  get artifactDirectory() {
67013
67170
  return join2(this.rootDir, this.artifactDirectoryName);
@@ -67043,7 +67200,7 @@ var Config = class {
67043
67200
  return join2(this.definitionsDirectory, "schema.graphql");
67044
67201
  }
67045
67202
  get routerBuildDirectory() {
67046
- return join2(this.projectRoot, "dist", "assets");
67203
+ return join2(this.projectRoot, "dist");
67047
67204
  }
67048
67205
  get definitionsDocumentsPath() {
67049
67206
  return join2(this.definitionsDirectory, "documents.gql");
@@ -67286,16 +67443,41 @@ var Config = class {
67286
67443
  }, []) ?? [];
67287
67444
  return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name));
67288
67445
  }
67289
- needsRefetchArtifact(document) {
67290
- let needsArtifact = false;
67291
- graphql2.visit(document, {
67292
- Directive: (node) => {
67293
- if ([this.paginateDirective].includes(node.name.value)) {
67294
- needsArtifact = true;
67446
+ get componentFieldDirective() {
67447
+ return "componentField";
67448
+ }
67449
+ componentFieldFragmentName(args) {
67450
+ let fieldValue = args.entry;
67451
+ if (typeof fieldValue !== "string") {
67452
+ const field = fieldValue.arguments?.find((arg) => arg.name.value === "field")?.value;
67453
+ fieldValue = field?.kind === "StringValue" ? field.value : "";
67454
+ }
67455
+ if (!fieldValue) {
67456
+ return "";
67457
+ }
67458
+ return `__componentField__${args.type}_${fieldValue}`;
67459
+ }
67460
+ localDocumentData(document) {
67461
+ let paginated = false;
67462
+ let componentFields = [];
67463
+ const typeInfo = new graphql2.TypeInfo(this.schema);
67464
+ graphql2.visit(
67465
+ document,
67466
+ graphql2.visitWithTypeInfo(typeInfo, {
67467
+ Directive: (node) => {
67468
+ if ([this.paginateDirective].includes(node.name.value)) {
67469
+ paginated = true;
67470
+ }
67471
+ },
67472
+ Field: (node) => {
67473
+ const parentType = typeInfo.getParentType();
67474
+ if (this.componentFields[parentType?.name ?? ""]?.[node.name.value] && parentType?.name) {
67475
+ componentFields.push({ type: parentType?.name, field: node.name.value });
67476
+ }
67295
67477
  }
67296
- }
67297
- });
67298
- return needsArtifact;
67478
+ })
67479
+ );
67480
+ return { paginated, componentFields };
67299
67481
  }
67300
67482
  #fragmentVariableMaps;
67301
67483
  registerFragmentVariablesHash({
@@ -67429,8 +67611,12 @@ async function getConfig({
67429
67611
  });
67430
67612
  try {
67431
67613
  let configFile = await readConfigFile(configPath);
67614
+ const pluginConfigs = Object.entries(configFile.plugins ?? {});
67615
+ if (process.env.HOUDINI_CODEGEN_PLUGIN) {
67616
+ pluginConfigs.push([process.env.HOUDINI_CODEGEN_PLUGIN, {}]);
67617
+ }
67432
67618
  const pluginsNested = [];
67433
- for (const [pluginName, plugin_config] of Object.entries(configFile.plugins ?? {})) {
67619
+ for (const [pluginName, plugin_config] of pluginConfigs) {
67434
67620
  let pluginFile = join2(dirname(configPath), pluginName);
67435
67621
  if (!pluginName.startsWith(".")) {
67436
67622
  pluginFile = await pluginPath(pluginName, configPath);
@@ -67548,8 +67734,8 @@ async function readConfigFile(configPath = DEFAULT_CONFIG_PATH) {
67548
67734
  throw new Error(`Could not load config file at file://${configPath}.
67549
67735
  ${e2.message}`);
67550
67736
  }
67551
- const config2 = imported.default || imported;
67552
- return config2;
67737
+ const config = imported.default || imported;
67738
+ return config;
67553
67739
  }
67554
67740
  var orderedPlugins = (plugins2) => {
67555
67741
  const ordered = plugins2.filter(
@@ -67649,6 +67835,39 @@ function getRootType(type) {
67649
67835
  }
67650
67836
  return type;
67651
67837
  }
67838
+ function processComponentFieldDirective(directive) {
67839
+ let field;
67840
+ let exportValue;
67841
+ let prop;
67842
+ let raw;
67843
+ for (const arg of directive.arguments ?? []) {
67844
+ if (arg.name.value === "field" && arg.value.kind === "StringValue") {
67845
+ field = arg.value.value;
67846
+ } else if (arg.name.value === "export" && arg.value.kind === "StringValue") {
67847
+ exportValue = arg.value.value;
67848
+ } else if (arg.name.value === "prop" && arg.value.kind === "StringValue") {
67849
+ prop = arg.value.value;
67850
+ } else if (arg.name.value === "raw" && arg.value.kind === "StringValue") {
67851
+ raw = arg.value.value;
67852
+ }
67853
+ }
67854
+ const missing = [];
67855
+ if (!field) {
67856
+ missing.push("field");
67857
+ }
67858
+ if (!prop) {
67859
+ missing.push("prop");
67860
+ }
67861
+ if (missing.length > 0) {
67862
+ throw new Error(`missing arguments to @componentField: ${missing.join(", ")}`);
67863
+ }
67864
+ return {
67865
+ prop,
67866
+ field,
67867
+ raw,
67868
+ export: exportValue
67869
+ };
67870
+ }
67652
67871
  function hashOriginal({ document }) {
67653
67872
  return hashDocument(document.originalString);
67654
67873
  }
@@ -67765,23 +67984,23 @@ function operation_requires_variables(operation) {
67765
67984
  )
67766
67985
  );
67767
67986
  }
67768
- function unwrapType(config2, type, wrappers = []) {
67987
+ function unwrapType(config, type, wrappers = []) {
67769
67988
  if (type.kind === "NonNullType") {
67770
- return unwrapType(config2, type.type, [TypeWrapper.NonNull, ...wrappers]);
67989
+ return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
67771
67990
  }
67772
67991
  if (type instanceof graphql3.GraphQLNonNull) {
67773
- return unwrapType(config2, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
67992
+ return unwrapType(config, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
67774
67993
  }
67775
67994
  if (wrappers[0] !== TypeWrapper.NonNull) {
67776
67995
  wrappers.unshift(TypeWrapper.Nullable);
67777
67996
  }
67778
67997
  if (type.kind === "ListType") {
67779
- return unwrapType(config2, type.type, [TypeWrapper.List, ...wrappers]);
67998
+ return unwrapType(config, type.type, [TypeWrapper.List, ...wrappers]);
67780
67999
  }
67781
68000
  if (type instanceof graphql3.GraphQLList) {
67782
- return unwrapType(config2, type.ofType, [TypeWrapper.List, ...wrappers]);
68001
+ return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
67783
68002
  }
67784
- const namedType = config2.schema.getType(type.name.value || type.name);
68003
+ const namedType = config.schema.getType(type.name.value || type.name);
67785
68004
  if (!namedType) {
67786
68005
  throw new Error("Could not unwrap type: " + JSON.stringify(type));
67787
68006
  }
@@ -67846,12 +68065,12 @@ function deepMerge2(filepath, ...targets) {
67846
68065
  }
67847
68066
 
67848
68067
  // src/lib/parse.ts
67849
- function parseJS(str, config2) {
68068
+ function parseJS(str, config) {
67850
68069
  const defaultConfig = {
67851
68070
  plugins: ["typescript", "importAssertions", "decorators-legacy"],
67852
68071
  sourceType: "module"
67853
68072
  };
67854
- return (0, import_parser.parse)(str || "", config2 ? deepMerge2("", defaultConfig, config2) : defaultConfig).program;
68073
+ return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
67855
68074
  }
67856
68075
  function parseJSON(str) {
67857
68076
  str = str.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m2, g) => g ? "" : m2);
@@ -67869,26 +68088,40 @@ async function printJS(script, options) {
67869
68088
  var recast = __toESM(require_main2(), 1);
67870
68089
  var AST = recast.types.builders;
67871
68090
  function ensureArtifactImport({
67872
- config: config2,
68091
+ config,
67873
68092
  artifact,
67874
68093
  body,
67875
68094
  local,
67876
68095
  withExtension
67877
68096
  }) {
67878
68097
  return ensureImports({
67879
- config: config2,
68098
+ config,
67880
68099
  body,
67881
- sourceModule: config2.artifactImportPath(artifact.name) + (withExtension ? ".js" : ""),
68100
+ sourceModule: config.artifactImportPath(artifact.name) + (withExtension ? ".js" : ""),
67882
68101
  import: local || `_${artifact.name}Artifact`
67883
68102
  });
67884
68103
  }
67885
68104
  function ensureImports({
67886
- config: config2,
68105
+ config,
67887
68106
  body,
67888
68107
  import: importID,
67889
68108
  sourceModule,
67890
68109
  importKind
67891
68110
  }) {
68111
+ if (!importID) {
68112
+ if (body.find(
68113
+ (statement) => statement.type === "ImportDeclaration" && statement.source.value === sourceModule
68114
+ )) {
68115
+ return null;
68116
+ }
68117
+ body.unshift({
68118
+ type: "ImportDeclaration",
68119
+ source: AST.stringLiteral(sourceModule),
68120
+ specifiers: [],
68121
+ importKind
68122
+ });
68123
+ return null;
68124
+ }
67892
68125
  const idList = Array.isArray(importID) ? importID : [importID];
67893
68126
  const toImport = idList.filter(
67894
68127
  (identifier) => !body.find(
@@ -67949,7 +68182,7 @@ async function detectFromPackageJSON(cwd) {
67949
68182
  module: packageJSON["type"] === "module" ? "esm" : "commonjs"
67950
68183
  };
67951
68184
  }
67952
- async function detectTools(cwd) {
68185
+ async function detectTools(cwd = process.cwd()) {
67953
68186
  let typescript = false;
67954
68187
  try {
67955
68188
  await fs_exports.stat(path_exports.join(cwd, "tsconfig.json"));
@@ -68207,13 +68440,14 @@ async function asyncWalk(ast, { enter, leave }) {
68207
68440
 
68208
68441
  // src/lib/walk.ts
68209
68442
  import * as graphql4 from "graphql";
68210
- async function find_graphql(config2, parsedScript, walker) {
68443
+ async function find_graphql(config, parsedScript, walker) {
68211
68444
  await asyncWalk(parsedScript, {
68212
68445
  async enter(node, parent) {
68213
- if (node.type !== "TaggedTemplateExpression" && node.type !== "CallExpression") {
68446
+ if (node.type !== "TaggedTemplateExpression" && node.type !== "CallExpression" && node.type !== "TSPropertySignature") {
68214
68447
  return;
68215
68448
  }
68216
- let documentString;
68449
+ let documentString = "";
68450
+ let propName = "";
68217
68451
  if (node.type === "TaggedTemplateExpression") {
68218
68452
  const expr = node;
68219
68453
  if (expr.tag.type !== "Identifier" || expr.tag.name !== "graphql") {
@@ -68233,55 +68467,184 @@ async function find_graphql(config2, parsedScript, walker) {
68233
68467
  } else {
68234
68468
  return;
68235
68469
  }
68236
- } else {
68470
+ } else if (node.type === "TSPropertySignature" && !walker.skipGraphqlType) {
68471
+ const signature = node;
68472
+ if (signature.typeAnnotation?.typeAnnotation?.type !== "TSTypeReference") {
68473
+ return;
68474
+ }
68475
+ const annotation = signature.typeAnnotation?.typeAnnotation;
68476
+ if (annotation.typeName.type !== "Identifier") {
68477
+ return;
68478
+ }
68479
+ if (annotation.typeName.name !== "GraphQL") {
68480
+ return;
68481
+ }
68482
+ if (annotation.typeParameters?.params[0].type !== "TSLiteralType") {
68483
+ return;
68484
+ }
68485
+ const literal = annotation.typeParameters?.params[0];
68486
+ if (literal.literal.type === "StringLiteral") {
68487
+ documentString = literal.literal.value;
68488
+ } else if (literal.literal.type === "TemplateLiteral") {
68489
+ documentString = literal.literal.quasis[0].value.raw;
68490
+ }
68491
+ if (signature.key.type === "Identifier") {
68492
+ propName = signature.key.name;
68493
+ }
68494
+ } else if (!documentString) {
68237
68495
  return;
68238
68496
  }
68239
68497
  const parsedTag = graphql4.parse(documentString);
68240
68498
  if (walker.where && !walker.where(parsedTag, { node, parent })) {
68241
68499
  return;
68242
68500
  }
68243
- const definition = config2.extractDefinition(parsedTag);
68244
- const name = definition.name?.value;
68245
- if (!name) {
68246
- throw new Error("Could not find definition name");
68247
- }
68501
+ let anonOkay = false;
68502
+ let definitions = [
68503
+ { raw: documentString, parsed: config.extractDefinition(parsedTag) }
68504
+ ];
68505
+ const name = definitions[0].parsed.name?.value;
68248
68506
  let kind;
68249
- if (definition.kind === "FragmentDefinition") {
68507
+ if (definitions[0].parsed.kind === "FragmentDefinition") {
68250
68508
  kind = CompiledFragmentKind;
68251
68509
  } else {
68252
- if (definition.operation === "query") {
68510
+ if (definitions[0].parsed.operation === "query") {
68253
68511
  kind = CompiledQueryKind;
68254
- } else if (definition.operation === "mutation") {
68512
+ } else if (definitions[0].parsed.operation === "mutation") {
68255
68513
  kind = CompiledMutationKind;
68256
68514
  } else {
68257
68515
  kind = CompiledSubscriptionKind;
68258
68516
  }
68259
68517
  }
68260
- walker.dependency?.(config2.artifactPath(parsedTag));
68261
- await walker.tag({
68262
- parsedDocument: parsedTag,
68263
- node: {
68264
- ...node,
68265
- ...this,
68266
- remove: this.remove,
68267
- replaceWith: this.replace
68268
- },
68269
- artifact: {
68270
- name,
68271
- kind
68272
- },
68273
- parent,
68274
- tagContent: documentString
68275
- });
68518
+ if (kind === CompiledQueryKind) {
68519
+ anonOkay = definitions[0].parsed.selectionSet.selections.every(
68520
+ (selection) => selection.kind === "InlineFragment" && selection.directives?.find(
68521
+ (directive) => directive.name.value === config.componentFieldDirective
68522
+ )
68523
+ );
68524
+ if (name) {
68525
+ definitions = [{ parsed: definitions[0].parsed, raw: definitions[0].raw }];
68526
+ } else if (config.configFile.features?.componentFields) {
68527
+ definitions = extractAnonymousQuery(
68528
+ config,
68529
+ definitions[0].raw,
68530
+ definitions[0].parsed,
68531
+ propName
68532
+ );
68533
+ }
68534
+ }
68535
+ if (!name && !anonOkay) {
68536
+ throw new Error("Could not find definition name");
68537
+ }
68538
+ walker.dependency?.(config.artifactPath(parsedTag));
68539
+ for (const definition of definitions) {
68540
+ const name2 = definition.parsed.name?.value;
68541
+ if (!name2) {
68542
+ continue;
68543
+ }
68544
+ await walker.tag({
68545
+ parsedDocument: { kind: "Document", definitions: [definition.parsed] },
68546
+ node: {
68547
+ ...node,
68548
+ ...this,
68549
+ remove: this.remove,
68550
+ replaceWith: this.replace
68551
+ },
68552
+ artifact: {
68553
+ name: name2,
68554
+ kind
68555
+ },
68556
+ parent,
68557
+ tagContent: definition.raw
68558
+ });
68559
+ }
68276
68560
  }
68277
68561
  });
68278
68562
  }
68563
+ function extractAnonymousQuery(config, raw, expr, propName) {
68564
+ const definitions = expr.selectionSet.selections.reduce(
68565
+ (defs, selection) => {
68566
+ if (selection.kind !== "InlineFragment") {
68567
+ return defs;
68568
+ }
68569
+ const componentField = selection.directives.find(
68570
+ (dir) => dir.name.value === config.componentFieldDirective
68571
+ );
68572
+ const fragmentName = config.componentFieldFragmentName({
68573
+ type: selection.typeCondition.name.value,
68574
+ entry: componentField
68575
+ });
68576
+ if (componentField) {
68577
+ componentField.arguments = [
68578
+ ...componentField?.arguments ?? [],
68579
+ {
68580
+ kind: "Argument",
68581
+ name: {
68582
+ kind: "Name",
68583
+ value: "raw"
68584
+ },
68585
+ value: {
68586
+ kind: "StringValue",
68587
+ value: raw
68588
+ }
68589
+ }
68590
+ ];
68591
+ }
68592
+ if (componentField && propName && !componentField.arguments?.find((arg) => arg.name.value === "prop")) {
68593
+ componentField.arguments = [
68594
+ ...componentField?.arguments ?? [],
68595
+ {
68596
+ kind: "Argument",
68597
+ name: {
68598
+ kind: "Name",
68599
+ value: "prop"
68600
+ },
68601
+ value: {
68602
+ kind: "StringValue",
68603
+ value: propName
68604
+ }
68605
+ }
68606
+ ];
68607
+ }
68608
+ const parsed = {
68609
+ kind: "FragmentDefinition",
68610
+ typeCondition: {
68611
+ kind: "NamedType",
68612
+ name: {
68613
+ kind: "Name",
68614
+ value: selection.typeCondition?.name.value || ""
68615
+ }
68616
+ },
68617
+ name: {
68618
+ kind: "Name",
68619
+ value: fragmentName
68620
+ },
68621
+ selectionSet: {
68622
+ kind: "SelectionSet",
68623
+ selections: selection.selectionSet.selections
68624
+ },
68625
+ directives: selection.directives
68626
+ };
68627
+ return defs.concat([
68628
+ {
68629
+ raw: graphql4.print(parsed),
68630
+ parsed
68631
+ }
68632
+ ]);
68633
+ },
68634
+ []
68635
+ );
68636
+ if (definitions.length > 1) {
68637
+ throw new Error("Anonymous queries can only contain a single inline fragment");
68638
+ }
68639
+ return definitions;
68640
+ }
68279
68641
 
68280
68642
  // src/lib/router/conventions.ts
68281
68643
  var conventions_exports = {};
68282
68644
  __export(conventions_exports, {
68283
68645
  adapter_config_path: () => adapter_config_path,
68284
68646
  app_component_path: () => app_component_path,
68647
+ componentField_unit_path: () => componentField_unit_path,
68285
68648
  fallback_unit_path: () => fallback_unit_path,
68286
68649
  is_layout: () => is_layout,
68287
68650
  layout_unit_path: () => layout_unit_path,
@@ -68299,32 +68662,35 @@ __export(conventions_exports, {
68299
68662
  server_adapter_path: () => server_adapter_path,
68300
68663
  vite_render_path: () => vite_render_path
68301
68664
  });
68302
- function router_path(config2) {
68303
- return path_exports.join(base_dir(config2), "Router.jsx");
68665
+ function router_path(config) {
68666
+ return path_exports.join(base_dir(config), "Router.jsx");
68304
68667
  }
68305
- function page_entry_path(config2, id, base) {
68306
- return path_exports.join(page_entries_dir(config2, base), `${id}.jsx`);
68668
+ function page_entry_path(config, id, base) {
68669
+ return path_exports.join(page_entries_dir(config, base), `${id}.jsx`);
68307
68670
  }
68308
- function server_adapter_path(config2, base) {
68309
- return path_exports.join(units_dir(config2, base), "render", "server.js");
68671
+ function server_adapter_path(config, base) {
68672
+ return path_exports.join(units_dir(config, base), "render", "server.js");
68310
68673
  }
68311
- function adapter_config_path(config2, base) {
68312
- return path_exports.join(units_dir(config2, base), "render", "config.js");
68674
+ function adapter_config_path(config, base) {
68675
+ return path_exports.join(units_dir(config, base), "render", "config.js");
68313
68676
  }
68314
- function vite_render_path(config2, base) {
68315
- return path_exports.join(units_dir(config2, base), "render", "vite.js");
68677
+ function vite_render_path(config, base) {
68678
+ return path_exports.join(units_dir(config, base), "render", "vite.js");
68316
68679
  }
68317
- function app_component_path(config2, base) {
68318
- return path_exports.join(units_dir(config2, base), "render", "App.jsx");
68680
+ function app_component_path(config, base) {
68681
+ return path_exports.join(units_dir(config, base), "render", "App.jsx");
68319
68682
  }
68320
- function page_unit_path(config2, id, base) {
68321
- return path_exports.join(page_units_dir(config2, base), `${id}.jsx`);
68683
+ function page_unit_path(config, id, base) {
68684
+ return path_exports.join(page_units_dir(config, base), `${id}.jsx`);
68322
68685
  }
68323
- function layout_unit_path(config2, id, base) {
68324
- return path_exports.join(layout_units_dir(config2, base), `${id}.jsx`);
68686
+ function layout_unit_path(config, id, base) {
68687
+ return path_exports.join(layout_units_dir(config, base), `${id}.jsx`);
68325
68688
  }
68326
- function fallback_unit_path(config2, which, id, base) {
68327
- return path_exports.join(fallbacks_units_dir(config2, which, base), `${id}.jsx`);
68689
+ function componentField_unit_path(config, id, base) {
68690
+ return path_exports.join(units_dir(config, base), "componentFields", `wrapper_${id}.jsx`);
68691
+ }
68692
+ function fallback_unit_path(config, which, id, base) {
68693
+ return path_exports.join(fallbacks_units_dir(config, which, base), `${id}.jsx`);
68328
68694
  }
68329
68695
  async function read_pageQuery(base) {
68330
68696
  const target = path_exports.join(base, "+page.gql");
@@ -68354,8 +68720,8 @@ async function read_layoutView(base) {
68354
68720
  }
68355
68721
  return [null, null];
68356
68722
  }
68357
- function router_index_path(config2) {
68358
- return path_exports.join(config2.routesDir, "..", "+index.jsx");
68723
+ function router_index_path(config) {
68724
+ return path_exports.join(config.routesDir, "..", "+index.jsx");
68359
68725
  }
68360
68726
  function is_layout(path3) {
68361
68727
  return path3.endsWith("+layout.tsx") || path3.endsWith("+layout.jsx");
@@ -68377,25 +68743,25 @@ function page_id(path3) {
68377
68743
  }
68378
68744
  return copy;
68379
68745
  }
68380
- function page_entries_dir(config2, base) {
68381
- return path_exports.join(units_dir(config2, base), "entries");
68746
+ function page_entries_dir(config, base) {
68747
+ return path_exports.join(units_dir(config, base), "entries");
68382
68748
  }
68383
- function page_units_dir(config2, base) {
68384
- return path_exports.join(units_dir(config2, base), "pages");
68749
+ function page_units_dir(config, base) {
68750
+ return path_exports.join(units_dir(config, base), "pages");
68385
68751
  }
68386
- function layout_units_dir(config2, base) {
68387
- return path_exports.join(units_dir(config2, base), "layouts");
68752
+ function layout_units_dir(config, base) {
68753
+ return path_exports.join(units_dir(config, base), "layouts");
68388
68754
  }
68389
- function fallbacks_units_dir(config2, which, base) {
68390
- return path_exports.join(units_dir(config2, base), "fallbacks", which);
68755
+ function fallbacks_units_dir(config, which, base) {
68756
+ return path_exports.join(units_dir(config, base), "fallbacks", which);
68391
68757
  }
68392
- function units_dir(config2, base = base_dir(config2)) {
68758
+ function units_dir(config, base = base_dir(config)) {
68393
68759
  return path_exports.join(base, "units");
68394
68760
  }
68395
- function base_dir(config2) {
68396
- return config2.pluginDirectory("houdini-react");
68761
+ function base_dir(config) {
68762
+ return config.pluginDirectory("houdini-react");
68397
68763
  }
68398
- function serialized_manifest_path(config2, base = base_dir(config2)) {
68764
+ function serialized_manifest_path(config, base = base_dir(config)) {
68399
68765
  return path_exports.join(base, "manifest.json");
68400
68766
  }
68401
68767
 
@@ -68408,6 +68774,7 @@ async function load_manifest(args) {
68408
68774
  url: "/",
68409
68775
  filepath: args.config.routesDir,
68410
68776
  project: {
68777
+ component_fields: {},
68411
68778
  pages: {},
68412
68779
  layouts: {},
68413
68780
  page_queries: {},
@@ -68532,8 +68899,7 @@ async function add_view(args) {
68532
68899
  const missing_queries = queries.filter((query2) => !args.queries.includes(query2));
68533
68900
  if (missing_queries.length > 0) {
68534
68901
  throw {
68535
- message: "Missing Queries",
68536
- description: JSON.stringify(missing_queries)
68902
+ message: `Unknown queries in ${args.path}: ${missing_queries.join(", ")}`
68537
68903
  };
68538
68904
  }
68539
68905
  const id = page_id(args.url);
@@ -68568,7 +68934,8 @@ async function add_query(args) {
68568
68934
  path: path_exports.relative(args.config.routesDir, args.path),
68569
68935
  name: query2.name.value,
68570
68936
  url: args.url,
68571
- loading
68937
+ loading,
68938
+ variables: query2.variableDefinitions?.map((variable) => variable.variable.name.value) ?? []
68572
68939
  };
68573
68940
  return target[page_id(args.url)];
68574
68941
  }
@@ -68604,7 +68971,7 @@ async function extractQueries(source) {
68604
68971
  }
68605
68972
  }
68606
68973
  if (!defaultExportNode) {
68607
- throw new Error("No default export found.");
68974
+ return [];
68608
68975
  }
68609
68976
  let props = [];
68610
68977
  const componentFunction = defaultExportNode;
@@ -68630,32 +68997,33 @@ import path2 from "node:path";
68630
68997
  function isSecondaryBuild() {
68631
68998
  return process.env.HOUDINI_SECONDARY_BUILD && process.env.HOUDINI_SECONDARY_BUILD !== "false";
68632
68999
  }
68633
- function internalRoutes(config2) {
68634
- const routes = [localApiEndpoint(config2)];
68635
- if (config2.router?.auth && "redirect" in config2.router.auth) {
68636
- routes.push(config2.router.auth.redirect);
69000
+ function internalRoutes(config) {
69001
+ const routes = [localApiEndpoint(config)];
69002
+ if (config.router?.auth && "redirect" in config.router.auth) {
69003
+ routes.push(config.router.auth.redirect);
68637
69004
  }
68638
69005
  return routes;
68639
69006
  }
68640
- async function buildLocalSchema(config2) {
69007
+ async function buildLocalSchema(config) {
68641
69008
  const { build } = await import("vite");
68642
69009
  process.env.HOUDINI_SECONDARY_BUILD = "true";
69010
+ const schema = path2.join(config.localApiDir, "+schema");
68643
69011
  await build({
68644
69012
  logLevel: "silent",
68645
69013
  build: {
68646
- outDir: path2.join(config2.rootDir, "temp"),
69014
+ outDir: path2.join(config.rootDir, "temp"),
68647
69015
  rollupOptions: {
68648
69016
  input: {
68649
- schema: path2.join(config2.localApiDir, "+schema")
69017
+ schema
68650
69018
  },
68651
- external: ["graphql"],
68652
69019
  output: {
68653
69020
  entryFileNames: "assets/[name].js"
68654
69021
  }
68655
69022
  },
69023
+ ssr: true,
68656
69024
  lib: {
68657
69025
  entry: {
68658
- schema: path2.join(config2.localApiDir, "+schema")
69026
+ schema
68659
69027
  },
68660
69028
  formats: ["es"]
68661
69029
  }
@@ -68663,9 +69031,9 @@ async function buildLocalSchema(config2) {
68663
69031
  });
68664
69032
  process.env.HOUDINI_SECONDARY_BUILD = "false";
68665
69033
  }
68666
- async function loadLocalSchema(config2) {
68667
- await buildLocalSchema(config2);
68668
- const { default: schema } = await import(path2.join(config2.rootDir, "temp", "assets", "schema.js"));
69034
+ async function loadLocalSchema(config) {
69035
+ await buildLocalSchema(config);
69036
+ const { default: schema } = await import(path2.join(config.rootDir, "temp", "assets", `schema.js?${Date.now().valueOf()}}`));
68669
69037
  return schema;
68670
69038
  }
68671
69039
 
@@ -68873,13 +69241,16 @@ async function handle_request(args) {
68873
69241
  }
68874
69242
  }
68875
69243
  async function redirect_auth(args) {
68876
- const { searchParams } = new URL(args.url, `http://${args.headers.get("host")}`);
69244
+ const { searchParams, host } = new URL(args.url, `http://${args.headers.get("host")}`);
68877
69245
  const { redirectTo, ...session } = Object.fromEntries(searchParams.entries());
68878
- if (redirectTo) {
68879
- const response = Response.redirect(redirectTo, 302);
68880
- await set_session(args, response, session);
68881
- return response;
68882
- }
69246
+ const response = new Response("ok", {
69247
+ status: 302,
69248
+ headers: {
69249
+ Location: redirectTo ?? "/"
69250
+ }
69251
+ });
69252
+ await set_session(args, response, session);
69253
+ return response;
68883
69254
  }
68884
69255
  var session_cookie_name = "__houdini__";
68885
69256
  async function set_session(req, response, value) {
@@ -68980,6 +69351,7 @@ export {
68980
69351
  path_exports as path,
68981
69352
  plugin,
68982
69353
  printJS,
69354
+ processComponentFieldDirective,
68983
69355
  pullSchema,
68984
69356
  query,
68985
69357
  readConfigFile,