houdini 1.0.0-next.5 → 1.0.0-next.7

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 (42) hide show
  1. package/build/cmd-cjs/index.js +484 -475
  2. package/build/cmd-esm/index.js +484 -475
  3. package/build/codegen/generators/artifacts/index.d.ts +2 -2
  4. package/build/codegen/generators/artifacts/indexFile.d.ts +2 -2
  5. package/build/codegen/generators/artifacts/selection.d.ts +2 -2
  6. package/build/codegen/generators/indexFile/index.d.ts +2 -2
  7. package/build/codegen/generators/persistedQueries/index.d.ts +2 -2
  8. package/build/codegen/generators/runtime/graphqlFunction.d.ts +2 -2
  9. package/build/codegen/generators/runtime/index.d.ts +2 -2
  10. package/build/codegen/generators/typescript/documentTypes.d.ts +2 -2
  11. package/build/codegen/generators/typescript/imperativeTypeDef.d.ts +2 -2
  12. package/build/codegen/generators/typescript/index.d.ts +2 -2
  13. package/build/codegen/index.d.ts +2 -2
  14. package/build/codegen/transforms/addID.d.ts +2 -2
  15. package/build/codegen/transforms/composeQueries.d.ts +4 -4
  16. package/build/codegen/transforms/fragmentVariables.d.ts +2 -2
  17. package/build/codegen/transforms/list.d.ts +2 -2
  18. package/build/codegen/transforms/paginate.d.ts +2 -2
  19. package/build/codegen/transforms/schema.d.ts +2 -2
  20. package/build/codegen/transforms/typename.d.ts +2 -2
  21. package/build/codegen/validators/noIDAlias.d.ts +2 -2
  22. package/build/codegen/validators/plugins.d.ts +2 -2
  23. package/build/codegen/validators/typeCheck.d.ts +2 -2
  24. package/build/codegen/validators/uniqueNames.d.ts +2 -2
  25. package/build/codegen-cjs/index.js +481 -472
  26. package/build/codegen-esm/index.js +481 -472
  27. package/build/lib/graphql.d.ts +2 -2
  28. package/build/lib/types.d.ts +35 -35
  29. package/build/lib-cjs/index.js +355 -355
  30. package/build/lib-esm/index.js +355 -355
  31. package/build/runtime/client/documentStore.d.ts +1 -1
  32. package/build/runtime/client/index.d.ts +7 -6
  33. package/build/runtime-cjs/client/documentStore.d.ts +1 -1
  34. package/build/runtime-cjs/client/index.d.ts +7 -6
  35. package/build/runtime-esm/client/documentStore.d.ts +1 -1
  36. package/build/runtime-esm/client/index.d.ts +7 -6
  37. package/build/test/index.d.ts +3 -3
  38. package/build/test-cjs/index.js +479 -470
  39. package/build/test-esm/index.js +479 -470
  40. package/build/vite-cjs/index.js +484 -475
  41. package/build/vite-esm/index.js +484 -475
  42. package/package.json +1 -1
@@ -7214,10 +7214,10 @@ var require_printer = __commonJS({
7214
7214
  Object.defineProperty(exports, "__esModule", {
7215
7215
  value: true
7216
7216
  });
7217
- exports.print = print12;
7217
+ exports.print = print11;
7218
7218
  var _visitor = require_visitor();
7219
7219
  var _blockString = require_blockString();
7220
- function print12(ast) {
7220
+ function print11(ast) {
7221
7221
  return (0, _visitor.visit)(ast, {
7222
7222
  leave: printDocASTReducer2
7223
7223
  });
@@ -58556,12 +58556,12 @@ var require_comments = __commonJS({
58556
58556
  comment.trailing = true;
58557
58557
  addCommentHelper(node, comment);
58558
58558
  }
58559
- function printLeadingComment(commentPath, print12) {
58559
+ function printLeadingComment(commentPath, print11) {
58560
58560
  var comment = commentPath.getValue();
58561
58561
  n.Comment.assert(comment);
58562
58562
  var loc = comment.loc;
58563
58563
  var lines = loc && loc.lines;
58564
- var parts = [print12(commentPath)];
58564
+ var parts = [print11(commentPath)];
58565
58565
  if (comment.trailing) {
58566
58566
  parts.push("\n");
58567
58567
  } else if (lines instanceof lines_1.Lines) {
@@ -58576,7 +58576,7 @@ var require_comments = __commonJS({
58576
58576
  }
58577
58577
  return (0, lines_1.concat)(parts);
58578
58578
  }
58579
- function printTrailingComment(commentPath, print12) {
58579
+ function printTrailingComment(commentPath, print11) {
58580
58580
  var comment = commentPath.getValue(commentPath);
58581
58581
  n.Comment.assert(comment);
58582
58582
  var loc = comment.loc;
@@ -58591,12 +58591,12 @@ var require_comments = __commonJS({
58591
58591
  parts.push(new Array(leadingSpace.length).join("\n"));
58592
58592
  }
58593
58593
  }
58594
- parts.push(print12(commentPath));
58594
+ parts.push(print11(commentPath));
58595
58595
  return (0, lines_1.concat)(parts);
58596
58596
  }
58597
- function printComments(path2, print12) {
58597
+ function printComments(path2, print11) {
58598
58598
  var value = path2.getValue();
58599
- var innerLines = print12(path2);
58599
+ var innerLines = print11(path2);
58600
58600
  var comments = n.Node.check(value) && types17.getFieldValue(value, "comments");
58601
58601
  if (!comments || comments.length === 0) {
58602
58602
  return innerLines;
@@ -58608,9 +58608,9 @@ var require_comments = __commonJS({
58608
58608
  var leading = types17.getFieldValue(comment, "leading");
58609
58609
  var trailing = types17.getFieldValue(comment, "trailing");
58610
58610
  if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
58611
- leadingParts.push(printLeadingComment(commentPath, print12));
58611
+ leadingParts.push(printLeadingComment(commentPath, print11));
58612
58612
  } else if (trailing) {
58613
- trailingParts.push(printTrailingComment(commentPath, print12));
58613
+ trailingParts.push(printTrailingComment(commentPath, print11));
58614
58614
  }
58615
58615
  }, "comments");
58616
58616
  leadingParts.push.apply(leadingParts, trailingParts);
@@ -59301,7 +59301,7 @@ var require_patcher = __commonJS({
59301
59301
  };
59302
59302
  exports.Patcher = Patcher;
59303
59303
  var Pp = Patcher.prototype;
59304
- Pp.tryToReprintComments = function(newNode, oldNode, print12) {
59304
+ Pp.tryToReprintComments = function(newNode, oldNode, print11) {
59305
59305
  var patcher = this;
59306
59306
  if (!newNode.comments && !oldNode.comments) {
59307
59307
  return true;
@@ -59318,7 +59318,7 @@ var require_patcher = __commonJS({
59318
59318
  assert_1.default.ok(oldComment.leading || oldComment.trailing);
59319
59319
  patcher.replace(
59320
59320
  oldComment.loc,
59321
- print12(reprint.newPath).indentTail(oldComment.loc.indent)
59321
+ print11(reprint.newPath).indentTail(oldComment.loc.indent)
59322
59322
  );
59323
59323
  });
59324
59324
  }
@@ -59365,17 +59365,17 @@ var require_patcher = __commonJS({
59365
59365
  var reprints = [];
59366
59366
  if (!lines || !findReprints(path2, reprints))
59367
59367
  return;
59368
- return function(print12) {
59368
+ return function(print11) {
59369
59369
  var patcher = new Patcher(lines);
59370
59370
  reprints.forEach(function(reprint) {
59371
59371
  var newNode = reprint.newPath.getValue();
59372
59372
  var oldNode = reprint.oldPath.getValue();
59373
59373
  SourceLocation.assert(oldNode.loc, true);
59374
- var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode, print12);
59374
+ var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode, print11);
59375
59375
  if (needToPrintNewPathWithComments) {
59376
59376
  patcher.deleteComments(oldNode);
59377
59377
  }
59378
- var newLines = print12(reprint.newPath, {
59378
+ var newLines = print11(reprint.newPath, {
59379
59379
  includeComments: needToPrintNewPathWithComments,
59380
59380
  avoidRootParens: oldNode.type === newNode.type && reprint.oldPath.hasParens()
59381
59381
  }).indentTail(oldNode.loc.indent);
@@ -59592,10 +59592,10 @@ var require_printer2 = __commonJS({
59592
59592
  function makePrintFunctionWith(options, overrides) {
59593
59593
  options = Object.assign({}, options, overrides);
59594
59594
  return function(path2) {
59595
- return print12(path2, options);
59595
+ return print11(path2, options);
59596
59596
  };
59597
59597
  }
59598
- function print12(path2, options) {
59598
+ function print11(path2, options) {
59599
59599
  assert_1.default.ok(path2 instanceof fast_path_1.default);
59600
59600
  options = options || {};
59601
59601
  if (options.includeComments) {
@@ -59611,7 +59611,7 @@ var require_printer2 = __commonJS({
59611
59611
  }
59612
59612
  }
59613
59613
  var reprinter = (0, patcher_1.getReprinter)(path2);
59614
- var lines = reprinter ? reprinter(print12) : genericPrint(path2, config4, options, makePrintFunctionWith(options, {
59614
+ var lines = reprinter ? reprinter(print11) : genericPrint(path2, config4, options, makePrintFunctionWith(options, {
59615
59615
  includeComments: true,
59616
59616
  avoidRootParens: false
59617
59617
  }));
@@ -59622,7 +59622,7 @@ var require_printer2 = __commonJS({
59622
59622
  if (!ast) {
59623
59623
  return emptyPrintResult;
59624
59624
  }
59625
- var lines = print12(fast_path_1.default.from(ast), {
59625
+ var lines = print11(fast_path_1.default.from(ast), {
59626
59626
  includeComments: true,
59627
59627
  avoidRootParens: false
59628
59628
  });
@@ -59675,7 +59675,7 @@ var require_printer2 = __commonJS({
59675
59675
  }
59676
59676
  return (0, lines_1.concat)(parts);
59677
59677
  }
59678
- function genericPrintNoParens(path2, options, print12) {
59678
+ function genericPrintNoParens(path2, options, print11) {
59679
59679
  var n = path2.getValue();
59680
59680
  if (!n) {
59681
59681
  return (0, lines_1.fromString)("");
@@ -59687,45 +59687,45 @@ var require_printer2 = __commonJS({
59687
59687
  var parts = [];
59688
59688
  switch (n.type) {
59689
59689
  case "File":
59690
- return path2.call(print12, "program");
59690
+ return path2.call(print11, "program");
59691
59691
  case "Program":
59692
59692
  if (n.directives) {
59693
59693
  path2.each(function(childPath) {
59694
- parts.push(print12(childPath), ";\n");
59694
+ parts.push(print11(childPath), ";\n");
59695
59695
  }, "directives");
59696
59696
  }
59697
59697
  if (n.interpreter) {
59698
- parts.push(path2.call(print12, "interpreter"));
59698
+ parts.push(path2.call(print11, "interpreter"));
59699
59699
  }
59700
59700
  parts.push(path2.call(function(bodyPath) {
59701
- return printStatementSequence(bodyPath, options, print12);
59701
+ return printStatementSequence(bodyPath, options, print11);
59702
59702
  }, "body"));
59703
59703
  return (0, lines_1.concat)(parts);
59704
59704
  case "Noop":
59705
59705
  case "EmptyStatement":
59706
59706
  return (0, lines_1.fromString)("");
59707
59707
  case "ExpressionStatement":
59708
- return (0, lines_1.concat)([path2.call(print12, "expression"), ";"]);
59708
+ return (0, lines_1.concat)([path2.call(print11, "expression"), ";"]);
59709
59709
  case "ParenthesizedExpression":
59710
- return (0, lines_1.concat)(["(", path2.call(print12, "expression"), ")"]);
59710
+ return (0, lines_1.concat)(["(", path2.call(print11, "expression"), ")"]);
59711
59711
  case "BinaryExpression":
59712
59712
  case "LogicalExpression":
59713
59713
  case "AssignmentExpression":
59714
59714
  return (0, lines_1.fromString)(" ").join([
59715
- path2.call(print12, "left"),
59715
+ path2.call(print11, "left"),
59716
59716
  n.operator,
59717
- path2.call(print12, "right")
59717
+ path2.call(print11, "right")
59718
59718
  ]);
59719
59719
  case "AssignmentPattern":
59720
59720
  return (0, lines_1.concat)([
59721
- path2.call(print12, "left"),
59721
+ path2.call(print11, "left"),
59722
59722
  " = ",
59723
- path2.call(print12, "right")
59723
+ path2.call(print11, "right")
59724
59724
  ]);
59725
59725
  case "MemberExpression":
59726
59726
  case "OptionalMemberExpression": {
59727
- parts.push(path2.call(print12, "object"));
59728
- var property = path2.call(print12, "property");
59727
+ parts.push(path2.call(print11, "object"));
59728
+ var property = path2.call(print11, "property");
59729
59729
  var optional = types17.getFieldValue(n, "optional");
59730
59730
  if (n.computed) {
59731
59731
  parts.push(optional ? "?.[" : "[", property, "]");
@@ -59735,18 +59735,18 @@ var require_printer2 = __commonJS({
59735
59735
  return (0, lines_1.concat)(parts);
59736
59736
  }
59737
59737
  case "ChainExpression":
59738
- return path2.call(print12, "expression");
59738
+ return path2.call(print11, "expression");
59739
59739
  case "MetaProperty":
59740
59740
  return (0, lines_1.concat)([
59741
- path2.call(print12, "meta"),
59741
+ path2.call(print11, "meta"),
59742
59742
  ".",
59743
- path2.call(print12, "property")
59743
+ path2.call(print11, "property")
59744
59744
  ]);
59745
59745
  case "BindExpression":
59746
59746
  if (n.object) {
59747
- parts.push(path2.call(print12, "object"));
59747
+ parts.push(path2.call(print11, "object"));
59748
59748
  }
59749
- parts.push("::", path2.call(print12, "callee"));
59749
+ parts.push("::", path2.call(print11, "callee"));
59750
59750
  return (0, lines_1.concat)(parts);
59751
59751
  case "Path":
59752
59752
  return (0, lines_1.fromString)(".").join(n.body);
@@ -59754,7 +59754,7 @@ var require_printer2 = __commonJS({
59754
59754
  return (0, lines_1.concat)([
59755
59755
  (0, lines_1.fromString)(n.name, options),
59756
59756
  n.optional ? "?" : "",
59757
- path2.call(print12, "typeAnnotation")
59757
+ path2.call(print11, "typeAnnotation")
59758
59758
  ]);
59759
59759
  case "SpreadElement":
59760
59760
  case "SpreadElementPattern":
@@ -59765,8 +59765,8 @@ var require_printer2 = __commonJS({
59765
59765
  case "RestElement":
59766
59766
  return (0, lines_1.concat)([
59767
59767
  "...",
59768
- path2.call(print12, "argument"),
59769
- path2.call(print12, "typeAnnotation")
59768
+ path2.call(print11, "argument"),
59769
+ path2.call(print11, "typeAnnotation")
59770
59770
  ]);
59771
59771
  case "FunctionDeclaration":
59772
59772
  case "FunctionExpression":
@@ -59781,15 +59781,15 @@ var require_printer2 = __commonJS({
59781
59781
  if (n.generator)
59782
59782
  parts.push("*");
59783
59783
  if (n.id) {
59784
- parts.push(" ", path2.call(print12, "id"), path2.call(print12, "typeParameters"));
59784
+ parts.push(" ", path2.call(print11, "id"), path2.call(print11, "typeParameters"));
59785
59785
  } else {
59786
59786
  if (n.typeParameters) {
59787
- parts.push(path2.call(print12, "typeParameters"));
59787
+ parts.push(path2.call(print11, "typeParameters"));
59788
59788
  }
59789
59789
  }
59790
- parts.push("(", printFunctionParams(path2, options, print12), ")", path2.call(print12, "returnType"));
59790
+ parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
59791
59791
  if (n.body) {
59792
- parts.push(" ", path2.call(print12, "body"));
59792
+ parts.push(" ", path2.call(print11, "body"));
59793
59793
  }
59794
59794
  return (0, lines_1.concat)(parts);
59795
59795
  case "ArrowFunctionExpression":
@@ -59797,44 +59797,44 @@ var require_printer2 = __commonJS({
59797
59797
  parts.push("async ");
59798
59798
  }
59799
59799
  if (n.typeParameters) {
59800
- parts.push(path2.call(print12, "typeParameters"));
59800
+ parts.push(path2.call(print11, "typeParameters"));
59801
59801
  }
59802
59802
  if (!options.arrowParensAlways && n.params.length === 1 && !n.rest && n.params[0].type === "Identifier" && !n.params[0].typeAnnotation && !n.returnType) {
59803
- parts.push(path2.call(print12, "params", 0));
59803
+ parts.push(path2.call(print11, "params", 0));
59804
59804
  } else {
59805
- parts.push("(", printFunctionParams(path2, options, print12), ")", path2.call(print12, "returnType"));
59805
+ parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
59806
59806
  }
59807
- parts.push(" => ", path2.call(print12, "body"));
59807
+ parts.push(" => ", path2.call(print11, "body"));
59808
59808
  return (0, lines_1.concat)(parts);
59809
59809
  case "MethodDefinition":
59810
- return printMethod(path2, options, print12);
59810
+ return printMethod(path2, options, print11);
59811
59811
  case "YieldExpression":
59812
59812
  parts.push("yield");
59813
59813
  if (n.delegate)
59814
59814
  parts.push("*");
59815
59815
  if (n.argument)
59816
- parts.push(" ", path2.call(print12, "argument"));
59816
+ parts.push(" ", path2.call(print11, "argument"));
59817
59817
  return (0, lines_1.concat)(parts);
59818
59818
  case "AwaitExpression":
59819
59819
  parts.push("await");
59820
59820
  if (n.all)
59821
59821
  parts.push("*");
59822
59822
  if (n.argument)
59823
- parts.push(" ", path2.call(print12, "argument"));
59823
+ parts.push(" ", path2.call(print11, "argument"));
59824
59824
  return (0, lines_1.concat)(parts);
59825
59825
  case "ModuleExpression":
59826
59826
  return (0, lines_1.concat)([
59827
59827
  "module {\n",
59828
- path2.call(print12, "body").indent(options.tabWidth),
59828
+ path2.call(print11, "body").indent(options.tabWidth),
59829
59829
  "\n}"
59830
59830
  ]);
59831
59831
  case "ModuleDeclaration":
59832
- parts.push("module", path2.call(print12, "id"));
59832
+ parts.push("module", path2.call(print11, "id"));
59833
59833
  if (n.source) {
59834
59834
  assert_1.default.ok(!n.body);
59835
- parts.push("from", path2.call(print12, "source"));
59835
+ parts.push("from", path2.call(print11, "source"));
59836
59836
  } else {
59837
- parts.push(path2.call(print12, "body"));
59837
+ parts.push(path2.call(print11, "body"));
59838
59838
  }
59839
59839
  return (0, lines_1.fromString)(" ").join(parts);
59840
59840
  case "ImportSpecifier":
@@ -59842,27 +59842,27 @@ var require_printer2 = __commonJS({
59842
59842
  parts.push(n.importKind + " ");
59843
59843
  }
59844
59844
  if (n.imported) {
59845
- parts.push(path2.call(print12, "imported"));
59845
+ parts.push(path2.call(print11, "imported"));
59846
59846
  if (n.local && n.local.name !== n.imported.name) {
59847
- parts.push(" as ", path2.call(print12, "local"));
59847
+ parts.push(" as ", path2.call(print11, "local"));
59848
59848
  }
59849
59849
  } else if (n.id) {
59850
- parts.push(path2.call(print12, "id"));
59850
+ parts.push(path2.call(print11, "id"));
59851
59851
  if (n.name) {
59852
- parts.push(" as ", path2.call(print12, "name"));
59852
+ parts.push(" as ", path2.call(print11, "name"));
59853
59853
  }
59854
59854
  }
59855
59855
  return (0, lines_1.concat)(parts);
59856
59856
  case "ExportSpecifier":
59857
59857
  if (n.local) {
59858
- parts.push(path2.call(print12, "local"));
59858
+ parts.push(path2.call(print11, "local"));
59859
59859
  if (n.exported && n.exported.name !== n.local.name) {
59860
- parts.push(" as ", path2.call(print12, "exported"));
59860
+ parts.push(" as ", path2.call(print11, "exported"));
59861
59861
  }
59862
59862
  } else if (n.id) {
59863
- parts.push(path2.call(print12, "id"));
59863
+ parts.push(path2.call(print11, "id"));
59864
59864
  if (n.name) {
59865
- parts.push(" as ", path2.call(print12, "name"));
59865
+ parts.push(" as ", path2.call(print11, "name"));
59866
59866
  }
59867
59867
  }
59868
59868
  return (0, lines_1.concat)(parts);
@@ -59871,40 +59871,40 @@ var require_printer2 = __commonJS({
59871
59871
  case "ImportNamespaceSpecifier":
59872
59872
  parts.push("* as ");
59873
59873
  if (n.local) {
59874
- parts.push(path2.call(print12, "local"));
59874
+ parts.push(path2.call(print11, "local"));
59875
59875
  } else if (n.id) {
59876
- parts.push(path2.call(print12, "id"));
59876
+ parts.push(path2.call(print11, "id"));
59877
59877
  }
59878
59878
  return (0, lines_1.concat)(parts);
59879
59879
  case "ImportDefaultSpecifier":
59880
59880
  if (n.local) {
59881
- return path2.call(print12, "local");
59881
+ return path2.call(print11, "local");
59882
59882
  }
59883
- return path2.call(print12, "id");
59883
+ return path2.call(print11, "id");
59884
59884
  case "TSExportAssignment":
59885
- return (0, lines_1.concat)(["export = ", path2.call(print12, "expression")]);
59885
+ return (0, lines_1.concat)(["export = ", path2.call(print11, "expression")]);
59886
59886
  case "ExportDeclaration":
59887
59887
  case "ExportDefaultDeclaration":
59888
59888
  case "ExportNamedDeclaration":
59889
- return printExportDeclaration(path2, options, print12);
59889
+ return printExportDeclaration(path2, options, print11);
59890
59890
  case "ExportAllDeclaration":
59891
59891
  parts.push("export *");
59892
59892
  if (n.exported) {
59893
- parts.push(" as ", path2.call(print12, "exported"));
59893
+ parts.push(" as ", path2.call(print11, "exported"));
59894
59894
  }
59895
- parts.push(" from ", path2.call(print12, "source"), ";");
59895
+ parts.push(" from ", path2.call(print11, "source"), ";");
59896
59896
  return (0, lines_1.concat)(parts);
59897
59897
  case "TSNamespaceExportDeclaration":
59898
- parts.push("export as namespace ", path2.call(print12, "id"));
59898
+ parts.push("export as namespace ", path2.call(print11, "id"));
59899
59899
  return maybeAddSemicolon((0, lines_1.concat)(parts));
59900
59900
  case "ExportNamespaceSpecifier":
59901
- return (0, lines_1.concat)(["* as ", path2.call(print12, "exported")]);
59901
+ return (0, lines_1.concat)(["* as ", path2.call(print11, "exported")]);
59902
59902
  case "ExportDefaultSpecifier":
59903
- return path2.call(print12, "exported");
59903
+ return path2.call(print11, "exported");
59904
59904
  case "Import":
59905
59905
  return (0, lines_1.fromString)("import", options);
59906
59906
  case "ImportExpression":
59907
- return (0, lines_1.concat)(["import(", path2.call(print12, "source"), ")"]);
59907
+ return (0, lines_1.concat)(["import(", path2.call(print11, "source"), ")"]);
59908
59908
  case "ImportDeclaration": {
59909
59909
  parts.push("import ");
59910
59910
  if (n.importKind && n.importKind !== "value") {
@@ -59916,9 +59916,9 @@ var require_printer2 = __commonJS({
59916
59916
  path2.each(function(specifierPath) {
59917
59917
  var spec = specifierPath.getValue();
59918
59918
  if (spec.type === "ImportSpecifier") {
59919
- bracedSpecifiers_1.push(print12(specifierPath));
59919
+ bracedSpecifiers_1.push(print11(specifierPath));
59920
59920
  } else if (spec.type === "ImportDefaultSpecifier" || spec.type === "ImportNamespaceSpecifier") {
59921
- unbracedSpecifiers_1.push(print12(specifierPath));
59921
+ unbracedSpecifiers_1.push(print11(specifierPath));
59922
59922
  }
59923
59923
  }, "specifiers");
59924
59924
  unbracedSpecifiers_1.forEach(function(lines2, i2) {
@@ -59948,16 +59948,16 @@ var require_printer2 = __commonJS({
59948
59948
  }
59949
59949
  parts.push(" from ");
59950
59950
  }
59951
- parts.push(path2.call(print12, "source"), maybePrintImportAssertions(path2, options, print12), ";");
59951
+ parts.push(path2.call(print11, "source"), maybePrintImportAssertions(path2, options, print11), ";");
59952
59952
  return (0, lines_1.concat)(parts);
59953
59953
  }
59954
59954
  case "ImportAttribute":
59955
- return (0, lines_1.concat)([path2.call(print12, "key"), ": ", path2.call(print12, "value")]);
59955
+ return (0, lines_1.concat)([path2.call(print11, "key"), ": ", path2.call(print11, "value")]);
59956
59956
  case "StaticBlock":
59957
59957
  parts.push("static ");
59958
59958
  case "BlockStatement": {
59959
59959
  var naked_1 = path2.call(function(bodyPath) {
59960
- return printStatementSequence(bodyPath, options, print12);
59960
+ return printStatementSequence(bodyPath, options, print11);
59961
59961
  }, "body");
59962
59962
  if (naked_1.isEmpty()) {
59963
59963
  if (!n.directives || n.directives.length === 0) {
@@ -59968,7 +59968,7 @@ var require_printer2 = __commonJS({
59968
59968
  parts.push("{\n");
59969
59969
  if (n.directives) {
59970
59970
  path2.each(function(childPath) {
59971
- parts.push(maybeAddSemicolon(print12(childPath).indent(options.tabWidth)), n.directives.length > 1 || !naked_1.isEmpty() ? "\n" : "");
59971
+ parts.push(maybeAddSemicolon(print11(childPath).indent(options.tabWidth)), n.directives.length > 1 || !naked_1.isEmpty() ? "\n" : "");
59972
59972
  }, "directives");
59973
59973
  }
59974
59974
  parts.push(naked_1.indent(options.tabWidth));
@@ -59978,7 +59978,7 @@ var require_printer2 = __commonJS({
59978
59978
  case "ReturnStatement": {
59979
59979
  parts.push("return");
59980
59980
  if (n.argument) {
59981
- var argLines = path2.call(print12, "argument");
59981
+ var argLines = path2.call(print11, "argument");
59982
59982
  if (argLines.startsWithComment() || argLines.length > 1 && namedTypes.JSXElement && namedTypes.JSXElement.check(n.argument)) {
59983
59983
  parts.push(" (\n", argLines.indent(options.tabWidth), "\n)");
59984
59984
  } else {
@@ -59990,17 +59990,17 @@ var require_printer2 = __commonJS({
59990
59990
  }
59991
59991
  case "CallExpression":
59992
59992
  case "OptionalCallExpression":
59993
- parts.push(path2.call(print12, "callee"));
59993
+ parts.push(path2.call(print11, "callee"));
59994
59994
  if (n.typeParameters) {
59995
- parts.push(path2.call(print12, "typeParameters"));
59995
+ parts.push(path2.call(print11, "typeParameters"));
59996
59996
  }
59997
59997
  if (n.typeArguments) {
59998
- parts.push(path2.call(print12, "typeArguments"));
59998
+ parts.push(path2.call(print11, "typeArguments"));
59999
59999
  }
60000
60000
  if (types17.getFieldValue(n, "optional")) {
60001
60001
  parts.push("?.");
60002
60002
  }
60003
- parts.push(printArgumentsList(path2, options, print12));
60003
+ parts.push(printArgumentsList(path2, options, print11));
60004
60004
  return (0, lines_1.concat)(parts);
60005
60005
  case "RecordExpression":
60006
60006
  parts.push("#");
@@ -60030,7 +60030,7 @@ var require_printer2 = __commonJS({
60030
60030
  var i_1 = 0;
60031
60031
  fields.forEach(function(field) {
60032
60032
  path2.each(function(childPath) {
60033
- var lines2 = print12(childPath);
60033
+ var lines2 = print11(childPath);
60034
60034
  if (!oneLine_1) {
60035
60035
  lines2 = lines2.indent(options.tabWidth);
60036
60036
  }
@@ -60067,32 +60067,32 @@ var require_printer2 = __commonJS({
60067
60067
  parts[parts.length - 1] = " " + rightBrace;
60068
60068
  }
60069
60069
  if (n.typeAnnotation) {
60070
- parts.push(path2.call(print12, "typeAnnotation"));
60070
+ parts.push(path2.call(print11, "typeAnnotation"));
60071
60071
  }
60072
60072
  return (0, lines_1.concat)(parts);
60073
60073
  }
60074
60074
  case "PropertyPattern":
60075
60075
  return (0, lines_1.concat)([
60076
- path2.call(print12, "key"),
60076
+ path2.call(print11, "key"),
60077
60077
  ": ",
60078
- path2.call(print12, "pattern")
60078
+ path2.call(print11, "pattern")
60079
60079
  ]);
60080
60080
  case "ObjectProperty":
60081
60081
  case "Property": {
60082
60082
  if (n.method || n.kind === "get" || n.kind === "set") {
60083
- return printMethod(path2, options, print12);
60083
+ return printMethod(path2, options, print11);
60084
60084
  }
60085
60085
  if (n.shorthand && n.value.type === "AssignmentPattern") {
60086
- return path2.call(print12, "value");
60086
+ return path2.call(print11, "value");
60087
60087
  }
60088
- var key = path2.call(print12, "key");
60088
+ var key = path2.call(print11, "key");
60089
60089
  if (n.computed) {
60090
60090
  parts.push("[", key, "]");
60091
60091
  } else {
60092
60092
  parts.push(key);
60093
60093
  }
60094
60094
  if (!n.shorthand || n.key.name !== n.value.name) {
60095
- parts.push(": ", path2.call(print12, "value"));
60095
+ parts.push(": ", path2.call(print11, "value"));
60096
60096
  }
60097
60097
  return (0, lines_1.concat)(parts);
60098
60098
  }
@@ -60100,18 +60100,18 @@ var require_printer2 = __commonJS({
60100
60100
  case "ObjectMethod":
60101
60101
  case "ClassPrivateMethod":
60102
60102
  case "TSDeclareMethod":
60103
- return printMethod(path2, options, print12);
60103
+ return printMethod(path2, options, print11);
60104
60104
  case "PrivateName":
60105
- return (0, lines_1.concat)(["#", path2.call(print12, "id")]);
60105
+ return (0, lines_1.concat)(["#", path2.call(print11, "id")]);
60106
60106
  case "Decorator":
60107
- return (0, lines_1.concat)(["@", path2.call(print12, "expression")]);
60107
+ return (0, lines_1.concat)(["@", path2.call(print11, "expression")]);
60108
60108
  case "TupleExpression":
60109
60109
  parts.push("#");
60110
60110
  case "ArrayExpression":
60111
60111
  case "ArrayPattern": {
60112
60112
  var elems = n.elements;
60113
60113
  var len_2 = elems.length;
60114
- var printed_1 = path2.map(print12, "elements");
60114
+ var printed_1 = path2.map(print11, "elements");
60115
60115
  var joined = (0, lines_1.fromString)(", ").join(printed_1);
60116
60116
  var oneLine_2 = joined.getLineLength(1) <= options.wrapColumn;
60117
60117
  if (oneLine_2) {
@@ -60149,12 +60149,12 @@ var require_printer2 = __commonJS({
60149
60149
  parts.push("]");
60150
60150
  }
60151
60151
  if (n.typeAnnotation) {
60152
- parts.push(path2.call(print12, "typeAnnotation"));
60152
+ parts.push(path2.call(print11, "typeAnnotation"));
60153
60153
  }
60154
60154
  return (0, lines_1.concat)(parts);
60155
60155
  }
60156
60156
  case "SequenceExpression":
60157
- return (0, lines_1.fromString)(", ").join(path2.map(print12, "expressions"));
60157
+ return (0, lines_1.fromString)(", ").join(path2.map(print11, "expressions"));
60158
60158
  case "ThisExpression":
60159
60159
  return (0, lines_1.fromString)("this");
60160
60160
  case "Super":
@@ -60175,7 +60175,7 @@ var require_printer2 = __commonJS({
60175
60175
  case "Literal":
60176
60176
  return (0, lines_1.fromString)(getPossibleRaw(n) || (typeof n.value === "string" ? nodeStr(n.value, options) : n.value), options);
60177
60177
  case "Directive":
60178
- return path2.call(print12, "value");
60178
+ return path2.call(print11, "value");
60179
60179
  case "DirectiveLiteral":
60180
60180
  return (0, lines_1.fromString)(getPossibleRaw(n) || nodeStr(n.value, options), options);
60181
60181
  case "InterpreterDirective":
@@ -60189,32 +60189,32 @@ var require_printer2 = __commonJS({
60189
60189
  parts.push(n.operator);
60190
60190
  if (/[a-z]$/.test(n.operator))
60191
60191
  parts.push(" ");
60192
- parts.push(path2.call(print12, "argument"));
60192
+ parts.push(path2.call(print11, "argument"));
60193
60193
  return (0, lines_1.concat)(parts);
60194
60194
  case "UpdateExpression":
60195
- parts.push(path2.call(print12, "argument"), n.operator);
60195
+ parts.push(path2.call(print11, "argument"), n.operator);
60196
60196
  if (n.prefix)
60197
60197
  parts.reverse();
60198
60198
  return (0, lines_1.concat)(parts);
60199
60199
  case "ConditionalExpression":
60200
60200
  return (0, lines_1.concat)([
60201
- path2.call(print12, "test"),
60201
+ path2.call(print11, "test"),
60202
60202
  " ? ",
60203
- path2.call(print12, "consequent"),
60203
+ path2.call(print11, "consequent"),
60204
60204
  " : ",
60205
- path2.call(print12, "alternate")
60205
+ path2.call(print11, "alternate")
60206
60206
  ]);
60207
60207
  case "NewExpression": {
60208
- parts.push("new ", path2.call(print12, "callee"));
60208
+ parts.push("new ", path2.call(print11, "callee"));
60209
60209
  if (n.typeParameters) {
60210
- parts.push(path2.call(print12, "typeParameters"));
60210
+ parts.push(path2.call(print11, "typeParameters"));
60211
60211
  }
60212
60212
  if (n.typeArguments) {
60213
- parts.push(path2.call(print12, "typeArguments"));
60213
+ parts.push(path2.call(print11, "typeArguments"));
60214
60214
  }
60215
60215
  var args = n.arguments;
60216
60216
  if (args) {
60217
- parts.push(printArgumentsList(path2, options, print12));
60217
+ parts.push(printArgumentsList(path2, options, print11));
60218
60218
  }
60219
60219
  return (0, lines_1.concat)(parts);
60220
60220
  }
@@ -60225,7 +60225,7 @@ var require_printer2 = __commonJS({
60225
60225
  parts.push(n.kind, " ");
60226
60226
  var maxLen_1 = 0;
60227
60227
  var printed = path2.map(function(childPath) {
60228
- var lines2 = print12(childPath);
60228
+ var lines2 = print11(childPath);
60229
60229
  maxLen_1 = Math.max(lines2.length, maxLen_1);
60230
60230
  return lines2;
60231
60231
  }, "declarations");
@@ -60244,30 +60244,30 @@ var require_printer2 = __commonJS({
60244
60244
  }
60245
60245
  case "VariableDeclarator":
60246
60246
  return n.init ? (0, lines_1.fromString)(" = ").join([
60247
- path2.call(print12, "id"),
60248
- path2.call(print12, "init")
60249
- ]) : path2.call(print12, "id");
60247
+ path2.call(print11, "id"),
60248
+ path2.call(print11, "init")
60249
+ ]) : path2.call(print11, "id");
60250
60250
  case "WithStatement":
60251
60251
  return (0, lines_1.concat)([
60252
60252
  "with (",
60253
- path2.call(print12, "object"),
60253
+ path2.call(print11, "object"),
60254
60254
  ") ",
60255
- path2.call(print12, "body")
60255
+ path2.call(print11, "body")
60256
60256
  ]);
60257
60257
  case "IfStatement": {
60258
- var con = adjustClause(path2.call(print12, "consequent"), options);
60259
- parts.push("if (", path2.call(print12, "test"), ")", con);
60258
+ var con = adjustClause(path2.call(print11, "consequent"), options);
60259
+ parts.push("if (", path2.call(print11, "test"), ")", con);
60260
60260
  if (n.alternate)
60261
- parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path2.call(print12, "alternate"), options));
60261
+ parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path2.call(print11, "alternate"), options));
60262
60262
  return (0, lines_1.concat)(parts);
60263
60263
  }
60264
60264
  case "ForStatement": {
60265
- var init = path2.call(print12, "init");
60265
+ var init = path2.call(print11, "init");
60266
60266
  var sep2 = init.length > 1 ? ";\n" : "; ";
60267
60267
  var forParen = "for (";
60268
- var indented = (0, lines_1.fromString)(sep2).join([init, path2.call(print12, "test"), path2.call(print12, "update")]).indentTail(forParen.length);
60268
+ var indented = (0, lines_1.fromString)(sep2).join([init, path2.call(print11, "test"), path2.call(print11, "update")]).indentTail(forParen.length);
60269
60269
  var head = (0, lines_1.concat)([forParen, indented, ")"]);
60270
- var clause = adjustClause(path2.call(print12, "body"), options);
60270
+ var clause = adjustClause(path2.call(print11, "body"), options);
60271
60271
  parts.push(head);
60272
60272
  if (head.length > 1) {
60273
60273
  parts.push("\n");
@@ -60279,18 +60279,18 @@ var require_printer2 = __commonJS({
60279
60279
  case "WhileStatement":
60280
60280
  return (0, lines_1.concat)([
60281
60281
  "while (",
60282
- path2.call(print12, "test"),
60282
+ path2.call(print11, "test"),
60283
60283
  ")",
60284
- adjustClause(path2.call(print12, "body"), options)
60284
+ adjustClause(path2.call(print11, "body"), options)
60285
60285
  ]);
60286
60286
  case "ForInStatement":
60287
60287
  return (0, lines_1.concat)([
60288
60288
  n.each ? "for each (" : "for (",
60289
- path2.call(print12, "left"),
60289
+ path2.call(print11, "left"),
60290
60290
  " in ",
60291
- path2.call(print12, "right"),
60291
+ path2.call(print11, "right"),
60292
60292
  ")",
60293
- adjustClause(path2.call(print12, "body"), options)
60293
+ adjustClause(path2.call(print11, "body"), options)
60294
60294
  ]);
60295
60295
  case "ForOfStatement":
60296
60296
  case "ForAwaitStatement":
@@ -60298,122 +60298,122 @@ var require_printer2 = __commonJS({
60298
60298
  if (n.await || n.type === "ForAwaitStatement") {
60299
60299
  parts.push("await ");
60300
60300
  }
60301
- parts.push("(", path2.call(print12, "left"), " of ", path2.call(print12, "right"), ")", adjustClause(path2.call(print12, "body"), options));
60301
+ parts.push("(", path2.call(print11, "left"), " of ", path2.call(print11, "right"), ")", adjustClause(path2.call(print11, "body"), options));
60302
60302
  return (0, lines_1.concat)(parts);
60303
60303
  case "DoWhileStatement": {
60304
60304
  var doBody = (0, lines_1.concat)([
60305
60305
  "do",
60306
- adjustClause(path2.call(print12, "body"), options)
60306
+ adjustClause(path2.call(print11, "body"), options)
60307
60307
  ]);
60308
60308
  parts.push(doBody);
60309
60309
  if (endsWithBrace(doBody))
60310
60310
  parts.push(" while");
60311
60311
  else
60312
60312
  parts.push("\nwhile");
60313
- parts.push(" (", path2.call(print12, "test"), ");");
60313
+ parts.push(" (", path2.call(print11, "test"), ");");
60314
60314
  return (0, lines_1.concat)(parts);
60315
60315
  }
60316
60316
  case "DoExpression": {
60317
60317
  var statements = path2.call(function(bodyPath) {
60318
- return printStatementSequence(bodyPath, options, print12);
60318
+ return printStatementSequence(bodyPath, options, print11);
60319
60319
  }, "body");
60320
60320
  return (0, lines_1.concat)(["do {\n", statements.indent(options.tabWidth), "\n}"]);
60321
60321
  }
60322
60322
  case "BreakStatement":
60323
60323
  parts.push("break");
60324
60324
  if (n.label)
60325
- parts.push(" ", path2.call(print12, "label"));
60325
+ parts.push(" ", path2.call(print11, "label"));
60326
60326
  parts.push(";");
60327
60327
  return (0, lines_1.concat)(parts);
60328
60328
  case "ContinueStatement":
60329
60329
  parts.push("continue");
60330
60330
  if (n.label)
60331
- parts.push(" ", path2.call(print12, "label"));
60331
+ parts.push(" ", path2.call(print11, "label"));
60332
60332
  parts.push(";");
60333
60333
  return (0, lines_1.concat)(parts);
60334
60334
  case "LabeledStatement":
60335
60335
  return (0, lines_1.concat)([
60336
- path2.call(print12, "label"),
60336
+ path2.call(print11, "label"),
60337
60337
  ":\n",
60338
- path2.call(print12, "body")
60338
+ path2.call(print11, "body")
60339
60339
  ]);
60340
60340
  case "TryStatement":
60341
- parts.push("try ", path2.call(print12, "block"));
60341
+ parts.push("try ", path2.call(print11, "block"));
60342
60342
  if (n.handler) {
60343
- parts.push(" ", path2.call(print12, "handler"));
60343
+ parts.push(" ", path2.call(print11, "handler"));
60344
60344
  } else if (n.handlers) {
60345
60345
  path2.each(function(handlerPath) {
60346
- parts.push(" ", print12(handlerPath));
60346
+ parts.push(" ", print11(handlerPath));
60347
60347
  }, "handlers");
60348
60348
  }
60349
60349
  if (n.finalizer) {
60350
- parts.push(" finally ", path2.call(print12, "finalizer"));
60350
+ parts.push(" finally ", path2.call(print11, "finalizer"));
60351
60351
  }
60352
60352
  return (0, lines_1.concat)(parts);
60353
60353
  case "CatchClause":
60354
60354
  parts.push("catch ");
60355
60355
  if (n.param) {
60356
- parts.push("(", path2.call(print12, "param"));
60356
+ parts.push("(", path2.call(print11, "param"));
60357
60357
  }
60358
60358
  if (n.guard) {
60359
- parts.push(" if ", path2.call(print12, "guard"));
60359
+ parts.push(" if ", path2.call(print11, "guard"));
60360
60360
  }
60361
60361
  if (n.param) {
60362
60362
  parts.push(") ");
60363
60363
  }
60364
- parts.push(path2.call(print12, "body"));
60364
+ parts.push(path2.call(print11, "body"));
60365
60365
  return (0, lines_1.concat)(parts);
60366
60366
  case "ThrowStatement":
60367
- return (0, lines_1.concat)(["throw ", path2.call(print12, "argument"), ";"]);
60367
+ return (0, lines_1.concat)(["throw ", path2.call(print11, "argument"), ";"]);
60368
60368
  case "SwitchStatement":
60369
60369
  return (0, lines_1.concat)([
60370
60370
  "switch (",
60371
- path2.call(print12, "discriminant"),
60371
+ path2.call(print11, "discriminant"),
60372
60372
  ") {\n",
60373
- (0, lines_1.fromString)("\n").join(path2.map(print12, "cases")),
60373
+ (0, lines_1.fromString)("\n").join(path2.map(print11, "cases")),
60374
60374
  "\n}"
60375
60375
  ]);
60376
60376
  case "SwitchCase":
60377
60377
  if (n.test)
60378
- parts.push("case ", path2.call(print12, "test"), ":");
60378
+ parts.push("case ", path2.call(print11, "test"), ":");
60379
60379
  else
60380
60380
  parts.push("default:");
60381
60381
  if (n.consequent.length > 0) {
60382
60382
  parts.push("\n", path2.call(function(consequentPath) {
60383
- return printStatementSequence(consequentPath, options, print12);
60383
+ return printStatementSequence(consequentPath, options, print11);
60384
60384
  }, "consequent").indent(options.tabWidth));
60385
60385
  }
60386
60386
  return (0, lines_1.concat)(parts);
60387
60387
  case "DebuggerStatement":
60388
60388
  return (0, lines_1.fromString)("debugger;");
60389
60389
  case "JSXAttribute":
60390
- parts.push(path2.call(print12, "name"));
60390
+ parts.push(path2.call(print11, "name"));
60391
60391
  if (n.value)
60392
- parts.push("=", path2.call(print12, "value"));
60392
+ parts.push("=", path2.call(print11, "value"));
60393
60393
  return (0, lines_1.concat)(parts);
60394
60394
  case "JSXIdentifier":
60395
60395
  return (0, lines_1.fromString)(n.name, options);
60396
60396
  case "JSXNamespacedName":
60397
60397
  return (0, lines_1.fromString)(":").join([
60398
- path2.call(print12, "namespace"),
60399
- path2.call(print12, "name")
60398
+ path2.call(print11, "namespace"),
60399
+ path2.call(print11, "name")
60400
60400
  ]);
60401
60401
  case "JSXMemberExpression":
60402
60402
  return (0, lines_1.fromString)(".").join([
60403
- path2.call(print12, "object"),
60404
- path2.call(print12, "property")
60403
+ path2.call(print11, "object"),
60404
+ path2.call(print11, "property")
60405
60405
  ]);
60406
60406
  case "JSXSpreadAttribute":
60407
- return (0, lines_1.concat)(["{...", path2.call(print12, "argument"), "}"]);
60407
+ return (0, lines_1.concat)(["{...", path2.call(print11, "argument"), "}"]);
60408
60408
  case "JSXSpreadChild":
60409
- return (0, lines_1.concat)(["{...", path2.call(print12, "expression"), "}"]);
60409
+ return (0, lines_1.concat)(["{...", path2.call(print11, "expression"), "}"]);
60410
60410
  case "JSXExpressionContainer":
60411
- return (0, lines_1.concat)(["{", path2.call(print12, "expression"), "}"]);
60411
+ return (0, lines_1.concat)(["{", path2.call(print11, "expression"), "}"]);
60412
60412
  case "JSXElement":
60413
60413
  case "JSXFragment": {
60414
60414
  var openingPropName = "opening" + (n.type === "JSXElement" ? "Element" : "Fragment");
60415
60415
  var closingPropName = "closing" + (n.type === "JSXElement" ? "Element" : "Fragment");
60416
- var openingLines = path2.call(print12, openingPropName);
60416
+ var openingLines = path2.call(print11, openingPropName);
60417
60417
  if (n[openingPropName].selfClosing) {
60418
60418
  assert_1.default.ok(!n[closingPropName], "unexpected " + closingPropName + " element in self-closing " + n.type);
60419
60419
  return openingLines;
@@ -60427,16 +60427,16 @@ var require_printer2 = __commonJS({
60427
60427
  return "\n";
60428
60428
  }
60429
60429
  }
60430
- return print12(childPath);
60430
+ return print11(childPath);
60431
60431
  }, "children")).indentTail(options.tabWidth);
60432
- var closingLines = path2.call(print12, closingPropName);
60432
+ var closingLines = path2.call(print11, closingPropName);
60433
60433
  return (0, lines_1.concat)([openingLines, childLines, closingLines]);
60434
60434
  }
60435
60435
  case "JSXOpeningElement": {
60436
- parts.push("<", path2.call(print12, "name"));
60436
+ parts.push("<", path2.call(print11, "name"));
60437
60437
  var attrParts_1 = [];
60438
60438
  path2.each(function(attrPath) {
60439
- attrParts_1.push(" ", print12(attrPath));
60439
+ attrParts_1.push(" ", print11(attrPath));
60440
60440
  }, "attributes");
60441
60441
  var attrLines = (0, lines_1.concat)(attrParts_1);
60442
60442
  var needLineWrap = attrLines.length > 1 || attrLines.getLineLength(1) > options.wrapColumn;
@@ -60453,7 +60453,7 @@ var require_printer2 = __commonJS({
60453
60453
  return (0, lines_1.concat)(parts);
60454
60454
  }
60455
60455
  case "JSXClosingElement":
60456
- return (0, lines_1.concat)(["</", path2.call(print12, "name"), ">"]);
60456
+ return (0, lines_1.concat)(["</", path2.call(print11, "name"), ">"]);
60457
60457
  case "JSXOpeningFragment":
60458
60458
  return (0, lines_1.fromString)("<>");
60459
60459
  case "JSXClosingFragment":
@@ -60464,9 +60464,9 @@ var require_printer2 = __commonJS({
60464
60464
  return (0, lines_1.fromString)("");
60465
60465
  case "TypeAnnotatedIdentifier":
60466
60466
  return (0, lines_1.concat)([
60467
- path2.call(print12, "annotation"),
60467
+ path2.call(print11, "annotation"),
60468
60468
  " ",
60469
- path2.call(print12, "identifier")
60469
+ path2.call(print11, "identifier")
60470
60470
  ]);
60471
60471
  case "ClassBody":
60472
60472
  if (n.body.length === 0) {
@@ -60475,12 +60475,12 @@ var require_printer2 = __commonJS({
60475
60475
  return (0, lines_1.concat)([
60476
60476
  "{\n",
60477
60477
  path2.call(function(bodyPath) {
60478
- return printStatementSequence(bodyPath, options, print12);
60478
+ return printStatementSequence(bodyPath, options, print11);
60479
60479
  }, "body").indent(options.tabWidth),
60480
60480
  "\n}"
60481
60481
  ]);
60482
60482
  case "ClassPropertyDefinition":
60483
- parts.push("static ", path2.call(print12, "definition"));
60483
+ parts.push("static ", path2.call(print11, "definition"));
60484
60484
  if (!namedTypes.MethodDefinition.check(n.definition))
60485
60485
  parts.push(";");
60486
60486
  return (0, lines_1.concat)(parts);
@@ -60501,12 +60501,12 @@ var require_printer2 = __commonJS({
60501
60501
  if (n.readonly) {
60502
60502
  parts.push("readonly ");
60503
60503
  }
60504
- var key = path2.call(print12, "key");
60504
+ var key = path2.call(print11, "key");
60505
60505
  if (n.computed) {
60506
60506
  key = (0, lines_1.concat)(["[", key, "]"]);
60507
60507
  }
60508
60508
  if (n.variance) {
60509
- key = (0, lines_1.concat)([printVariance(path2, print12), key]);
60509
+ key = (0, lines_1.concat)([printVariance(path2, print11), key]);
60510
60510
  }
60511
60511
  parts.push(key);
60512
60512
  if (n.optional) {
@@ -60516,10 +60516,10 @@ var require_printer2 = __commonJS({
60516
60516
  parts.push("!");
60517
60517
  }
60518
60518
  if (n.typeAnnotation) {
60519
- parts.push(path2.call(print12, "typeAnnotation"));
60519
+ parts.push(path2.call(print11, "typeAnnotation"));
60520
60520
  }
60521
60521
  if (n.value) {
60522
- parts.push(" = ", path2.call(print12, "value"));
60522
+ parts.push(" = ", path2.call(print11, "value"));
60523
60523
  }
60524
60524
  parts.push(";");
60525
60525
  return (0, lines_1.concat)(parts);
@@ -60528,21 +60528,21 @@ var require_printer2 = __commonJS({
60528
60528
  if (n.static) {
60529
60529
  parts.push("static ");
60530
60530
  }
60531
- parts.push(path2.call(print12, "key"));
60531
+ parts.push(path2.call(print11, "key"));
60532
60532
  if (n.typeAnnotation) {
60533
- parts.push(path2.call(print12, "typeAnnotation"));
60533
+ parts.push(path2.call(print11, "typeAnnotation"));
60534
60534
  }
60535
60535
  if (n.value) {
60536
- parts.push(" = ", path2.call(print12, "value"));
60536
+ parts.push(" = ", path2.call(print11, "value"));
60537
60537
  }
60538
60538
  parts.push(";");
60539
60539
  return (0, lines_1.concat)(parts);
60540
60540
  case "ClassAccessorProperty": {
60541
60541
  parts.push.apply(parts, tslib_1.__spreadArray(tslib_1.__spreadArray([], printClassMemberModifiers(n), false), ["accessor "], false));
60542
60542
  if (n.computed) {
60543
- parts.push("[", path2.call(print12, "key"), "]");
60543
+ parts.push("[", path2.call(print11, "key"), "]");
60544
60544
  } else {
60545
- parts.push(path2.call(print12, "key"));
60545
+ parts.push(path2.call(print11, "key"));
60546
60546
  }
60547
60547
  if (n.optional) {
60548
60548
  parts.push("?");
@@ -60551,10 +60551,10 @@ var require_printer2 = __commonJS({
60551
60551
  parts.push("!");
60552
60552
  }
60553
60553
  if (n.typeAnnotation) {
60554
- parts.push(path2.call(print12, "typeAnnotation"));
60554
+ parts.push(path2.call(print11, "typeAnnotation"));
60555
60555
  }
60556
60556
  if (n.value) {
60557
- parts.push(" = ", path2.call(print12, "value"));
60557
+ parts.push(" = ", path2.call(print11, "value"));
60558
60558
  }
60559
60559
  parts.push(";");
60560
60560
  return (0, lines_1.concat)(parts);
@@ -60570,21 +60570,21 @@ var require_printer2 = __commonJS({
60570
60570
  }
60571
60571
  parts.push("class");
60572
60572
  if (n.id) {
60573
- parts.push(" ", path2.call(print12, "id"));
60573
+ parts.push(" ", path2.call(print11, "id"));
60574
60574
  }
60575
60575
  if (n.typeParameters) {
60576
- parts.push(path2.call(print12, "typeParameters"));
60576
+ parts.push(path2.call(print11, "typeParameters"));
60577
60577
  }
60578
60578
  if (n.superClass) {
60579
- parts.push(" extends ", path2.call(print12, "superClass"), path2.call(print12, "superTypeParameters"));
60579
+ parts.push(" extends ", path2.call(print11, "superClass"), path2.call(print11, "superTypeParameters"));
60580
60580
  }
60581
60581
  if (n.extends && n.extends.length > 0) {
60582
- parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print12, "extends")));
60582
+ parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")));
60583
60583
  }
60584
60584
  if (n["implements"] && n["implements"].length > 0) {
60585
- parts.push(" implements ", (0, lines_1.fromString)(", ").join(path2.map(print12, "implements")));
60585
+ parts.push(" implements ", (0, lines_1.fromString)(", ").join(path2.map(print11, "implements")));
60586
60586
  }
60587
- parts.push(" ", path2.call(print12, "body"));
60587
+ parts.push(" ", path2.call(print11, "body"));
60588
60588
  if (n.type === "DeclareClass") {
60589
60589
  return printFlowDeclaration(path2, parts);
60590
60590
  } else {
@@ -60593,11 +60593,11 @@ var require_printer2 = __commonJS({
60593
60593
  case "TemplateElement":
60594
60594
  return (0, lines_1.fromString)(n.value.raw, options).lockIndentTail();
60595
60595
  case "TemplateLiteral": {
60596
- var expressions_1 = path2.map(print12, "expressions");
60596
+ var expressions_1 = path2.map(print11, "expressions");
60597
60597
  parts.push("`");
60598
60598
  path2.each(function(childPath) {
60599
60599
  var i2 = childPath.getName();
60600
- parts.push(print12(childPath));
60600
+ parts.push(print11(childPath));
60601
60601
  if (i2 < expressions_1.length) {
60602
60602
  parts.push("${", expressions_1[i2], "}");
60603
60603
  }
@@ -60606,7 +60606,7 @@ var require_printer2 = __commonJS({
60606
60606
  return (0, lines_1.concat)(parts).lockIndentTail();
60607
60607
  }
60608
60608
  case "TaggedTemplateExpression":
60609
- return (0, lines_1.concat)([path2.call(print12, "tag"), path2.call(print12, "quasi")]);
60609
+ return (0, lines_1.concat)([path2.call(print11, "tag"), path2.call(print11, "quasi")]);
60610
60610
  case "Node":
60611
60611
  case "Printable":
60612
60612
  case "SourceLocation":
@@ -60640,7 +60640,7 @@ var require_printer2 = __commonJS({
60640
60640
  if (n.typeAnnotation.type !== "FunctionTypeAnnotation") {
60641
60641
  parts.push(": ");
60642
60642
  }
60643
- parts.push(path2.call(print12, "typeAnnotation"));
60643
+ parts.push(path2.call(print11, "typeAnnotation"));
60644
60644
  return (0, lines_1.concat)(parts);
60645
60645
  }
60646
60646
  return (0, lines_1.fromString)("");
@@ -60654,9 +60654,9 @@ var require_printer2 = __commonJS({
60654
60654
  case "MixedTypeAnnotation":
60655
60655
  return (0, lines_1.fromString)("mixed", options);
60656
60656
  case "ArrayTypeAnnotation":
60657
- return (0, lines_1.concat)([path2.call(print12, "elementType"), "[]"]);
60657
+ return (0, lines_1.concat)([path2.call(print11, "elementType"), "[]"]);
60658
60658
  case "TupleTypeAnnotation": {
60659
- var printed_2 = path2.map(print12, "types");
60659
+ var printed_2 = path2.map(print11, "types");
60660
60660
  var joined = (0, lines_1.fromString)(", ").join(printed_2);
60661
60661
  var oneLine_3 = joined.getLineLength(1) <= options.wrapColumn;
60662
60662
  if (oneLine_3) {
@@ -60703,38 +60703,38 @@ var require_printer2 = __commonJS({
60703
60703
  case "InterfaceTypeAnnotation":
60704
60704
  parts.push("interface");
60705
60705
  if (n.extends && n.extends.length > 0) {
60706
- parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print12, "extends")));
60706
+ parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")));
60707
60707
  }
60708
- parts.push(" ", path2.call(print12, "body"));
60708
+ parts.push(" ", path2.call(print11, "body"));
60709
60709
  return (0, lines_1.concat)(parts);
60710
60710
  case "DeclareFunction":
60711
60711
  return printFlowDeclaration(path2, [
60712
60712
  "function ",
60713
- path2.call(print12, "id"),
60713
+ path2.call(print11, "id"),
60714
60714
  ";"
60715
60715
  ]);
60716
60716
  case "DeclareModule":
60717
60717
  return printFlowDeclaration(path2, [
60718
60718
  "module ",
60719
- path2.call(print12, "id"),
60719
+ path2.call(print11, "id"),
60720
60720
  " ",
60721
- path2.call(print12, "body")
60721
+ path2.call(print11, "body")
60722
60722
  ]);
60723
60723
  case "DeclareModuleExports":
60724
60724
  return printFlowDeclaration(path2, [
60725
60725
  "module.exports",
60726
- path2.call(print12, "typeAnnotation")
60726
+ path2.call(print11, "typeAnnotation")
60727
60727
  ]);
60728
60728
  case "DeclareVariable":
60729
- return printFlowDeclaration(path2, ["var ", path2.call(print12, "id"), ";"]);
60729
+ return printFlowDeclaration(path2, ["var ", path2.call(print11, "id"), ";"]);
60730
60730
  case "DeclareExportDeclaration":
60731
60731
  case "DeclareExportAllDeclaration":
60732
- return (0, lines_1.concat)(["declare ", printExportDeclaration(path2, options, print12)]);
60732
+ return (0, lines_1.concat)(["declare ", printExportDeclaration(path2, options, print11)]);
60733
60733
  case "EnumDeclaration":
60734
60734
  return (0, lines_1.concat)([
60735
60735
  "enum ",
60736
- path2.call(print12, "id"),
60737
- path2.call(print12, "body")
60736
+ path2.call(print11, "id"),
60737
+ path2.call(print11, "body")
60738
60738
  ]);
60739
60739
  case "EnumBooleanBody":
60740
60740
  case "EnumNumberBody":
@@ -60746,24 +60746,24 @@ var require_printer2 = __commonJS({
60746
60746
  n.type.slice(4, -4).toLowerCase()
60747
60747
  );
60748
60748
  }
60749
- parts.push(" {\n", (0, lines_1.fromString)("\n").join(path2.map(print12, "members")).indent(options.tabWidth), "\n}");
60749
+ parts.push(" {\n", (0, lines_1.fromString)("\n").join(path2.map(print11, "members")).indent(options.tabWidth), "\n}");
60750
60750
  return (0, lines_1.concat)(parts);
60751
60751
  }
60752
60752
  case "EnumDefaultedMember":
60753
- return (0, lines_1.concat)([path2.call(print12, "id"), ","]);
60753
+ return (0, lines_1.concat)([path2.call(print11, "id"), ","]);
60754
60754
  case "EnumBooleanMember":
60755
60755
  case "EnumNumberMember":
60756
60756
  case "EnumStringMember":
60757
60757
  return (0, lines_1.concat)([
60758
- path2.call(print12, "id"),
60758
+ path2.call(print11, "id"),
60759
60759
  " = ",
60760
- path2.call(print12, "init"),
60760
+ path2.call(print11, "init"),
60761
60761
  ","
60762
60762
  ]);
60763
60763
  case "InferredPredicate":
60764
60764
  return (0, lines_1.fromString)("%checks", options);
60765
60765
  case "DeclaredPredicate":
60766
- return (0, lines_1.concat)(["%checks(", path2.call(print12, "value"), ")"]);
60766
+ return (0, lines_1.concat)(["%checks(", path2.call(print11, "value"), ")"]);
60767
60767
  case "FunctionTypeAnnotation": {
60768
60768
  var parent = path2.getParentNode(0);
60769
60769
  var isArrowFunctionTypeAnnotation = !(namedTypes.ObjectTypeCallProperty.check(parent) || namedTypes.ObjectTypeInternalSlot.check(parent) && parent.method || namedTypes.DeclareFunction.check(path2.getParentNode(2)));
@@ -60773,14 +60773,14 @@ var require_printer2 = __commonJS({
60773
60773
  }
60774
60774
  var hasTypeParameters = !!n.typeParameters;
60775
60775
  var needsParens = hasTypeParameters || n.params.length !== 1 || n.params[0].name;
60776
- parts.push(hasTypeParameters ? path2.call(print12, "typeParameters") : "", needsParens ? "(" : "", printFunctionParams(path2, options, print12), needsParens ? ")" : "");
60776
+ parts.push(hasTypeParameters ? path2.call(print11, "typeParameters") : "", needsParens ? "(" : "", printFunctionParams(path2, options, print11), needsParens ? ")" : "");
60777
60777
  if (n.returnType) {
60778
- parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path2.call(print12, "returnType"));
60778
+ parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path2.call(print11, "returnType"));
60779
60779
  }
60780
60780
  return (0, lines_1.concat)(parts);
60781
60781
  }
60782
60782
  case "FunctionTypeParam": {
60783
- var name = path2.call(print12, "name");
60783
+ var name = path2.call(print11, "name");
60784
60784
  parts.push(name);
60785
60785
  if (n.optional) {
60786
60786
  parts.push("?");
@@ -60788,13 +60788,13 @@ var require_printer2 = __commonJS({
60788
60788
  if (name.infos[0].line) {
60789
60789
  parts.push(": ");
60790
60790
  }
60791
- parts.push(path2.call(print12, "typeAnnotation"));
60791
+ parts.push(path2.call(print11, "typeAnnotation"));
60792
60792
  return (0, lines_1.concat)(parts);
60793
60793
  }
60794
60794
  case "GenericTypeAnnotation":
60795
60795
  return (0, lines_1.concat)([
60796
- path2.call(print12, "id"),
60797
- path2.call(print12, "typeParameters")
60796
+ path2.call(print11, "id"),
60797
+ path2.call(print11, "typeParameters")
60798
60798
  ]);
60799
60799
  case "DeclareInterface":
60800
60800
  parts.push("declare ");
@@ -60803,24 +60803,24 @@ var require_printer2 = __commonJS({
60803
60803
  if (n.declare) {
60804
60804
  parts.push("declare ");
60805
60805
  }
60806
- parts.push("interface ", path2.call(print12, "id"), path2.call(print12, "typeParameters"), " ");
60806
+ parts.push("interface ", path2.call(print11, "id"), path2.call(print11, "typeParameters"), " ");
60807
60807
  if (n["extends"] && n["extends"].length > 0) {
60808
- parts.push("extends ", (0, lines_1.fromString)(", ").join(path2.map(print12, "extends")), " ");
60808
+ parts.push("extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")), " ");
60809
60809
  }
60810
60810
  if (n.body) {
60811
- parts.push(path2.call(print12, "body"));
60811
+ parts.push(path2.call(print11, "body"));
60812
60812
  }
60813
60813
  return (0, lines_1.concat)(parts);
60814
60814
  case "ClassImplements":
60815
60815
  case "InterfaceExtends":
60816
60816
  return (0, lines_1.concat)([
60817
- path2.call(print12, "id"),
60818
- path2.call(print12, "typeParameters")
60817
+ path2.call(print11, "id"),
60818
+ path2.call(print11, "typeParameters")
60819
60819
  ]);
60820
60820
  case "IntersectionTypeAnnotation":
60821
- return (0, lines_1.fromString)(" & ").join(path2.map(print12, "types"));
60821
+ return (0, lines_1.fromString)(" & ").join(path2.map(print11, "types"));
60822
60822
  case "NullableTypeAnnotation":
60823
- return (0, lines_1.concat)(["?", path2.call(print12, "typeAnnotation")]);
60823
+ return (0, lines_1.concat)(["?", path2.call(print11, "typeAnnotation")]);
60824
60824
  case "NullLiteralTypeAnnotation":
60825
60825
  return (0, lines_1.fromString)("null", options);
60826
60826
  case "ThisTypeAnnotation":
@@ -60828,40 +60828,40 @@ var require_printer2 = __commonJS({
60828
60828
  case "NumberTypeAnnotation":
60829
60829
  return (0, lines_1.fromString)("number", options);
60830
60830
  case "ObjectTypeCallProperty":
60831
- return path2.call(print12, "value");
60831
+ return path2.call(print11, "value");
60832
60832
  case "ObjectTypeIndexer":
60833
60833
  if (n.static) {
60834
60834
  parts.push("static ");
60835
60835
  }
60836
- parts.push(printVariance(path2, print12), "[");
60836
+ parts.push(printVariance(path2, print11), "[");
60837
60837
  if (n.id) {
60838
- parts.push(path2.call(print12, "id"), ": ");
60838
+ parts.push(path2.call(print11, "id"), ": ");
60839
60839
  }
60840
- parts.push(path2.call(print12, "key"), "]: ", path2.call(print12, "value"));
60840
+ parts.push(path2.call(print11, "key"), "]: ", path2.call(print11, "value"));
60841
60841
  return (0, lines_1.concat)(parts);
60842
60842
  case "ObjectTypeProperty":
60843
60843
  return (0, lines_1.concat)([
60844
- printVariance(path2, print12),
60845
- path2.call(print12, "key"),
60844
+ printVariance(path2, print11),
60845
+ path2.call(print11, "key"),
60846
60846
  n.optional ? "?" : "",
60847
60847
  ": ",
60848
- path2.call(print12, "value")
60848
+ path2.call(print11, "value")
60849
60849
  ]);
60850
60850
  case "ObjectTypeInternalSlot":
60851
60851
  return (0, lines_1.concat)([
60852
60852
  n.static ? "static " : "",
60853
60853
  "[[",
60854
- path2.call(print12, "id"),
60854
+ path2.call(print11, "id"),
60855
60855
  "]]",
60856
60856
  n.optional ? "?" : "",
60857
60857
  n.value.type !== "FunctionTypeAnnotation" ? ": " : "",
60858
- path2.call(print12, "value")
60858
+ path2.call(print11, "value")
60859
60859
  ]);
60860
60860
  case "QualifiedTypeIdentifier":
60861
60861
  return (0, lines_1.concat)([
60862
- path2.call(print12, "qualification"),
60862
+ path2.call(print11, "qualification"),
60863
60863
  ".",
60864
- path2.call(print12, "id")
60864
+ path2.call(print11, "id")
60865
60865
  ]);
60866
60866
  case "StringLiteralTypeAnnotation":
60867
60867
  return (0, lines_1.fromString)(nodeStr(n.value, options), options);
@@ -60878,36 +60878,36 @@ var require_printer2 = __commonJS({
60878
60878
  case "TypeAlias":
60879
60879
  return (0, lines_1.concat)([
60880
60880
  "type ",
60881
- path2.call(print12, "id"),
60882
- path2.call(print12, "typeParameters"),
60881
+ path2.call(print11, "id"),
60882
+ path2.call(print11, "typeParameters"),
60883
60883
  " = ",
60884
- path2.call(print12, "right"),
60884
+ path2.call(print11, "right"),
60885
60885
  ";"
60886
60886
  ]);
60887
60887
  case "DeclareOpaqueType":
60888
60888
  parts.push("declare ");
60889
60889
  case "OpaqueType":
60890
- parts.push("opaque type ", path2.call(print12, "id"), path2.call(print12, "typeParameters"));
60890
+ parts.push("opaque type ", path2.call(print11, "id"), path2.call(print11, "typeParameters"));
60891
60891
  if (n["supertype"]) {
60892
- parts.push(": ", path2.call(print12, "supertype"));
60892
+ parts.push(": ", path2.call(print11, "supertype"));
60893
60893
  }
60894
60894
  if (n["impltype"]) {
60895
- parts.push(" = ", path2.call(print12, "impltype"));
60895
+ parts.push(" = ", path2.call(print11, "impltype"));
60896
60896
  }
60897
60897
  parts.push(";");
60898
60898
  return (0, lines_1.concat)(parts);
60899
60899
  case "TypeCastExpression":
60900
60900
  return (0, lines_1.concat)([
60901
60901
  "(",
60902
- path2.call(print12, "expression"),
60903
- path2.call(print12, "typeAnnotation"),
60902
+ path2.call(print11, "expression"),
60903
+ path2.call(print11, "typeAnnotation"),
60904
60904
  ")"
60905
60905
  ]);
60906
60906
  case "TypeParameterDeclaration":
60907
60907
  case "TypeParameterInstantiation":
60908
60908
  return (0, lines_1.concat)([
60909
60909
  "<",
60910
- (0, lines_1.fromString)(", ").join(path2.map(print12, "params")),
60910
+ (0, lines_1.fromString)(", ").join(path2.map(print11, "params")),
60911
60911
  ">"
60912
60912
  ]);
60913
60913
  case "Variance":
@@ -60920,32 +60920,32 @@ var require_printer2 = __commonJS({
60920
60920
  return (0, lines_1.fromString)("");
60921
60921
  case "TypeParameter":
60922
60922
  if (n.variance) {
60923
- parts.push(printVariance(path2, print12));
60923
+ parts.push(printVariance(path2, print11));
60924
60924
  }
60925
- parts.push(path2.call(print12, "name"));
60925
+ parts.push(path2.call(print11, "name"));
60926
60926
  if (n.bound) {
60927
- parts.push(path2.call(print12, "bound"));
60927
+ parts.push(path2.call(print11, "bound"));
60928
60928
  }
60929
60929
  if (n["default"]) {
60930
- parts.push("=", path2.call(print12, "default"));
60930
+ parts.push("=", path2.call(print11, "default"));
60931
60931
  }
60932
60932
  return (0, lines_1.concat)(parts);
60933
60933
  case "TypeofTypeAnnotation":
60934
60934
  return (0, lines_1.concat)([
60935
60935
  (0, lines_1.fromString)("typeof ", options),
60936
- path2.call(print12, "argument")
60936
+ path2.call(print11, "argument")
60937
60937
  ]);
60938
60938
  case "IndexedAccessType":
60939
60939
  case "OptionalIndexedAccessType":
60940
60940
  return (0, lines_1.concat)([
60941
- path2.call(print12, "objectType"),
60941
+ path2.call(print11, "objectType"),
60942
60942
  n.optional ? "?." : "",
60943
60943
  "[",
60944
- path2.call(print12, "indexType"),
60944
+ path2.call(print11, "indexType"),
60945
60945
  "]"
60946
60946
  ]);
60947
60947
  case "UnionTypeAnnotation":
60948
- return (0, lines_1.fromString)(" | ").join(path2.map(print12, "types"));
60948
+ return (0, lines_1.fromString)(" | ").join(path2.map(print11, "types"));
60949
60949
  case "VoidTypeAnnotation":
60950
60950
  return (0, lines_1.fromString)("void", options);
60951
60951
  case "NullTypeAnnotation":
@@ -60985,77 +60985,77 @@ var require_printer2 = __commonJS({
60985
60985
  case "TSNeverKeyword":
60986
60986
  return (0, lines_1.fromString)("never", options);
60987
60987
  case "TSArrayType":
60988
- return (0, lines_1.concat)([path2.call(print12, "elementType"), "[]"]);
60988
+ return (0, lines_1.concat)([path2.call(print11, "elementType"), "[]"]);
60989
60989
  case "TSLiteralType":
60990
- return path2.call(print12, "literal");
60990
+ return path2.call(print11, "literal");
60991
60991
  case "TSUnionType":
60992
- return (0, lines_1.fromString)(" | ").join(path2.map(print12, "types"));
60992
+ return (0, lines_1.fromString)(" | ").join(path2.map(print11, "types"));
60993
60993
  case "TSIntersectionType":
60994
- return (0, lines_1.fromString)(" & ").join(path2.map(print12, "types"));
60994
+ return (0, lines_1.fromString)(" & ").join(path2.map(print11, "types"));
60995
60995
  case "TSConditionalType":
60996
- parts.push(path2.call(print12, "checkType"), " extends ", path2.call(print12, "extendsType"), " ? ", path2.call(print12, "trueType"), " : ", path2.call(print12, "falseType"));
60996
+ parts.push(path2.call(print11, "checkType"), " extends ", path2.call(print11, "extendsType"), " ? ", path2.call(print11, "trueType"), " : ", path2.call(print11, "falseType"));
60997
60997
  return (0, lines_1.concat)(parts);
60998
60998
  case "TSInferType":
60999
- parts.push("infer ", path2.call(print12, "typeParameter"));
60999
+ parts.push("infer ", path2.call(print11, "typeParameter"));
61000
61000
  return (0, lines_1.concat)(parts);
61001
61001
  case "TSParenthesizedType":
61002
- return (0, lines_1.concat)(["(", path2.call(print12, "typeAnnotation"), ")"]);
61002
+ return (0, lines_1.concat)(["(", path2.call(print11, "typeAnnotation"), ")"]);
61003
61003
  case "TSFunctionType":
61004
61004
  return (0, lines_1.concat)([
61005
- path2.call(print12, "typeParameters"),
61005
+ path2.call(print11, "typeParameters"),
61006
61006
  "(",
61007
- printFunctionParams(path2, options, print12),
61007
+ printFunctionParams(path2, options, print11),
61008
61008
  ") => ",
61009
- path2.call(print12, "typeAnnotation", "typeAnnotation")
61009
+ path2.call(print11, "typeAnnotation", "typeAnnotation")
61010
61010
  ]);
61011
61011
  case "TSConstructorType":
61012
61012
  return (0, lines_1.concat)([
61013
61013
  "new ",
61014
- path2.call(print12, "typeParameters"),
61014
+ path2.call(print11, "typeParameters"),
61015
61015
  "(",
61016
- printFunctionParams(path2, options, print12),
61016
+ printFunctionParams(path2, options, print11),
61017
61017
  ") => ",
61018
- path2.call(print12, "typeAnnotation", "typeAnnotation")
61018
+ path2.call(print11, "typeAnnotation", "typeAnnotation")
61019
61019
  ]);
61020
61020
  case "TSMappedType": {
61021
- parts.push(n.readonly ? "readonly " : "", "[", path2.call(print12, "typeParameter"), "]", n.optional ? "?" : "");
61021
+ parts.push(n.readonly ? "readonly " : "", "[", path2.call(print11, "typeParameter"), "]", n.optional ? "?" : "");
61022
61022
  if (n.typeAnnotation) {
61023
- parts.push(": ", path2.call(print12, "typeAnnotation"), ";");
61023
+ parts.push(": ", path2.call(print11, "typeAnnotation"), ";");
61024
61024
  }
61025
61025
  return (0, lines_1.concat)(["{\n", (0, lines_1.concat)(parts).indent(options.tabWidth), "\n}"]);
61026
61026
  }
61027
61027
  case "TSTupleType":
61028
61028
  return (0, lines_1.concat)([
61029
61029
  "[",
61030
- (0, lines_1.fromString)(", ").join(path2.map(print12, "elementTypes")),
61030
+ (0, lines_1.fromString)(", ").join(path2.map(print11, "elementTypes")),
61031
61031
  "]"
61032
61032
  ]);
61033
61033
  case "TSNamedTupleMember":
61034
- parts.push(path2.call(print12, "label"));
61034
+ parts.push(path2.call(print11, "label"));
61035
61035
  if (n.optional) {
61036
61036
  parts.push("?");
61037
61037
  }
61038
- parts.push(": ", path2.call(print12, "elementType"));
61038
+ parts.push(": ", path2.call(print11, "elementType"));
61039
61039
  return (0, lines_1.concat)(parts);
61040
61040
  case "TSRestType":
61041
- return (0, lines_1.concat)(["...", path2.call(print12, "typeAnnotation")]);
61041
+ return (0, lines_1.concat)(["...", path2.call(print11, "typeAnnotation")]);
61042
61042
  case "TSOptionalType":
61043
- return (0, lines_1.concat)([path2.call(print12, "typeAnnotation"), "?"]);
61043
+ return (0, lines_1.concat)([path2.call(print11, "typeAnnotation"), "?"]);
61044
61044
  case "TSIndexedAccessType":
61045
61045
  return (0, lines_1.concat)([
61046
- path2.call(print12, "objectType"),
61046
+ path2.call(print11, "objectType"),
61047
61047
  "[",
61048
- path2.call(print12, "indexType"),
61048
+ path2.call(print11, "indexType"),
61049
61049
  "]"
61050
61050
  ]);
61051
61051
  case "TSTypeOperator":
61052
61052
  return (0, lines_1.concat)([
61053
- path2.call(print12, "operator"),
61053
+ path2.call(print11, "operator"),
61054
61054
  " ",
61055
- path2.call(print12, "typeAnnotation")
61055
+ path2.call(print11, "typeAnnotation")
61056
61056
  ]);
61057
61057
  case "TSTypeLiteral": {
61058
- var members = (0, lines_1.fromString)("\n").join(path2.map(print12, "members").map(function(member) {
61058
+ var members = (0, lines_1.fromString)("\n").join(path2.map(print11, "members").map(function(member) {
61059
61059
  if (lastNonSpaceCharacter(member) !== ";") {
61060
61060
  return member.concat(";");
61061
61061
  }
@@ -61068,13 +61068,13 @@ var require_printer2 = __commonJS({
61068
61068
  return (0, lines_1.concat)(parts);
61069
61069
  }
61070
61070
  case "TSEnumMember":
61071
- parts.push(path2.call(print12, "id"));
61071
+ parts.push(path2.call(print11, "id"));
61072
61072
  if (n.initializer) {
61073
- parts.push(" = ", path2.call(print12, "initializer"));
61073
+ parts.push(" = ", path2.call(print11, "initializer"));
61074
61074
  }
61075
61075
  return (0, lines_1.concat)(parts);
61076
61076
  case "TSTypeQuery":
61077
- return (0, lines_1.concat)(["typeof ", path2.call(print12, "exprName")]);
61077
+ return (0, lines_1.concat)(["typeof ", path2.call(print11, "exprName")]);
61078
61078
  case "TSParameterProperty":
61079
61079
  if (n.accessibility) {
61080
61080
  parts.push(n.accessibility, " ");
@@ -61088,119 +61088,119 @@ var require_printer2 = __commonJS({
61088
61088
  if (n.readonly) {
61089
61089
  parts.push("readonly ");
61090
61090
  }
61091
- parts.push(path2.call(print12, "parameter"));
61091
+ parts.push(path2.call(print11, "parameter"));
61092
61092
  return (0, lines_1.concat)(parts);
61093
61093
  case "TSTypeReference":
61094
61094
  return (0, lines_1.concat)([
61095
- path2.call(print12, "typeName"),
61096
- path2.call(print12, "typeParameters")
61095
+ path2.call(print11, "typeName"),
61096
+ path2.call(print11, "typeParameters")
61097
61097
  ]);
61098
61098
  case "TSQualifiedName":
61099
- return (0, lines_1.concat)([path2.call(print12, "left"), ".", path2.call(print12, "right")]);
61099
+ return (0, lines_1.concat)([path2.call(print11, "left"), ".", path2.call(print11, "right")]);
61100
61100
  case "TSAsExpression":
61101
61101
  case "TSSatisfiesExpression": {
61102
- var expression = path2.call(print12, "expression");
61103
- parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path2.call(print12, "typeAnnotation"));
61102
+ var expression = path2.call(print11, "expression");
61103
+ parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path2.call(print11, "typeAnnotation"));
61104
61104
  return (0, lines_1.concat)(parts);
61105
61105
  }
61106
61106
  case "TSTypeCastExpression":
61107
61107
  return (0, lines_1.concat)([
61108
- path2.call(print12, "expression"),
61109
- path2.call(print12, "typeAnnotation")
61108
+ path2.call(print11, "expression"),
61109
+ path2.call(print11, "typeAnnotation")
61110
61110
  ]);
61111
61111
  case "TSNonNullExpression":
61112
- return (0, lines_1.concat)([path2.call(print12, "expression"), "!"]);
61112
+ return (0, lines_1.concat)([path2.call(print11, "expression"), "!"]);
61113
61113
  case "TSTypeAnnotation":
61114
- return (0, lines_1.concat)([": ", path2.call(print12, "typeAnnotation")]);
61114
+ return (0, lines_1.concat)([": ", path2.call(print11, "typeAnnotation")]);
61115
61115
  case "TSIndexSignature":
61116
61116
  return (0, lines_1.concat)([
61117
61117
  n.readonly ? "readonly " : "",
61118
61118
  "[",
61119
- path2.map(print12, "parameters"),
61119
+ path2.map(print11, "parameters"),
61120
61120
  "]",
61121
- path2.call(print12, "typeAnnotation")
61121
+ path2.call(print11, "typeAnnotation")
61122
61122
  ]);
61123
61123
  case "TSPropertySignature":
61124
- parts.push(printVariance(path2, print12), n.readonly ? "readonly " : "");
61124
+ parts.push(printVariance(path2, print11), n.readonly ? "readonly " : "");
61125
61125
  if (n.computed) {
61126
- parts.push("[", path2.call(print12, "key"), "]");
61126
+ parts.push("[", path2.call(print11, "key"), "]");
61127
61127
  } else {
61128
- parts.push(path2.call(print12, "key"));
61128
+ parts.push(path2.call(print11, "key"));
61129
61129
  }
61130
- parts.push(n.optional ? "?" : "", path2.call(print12, "typeAnnotation"));
61130
+ parts.push(n.optional ? "?" : "", path2.call(print11, "typeAnnotation"));
61131
61131
  return (0, lines_1.concat)(parts);
61132
61132
  case "TSMethodSignature":
61133
61133
  if (n.computed) {
61134
- parts.push("[", path2.call(print12, "key"), "]");
61134
+ parts.push("[", path2.call(print11, "key"), "]");
61135
61135
  } else {
61136
- parts.push(path2.call(print12, "key"));
61136
+ parts.push(path2.call(print11, "key"));
61137
61137
  }
61138
61138
  if (n.optional) {
61139
61139
  parts.push("?");
61140
61140
  }
61141
- parts.push(path2.call(print12, "typeParameters"), "(", printFunctionParams(path2, options, print12), ")", path2.call(print12, "typeAnnotation"));
61141
+ parts.push(path2.call(print11, "typeParameters"), "(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "typeAnnotation"));
61142
61142
  return (0, lines_1.concat)(parts);
61143
61143
  case "TSTypePredicate":
61144
61144
  if (n.asserts) {
61145
61145
  parts.push("asserts ");
61146
61146
  }
61147
- parts.push(path2.call(print12, "parameterName"));
61147
+ parts.push(path2.call(print11, "parameterName"));
61148
61148
  if (n.typeAnnotation) {
61149
- parts.push(" is ", path2.call(print12, "typeAnnotation", "typeAnnotation"));
61149
+ parts.push(" is ", path2.call(print11, "typeAnnotation", "typeAnnotation"));
61150
61150
  }
61151
61151
  return (0, lines_1.concat)(parts);
61152
61152
  case "TSCallSignatureDeclaration":
61153
61153
  return (0, lines_1.concat)([
61154
- path2.call(print12, "typeParameters"),
61154
+ path2.call(print11, "typeParameters"),
61155
61155
  "(",
61156
- printFunctionParams(path2, options, print12),
61156
+ printFunctionParams(path2, options, print11),
61157
61157
  ")",
61158
- path2.call(print12, "typeAnnotation")
61158
+ path2.call(print11, "typeAnnotation")
61159
61159
  ]);
61160
61160
  case "TSConstructSignatureDeclaration":
61161
61161
  if (n.typeParameters) {
61162
- parts.push("new", path2.call(print12, "typeParameters"));
61162
+ parts.push("new", path2.call(print11, "typeParameters"));
61163
61163
  } else {
61164
61164
  parts.push("new ");
61165
61165
  }
61166
- parts.push("(", printFunctionParams(path2, options, print12), ")", path2.call(print12, "typeAnnotation"));
61166
+ parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "typeAnnotation"));
61167
61167
  return (0, lines_1.concat)(parts);
61168
61168
  case "TSTypeAliasDeclaration":
61169
61169
  return (0, lines_1.concat)([
61170
61170
  n.declare ? "declare " : "",
61171
61171
  "type ",
61172
- path2.call(print12, "id"),
61173
- path2.call(print12, "typeParameters"),
61172
+ path2.call(print11, "id"),
61173
+ path2.call(print11, "typeParameters"),
61174
61174
  " = ",
61175
- path2.call(print12, "typeAnnotation"),
61175
+ path2.call(print11, "typeAnnotation"),
61176
61176
  ";"
61177
61177
  ]);
61178
61178
  case "TSTypeParameter": {
61179
- parts.push(path2.call(print12, "name"));
61179
+ parts.push(path2.call(print11, "name"));
61180
61180
  var parent = path2.getParentNode(0);
61181
61181
  var isInMappedType = namedTypes.TSMappedType.check(parent);
61182
61182
  if (n.constraint) {
61183
- parts.push(isInMappedType ? " in " : " extends ", path2.call(print12, "constraint"));
61183
+ parts.push(isInMappedType ? " in " : " extends ", path2.call(print11, "constraint"));
61184
61184
  }
61185
61185
  if (n["default"]) {
61186
- parts.push(" = ", path2.call(print12, "default"));
61186
+ parts.push(" = ", path2.call(print11, "default"));
61187
61187
  }
61188
61188
  return (0, lines_1.concat)(parts);
61189
61189
  }
61190
61190
  case "TSTypeAssertion": {
61191
- parts.push("<", path2.call(print12, "typeAnnotation"), "> ", path2.call(print12, "expression"));
61191
+ parts.push("<", path2.call(print11, "typeAnnotation"), "> ", path2.call(print11, "expression"));
61192
61192
  return (0, lines_1.concat)(parts);
61193
61193
  }
61194
61194
  case "TSTypeParameterDeclaration":
61195
61195
  case "TSTypeParameterInstantiation":
61196
61196
  return (0, lines_1.concat)([
61197
61197
  "<",
61198
- (0, lines_1.fromString)(", ").join(path2.map(print12, "params")),
61198
+ (0, lines_1.fromString)(", ").join(path2.map(print11, "params")),
61199
61199
  ">"
61200
61200
  ]);
61201
61201
  case "TSEnumDeclaration": {
61202
- parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path2.call(print12, "id"));
61203
- var memberLines = (0, lines_1.fromString)(",\n").join(path2.map(print12, "members"));
61202
+ parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path2.call(print11, "id"));
61203
+ var memberLines = (0, lines_1.fromString)(",\n").join(path2.map(print11, "members"));
61204
61204
  if (memberLines.isEmpty()) {
61205
61205
  parts.push(" {}");
61206
61206
  } else {
@@ -61210,11 +61210,11 @@ var require_printer2 = __commonJS({
61210
61210
  }
61211
61211
  case "TSExpressionWithTypeArguments":
61212
61212
  return (0, lines_1.concat)([
61213
- path2.call(print12, "expression"),
61214
- path2.call(print12, "typeParameters")
61213
+ path2.call(print11, "expression"),
61214
+ path2.call(print11, "typeParameters")
61215
61215
  ]);
61216
61216
  case "TSInterfaceBody": {
61217
- var lines = (0, lines_1.fromString)("\n").join(path2.map(print12, "body").map(function(element) {
61217
+ var lines = (0, lines_1.fromString)("\n").join(path2.map(print11, "body").map(function(element) {
61218
61218
  if (lastNonSpaceCharacter(element) !== ";") {
61219
61219
  return element.concat(";");
61220
61220
  }
@@ -61226,22 +61226,22 @@ var require_printer2 = __commonJS({
61226
61226
  return (0, lines_1.concat)(["{\n", lines.indent(options.tabWidth), "\n}"]);
61227
61227
  }
61228
61228
  case "TSImportType":
61229
- parts.push("import(", path2.call(print12, "argument"), ")");
61229
+ parts.push("import(", path2.call(print11, "argument"), ")");
61230
61230
  if (n.qualifier) {
61231
- parts.push(".", path2.call(print12, "qualifier"));
61231
+ parts.push(".", path2.call(print11, "qualifier"));
61232
61232
  }
61233
61233
  if (n.typeParameters) {
61234
- parts.push(path2.call(print12, "typeParameters"));
61234
+ parts.push(path2.call(print11, "typeParameters"));
61235
61235
  }
61236
61236
  return (0, lines_1.concat)(parts);
61237
61237
  case "TSImportEqualsDeclaration":
61238
61238
  if (n.isExport) {
61239
61239
  parts.push("export ");
61240
61240
  }
61241
- parts.push("import ", path2.call(print12, "id"), " = ", path2.call(print12, "moduleReference"));
61241
+ parts.push("import ", path2.call(print11, "id"), " = ", path2.call(print11, "moduleReference"));
61242
61242
  return maybeAddSemicolon((0, lines_1.concat)(parts));
61243
61243
  case "TSExternalModuleReference":
61244
- return (0, lines_1.concat)(["require(", path2.call(print12, "expression"), ")"]);
61244
+ return (0, lines_1.concat)(["require(", path2.call(print11, "expression"), ")"]);
61245
61245
  case "TSModuleDeclaration": {
61246
61246
  var parent = path2.getParentNode();
61247
61247
  if (parent.type === "TSModuleDeclaration") {
@@ -61266,16 +61266,16 @@ var require_printer2 = __commonJS({
61266
61266
  }
61267
61267
  }
61268
61268
  }
61269
- parts.push(path2.call(print12, "id"));
61269
+ parts.push(path2.call(print11, "id"));
61270
61270
  if (n.body) {
61271
61271
  parts.push(" ");
61272
- parts.push(path2.call(print12, "body"));
61272
+ parts.push(path2.call(print11, "body"));
61273
61273
  }
61274
61274
  return (0, lines_1.concat)(parts);
61275
61275
  }
61276
61276
  case "TSModuleBlock": {
61277
61277
  var naked = path2.call(function(bodyPath) {
61278
- return printStatementSequence(bodyPath, options, print12);
61278
+ return printStatementSequence(bodyPath, options, print11);
61279
61279
  }, "body");
61280
61280
  if (naked.isEmpty()) {
61281
61281
  parts.push("{}");
@@ -61285,11 +61285,11 @@ var require_printer2 = __commonJS({
61285
61285
  return (0, lines_1.concat)(parts);
61286
61286
  }
61287
61287
  case "TSInstantiationExpression": {
61288
- parts.push(path2.call(print12, "expression"), path2.call(print12, "typeParameters"));
61288
+ parts.push(path2.call(print11, "expression"), path2.call(print11, "typeParameters"));
61289
61289
  return (0, lines_1.concat)(parts);
61290
61290
  }
61291
61291
  case "V8IntrinsicIdentifier":
61292
- return (0, lines_1.concat)(["%", path2.call(print12, "name")]);
61292
+ return (0, lines_1.concat)(["%", path2.call(print11, "name")]);
61293
61293
  case "TopicReference":
61294
61294
  return (0, lines_1.fromString)("#");
61295
61295
  case "ClassHeritage":
@@ -61339,7 +61339,7 @@ var require_printer2 = __commonJS({
61339
61339
  }
61340
61340
  return (0, lines_1.concat)(parts);
61341
61341
  }
61342
- function printStatementSequence(path2, options, print12) {
61342
+ function printStatementSequence(path2, options, print11) {
61343
61343
  var filtered = [];
61344
61344
  var sawComment = false;
61345
61345
  var sawStatement = false;
@@ -61360,7 +61360,7 @@ var require_printer2 = __commonJS({
61360
61360
  }
61361
61361
  filtered.push({
61362
61362
  node: stmt,
61363
- printed: print12(stmtPath)
61363
+ printed: print11(stmtPath)
61364
61364
  });
61365
61365
  });
61366
61366
  if (sawComment) {
@@ -61452,7 +61452,7 @@ var require_printer2 = __commonJS({
61452
61452
  }
61453
61453
  return parts;
61454
61454
  }
61455
- function printMethod(path2, options, print12) {
61455
+ function printMethod(path2, options, print11) {
61456
61456
  var node = path2.getNode();
61457
61457
  var kind = node.kind;
61458
61458
  var parts = [];
@@ -61470,7 +61470,7 @@ var require_printer2 = __commonJS({
61470
61470
  if (kind === "get" || kind === "set") {
61471
61471
  parts.push(kind, " ");
61472
61472
  }
61473
- var key = path2.call(print12, "key");
61473
+ var key = path2.call(print11, "key");
61474
61474
  if (node.computed) {
61475
61475
  key = (0, lines_1.concat)(["[", key, "]"]);
61476
61476
  }
@@ -61479,26 +61479,26 @@ var require_printer2 = __commonJS({
61479
61479
  parts.push("?");
61480
61480
  }
61481
61481
  if (node === nodeValue) {
61482
- parts.push(path2.call(print12, "typeParameters"), "(", printFunctionParams(path2, options, print12), ")", path2.call(print12, "returnType"));
61482
+ parts.push(path2.call(print11, "typeParameters"), "(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
61483
61483
  if (node.body) {
61484
- parts.push(" ", path2.call(print12, "body"));
61484
+ parts.push(" ", path2.call(print11, "body"));
61485
61485
  } else {
61486
61486
  parts.push(";");
61487
61487
  }
61488
61488
  } else {
61489
- parts.push(path2.call(print12, "value", "typeParameters"), "(", path2.call(function(valuePath) {
61490
- return printFunctionParams(valuePath, options, print12);
61491
- }, "value"), ")", path2.call(print12, "value", "returnType"));
61489
+ parts.push(path2.call(print11, "value", "typeParameters"), "(", path2.call(function(valuePath) {
61490
+ return printFunctionParams(valuePath, options, print11);
61491
+ }, "value"), ")", path2.call(print11, "value", "returnType"));
61492
61492
  if (nodeValue.body) {
61493
- parts.push(" ", path2.call(print12, "value", "body"));
61493
+ parts.push(" ", path2.call(print11, "value", "body"));
61494
61494
  } else {
61495
61495
  parts.push(";");
61496
61496
  }
61497
61497
  }
61498
61498
  return (0, lines_1.concat)(parts);
61499
61499
  }
61500
- function printArgumentsList(path2, options, print12) {
61501
- var printed = path2.map(print12, "arguments");
61500
+ function printArgumentsList(path2, options, print11) {
61501
+ var printed = path2.map(print11, "arguments");
61502
61502
  var trailingComma = util.isTrailingCommaEnabled(options, "parameters");
61503
61503
  var joined = (0, lines_1.fromString)(", ").join(printed);
61504
61504
  if (joined.getLineLength(1) > options.wrapColumn) {
@@ -61511,28 +61511,28 @@ var require_printer2 = __commonJS({
61511
61511
  }
61512
61512
  return (0, lines_1.concat)(["(", joined, ")"]);
61513
61513
  }
61514
- function printFunctionParams(path2, options, print12) {
61514
+ function printFunctionParams(path2, options, print11) {
61515
61515
  var fun = path2.getValue();
61516
61516
  var params;
61517
61517
  var printed = [];
61518
61518
  if (fun.params) {
61519
61519
  params = fun.params;
61520
- printed = path2.map(print12, "params");
61520
+ printed = path2.map(print11, "params");
61521
61521
  } else if (fun.parameters) {
61522
61522
  params = fun.parameters;
61523
- printed = path2.map(print12, "parameters");
61523
+ printed = path2.map(print11, "parameters");
61524
61524
  }
61525
61525
  if (fun.defaults) {
61526
61526
  path2.each(function(defExprPath) {
61527
61527
  var i2 = defExprPath.getName();
61528
61528
  var p = printed[i2];
61529
61529
  if (p && defExprPath.getValue()) {
61530
- printed[i2] = (0, lines_1.concat)([p, " = ", print12(defExprPath)]);
61530
+ printed[i2] = (0, lines_1.concat)([p, " = ", print11(defExprPath)]);
61531
61531
  }
61532
61532
  }, "defaults");
61533
61533
  }
61534
61534
  if (fun.rest) {
61535
- printed.push((0, lines_1.concat)(["...", path2.call(print12, "rest")]));
61535
+ printed.push((0, lines_1.concat)(["...", path2.call(print11, "rest")]));
61536
61536
  }
61537
61537
  var joined = (0, lines_1.fromString)(", ").join(printed);
61538
61538
  if (joined.length > 1 || joined.getLineLength(1) > options.wrapColumn) {
@@ -61546,11 +61546,11 @@ var require_printer2 = __commonJS({
61546
61546
  }
61547
61547
  return joined;
61548
61548
  }
61549
- function maybePrintImportAssertions(path2, options, print12) {
61549
+ function maybePrintImportAssertions(path2, options, print11) {
61550
61550
  var n = path2.getValue();
61551
61551
  if (n.assertions && n.assertions.length > 0) {
61552
61552
  var parts = [" assert {"];
61553
- var printed = path2.map(print12, "assertions");
61553
+ var printed = path2.map(print11, "assertions");
61554
61554
  var flat = (0, lines_1.fromString)(", ").join(printed);
61555
61555
  if (flat.length > 1 || flat.getLineLength(1) > options.wrapColumn) {
61556
61556
  parts.push("\n", (0, lines_1.fromString)(",\n").join(printed).indent(options.tabWidth), "\n}");
@@ -61561,7 +61561,7 @@ var require_printer2 = __commonJS({
61561
61561
  }
61562
61562
  return (0, lines_1.fromString)("");
61563
61563
  }
61564
- function printExportDeclaration(path2, options, print12) {
61564
+ function printExportDeclaration(path2, options, print11) {
61565
61565
  var decl = path2.getValue();
61566
61566
  var parts = ["export "];
61567
61567
  if (decl.exportKind && decl.exportKind === "type") {
@@ -61575,7 +61575,7 @@ var require_printer2 = __commonJS({
61575
61575
  parts.push("default ");
61576
61576
  }
61577
61577
  if (decl.declaration) {
61578
- parts.push(path2.call(print12, "declaration"));
61578
+ parts.push(path2.call(print11, "declaration"));
61579
61579
  } else if (decl.specifiers) {
61580
61580
  if (decl.specifiers.length === 1 && decl.specifiers[0].type === "ExportBatchSpecifier") {
61581
61581
  parts.push("*");
@@ -61587,9 +61587,9 @@ var require_printer2 = __commonJS({
61587
61587
  path2.each(function(specifierPath) {
61588
61588
  var spec = specifierPath.getValue();
61589
61589
  if (spec.type === "ExportDefaultSpecifier") {
61590
- unbracedSpecifiers_2.push(print12(specifierPath));
61590
+ unbracedSpecifiers_2.push(print11(specifierPath));
61591
61591
  } else {
61592
- bracedSpecifiers_2.push(print12(specifierPath));
61592
+ bracedSpecifiers_2.push(print11(specifierPath));
61593
61593
  }
61594
61594
  }, "specifiers");
61595
61595
  unbracedSpecifiers_2.forEach(function(lines2, i2) {
@@ -61618,10 +61618,10 @@ var require_printer2 = __commonJS({
61618
61618
  }
61619
61619
  }
61620
61620
  } else {
61621
- parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path2.map(print12, "specifiers")), shouldPrintSpaces ? " }" : "}");
61621
+ parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path2.map(print11, "specifiers")), shouldPrintSpaces ? " }" : "}");
61622
61622
  }
61623
61623
  if (decl.source) {
61624
- parts.push(" from ", path2.call(print12, "source"), maybePrintImportAssertions(path2, options, print12));
61624
+ parts.push(" from ", path2.call(print11, "source"), maybePrintImportAssertions(path2, options, print11));
61625
61625
  }
61626
61626
  }
61627
61627
  var lines = (0, lines_1.concat)(parts);
@@ -61639,7 +61639,7 @@ var require_printer2 = __commonJS({
61639
61639
  }
61640
61640
  return (0, lines_1.concat)(parts);
61641
61641
  }
61642
- function printVariance(path2, print12) {
61642
+ function printVariance(path2, print11) {
61643
61643
  return path2.call(function(variancePath) {
61644
61644
  var value = variancePath.getValue();
61645
61645
  if (value) {
@@ -61649,7 +61649,7 @@ var require_printer2 = __commonJS({
61649
61649
  if (value === "minus") {
61650
61650
  return (0, lines_1.fromString)("-");
61651
61651
  }
61652
- return print12(variancePath);
61652
+ return print11(variancePath);
61653
61653
  }
61654
61654
  return (0, lines_1.fromString)("");
61655
61655
  }, "variance");
@@ -61736,10 +61736,10 @@ var require_main2 = __commonJS({
61736
61736
  Object.defineProperty(exports, "visit", { enumerable: true, get: function() {
61737
61737
  return ast_types_1.visit;
61738
61738
  } });
61739
- function print12(node, options) {
61739
+ function print11(node, options) {
61740
61740
  return new printer_1.Printer(options).print(node);
61741
61741
  }
61742
- exports.print = print12;
61742
+ exports.print = print11;
61743
61743
  function prettyPrint3(node, options) {
61744
61744
  return new printer_1.Printer(options).printGenerically(node);
61745
61745
  }
@@ -61763,7 +61763,7 @@ var require_main2 = __commonJS({
61763
61763
  function runString(code, transformer, options) {
61764
61764
  var writeback = options && options.writeback || defaultWriteback;
61765
61765
  transformer((0, parser_1.parse)(code, options), function(node) {
61766
- writeback(print12(node, options).code);
61766
+ writeback(print11(node, options).code);
61767
61767
  });
61768
61768
  }
61769
61769
  }
@@ -67369,7 +67369,7 @@ async function getConfig({
67369
67369
  }
67370
67370
  }
67371
67371
  _config.plugins = orderedPlugins(plugins);
67372
- await Promise.all(_config.plugins.map((plugin2) => plugin2.after_load?.({ config: _config })));
67372
+ await Promise.all(_config.plugins.map((plugin2) => plugin2.afterLoad?.({ config: _config })));
67373
67373
  resolve2(_config);
67374
67374
  return _config;
67375
67375
  } catch (e2) {
@@ -67516,8 +67516,8 @@ function getRootType(type) {
67516
67516
  function hashDocument({
67517
67517
  document
67518
67518
  }) {
67519
- const docString = typeof document === "string" ? document : graphql3.print(document.document);
67520
- return import_crypto.default.createHash("sha256").update(docString).digest("hex");
67519
+ const docString = typeof document === "string" ? document : document.artifact?.raw;
67520
+ return import_crypto.default.createHash("sha256").update(docString ?? "").digest("hex");
67521
67521
  }
67522
67522
  function parentTypeFromAncestors(schema, filepath, ancestors) {
67523
67523
  const parents = [...ancestors];
@@ -68282,7 +68282,7 @@ async function fragmentVariables(config4, documents) {
68282
68282
  name: "generated::fragmentVariables",
68283
68283
  kind: "HoudiniFragment" /* Fragment */,
68284
68284
  document: doc,
68285
- originalDocument: doc,
68285
+ originalParsed: doc,
68286
68286
  generateStore: false,
68287
68287
  generateArtifact: false,
68288
68288
  filename: "generated::fragmentVariables",
@@ -69211,7 +69211,7 @@ async function paginate(config4, documents) {
69211
69211
  filename: doc.filename,
69212
69212
  name: refetchQueryName,
69213
69213
  document: queryDoc,
69214
- originalDocument: queryDoc,
69214
+ originalParsed: queryDoc,
69215
69215
  generateArtifact: true,
69216
69216
  generateStore: false,
69217
69217
  refetch: doc.refetch,
@@ -69631,7 +69631,7 @@ async function addListFragments(config4, documents) {
69631
69631
  generateArtifact: false,
69632
69632
  generateStore: false,
69633
69633
  document: generatedDoc,
69634
- originalDocument: generatedDoc,
69634
+ originalParsed: generatedDoc,
69635
69635
  filename: "generated::lists",
69636
69636
  originalString: "",
69637
69637
  artifact: null
@@ -70159,11 +70159,11 @@ function artifactGenerator(stats) {
70159
70159
  };
70160
70160
  const plugin_data = config4.plugins.reduce(
70161
70161
  (prev, plugin2) => {
70162
- if (!plugin2.artifact_data) {
70162
+ if (!plugin2.artifactData) {
70163
70163
  return prev;
70164
70164
  }
70165
70165
  const result = { ...prev };
70166
- const dataToAdd = plugin2.artifact_data({ config: config4, document: doc }) ?? {};
70166
+ const dataToAdd = plugin2.artifactData({ config: config4, document: doc }) ?? {};
70167
70167
  if (Object.keys(dataToAdd).length > 0) {
70168
70168
  result[plugin2.name] = dataToAdd;
70169
70169
  }
@@ -70208,10 +70208,10 @@ function artifactGenerator(stats) {
70208
70208
  }
70209
70209
  doc.artifact = artifact;
70210
70210
  for (const plugin2 of config4.plugins) {
70211
- if (!plugin2.artifact_end) {
70211
+ if (!plugin2.artifactEnd) {
70212
70212
  continue;
70213
70213
  }
70214
- plugin2.artifact_end({ config: config4, document: doc });
70214
+ plugin2.artifactEnd({ config: config4, document: doc });
70215
70215
  }
70216
70216
  const file = AST5.program([
70217
70217
  moduleExport(config4, "default", serializeValue(artifact)),
@@ -70251,18 +70251,18 @@ async function generateGraphqlReturnTypes(config4, docs) {
70251
70251
  const indexPath = path_exports.join(config4.runtimeDirectory, "index.d.ts");
70252
70252
  const fileContent = await fs_exports.readFile(indexPath) || "";
70253
70253
  const contents = await parseJS(fileContent);
70254
- const graphql_tag_return = config4.plugins.find(
70255
- (plugin2) => plugin2.graphql_tag_return
70256
- )?.graphql_tag_return;
70257
- if (!graphql_tag_return || !contents) {
70254
+ const graphqlTagReturn = config4.plugins.find(
70255
+ (plugin2) => plugin2.graphqlTagReturn
70256
+ )?.graphqlTagReturn;
70257
+ if (!graphqlTagReturn || !contents) {
70258
70258
  return fileContent;
70259
70259
  }
70260
70260
  const overloaded_returns = {};
70261
70261
  for (const doc of docs) {
70262
- const return_value = graphql_tag_return({
70262
+ const return_value = graphqlTagReturn({
70263
70263
  config: config4,
70264
70264
  document: doc,
70265
- ensure_import({ identifier, module: module2 }) {
70265
+ ensureImport({ identifier, module: module2 }) {
70266
70266
  ensureImports({
70267
70267
  config: config4,
70268
70268
  body: contents.script.body,
@@ -70310,18 +70310,18 @@ async function injectPlugins({
70310
70310
  importStatement,
70311
70311
  exportStatement
70312
70312
  }) {
70313
- const client_plugins = config4.plugins.filter((plugin2) => plugin2.client_plugins).reduce((acc, plugin2) => {
70314
- let plugins = plugin2.client_plugins;
70313
+ const clientPlugins = config4.plugins.filter((plugin2) => plugin2.clientPlugins).reduce((acc, plugin2) => {
70314
+ let plugins = plugin2.clientPlugins;
70315
70315
  if (typeof plugins === "function") {
70316
70316
  plugins = plugins(config4, config4.pluginConfig(plugin2.name));
70317
70317
  }
70318
70318
  return [...acc, ...Object.entries(plugins)];
70319
70319
  }, []);
70320
- return client_plugins.length > 0 ? `
70321
- ${client_plugins.map((plugin2, i2) => importStatement(plugin2[0], `plugin${i2}`))}
70320
+ return clientPlugins.length > 0 ? `
70321
+ ${clientPlugins.map((plugin2, i2) => importStatement(plugin2[0], `plugin${i2}`))}
70322
70322
 
70323
70323
  const plugins = [
70324
- ${client_plugins.map((plugin2, i2) => {
70324
+ ${clientPlugins.map((plugin2, i2) => {
70325
70325
  const suffix = `(${JSON.stringify(plugin2[1])})`;
70326
70326
  return `plugin${i2}${suffix}`;
70327
70327
  }).join(",\n")}
@@ -70365,18 +70365,18 @@ ${exportStatement("config")}
70365
70365
  },
70366
70366
  [path_exports.join(config4.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config4, content, importStatement, exportStatement })
70367
70367
  }),
70368
- ...config4.plugins.filter((plugin2) => plugin2.include_runtime).map((plugin2) => generatePluginRuntime(config4, plugin2)),
70368
+ ...config4.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config4, plugin2)),
70369
70369
  generatePluginIndex({ config: config4, exportStatement: exportStar })
70370
70370
  ]);
70371
70371
  await generateGraphqlReturnTypes(config4, docs);
70372
70372
  }
70373
70373
  async function generatePluginRuntime(config4, plugin2) {
70374
- if (houdini_mode.is_testing || !plugin2.include_runtime) {
70374
+ if (houdini_mode.is_testing || !plugin2.includeRuntime) {
70375
70375
  return;
70376
70376
  }
70377
70377
  const runtime_path = path_exports.join(
70378
70378
  path_exports.dirname(plugin2.filepath),
70379
- typeof plugin2.include_runtime === "string" ? plugin2.include_runtime : plugin2.include_runtime[config4.module]
70379
+ typeof plugin2.includeRuntime === "string" ? plugin2.includeRuntime : plugin2.includeRuntime[config4.module]
70380
70380
  );
70381
70381
  try {
70382
70382
  await fs_exports.stat(runtime_path);
@@ -70392,7 +70392,7 @@ async function generatePluginRuntime(config4, plugin2) {
70392
70392
  runtime_path,
70393
70393
  pluginDir,
70394
70394
  Object.fromEntries(
70395
- Object.entries(plugin2.transform_runtime ?? {}).map(([key, value]) => [
70395
+ Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
70396
70396
  path_exports.join(runtime_path, key),
70397
70397
  (content) => value({ config: config4, content })
70398
70398
  ])
@@ -70786,7 +70786,7 @@ async function generateDocumentTypes(config4, docs) {
70786
70786
  const typePaths = [];
70787
70787
  const fragmentDefinitions = {};
70788
70788
  for (const document of docs) {
70789
- for (const defn of document.originalDocument.definitions.filter(
70789
+ for (const defn of document.originalParsed.definitions.filter(
70790
70790
  ({ kind }) => kind === "FragmentDefinition"
70791
70791
  )) {
70792
70792
  fragmentDefinitions[defn.name.value] = defn;
@@ -70794,47 +70794,54 @@ async function generateDocumentTypes(config4, docs) {
70794
70794
  }
70795
70795
  const missingScalars = /* @__PURE__ */ new Set();
70796
70796
  await Promise.all(
70797
- docs.map(async ({ originalDocument, name, filename, generateArtifact }) => {
70798
- if (!generateArtifact) {
70799
- return;
70800
- }
70801
- const typeDefPath = config4.artifactTypePath(originalDocument);
70802
- const program = AST11.program([]);
70803
- const visitedTypes = /* @__PURE__ */ new Set();
70804
- let definition = originalDocument.definitions.find(
70805
- (def) => (def.kind === "OperationDefinition" || def.kind === "FragmentDefinition") && def.name?.value === name
70806
- );
70807
- const selections = flattenSelections({
70808
- config: config4,
70809
- filepath: filename,
70810
- selections: definition.selectionSet.selections,
70811
- fragmentDefinitions,
70812
- applyFragments: definition.kind === "OperationDefinition"
70813
- });
70814
- if (definition?.kind === "OperationDefinition") {
70815
- await generateOperationTypeDefs(
70816
- config4,
70817
- filename,
70818
- program.body,
70819
- definition,
70820
- selections,
70821
- visitedTypes,
70822
- missingScalars
70823
- );
70824
- } else {
70825
- await generateFragmentTypeDefs(
70826
- config4,
70827
- filename,
70828
- program.body,
70829
- selections,
70830
- originalDocument.definitions,
70831
- visitedTypes,
70832
- missingScalars
70797
+ docs.map(
70798
+ async ({
70799
+ originalParsed: originalDocument,
70800
+ name,
70801
+ filename,
70802
+ generateArtifact
70803
+ }) => {
70804
+ if (!generateArtifact) {
70805
+ return;
70806
+ }
70807
+ const typeDefPath = config4.artifactTypePath(originalDocument);
70808
+ const program = AST11.program([]);
70809
+ const visitedTypes = /* @__PURE__ */ new Set();
70810
+ let definition = originalDocument.definitions.find(
70811
+ (def) => (def.kind === "OperationDefinition" || def.kind === "FragmentDefinition") && def.name?.value === name
70833
70812
  );
70813
+ const selections = flattenSelections({
70814
+ config: config4,
70815
+ filepath: filename,
70816
+ selections: definition.selectionSet.selections,
70817
+ fragmentDefinitions,
70818
+ applyFragments: definition.kind === "OperationDefinition"
70819
+ });
70820
+ if (definition?.kind === "OperationDefinition") {
70821
+ await generateOperationTypeDefs(
70822
+ config4,
70823
+ filename,
70824
+ program.body,
70825
+ definition,
70826
+ selections,
70827
+ visitedTypes,
70828
+ missingScalars
70829
+ );
70830
+ } else {
70831
+ await generateFragmentTypeDefs(
70832
+ config4,
70833
+ filename,
70834
+ program.body,
70835
+ selections,
70836
+ originalDocument.definitions,
70837
+ visitedTypes,
70838
+ missingScalars
70839
+ );
70840
+ }
70841
+ await fs_exports.writeFile(typeDefPath, recast11.print(program).code);
70842
+ typePaths.push(typeDefPath);
70834
70843
  }
70835
- await fs_exports.writeFile(typeDefPath, recast11.print(program).code);
70836
- typePaths.push(typeDefPath);
70837
- })
70844
+ )
70838
70845
  );
70839
70846
  const typeIndex = AST11.program(
70840
70847
  typePaths.sort((a, b) => a.localeCompare(b)).map((typePath) => {
@@ -70849,28 +70856,28 @@ async function generateDocumentTypes(config4, docs) {
70849
70856
  AST11.exportAllDeclaration(AST11.literal("./graphql"), null)
70850
70857
  ])
70851
70858
  );
70852
- const export_default_as = ({ module: module2, as }) => `
70859
+ const exportDefaultAs = ({ module: module2, as }) => `
70853
70860
  export { default as ${as} } from "${module2}"
70854
70861
  `;
70855
- const export_star_from = ({ module: module2 }) => `
70862
+ const exportStarFrom2 = ({ module: module2 }) => `
70856
70863
  export * from "${module2}"
70857
70864
  `;
70858
70865
  let indexContent = recast11.print(typeIndex).code;
70859
70866
  for (const plugin2 of config4.plugins) {
70860
- if (!plugin2.index_file) {
70867
+ if (!plugin2.indexFile) {
70861
70868
  continue;
70862
70869
  }
70863
- indexContent = plugin2.index_file({
70870
+ indexContent = plugin2.indexFile({
70864
70871
  config: config4,
70865
70872
  content: indexContent,
70866
- export_default_as,
70867
- export_star_from,
70868
- plugin_root: config4.pluginDirectory(plugin2.name),
70873
+ exportDefaultAs,
70874
+ exportStarFrom: exportStarFrom2,
70875
+ pluginRoot: config4.pluginDirectory(plugin2.name),
70869
70876
  typedef: true,
70870
70877
  documents: docs
70871
70878
  });
70872
- if (plugin2.include_runtime) {
70873
- indexContent += export_star_from({
70879
+ if (plugin2.includeRuntime) {
70880
+ indexContent += exportStarFrom2({
70874
70881
  module: "./" + path_exports.relative(config4.rootDir, config4.pluginRuntimeDirectory(plugin2.name))
70875
70882
  });
70876
70883
  }
@@ -71117,10 +71124,10 @@ var graphql19 = __toESM(require_graphql2(), 1);
71117
71124
  var recast12 = __toESM(require_main2(), 1);
71118
71125
  var AST12 = recast12.types.builders;
71119
71126
  async function imperativeCacheTypef(config4, docs) {
71120
- const returnType = (doc) => config4.plugins.find((plugin2) => plugin2.graphql_tag_return)?.graphql_tag_return?.({
71127
+ const returnType = (doc) => config4.plugins.find((plugin2) => plugin2.graphqlTagReturn)?.graphqlTagReturn?.({
71121
71128
  config: config4,
71122
71129
  document: doc,
71123
- ensure_import({ identifier, module: module2 }) {
71130
+ ensureImport({ identifier, module: module2 }) {
71124
71131
  ensureImports({
71125
71132
  config: config4,
71126
71133
  body,
@@ -71491,27 +71498,30 @@ async function persistOutputGenerator(config4, docs) {
71491
71498
  console.log("Can only write the queryMap to a json file");
71492
71499
  return;
71493
71500
  }
71494
- const queryMap = docs.reduce((acc, { document, generateArtifact }) => {
71495
- if (!generateArtifact) {
71496
- return acc;
71497
- }
71498
- let rawString = graphql20.print(
71499
- graphql20.visit(document, {
71500
- Directive(node) {
71501
- if (config4.isInternalDirective(node.name.value)) {
71502
- return null;
71501
+ const queryMap = docs.reduce(
71502
+ (acc, { document, generateArtifact }) => {
71503
+ if (!generateArtifact) {
71504
+ return acc;
71505
+ }
71506
+ let rawString = graphql20.print(
71507
+ graphql20.visit(document, {
71508
+ Directive(node) {
71509
+ if (config4.isInternalDirective(node.name.value)) {
71510
+ return null;
71511
+ }
71503
71512
  }
71504
- }
71505
- })
71506
- );
71507
- const operations = document.definitions.filter(
71508
- ({ kind }) => kind === graphql20.Kind.OPERATION_DEFINITION
71509
- );
71510
- if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
71511
- acc[hashDocument({ config: config4, document: rawString })] = rawString;
71512
- }
71513
- return acc;
71514
- }, {});
71513
+ })
71514
+ );
71515
+ const operations = document.definitions.filter(
71516
+ ({ kind }) => kind === graphql20.Kind.OPERATION_DEFINITION
71517
+ );
71518
+ if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
71519
+ acc[hashDocument({ config: config4, document: rawString })] = rawString;
71520
+ }
71521
+ return acc;
71522
+ },
71523
+ {}
71524
+ );
71515
71525
  if (Object.keys(queryMap).length === 0)
71516
71526
  return;
71517
71527
  await fs_exports.writeFile(config4.persistedQueryPath, JSON.stringify(queryMap, null, 4));
@@ -71580,32 +71590,32 @@ async function writeIndexFile2(config4, docs) {
71580
71590
  const definitionsDir = relative2(config4.definitionsDirectory);
71581
71591
  const cjs = config4.module === "commonjs";
71582
71592
  let body = cjs ? cjsIndexFilePreamble : "";
71583
- const export_star_from = ({ module: module2 }) => "\n" + (cjs ? exportStarFrom(module2) : `export * from "${module2}"`) + "\n";
71584
- const export_default_as = ({ module: module2, as }) => "\n" + (cjs ? exportDefaultFrom(module2, as) : `export { default as ${as} } from "${module2}"`) + "\n";
71593
+ const exportStar = ({ module: module2 }) => "\n" + (cjs ? exportStarFrom(module2) : `export * from "${module2}"`) + "\n";
71594
+ const exportDefaultAs = ({ module: module2, as }) => "\n" + (cjs ? exportDefaultFrom(module2, as) : `export { default as ${as} } from "${module2}"`) + "\n";
71585
71595
  body += [
71586
- export_star_from({ module: "./" + path_exports.join(runtimeDir, "client") }),
71587
- export_star_from({ module: runtimeDir }),
71588
- export_star_from({ module: artifactDir }),
71589
- export_star_from({ module: definitionsDir })
71596
+ exportStar({ module: "./" + path_exports.join(runtimeDir, "client") }),
71597
+ exportStar({ module: runtimeDir }),
71598
+ exportStar({ module: artifactDir }),
71599
+ exportStar({ module: definitionsDir })
71590
71600
  ].join("");
71591
71601
  for (const plugin2 of config4.plugins) {
71592
- if (plugin2.index_file) {
71593
- body = plugin2.index_file({
71602
+ if (plugin2.indexFile) {
71603
+ body = plugin2.indexFile({
71594
71604
  config: config4,
71595
71605
  content: body,
71596
- export_default_as,
71597
- export_star_from,
71598
- plugin_root: config4.pluginDirectory(plugin2.name),
71606
+ exportDefaultAs,
71607
+ exportStarFrom: exportStar,
71608
+ pluginRoot: config4.pluginDirectory(plugin2.name),
71599
71609
  typedef: false,
71600
71610
  documents: docs
71601
71611
  });
71602
71612
  }
71603
- if (plugin2.include_runtime) {
71604
- body += export_star_from({
71613
+ if (plugin2.includeRuntime) {
71614
+ body += exportStar({
71605
71615
  module: relative2(config4.pluginRuntimeDirectory(plugin2.name))
71606
71616
  });
71607
71617
  }
71608
- if (!plugin2.index_file) {
71618
+ if (!plugin2.indexFile) {
71609
71619
  continue;
71610
71620
  }
71611
71621
  }
@@ -72653,10 +72663,10 @@ async function runPipeline2(config4, docs) {
72653
72663
  deleted: []
72654
72664
  };
72655
72665
  const generatePlugins = config4.plugins.filter((plugin2) => plugin2.generate);
72656
- const after_validate = config4.plugins.filter((plugin2) => plugin2.after_validate).map((plugin2) => plugin2.after_validate);
72666
+ const afterValidate = config4.plugins.filter((plugin2) => plugin2.afterValidate).map((plugin2) => plugin2.afterValidate);
72657
72667
  const validate2 = config4.plugins.filter((plugin2) => plugin2.validate).map((plugin2) => plugin2.validate);
72658
- const before_validate = config4.plugins.filter((plugin2) => plugin2.before_validate).map((plugin2) => plugin2.before_validate);
72659
- const transform_before_generate = config4.plugins.filter((plugin2) => plugin2.transform_before_generate).map((plugin2) => plugin2.transform_before_generate);
72668
+ const beforeValidate = config4.plugins.filter((plugin2) => plugin2.beforeValidate).map((plugin2) => plugin2.beforeValidate);
72669
+ const beforeGenerate = config4.plugins.filter((plugin2) => plugin2.beforeGenerate).map((plugin2) => plugin2.beforeGenerate);
72660
72670
  const wrapHook = (hooks) => hooks.map(
72661
72671
  (fn) => (config5, docs2) => fn({
72662
72672
  config: config5,
@@ -72669,20 +72679,20 @@ async function runPipeline2(config4, docs) {
72669
72679
  config4,
72670
72680
  [
72671
72681
  graphqlExtensions,
72672
- ...wrapHook(before_validate),
72682
+ ...wrapHook(beforeValidate),
72673
72683
  typeCheck,
72674
72684
  uniqueDocumentNames,
72675
72685
  noIDAlias,
72676
72686
  validatePlugins,
72677
72687
  ...wrapHook(validate2),
72678
- ...wrapHook(after_validate),
72688
+ ...wrapHook(afterValidate),
72679
72689
  addID,
72680
72690
  addTypename,
72681
72691
  addListFragments,
72682
72692
  paginate,
72683
72693
  fragmentVariables,
72684
72694
  includeFragmentDefinitions,
72685
- ...wrapHook(transform_before_generate),
72695
+ ...wrapHook(beforeGenerate),
72686
72696
  artifactGenerator(artifactStats),
72687
72697
  runtimeGenerator,
72688
72698
  writeIndexFile2,
@@ -72693,14 +72703,13 @@ async function runPipeline2(config4, docs) {
72693
72703
  (plugin2) => async (config5, docs2) => await plugin2.generate({
72694
72704
  config: config5,
72695
72705
  documents: docs2,
72696
- plugin_root: config5.pluginDirectory(plugin2.name)
72706
+ pluginRoot: config5.pluginDirectory(plugin2.name)
72697
72707
  })
72698
72708
  )
72699
72709
  ],
72700
72710
  docs
72701
72711
  );
72702
72712
  } catch (e2) {
72703
- console.log(e2);
72704
72713
  error = e2;
72705
72714
  }
72706
72715
  const unchanged = artifactStats.total.length - artifactStats.changed.length - artifactStats.new.length - artifactStats.deleted.length;
@@ -72750,9 +72759,9 @@ async function collectDocuments(config4) {
72750
72759
  ".ts": []
72751
72760
  };
72752
72761
  for (const plugin2 of config4.plugins) {
72753
- if (plugin2.extensions && plugin2.extract_documents) {
72762
+ if (plugin2.extensions && plugin2.extractDocuments) {
72754
72763
  for (const extension of plugin2.extensions) {
72755
- extractors[extension] = [...extractors[extension] || [], plugin2.extract_documents];
72764
+ extractors[extension] = [...extractors[extension] || [], plugin2.extractDocuments];
72756
72765
  }
72757
72766
  }
72758
72767
  }
@@ -72851,7 +72860,7 @@ async function processGraphQLDocument(config4, filepath, document) {
72851
72860
  kind,
72852
72861
  document: parsedDoc,
72853
72862
  filename: filepath,
72854
- originalDocument: parsedDoc,
72863
+ originalParsed: parsedDoc,
72855
72864
  generateArtifact: true,
72856
72865
  generateStore: true,
72857
72866
  originalString: document,
@@ -72939,10 +72948,10 @@ function Plugin(opts = {}) {
72939
72948
  filepath
72940
72949
  };
72941
72950
  for (const plugin2 of config3.plugins) {
72942
- if (!plugin2.transform_file) {
72951
+ if (!plugin2.transformFile) {
72943
72952
  continue;
72944
72953
  }
72945
- const { code: code2 } = await plugin2.transform_file(ctx);
72954
+ const { code: code2 } = await plugin2.transformFile(ctx);
72946
72955
  ctx.content = code2;
72947
72956
  }
72948
72957
  return { code: ctx.content };