houdini 1.2.44 → 1.2.46

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 (55) hide show
  1. package/build/cmd-cjs/index.js +664 -848
  2. package/build/cmd-esm/index.js +514 -698
  3. package/build/codegen/generators/comments/jsdoc.d.ts +2 -0
  4. package/build/codegen-cjs/index.js +662 -846
  5. package/build/codegen-esm/index.js +512 -696
  6. package/build/lib/graphql.d.ts +1 -1
  7. package/build/lib/index.d.ts +1 -0
  8. package/build/lib/typescript.d.ts +19 -0
  9. package/build/lib-cjs/index.js +726 -467
  10. package/build/lib-esm/index.js +720 -467
  11. package/build/runtime/client/index.d.ts +7 -1
  12. package/build/runtime/client/plugins/fragment.d.ts +2 -2
  13. package/build/runtime/client/plugins/mutation.d.ts +2 -1
  14. package/build/runtime/client/plugins/query.d.ts +2 -2
  15. package/build/runtime/lib/scalars.d.ts +1 -1
  16. package/build/runtime/lib/types.d.ts +13 -2
  17. package/build/runtime/router/match.d.ts +3 -2
  18. package/build/runtime/router/types.d.ts +3 -1
  19. package/build/runtime-cjs/client/index.d.ts +7 -1
  20. package/build/runtime-cjs/client/index.js +26 -11
  21. package/build/runtime-cjs/client/plugins/fragment.d.ts +2 -2
  22. package/build/runtime-cjs/client/plugins/fragment.js +4 -11
  23. package/build/runtime-cjs/client/plugins/mutation.d.ts +2 -1
  24. package/build/runtime-cjs/client/plugins/mutation.js +8 -15
  25. package/build/runtime-cjs/client/plugins/query.d.ts +2 -2
  26. package/build/runtime-cjs/client/plugins/query.js +4 -11
  27. package/build/runtime-cjs/lib/scalars.d.ts +1 -1
  28. package/build/runtime-cjs/lib/scalars.js +4 -0
  29. package/build/runtime-cjs/lib/types.d.ts +13 -2
  30. package/build/runtime-cjs/router/match.d.ts +3 -2
  31. package/build/runtime-cjs/router/match.js +11 -2
  32. package/build/runtime-cjs/router/server.js +1 -1
  33. package/build/runtime-cjs/router/types.d.ts +3 -1
  34. package/build/runtime-esm/client/index.d.ts +7 -1
  35. package/build/runtime-esm/client/index.js +26 -11
  36. package/build/runtime-esm/client/plugins/fragment.d.ts +2 -2
  37. package/build/runtime-esm/client/plugins/fragment.js +1 -2
  38. package/build/runtime-esm/client/plugins/mutation.d.ts +2 -1
  39. package/build/runtime-esm/client/plugins/mutation.js +1 -2
  40. package/build/runtime-esm/client/plugins/query.d.ts +2 -2
  41. package/build/runtime-esm/client/plugins/query.js +1 -2
  42. package/build/runtime-esm/lib/scalars.d.ts +1 -1
  43. package/build/runtime-esm/lib/scalars.js +6 -0
  44. package/build/runtime-esm/lib/types.d.ts +13 -2
  45. package/build/runtime-esm/router/match.d.ts +3 -2
  46. package/build/runtime-esm/router/match.js +11 -2
  47. package/build/runtime-esm/router/server.js +1 -1
  48. package/build/runtime-esm/router/types.d.ts +3 -1
  49. package/build/test-cjs/index.js +677 -844
  50. package/build/test-esm/index.js +527 -694
  51. package/build/vite-cjs/index.js +786 -857
  52. package/build/vite-esm/index.js +636 -707
  53. package/package.json +1 -1
  54. package/build/codegen/generators/typescript/typeReference.d.ts +0 -8
  55. package/build/codegen/generators/typescript/types.d.ts +0 -10
@@ -13560,14 +13560,14 @@ var require_lib3 = __commonJS({
13560
13560
  this.preserveSpace = !!preserveSpace;
13561
13561
  }
13562
13562
  };
13563
- var types4 = {
13563
+ var types5 = {
13564
13564
  brace: new TokContext("{"),
13565
13565
  j_oTag: new TokContext("<tag"),
13566
13566
  j_cTag: new TokContext("</tag"),
13567
13567
  j_expr: new TokContext("<tag>...</tag>", true)
13568
13568
  };
13569
13569
  {
13570
- types4.template = new TokContext("`", true);
13570
+ types5.template = new TokContext("`", true);
13571
13571
  }
13572
13572
  var beforeExpr = true;
13573
13573
  var startsExpr = true;
@@ -14105,17 +14105,17 @@ var require_lib3 = __commonJS({
14105
14105
  context.pop();
14106
14106
  };
14107
14107
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
14108
- context.push(types4.brace);
14108
+ context.push(types5.brace);
14109
14109
  };
14110
14110
  tokenTypes[22].updateContext = (context) => {
14111
- if (context[context.length - 1] === types4.template) {
14111
+ if (context[context.length - 1] === types5.template) {
14112
14112
  context.pop();
14113
14113
  } else {
14114
- context.push(types4.template);
14114
+ context.push(types5.template);
14115
14115
  }
14116
14116
  };
14117
14117
  tokenTypes[142].updateContext = (context) => {
14118
- context.push(types4.j_expr, types4.j_oTag);
14118
+ context.push(types5.j_expr, types5.j_oTag);
14119
14119
  };
14120
14120
  }
14121
14121
  var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
@@ -14675,7 +14675,7 @@ var require_lib3 = __commonJS({
14675
14675
  this.end = 0;
14676
14676
  this.lastTokEndLoc = null;
14677
14677
  this.lastTokStartLoc = null;
14678
- this.context = [types4.brace];
14678
+ this.context = [types5.brace];
14679
14679
  this.firstInvalidTemplateEscapePos = null;
14680
14680
  this.strictErrors = /* @__PURE__ */ new Map();
14681
14681
  this.tokensLength = 0;
@@ -18502,7 +18502,7 @@ var require_lib3 = __commonJS({
18502
18502
  context
18503
18503
  } = this.state;
18504
18504
  const currentContext = context[context.length - 1];
18505
- if (currentContext === types4.j_oTag || currentContext === types4.j_expr) {
18505
+ if (currentContext === types5.j_oTag || currentContext === types5.j_expr) {
18506
18506
  context.pop();
18507
18507
  }
18508
18508
  }
@@ -19524,9 +19524,9 @@ var require_lib3 = __commonJS({
19524
19524
  switch (this.state.type) {
19525
19525
  case 5:
19526
19526
  node = this.startNode();
19527
- this.setContext(types4.brace);
19527
+ this.setContext(types5.brace);
19528
19528
  this.next();
19529
- node = this.jsxParseExpressionContainer(node, types4.j_oTag);
19529
+ node = this.jsxParseExpressionContainer(node, types5.j_oTag);
19530
19530
  if (node.expression.type === "JSXEmptyExpression") {
19531
19531
  this.raise(JsxErrors.AttributeIsEmpty, node);
19532
19532
  }
@@ -19545,7 +19545,7 @@ var require_lib3 = __commonJS({
19545
19545
  jsxParseSpreadChild(node) {
19546
19546
  this.next();
19547
19547
  node.expression = this.parseExpression();
19548
- this.setContext(types4.j_expr);
19548
+ this.setContext(types5.j_expr);
19549
19549
  this.state.canStartJSXElement = true;
19550
19550
  this.expect(8);
19551
19551
  return this.finishNode(node, "JSXSpreadChild");
@@ -19565,11 +19565,11 @@ var require_lib3 = __commonJS({
19565
19565
  jsxParseAttribute() {
19566
19566
  const node = this.startNode();
19567
19567
  if (this.match(5)) {
19568
- this.setContext(types4.brace);
19568
+ this.setContext(types5.brace);
19569
19569
  this.next();
19570
19570
  this.expect(21);
19571
19571
  node.argument = this.parseMaybeAssignAllowIn();
19572
- this.setContext(types4.j_oTag);
19572
+ this.setContext(types5.j_oTag);
19573
19573
  this.state.canStartJSXElement = true;
19574
19574
  this.expect(8);
19575
19575
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -19628,12 +19628,12 @@ var require_lib3 = __commonJS({
19628
19628
  break;
19629
19629
  case 5: {
19630
19630
  const node2 = this.startNode();
19631
- this.setContext(types4.brace);
19631
+ this.setContext(types5.brace);
19632
19632
  this.next();
19633
19633
  if (this.match(21)) {
19634
19634
  children.push(this.jsxParseSpreadChild(node2));
19635
19635
  } else {
19636
- children.push(this.jsxParseExpressionContainer(node2, types4.j_expr));
19636
+ children.push(this.jsxParseExpressionContainer(node2, types5.j_expr));
19637
19637
  }
19638
19638
  break;
19639
19639
  }
@@ -19698,11 +19698,11 @@ var require_lib3 = __commonJS({
19698
19698
  }
19699
19699
  getTokenFromCode(code2) {
19700
19700
  const context = this.curContext();
19701
- if (context === types4.j_expr) {
19701
+ if (context === types5.j_expr) {
19702
19702
  this.jsxReadToken();
19703
19703
  return;
19704
19704
  }
19705
- if (context === types4.j_oTag || context === types4.j_cTag) {
19705
+ if (context === types5.j_oTag || context === types5.j_cTag) {
19706
19706
  if (isIdentifierStart(code2)) {
19707
19707
  this.jsxReadWord();
19708
19708
  return;
@@ -19712,7 +19712,7 @@ var require_lib3 = __commonJS({
19712
19712
  this.finishToken(143);
19713
19713
  return;
19714
19714
  }
19715
- if ((code2 === 34 || code2 === 39) && context === types4.j_oTag) {
19715
+ if ((code2 === 34 || code2 === 39) && context === types5.j_oTag) {
19716
19716
  this.jsxReadString(code2);
19717
19717
  return;
19718
19718
  }
@@ -19730,17 +19730,17 @@ var require_lib3 = __commonJS({
19730
19730
  type
19731
19731
  } = this.state;
19732
19732
  if (type === 56 && prevType === 142) {
19733
- context.splice(-2, 2, types4.j_cTag);
19733
+ context.splice(-2, 2, types5.j_cTag);
19734
19734
  this.state.canStartJSXElement = false;
19735
19735
  } else if (type === 142) {
19736
- context.push(types4.j_oTag);
19736
+ context.push(types5.j_oTag);
19737
19737
  } else if (type === 143) {
19738
19738
  const out = context[context.length - 1];
19739
- if (out === types4.j_oTag && prevType === 56 || out === types4.j_cTag) {
19739
+ if (out === types5.j_oTag && prevType === 56 || out === types5.j_cTag) {
19740
19740
  context.pop();
19741
- this.state.canStartJSXElement = context[context.length - 1] === types4.j_expr;
19741
+ this.state.canStartJSXElement = context[context.length - 1] === types5.j_expr;
19742
19742
  } else {
19743
- this.setContext(types4.j_expr);
19743
+ this.setContext(types5.j_expr);
19744
19744
  this.state.canStartJSXElement = true;
19745
19745
  }
19746
19746
  } else {
@@ -21115,14 +21115,14 @@ var require_lib3 = __commonJS({
21115
21115
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
21116
21116
  const node = this.startNode();
21117
21117
  const hasLeadingOperator = this.eat(operator);
21118
- const types5 = [];
21118
+ const types6 = [];
21119
21119
  do {
21120
- types5.push(parseConstituentType());
21120
+ types6.push(parseConstituentType());
21121
21121
  } while (this.eat(operator));
21122
- if (types5.length === 1 && !hasLeadingOperator) {
21123
- return types5[0];
21122
+ if (types6.length === 1 && !hasLeadingOperator) {
21123
+ return types6[0];
21124
21124
  }
21125
- node.types = types5;
21125
+ node.types = types6;
21126
21126
  return this.finishNode(node, kind);
21127
21127
  }
21128
21128
  tsParseIntersectionTypeOrHigher() {
@@ -21686,7 +21686,7 @@ var require_lib3 = __commonJS({
21686
21686
  }));
21687
21687
  if (node.params.length === 0) {
21688
21688
  this.raise(TSErrors.EmptyTypeArguments, node);
21689
- } else if (!this.state.inType && this.curContext() === types4.brace) {
21689
+ } else if (!this.state.inType && this.curContext() === types5.brace) {
21690
21690
  this.reScan_lt_gt();
21691
21691
  }
21692
21692
  this.expect(48);
@@ -22312,7 +22312,7 @@ var require_lib3 = __commonJS({
22312
22312
  context
22313
22313
  } = this.state;
22314
22314
  const currentContext = context[context.length - 1];
22315
- if (currentContext === types4.j_oTag || currentContext === types4.j_expr) {
22315
+ if (currentContext === types5.j_oTag || currentContext === types5.j_expr) {
22316
22316
  context.pop();
22317
22317
  }
22318
22318
  }
@@ -27444,9 +27444,9 @@ var require_shared = __commonJS({
27444
27444
  var tslib_1 = require_tslib();
27445
27445
  var types_1 = tslib_1.__importDefault(require_types());
27446
27446
  function default_1(fork) {
27447
- var types4 = fork.use(types_1.default);
27448
- var Type = types4.Type;
27449
- var builtin = types4.builtInTypes;
27447
+ var types5 = fork.use(types_1.default);
27448
+ var Type = types5.Type;
27449
+ var builtin = types5.builtInTypes;
27450
27450
  var isNumber = builtin.number;
27451
27451
  function geq(than) {
27452
27452
  return Type.from(function(value) {
@@ -27596,9 +27596,9 @@ var require_types = __commonJS({
27596
27596
  }(BaseType);
27597
27597
  var OrType = function(_super) {
27598
27598
  tslib_1.__extends(OrType2, _super);
27599
- function OrType2(types4) {
27599
+ function OrType2(types5) {
27600
27600
  var _this = _super.call(this) || this;
27601
- _this.types = types4;
27601
+ _this.types = types5;
27602
27602
  _this.kind = "OrType";
27603
27603
  return _this;
27604
27604
  }
@@ -27739,11 +27739,11 @@ var require_types = __commonJS({
27739
27739
  function typesPlugin(_fork) {
27740
27740
  var Type = {
27741
27741
  or: function() {
27742
- var types4 = [];
27742
+ var types5 = [];
27743
27743
  for (var _i = 0; _i < arguments.length; _i++) {
27744
- types4[_i] = arguments[_i];
27744
+ types5[_i] = arguments[_i];
27745
27745
  }
27746
- return new OrType(types4.map(function(type) {
27746
+ return new OrType(types5.map(function(type) {
27747
27747
  return Type.from(type);
27748
27748
  }));
27749
27749
  },
@@ -28188,9 +28188,9 @@ var require_path2 = __commonJS({
28188
28188
  var Op = Object.prototype;
28189
28189
  var hasOwn = Op.hasOwnProperty;
28190
28190
  function pathPlugin(fork) {
28191
- var types4 = fork.use(types_1.default);
28192
- var isArray = types4.builtInTypes.array;
28193
- var isNumber = types4.builtInTypes.number;
28191
+ var types5 = fork.use(types_1.default);
28192
+ var isArray = types5.builtInTypes.array;
28193
+ var isNumber = types5.builtInTypes.number;
28194
28194
  var Path = function Path2(value, parentPath, name) {
28195
28195
  if (!(this instanceof Path2)) {
28196
28196
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -28492,13 +28492,13 @@ var require_scope = __commonJS({
28492
28492
  var types_1 = tslib_1.__importDefault(require_types());
28493
28493
  var hasOwn = Object.prototype.hasOwnProperty;
28494
28494
  function scopePlugin(fork) {
28495
- var types4 = fork.use(types_1.default);
28496
- var Type = types4.Type;
28497
- var namedTypes = types4.namedTypes;
28495
+ var types5 = fork.use(types_1.default);
28496
+ var Type = types5.Type;
28497
+ var namedTypes = types5.namedTypes;
28498
28498
  var Node = namedTypes.Node;
28499
28499
  var Expression = namedTypes.Expression;
28500
- var isArray = types4.builtInTypes.array;
28501
- var b = types4.builders;
28500
+ var isArray = types5.builtInTypes.array;
28501
+ var b = types5.builders;
28502
28502
  var Scope = function Scope2(path3, parentScope) {
28503
28503
  if (!(this instanceof Scope2)) {
28504
28504
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -28561,7 +28561,7 @@ var require_scope = __commonJS({
28561
28561
  ++index;
28562
28562
  }
28563
28563
  var name = prefix + index;
28564
- return this.bindings[name] = types4.builders.identifier(name);
28564
+ return this.bindings[name] = types5.builders.identifier(name);
28565
28565
  };
28566
28566
  Sp.injectTemporary = function(identifier, init) {
28567
28567
  identifier || (identifier = this.declareTemporary());
@@ -28637,7 +28637,7 @@ var require_scope = __commonJS({
28637
28637
  bindings
28638
28638
  );
28639
28639
  } else if (Node.check(node) && !Expression.check(node)) {
28640
- types4.eachField(node, function(name, child) {
28640
+ types5.eachField(node, function(name, child) {
28641
28641
  var childPath = path3.get(name);
28642
28642
  if (!pathHasValue(childPath, child)) {
28643
28643
  throw new Error("");
@@ -28715,24 +28715,24 @@ var require_scope = __commonJS({
28715
28715
  addPattern(patternPath.get("argument"), bindings);
28716
28716
  }
28717
28717
  }
28718
- function addTypePattern(patternPath, types5) {
28718
+ function addTypePattern(patternPath, types6) {
28719
28719
  var pattern = patternPath.value;
28720
28720
  namedTypes.Pattern.assert(pattern);
28721
28721
  if (namedTypes.Identifier.check(pattern)) {
28722
- if (hasOwn.call(types5, pattern.name)) {
28723
- types5[pattern.name].push(patternPath);
28722
+ if (hasOwn.call(types6, pattern.name)) {
28723
+ types6[pattern.name].push(patternPath);
28724
28724
  } else {
28725
- types5[pattern.name] = [patternPath];
28725
+ types6[pattern.name] = [patternPath];
28726
28726
  }
28727
28727
  }
28728
28728
  }
28729
- function addTypeParameter(parameterPath, types5) {
28729
+ function addTypeParameter(parameterPath, types6) {
28730
28730
  var parameter = parameterPath.value;
28731
28731
  FlowOrTSTypeParameterType.assert(parameter);
28732
- if (hasOwn.call(types5, parameter.name)) {
28733
- types5[parameter.name].push(parameterPath);
28732
+ if (hasOwn.call(types6, parameter.name)) {
28733
+ types6[parameter.name].push(parameterPath);
28734
28734
  } else {
28735
- types5[parameter.name] = [parameterPath];
28735
+ types6[parameter.name] = [parameterPath];
28736
28736
  }
28737
28737
  }
28738
28738
  Sp.lookup = function(name) {
@@ -28773,11 +28773,11 @@ var require_node_path = __commonJS({
28773
28773
  var scope_1 = tslib_1.__importDefault(require_scope());
28774
28774
  var shared_1 = require_shared();
28775
28775
  function nodePathPlugin(fork) {
28776
- var types4 = fork.use(types_1.default);
28777
- var n = types4.namedTypes;
28778
- var b = types4.builders;
28779
- var isNumber = types4.builtInTypes.number;
28780
- var isArray = types4.builtInTypes.array;
28776
+ var types5 = fork.use(types_1.default);
28777
+ var n = types5.namedTypes;
28778
+ var b = types5.builders;
28779
+ var isNumber = types5.builtInTypes.number;
28780
+ var isArray = types5.builtInTypes.array;
28781
28781
  var Path = fork.use(path_1.default);
28782
28782
  var Scope = fork.use(scope_1.default);
28783
28783
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -28868,7 +28868,7 @@ var require_node_path = __commonJS({
28868
28868
  return scope || null;
28869
28869
  };
28870
28870
  NPp.getValueProperty = function(name) {
28871
- return types4.getFieldValue(this.value, name);
28871
+ return types5.getFieldValue(this.value, name);
28872
28872
  };
28873
28873
  NPp.needsParens = function(assumeExpressionContext) {
28874
28874
  var pp = this.parentPath;
@@ -29010,7 +29010,7 @@ var require_node_path = __commonJS({
29010
29010
  return node.some(containsCallExpression);
29011
29011
  }
29012
29012
  if (n.Node.check(node)) {
29013
- return types4.someField(node, function(_name, child) {
29013
+ return types5.someField(node, function(_name, child) {
29014
29014
  return containsCallExpression(child);
29015
29015
  });
29016
29016
  }
@@ -29131,11 +29131,11 @@ var require_path_visitor = __commonJS({
29131
29131
  var shared_1 = require_shared();
29132
29132
  var hasOwn = Object.prototype.hasOwnProperty;
29133
29133
  function pathVisitorPlugin(fork) {
29134
- var types4 = fork.use(types_1.default);
29134
+ var types5 = fork.use(types_1.default);
29135
29135
  var NodePath = fork.use(node_path_1.default);
29136
- var isArray = types4.builtInTypes.array;
29137
- var isObject2 = types4.builtInTypes.object;
29138
- var isFunction = types4.builtInTypes.function;
29136
+ var isArray = types5.builtInTypes.array;
29137
+ var isObject2 = types5.builtInTypes.object;
29138
+ var isFunction = types5.builtInTypes.function;
29139
29139
  var undefined2;
29140
29140
  var PathVisitor = function PathVisitor2() {
29141
29141
  if (!(this instanceof PathVisitor2)) {
@@ -29155,7 +29155,7 @@ var require_path_visitor = __commonJS({
29155
29155
  typeNames[methodName.slice("visit".length)] = true;
29156
29156
  }
29157
29157
  }
29158
- var supertypeTable = types4.computeSupertypeLookupTable(typeNames);
29158
+ var supertypeTable = types5.computeSupertypeLookupTable(typeNames);
29159
29159
  var methodNameTable = /* @__PURE__ */ Object.create(null);
29160
29160
  var typeNameKeys = Object.keys(supertypeTable);
29161
29161
  var typeNameCount = typeNameKeys.length;
@@ -29274,7 +29274,7 @@ var require_path_visitor = __commonJS({
29274
29274
  path3.each(visitor.visitWithoutReset, visitor);
29275
29275
  } else if (!isObject2.check(value)) {
29276
29276
  } else {
29277
- var childNames = types4.getFieldNames(value);
29277
+ var childNames = types5.getFieldNames(value);
29278
29278
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
29279
29279
  childNames.push("comments");
29280
29280
  }
@@ -29283,7 +29283,7 @@ var require_path_visitor = __commonJS({
29283
29283
  for (var i2 = 0; i2 < childCount; ++i2) {
29284
29284
  var childName = childNames[i2];
29285
29285
  if (!hasOwn.call(value, childName)) {
29286
- value[childName] = types4.getFieldValue(value, childName);
29286
+ value[childName] = types5.getFieldValue(value, childName);
29287
29287
  }
29288
29288
  childPaths.push(path3.get(childName));
29289
29289
  }
@@ -29426,13 +29426,13 @@ var require_equiv = __commonJS({
29426
29426
  var shared_1 = require_shared();
29427
29427
  var types_1 = tslib_1.__importDefault(require_types());
29428
29428
  function default_1(fork) {
29429
- var types4 = fork.use(types_1.default);
29430
- var getFieldNames = types4.getFieldNames;
29431
- var getFieldValue = types4.getFieldValue;
29432
- var isArray = types4.builtInTypes.array;
29433
- var isObject2 = types4.builtInTypes.object;
29434
- var isDate = types4.builtInTypes.Date;
29435
- var isRegExp = types4.builtInTypes.RegExp;
29429
+ var types5 = fork.use(types_1.default);
29430
+ var getFieldNames = types5.getFieldNames;
29431
+ var getFieldValue = types5.getFieldValue;
29432
+ var isArray = types5.builtInTypes.array;
29433
+ var isObject2 = types5.builtInTypes.object;
29434
+ var isDate = types5.builtInTypes.Date;
29435
+ var isRegExp = types5.builtInTypes.RegExp;
29436
29436
  var hasOwn = Object.prototype.hasOwnProperty;
29437
29437
  function astNodesAreEquivalent(a, b, problemPath) {
29438
29438
  if (isArray.check(problemPath)) {
@@ -29585,24 +29585,24 @@ var require_fork = __commonJS({
29585
29585
  var shared_1 = require_shared();
29586
29586
  function default_1(plugins2) {
29587
29587
  var fork = createFork();
29588
- var types4 = fork.use(types_1.default);
29588
+ var types5 = fork.use(types_1.default);
29589
29589
  plugins2.forEach(fork.use);
29590
- types4.finalize();
29590
+ types5.finalize();
29591
29591
  var PathVisitor = fork.use(path_visitor_1.default);
29592
29592
  return {
29593
- Type: types4.Type,
29594
- builtInTypes: types4.builtInTypes,
29595
- namedTypes: types4.namedTypes,
29596
- builders: types4.builders,
29597
- defineMethod: types4.defineMethod,
29598
- getFieldNames: types4.getFieldNames,
29599
- getFieldValue: types4.getFieldValue,
29600
- eachField: types4.eachField,
29601
- someField: types4.someField,
29602
- getSupertypeNames: types4.getSupertypeNames,
29603
- getBuilderName: types4.getBuilderName,
29593
+ Type: types5.Type,
29594
+ builtInTypes: types5.builtInTypes,
29595
+ namedTypes: types5.namedTypes,
29596
+ builders: types5.builders,
29597
+ defineMethod: types5.defineMethod,
29598
+ getFieldNames: types5.getFieldNames,
29599
+ getFieldValue: types5.getFieldValue,
29600
+ eachField: types5.eachField,
29601
+ someField: types5.someField,
29602
+ getSupertypeNames: types5.getSupertypeNames,
29603
+ getBuilderName: types5.getBuilderName,
29604
29604
  astNodesAreEquivalent: fork.use(equiv_1.default),
29605
- finalize: types4.finalize,
29605
+ finalize: types5.finalize,
29606
29606
  Path: fork.use(path_1.default),
29607
29607
  NodePath: fork.use(node_path_1.default),
29608
29608
  PathVisitor,
@@ -29772,8 +29772,8 @@ var require_core2 = __commonJS({
29772
29772
  var types_1 = tslib_1.__importDefault(require_types());
29773
29773
  var shared_1 = tslib_1.__importStar(require_shared());
29774
29774
  function default_1(fork) {
29775
- var types4 = fork.use(types_1.default);
29776
- var Type = types4.Type;
29775
+ var types5 = fork.use(types_1.default);
29776
+ var Type = types5.Type;
29777
29777
  var def = Type.def;
29778
29778
  var or = Type.or;
29779
29779
  var shared = fork.use(shared_1.default);
@@ -29865,9 +29865,9 @@ var require_es6 = __commonJS({
29865
29865
  var shared_1 = tslib_1.__importStar(require_shared());
29866
29866
  function default_1(fork) {
29867
29867
  fork.use(core_1.default);
29868
- var types4 = fork.use(types_1.default);
29869
- var def = types4.Type.def;
29870
- var or = types4.Type.or;
29868
+ var types5 = fork.use(types_1.default);
29869
+ var def = types5.Type.def;
29870
+ var or = types5.Type.or;
29871
29871
  var defaults = fork.use(shared_1.default).defaults;
29872
29872
  def("Function").field("generator", Boolean, defaults["false"]).field("expression", Boolean, defaults["false"]).field("defaults", [or(def("Expression"), null)], defaults.emptyArray).field("rest", or(def("Identifier"), null), defaults["null"]);
29873
29873
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -29957,8 +29957,8 @@ var require_es2017 = __commonJS({
29957
29957
  var shared_1 = tslib_1.__importStar(require_shared());
29958
29958
  function default_1(fork) {
29959
29959
  fork.use(es2016_1.default);
29960
- var types4 = fork.use(types_1.default);
29961
- var def = types4.Type.def;
29960
+ var types5 = fork.use(types_1.default);
29961
+ var def = types5.Type.def;
29962
29962
  var defaults = fork.use(shared_1.default).defaults;
29963
29963
  def("Function").field("async", Boolean, defaults["false"]);
29964
29964
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -29981,9 +29981,9 @@ var require_es2018 = __commonJS({
29981
29981
  var shared_1 = tslib_1.__importStar(require_shared());
29982
29982
  function default_1(fork) {
29983
29983
  fork.use(es2017_1.default);
29984
- var types4 = fork.use(types_1.default);
29985
- var def = types4.Type.def;
29986
- var or = types4.Type.or;
29984
+ var types5 = fork.use(types_1.default);
29985
+ var def = types5.Type.def;
29986
+ var or = types5.Type.or;
29987
29987
  var defaults = fork.use(shared_1.default).defaults;
29988
29988
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
29989
29989
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -30014,9 +30014,9 @@ var require_es2019 = __commonJS({
30014
30014
  var shared_1 = tslib_1.__importStar(require_shared());
30015
30015
  function default_1(fork) {
30016
30016
  fork.use(es2018_1.default);
30017
- var types4 = fork.use(types_1.default);
30018
- var def = types4.Type.def;
30019
- var or = types4.Type.or;
30017
+ var types5 = fork.use(types_1.default);
30018
+ var def = types5.Type.def;
30019
+ var or = types5.Type.or;
30020
30020
  var defaults = fork.use(shared_1.default).defaults;
30021
30021
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
30022
30022
  }
@@ -30040,9 +30040,9 @@ var require_es20202 = __commonJS({
30040
30040
  function default_1(fork) {
30041
30041
  fork.use(es2020_1.default);
30042
30042
  fork.use(es2019_1.default);
30043
- var types4 = fork.use(types_1.default);
30044
- var def = types4.Type.def;
30045
- var or = types4.Type.or;
30043
+ var types5 = fork.use(types_1.default);
30044
+ var def = types5.Type.def;
30045
+ var or = types5.Type.or;
30046
30046
  var shared = fork.use(shared_1.default);
30047
30047
  var defaults = shared.defaults;
30048
30048
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -30092,8 +30092,8 @@ var require_es2022 = __commonJS({
30092
30092
  var shared_1 = require_shared();
30093
30093
  function default_1(fork) {
30094
30094
  fork.use(es2021_1.default);
30095
- var types4 = fork.use(types_1.default);
30096
- var def = types4.Type.def;
30095
+ var types5 = fork.use(types_1.default);
30096
+ var def = types5.Type.def;
30097
30097
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
30098
30098
  }
30099
30099
  exports.default = default_1;
@@ -30114,9 +30114,9 @@ var require_es_proposals = __commonJS({
30114
30114
  var es2022_1 = tslib_1.__importDefault(require_es2022());
30115
30115
  function default_1(fork) {
30116
30116
  fork.use(es2022_1.default);
30117
- var types4 = fork.use(types_1.default);
30118
- var Type = types4.Type;
30119
- var def = types4.Type.def;
30117
+ var types5 = fork.use(types_1.default);
30118
+ var Type = types5.Type;
30119
+ var def = types5.Type.def;
30120
30120
  var or = Type.or;
30121
30121
  var shared = fork.use(shared_1.default);
30122
30122
  var defaults = shared.defaults;
@@ -30156,9 +30156,9 @@ var require_jsx = __commonJS({
30156
30156
  var shared_1 = tslib_1.__importStar(require_shared());
30157
30157
  function default_1(fork) {
30158
30158
  fork.use(es_proposals_1.default);
30159
- var types4 = fork.use(types_1.default);
30160
- var def = types4.Type.def;
30161
- var or = types4.Type.or;
30159
+ var types5 = fork.use(types_1.default);
30160
+ var def = types5.Type.def;
30161
+ var or = types5.Type.or;
30162
30162
  var defaults = fork.use(shared_1.default).defaults;
30163
30163
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
30164
30164
  def("Literal"),
@@ -30216,9 +30216,9 @@ var require_type_annotations = __commonJS({
30216
30216
  var types_1 = tslib_1.__importDefault(require_types());
30217
30217
  var shared_1 = tslib_1.__importStar(require_shared());
30218
30218
  function default_1(fork) {
30219
- var types4 = fork.use(types_1.default);
30220
- var def = types4.Type.def;
30221
- var or = types4.Type.or;
30219
+ var types5 = fork.use(types_1.default);
30220
+ var def = types5.Type.def;
30221
+ var or = types5.Type.or;
30222
30222
  var defaults = fork.use(shared_1.default).defaults;
30223
30223
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
30224
30224
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -30253,9 +30253,9 @@ var require_flow = __commonJS({
30253
30253
  function default_1(fork) {
30254
30254
  fork.use(es_proposals_1.default);
30255
30255
  fork.use(type_annotations_1.default);
30256
- var types4 = fork.use(types_1.default);
30257
- var def = types4.Type.def;
30258
- var or = types4.Type.or;
30256
+ var types5 = fork.use(types_1.default);
30257
+ var def = types5.Type.def;
30258
+ var or = types5.Type.or;
30259
30259
  var defaults = fork.use(shared_1.default).defaults;
30260
30260
  def("Flow").bases("Node");
30261
30261
  def("FlowType").bases("Flow");
@@ -30369,10 +30369,10 @@ var require_esprima = __commonJS({
30369
30369
  var shared_1 = tslib_1.__importStar(require_shared());
30370
30370
  function default_1(fork) {
30371
30371
  fork.use(es_proposals_1.default);
30372
- var types4 = fork.use(types_1.default);
30372
+ var types5 = fork.use(types_1.default);
30373
30373
  var defaults = fork.use(shared_1.default).defaults;
30374
- var def = types4.Type.def;
30375
- var or = types4.Type.or;
30374
+ var def = types5.Type.def;
30375
+ var or = types5.Type.or;
30376
30376
  def("VariableDeclaration").field("declarations", [or(
30377
30377
  def("VariableDeclarator"),
30378
30378
  def("Identifier")
@@ -30417,11 +30417,11 @@ var require_babel_core = __commonJS({
30417
30417
  function default_1(fork) {
30418
30418
  var _a, _b, _c, _d, _e;
30419
30419
  fork.use(es_proposals_1.default);
30420
- var types4 = fork.use(types_1.default);
30420
+ var types5 = fork.use(types_1.default);
30421
30421
  var defaults = fork.use(shared_1.default).defaults;
30422
- var def = types4.Type.def;
30423
- var or = types4.Type.or;
30424
- var isUndefined = types4.builtInTypes.undefined;
30422
+ var def = types5.Type.def;
30423
+ var or = types5.Type.or;
30424
+ var isUndefined = types5.builtInTypes.undefined;
30425
30425
  def("Noop").bases("Statement").build();
30426
30426
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
30427
30427
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -30446,7 +30446,7 @@ var require_babel_core = __commonJS({
30446
30446
  raw: String
30447
30447
  },
30448
30448
  function getDefault() {
30449
- var value = types4.getFieldValue(this, "value");
30449
+ var value = types5.getFieldValue(this, "value");
30450
30450
  return {
30451
30451
  rawValue: value,
30452
30452
  raw: toRaw ? toRaw(value) : String(value)
@@ -30549,8 +30549,8 @@ var require_babel = __commonJS({
30549
30549
  var flow_1 = tslib_1.__importDefault(require_flow());
30550
30550
  var shared_1 = require_shared();
30551
30551
  function default_1(fork) {
30552
- var types4 = fork.use(types_1.default);
30553
- var def = types4.Type.def;
30552
+ var types5 = fork.use(types_1.default);
30553
+ var def = types5.Type.def;
30554
30554
  fork.use(babel_core_1.default);
30555
30555
  fork.use(flow_1.default);
30556
30556
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -30576,12 +30576,12 @@ var require_typescript = __commonJS({
30576
30576
  function default_1(fork) {
30577
30577
  fork.use(babel_core_1.default);
30578
30578
  fork.use(type_annotations_1.default);
30579
- var types4 = fork.use(types_1.default);
30580
- var n = types4.namedTypes;
30581
- var def = types4.Type.def;
30582
- var or = types4.Type.or;
30579
+ var types5 = fork.use(types_1.default);
30580
+ var n = types5.namedTypes;
30581
+ var def = types5.Type.def;
30582
+ var or = types5.Type.or;
30583
30583
  var defaults = fork.use(shared_1.default).defaults;
30584
- var StringLiteral = types4.Type.from(function(value, deep) {
30584
+ var StringLiteral = types5.Type.from(function(value, deep) {
30585
30585
  if (n.StringLiteral && n.StringLiteral.check(value, deep)) {
30586
30586
  return true;
30587
30587
  }
@@ -32557,8 +32557,8 @@ var require_util2 = __commonJS({
32557
32557
  exports.isTrailingCommaEnabled = exports.getParentExportDeclaration = exports.isExportDeclaration = exports.fixFaultyLocations = exports.getTrueLoc = exports.composeSourceMaps = exports.copyPos = exports.comparePos = exports.getUnionOfKeys = exports.getOption = exports.isBrowser = exports.getLineTerminator = void 0;
32558
32558
  var tslib_1 = require_tslib();
32559
32559
  var assert_1 = tslib_1.__importDefault(require("assert"));
32560
- var types4 = tslib_1.__importStar(require_main());
32561
- var n = types4.namedTypes;
32560
+ var types5 = tslib_1.__importStar(require_main());
32561
+ var n = types5.namedTypes;
32562
32562
  var source_map_1 = tslib_1.__importDefault(require_source_map());
32563
32563
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
32564
32564
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -39876,10 +39876,10 @@ var require_comments = __commonJS({
39876
39876
  exports.printComments = exports.attach = void 0;
39877
39877
  var tslib_1 = require_tslib();
39878
39878
  var assert_1 = tslib_1.__importDefault(require("assert"));
39879
- var types4 = tslib_1.__importStar(require_main());
39880
- var n = types4.namedTypes;
39881
- var isArray = types4.builtInTypes.array;
39882
- var isObject2 = types4.builtInTypes.object;
39879
+ var types5 = tslib_1.__importStar(require_main());
39880
+ var n = types5.namedTypes;
39881
+ var isArray = types5.builtInTypes.array;
39882
+ var isObject2 = types5.builtInTypes.object;
39883
39883
  var lines_1 = require_lines();
39884
39884
  var util_1 = require_util2();
39885
39885
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -39910,7 +39910,7 @@ var require_comments = __commonJS({
39910
39910
  if (isArray.check(node)) {
39911
39911
  names = Object.keys(node);
39912
39912
  } else if (isObject2.check(node)) {
39913
- names = types4.getFieldNames(node);
39913
+ names = types5.getFieldNames(node);
39914
39914
  } else {
39915
39915
  return resultArray;
39916
39916
  }
@@ -40088,7 +40088,7 @@ var require_comments = __commonJS({
40088
40088
  function printComments(path3, print6) {
40089
40089
  var value = path3.getValue();
40090
40090
  var innerLines = print6(path3);
40091
- var comments = n.Node.check(value) && types4.getFieldValue(value, "comments");
40091
+ var comments = n.Node.check(value) && types5.getFieldValue(value, "comments");
40092
40092
  if (!comments || comments.length === 0) {
40093
40093
  return innerLines;
40094
40094
  }
@@ -40096,8 +40096,8 @@ var require_comments = __commonJS({
40096
40096
  var trailingParts = [innerLines];
40097
40097
  path3.each(function(commentPath) {
40098
40098
  var comment = commentPath.getValue();
40099
- var leading = types4.getFieldValue(comment, "leading");
40100
- var trailing = types4.getFieldValue(comment, "trailing");
40099
+ var leading = types5.getFieldValue(comment, "leading");
40100
+ var trailing = types5.getFieldValue(comment, "trailing");
40101
40101
  if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
40102
40102
  leadingParts.push(printLeadingComment(commentPath, print6));
40103
40103
  } else if (trailing) {
@@ -40119,10 +40119,10 @@ var require_parser = __commonJS({
40119
40119
  exports.parse = void 0;
40120
40120
  var tslib_1 = require_tslib();
40121
40121
  var assert_1 = tslib_1.__importDefault(require("assert"));
40122
- var types4 = tslib_1.__importStar(require_main());
40123
- var b = types4.builders;
40124
- var isObject2 = types4.builtInTypes.object;
40125
- var isArray = types4.builtInTypes.array;
40122
+ var types5 = tslib_1.__importStar(require_main());
40123
+ var b = types5.builders;
40124
+ var isObject2 = types5.builtInTypes.object;
40125
+ var isArray = types5.builtInTypes.array;
40126
40126
  var options_1 = require_options();
40127
40127
  var lines_1 = require_lines();
40128
40128
  var comments_1 = require_comments();
@@ -40308,11 +40308,11 @@ var require_fast_path = __commonJS({
40308
40308
  Object.defineProperty(exports, "__esModule", { value: true });
40309
40309
  var tslib_1 = require_tslib();
40310
40310
  var assert_1 = tslib_1.__importDefault(require("assert"));
40311
- var types4 = tslib_1.__importStar(require_main());
40311
+ var types5 = tslib_1.__importStar(require_main());
40312
40312
  var util = tslib_1.__importStar(require_util2());
40313
- var n = types4.namedTypes;
40314
- var isArray = types4.builtInTypes.array;
40315
- var isNumber = types4.builtInTypes.number;
40313
+ var n = types5.namedTypes;
40314
+ var isArray = types5.builtInTypes.array;
40315
+ var isNumber = types5.builtInTypes.number;
40316
40316
  var PRECEDENCE = {};
40317
40317
  [
40318
40318
  ["??"],
@@ -40341,7 +40341,7 @@ var require_fast_path = __commonJS({
40341
40341
  if (obj instanceof FastPath) {
40342
40342
  return obj.copy();
40343
40343
  }
40344
- if (obj instanceof types4.NodePath) {
40344
+ if (obj instanceof types5.NodePath) {
40345
40345
  var copy = Object.create(FastPath.prototype);
40346
40346
  var stack = [obj.value];
40347
40347
  for (var pp = void 0; pp = obj.parentPath; obj = pp)
@@ -40652,7 +40652,7 @@ var require_fast_path = __commonJS({
40652
40652
  return node.some(containsCallExpression);
40653
40653
  }
40654
40654
  if (n.Node.check(node)) {
40655
- return types4.someField(node, function(_name, child) {
40655
+ return types5.someField(node, function(_name, child) {
40656
40656
  return containsCallExpression(child);
40657
40657
  });
40658
40658
  }
@@ -40742,16 +40742,16 @@ var require_patcher = __commonJS({
40742
40742
  var tslib_1 = require_tslib();
40743
40743
  var assert_1 = tslib_1.__importDefault(require("assert"));
40744
40744
  var linesModule = tslib_1.__importStar(require_lines());
40745
- var types4 = tslib_1.__importStar(require_main());
40746
- var Printable = types4.namedTypes.Printable;
40747
- var Expression = types4.namedTypes.Expression;
40748
- var ReturnStatement = types4.namedTypes.ReturnStatement;
40749
- var SourceLocation = types4.namedTypes.SourceLocation;
40745
+ var types5 = tslib_1.__importStar(require_main());
40746
+ var Printable = types5.namedTypes.Printable;
40747
+ var Expression = types5.namedTypes.Expression;
40748
+ var ReturnStatement = types5.namedTypes.ReturnStatement;
40749
+ var SourceLocation = types5.namedTypes.SourceLocation;
40750
40750
  var util_1 = require_util2();
40751
40751
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
40752
- var isObject2 = types4.builtInTypes.object;
40753
- var isArray = types4.builtInTypes.array;
40754
- var isString = types4.builtInTypes.string;
40752
+ var isObject2 = types5.builtInTypes.object;
40753
+ var isArray = types5.builtInTypes.array;
40754
+ var isString = types5.builtInTypes.string;
40755
40755
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
40756
40756
  var Patcher = function Patcher2(lines) {
40757
40757
  assert_1.default.ok(this instanceof Patcher2);
@@ -41021,8 +41021,8 @@ var require_patcher = __commonJS({
41021
41021
  if (k.charAt(0) === "_") {
41022
41022
  continue;
41023
41023
  }
41024
- newPath.stack.push(k, types4.getFieldValue(newNode, k));
41025
- oldPath.stack.push(k, types4.getFieldValue(oldNode, k));
41024
+ newPath.stack.push(k, types5.getFieldValue(newNode, k));
41025
+ oldPath.stack.push(k, types5.getFieldValue(oldNode, k));
41026
41026
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
41027
41027
  newPath.stack.length -= 2;
41028
41028
  oldPath.stack.length -= 2;
@@ -41046,16 +41046,16 @@ var require_printer = __commonJS({
41046
41046
  exports.Printer = void 0;
41047
41047
  var tslib_1 = require_tslib();
41048
41048
  var assert_1 = tslib_1.__importDefault(require("assert"));
41049
- var types4 = tslib_1.__importStar(require_main());
41049
+ var types5 = tslib_1.__importStar(require_main());
41050
41050
  var comments_1 = require_comments();
41051
41051
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
41052
41052
  var lines_1 = require_lines();
41053
41053
  var options_1 = require_options();
41054
41054
  var patcher_1 = require_patcher();
41055
41055
  var util = tslib_1.__importStar(require_util2());
41056
- var namedTypes = types4.namedTypes;
41057
- var isString = types4.builtInTypes.string;
41058
- var isObject2 = types4.builtInTypes.object;
41056
+ var namedTypes = types5.namedTypes;
41057
+ var isString = types5.builtInTypes.string;
41058
+ var isObject2 = types5.builtInTypes.object;
41059
41059
  var PrintResult = function PrintResult2(code, sourceMap) {
41060
41060
  assert_1.default.ok(this instanceof PrintResult2);
41061
41061
  isString.assert(code);
@@ -41217,7 +41217,7 @@ var require_printer = __commonJS({
41217
41217
  case "OptionalMemberExpression": {
41218
41218
  parts.push(path3.call(print6, "object"));
41219
41219
  var property = path3.call(print6, "property");
41220
- var optional = types4.getFieldValue(n, "optional");
41220
+ var optional = types5.getFieldValue(n, "optional");
41221
41221
  if (n.computed) {
41222
41222
  parts.push(optional ? "?.[" : "[", property, "]");
41223
41223
  } else {
@@ -41488,7 +41488,7 @@ var require_printer = __commonJS({
41488
41488
  if (n.typeArguments) {
41489
41489
  parts.push(path3.call(print6, "typeArguments"));
41490
41490
  }
41491
- if (types4.getFieldValue(n, "optional")) {
41491
+ if (types5.getFieldValue(n, "optional")) {
41492
41492
  parts.push("?.");
41493
41493
  }
41494
41494
  parts.push(printArgumentsList(path3, options, print6));
@@ -43167,8 +43167,8 @@ var require_printer = __commonJS({
43167
43167
  });
43168
43168
  }
43169
43169
  function getPossibleRaw(node) {
43170
- var value = types4.getFieldValue(node, "value");
43171
- var extra = types4.getFieldValue(node, "extra");
43170
+ var value = types5.getFieldValue(node, "value");
43171
+ var extra = types5.getFieldValue(node, "extra");
43172
43172
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
43173
43173
  return extra.raw;
43174
43174
  }
@@ -43216,8 +43216,8 @@ var require_main2 = __commonJS({
43216
43216
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
43217
43217
  var tslib_1 = require_tslib();
43218
43218
  var fs_1 = tslib_1.__importDefault(require("fs"));
43219
- var types4 = tslib_1.__importStar(require_main());
43220
- exports.types = types4;
43219
+ var types5 = tslib_1.__importStar(require_main());
43220
+ exports.types = types5;
43221
43221
  var parser_1 = require_parser();
43222
43222
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
43223
43223
  return parser_1.parse;
@@ -47645,30 +47645,30 @@ var require_utils3 = __commonJS({
47645
47645
  validate2.oneOf = values;
47646
47646
  return validate2;
47647
47647
  }
47648
- function assertNodeType(...types4) {
47648
+ function assertNodeType(...types5) {
47649
47649
  function validate2(node, key, val) {
47650
- for (const type of types4) {
47650
+ for (const type of types5) {
47651
47651
  if ((0, _is.default)(type, val)) {
47652
47652
  (0, _validate.validateChild)(node, key, val);
47653
47653
  return;
47654
47654
  }
47655
47655
  }
47656
- throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types4)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
47656
+ throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types5)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
47657
47657
  }
47658
- validate2.oneOfNodeTypes = types4;
47658
+ validate2.oneOfNodeTypes = types5;
47659
47659
  return validate2;
47660
47660
  }
47661
- function assertNodeOrValueType(...types4) {
47661
+ function assertNodeOrValueType(...types5) {
47662
47662
  function validate2(node, key, val) {
47663
- for (const type of types4) {
47663
+ for (const type of types5) {
47664
47664
  if (getType(val) === type || (0, _is.default)(type, val)) {
47665
47665
  (0, _validate.validateChild)(node, key, val);
47666
47666
  return;
47667
47667
  }
47668
47668
  }
47669
- throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types4)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
47669
+ throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types5)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
47670
47670
  }
47671
- validate2.oneOfNodeOrValueTypes = types4;
47671
+ validate2.oneOfNodeOrValueTypes = types5;
47672
47672
  return validate2;
47673
47673
  }
47674
47674
  function assertValueType(type) {
@@ -51270,7 +51270,7 @@ var require_generated2 = __commonJS({
51270
51270
  exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
51271
51271
  exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
51272
51272
  exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
51273
- exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
51273
+ exports.tSTypeReference = exports.tsTypeReference = tsTypeReference2;
51274
51274
  exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
51275
51275
  exports.tSUnionType = exports.tsUnionType = tsUnionType;
51276
51276
  exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
@@ -52096,10 +52096,10 @@ var require_generated2 = __commonJS({
52096
52096
  body
52097
52097
  });
52098
52098
  }
52099
- function intersectionTypeAnnotation(types4) {
52099
+ function intersectionTypeAnnotation(types5) {
52100
52100
  return (0, _validateNode.default)({
52101
52101
  type: "IntersectionTypeAnnotation",
52102
- types: types4
52102
+ types: types5
52103
52103
  });
52104
52104
  }
52105
52105
  function mixedTypeAnnotation() {
@@ -52222,10 +52222,10 @@ var require_generated2 = __commonJS({
52222
52222
  type: "ThisTypeAnnotation"
52223
52223
  };
52224
52224
  }
52225
- function tupleTypeAnnotation(types4) {
52225
+ function tupleTypeAnnotation(types5) {
52226
52226
  return (0, _validateNode.default)({
52227
52227
  type: "TupleTypeAnnotation",
52228
- types: types4
52228
+ types: types5
52229
52229
  });
52230
52230
  }
52231
52231
  function typeofTypeAnnotation(argument) {
@@ -52276,10 +52276,10 @@ var require_generated2 = __commonJS({
52276
52276
  params
52277
52277
  });
52278
52278
  }
52279
- function unionTypeAnnotation(types4) {
52279
+ function unionTypeAnnotation(types5) {
52280
52280
  return (0, _validateNode.default)({
52281
52281
  type: "UnionTypeAnnotation",
52282
- types: types4
52282
+ types: types5
52283
52283
  });
52284
52284
  }
52285
52285
  function variance(kind) {
@@ -52732,7 +52732,7 @@ var require_generated2 = __commonJS({
52732
52732
  typeAnnotation: typeAnnotation2
52733
52733
  });
52734
52734
  }
52735
- function tsTypeReference(typeName, typeParameters = null) {
52735
+ function tsTypeReference2(typeName, typeParameters = null) {
52736
52736
  return (0, _validateNode.default)({
52737
52737
  type: "TSTypeReference",
52738
52738
  typeName,
@@ -52792,16 +52792,16 @@ var require_generated2 = __commonJS({
52792
52792
  optional
52793
52793
  });
52794
52794
  }
52795
- function tsUnionType(types4) {
52795
+ function tsUnionType(types5) {
52796
52796
  return (0, _validateNode.default)({
52797
52797
  type: "TSUnionType",
52798
- types: types4
52798
+ types: types5
52799
52799
  });
52800
52800
  }
52801
- function tsIntersectionType(types4) {
52801
+ function tsIntersectionType(types5) {
52802
52802
  return (0, _validateNode.default)({
52803
52803
  type: "TSIntersectionType",
52804
- types: types4
52804
+ types: types5
52805
52805
  });
52806
52806
  }
52807
52807
  function tsConditionalType(checkType, extendsType, trueType, falseType) {
@@ -54416,12 +54416,12 @@ var require_removeTypeDuplicates = __commonJS({
54416
54416
  const generics = /* @__PURE__ */ new Map();
54417
54417
  const bases = /* @__PURE__ */ new Map();
54418
54418
  const typeGroups = /* @__PURE__ */ new Set();
54419
- const types4 = [];
54419
+ const types5 = [];
54420
54420
  for (let i2 = 0; i2 < nodes.length; i2++) {
54421
54421
  const node = nodes[i2];
54422
54422
  if (!node)
54423
54423
  continue;
54424
- if (types4.indexOf(node) >= 0) {
54424
+ if (types5.indexOf(node) >= 0) {
54425
54425
  continue;
54426
54426
  }
54427
54427
  if ((0, _generated.isAnyTypeAnnotation)(node)) {
@@ -54455,15 +54455,15 @@ var require_removeTypeDuplicates = __commonJS({
54455
54455
  }
54456
54456
  continue;
54457
54457
  }
54458
- types4.push(node);
54458
+ types5.push(node);
54459
54459
  }
54460
54460
  for (const [, baseType] of bases) {
54461
- types4.push(baseType);
54461
+ types5.push(baseType);
54462
54462
  }
54463
54463
  for (const [, genericName] of generics) {
54464
- types4.push(genericName);
54464
+ types5.push(genericName);
54465
54465
  }
54466
- return types4;
54466
+ return types5;
54467
54467
  }
54468
54468
  }
54469
54469
  });
@@ -54478,8 +54478,8 @@ var require_createFlowUnionType = __commonJS({
54478
54478
  exports.default = createFlowUnionType;
54479
54479
  var _generated = require_generated2();
54480
54480
  var _removeTypeDuplicates = require_removeTypeDuplicates();
54481
- function createFlowUnionType(types4) {
54482
- const flattened = (0, _removeTypeDuplicates.default)(types4);
54481
+ function createFlowUnionType(types5) {
54482
+ const flattened = (0, _removeTypeDuplicates.default)(types5);
54483
54483
  if (flattened.length === 1) {
54484
54484
  return flattened[0];
54485
54485
  } else {
@@ -54506,12 +54506,12 @@ var require_removeTypeDuplicates2 = __commonJS({
54506
54506
  const generics = /* @__PURE__ */ new Map();
54507
54507
  const bases = /* @__PURE__ */ new Map();
54508
54508
  const typeGroups = /* @__PURE__ */ new Set();
54509
- const types4 = [];
54509
+ const types5 = [];
54510
54510
  for (let i2 = 0; i2 < nodes.length; i2++) {
54511
54511
  const node = nodes[i2];
54512
54512
  if (!node)
54513
54513
  continue;
54514
- if (types4.indexOf(node) >= 0) {
54514
+ if (types5.indexOf(node) >= 0) {
54515
54515
  continue;
54516
54516
  }
54517
54517
  if ((0, _generated.isTSAnyKeyword)(node)) {
@@ -54545,15 +54545,15 @@ var require_removeTypeDuplicates2 = __commonJS({
54545
54545
  }
54546
54546
  continue;
54547
54547
  }
54548
- types4.push(node);
54548
+ types5.push(node);
54549
54549
  }
54550
54550
  for (const [, baseType] of bases) {
54551
- types4.push(baseType);
54551
+ types5.push(baseType);
54552
54552
  }
54553
54553
  for (const [, genericName] of generics) {
54554
- types4.push(genericName);
54554
+ types5.push(genericName);
54555
54555
  }
54556
- return types4;
54556
+ return types5;
54557
54557
  }
54558
54558
  }
54559
54559
  });
@@ -54570,10 +54570,10 @@ var require_createTSUnionType = __commonJS({
54570
54570
  var _removeTypeDuplicates = require_removeTypeDuplicates2();
54571
54571
  var _index = require_generated();
54572
54572
  function createTSUnionType(typeAnnotations) {
54573
- const types4 = typeAnnotations.map((type) => {
54573
+ const types5 = typeAnnotations.map((type) => {
54574
54574
  return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
54575
54575
  });
54576
- const flattened = (0, _removeTypeDuplicates.default)(types4);
54576
+ const flattened = (0, _removeTypeDuplicates.default)(types5);
54577
54577
  if (flattened.length === 1) {
54578
54578
  return flattened[0];
54579
54579
  } else {
@@ -58200,6 +58200,7 @@ __export(lib_exports, {
58200
58200
  detectTools: () => detectTools,
58201
58201
  ensureArtifactImport: () => ensureArtifactImport,
58202
58202
  ensureImports: () => ensureImports,
58203
+ enumReference: () => enumReference,
58203
58204
  exec: () => exec,
58204
58205
  extractHeaders: () => extractHeaders,
58205
58206
  extractHeadersStr: () => extractHeadersStr,
@@ -58229,6 +58230,7 @@ __export(lib_exports, {
58229
58230
  localApiEndpoint: () => localApiEndpoint,
58230
58231
  localApiSessionKeys: () => localApiSessionKeys,
58231
58232
  mutation: () => mutation,
58233
+ nullableField: () => nullableField,
58232
58234
  operation_requires_variables: () => operation_requires_variables,
58233
58235
  orderedPlugins: () => orderedPlugins,
58234
58236
  parentField: () => parentField,
@@ -58243,12 +58245,16 @@ __export(lib_exports, {
58243
58245
  pullSchema: () => pullSchema,
58244
58246
  query: () => query,
58245
58247
  readConfigFile: () => readConfigFile,
58248
+ readonlyProperty: () => readonlyProperty,
58246
58249
  routerConventions: () => conventions_exports,
58247
58250
  runPipeline: () => runPipeline,
58251
+ scalarPropertyValue: () => scalarPropertyValue,
58248
58252
  setMockConfig: () => setMockConfig,
58249
58253
  siteURL: () => siteURL,
58250
58254
  subscription: () => subscription,
58255
+ tsTypeReference: () => tsTypeReference,
58251
58256
  unwrapType: () => unwrapType,
58257
+ unwrappedTsTypeReference: () => unwrappedTsTypeReference,
58252
58258
  wrapType: () => wrapType
58253
58259
  });
58254
58260
  module.exports = __toCommonJS(lib_exports);
@@ -59127,7 +59133,7 @@ var printDocASTReducer = {
59127
59133
  leave: ({ name, interfaces, directives, fields }) => join(["interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
59128
59134
  },
59129
59135
  UnionTypeDefinition: {
59130
- leave: ({ name, directives, types: types4 }) => join(["union", name, join(directives, " "), wrap("= ", join(types4, " | "))], " ")
59136
+ leave: ({ name, directives, types: types5 }) => join(["union", name, join(directives, " "), wrap("= ", join(types5, " | "))], " ")
59131
59137
  },
59132
59138
  EnumTypeDefinition: {
59133
59139
  leave: ({ name, directives, values }) => join(["enum", name, join(directives, " "), block(values)], " ")
@@ -59154,7 +59160,7 @@ var printDocASTReducer = {
59154
59160
  leave: ({ name, interfaces, directives, fields }) => join(["extend interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
59155
59161
  },
59156
59162
  UnionTypeExtension: {
59157
- leave: ({ name, directives, types: types4 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types4, " | "))], " ")
59163
+ leave: ({ name, directives, types: types5 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types5, " | "))], " ")
59158
59164
  },
59159
59165
  EnumTypeExtension: {
59160
59166
  leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
@@ -60034,8 +60040,8 @@ function healTypes(originalTypeMap, directives) {
60034
60040
  }
60035
60041
  }
60036
60042
  function healUnderlyingTypes(type) {
60037
- const types4 = type.getTypes();
60038
- types4.push(...types4.splice(0).map((t3) => healType(t3)).filter(Boolean));
60043
+ const types5 = type.getTypes();
60044
+ types5.push(...types5.splice(0).map((t3) => healType(t3)).filter(Boolean));
60039
60045
  }
60040
60046
  function healType(type) {
60041
60047
  if ((0, import_graphql12.isListType)(type)) {
@@ -60819,11 +60825,11 @@ function mergeEnum(e1, e2, config) {
60819
60825
 
60820
60826
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
60821
60827
  var import_graphql21 = require("graphql");
60822
- function isStringTypes(types4) {
60823
- return typeof types4 === "string";
60828
+ function isStringTypes(types5) {
60829
+ return typeof types5 === "string";
60824
60830
  }
60825
- function isSourceTypes(types4) {
60826
- return types4 instanceof import_graphql21.Source;
60831
+ function isSourceTypes(types5) {
60832
+ return types5 instanceof import_graphql21.Source;
60827
60833
  }
60828
60834
  function extractType(type) {
60829
60835
  let visitedType = type;
@@ -61518,6 +61524,44 @@ function deepMerge(...objects) {
61518
61524
  return mergedObj;
61519
61525
  }
61520
61526
 
61527
+ // src/runtime/lib/types.ts
61528
+ var CachePolicy = {
61529
+ CacheOrNetwork: "CacheOrNetwork",
61530
+ CacheOnly: "CacheOnly",
61531
+ NetworkOnly: "NetworkOnly",
61532
+ CacheAndNetwork: "CacheAndNetwork",
61533
+ NoCache: "NoCache"
61534
+ };
61535
+ var PaginateMode = {
61536
+ Infinite: "Infinite",
61537
+ SinglePage: "SinglePage"
61538
+ };
61539
+ var ArtifactKind = {
61540
+ Query: "HoudiniQuery",
61541
+ Subscription: "HoudiniSubscription",
61542
+ Mutation: "HoudiniMutation",
61543
+ Fragment: "HoudiniFragment"
61544
+ };
61545
+ var CompiledFragmentKind = ArtifactKind.Fragment;
61546
+ var CompiledMutationKind = ArtifactKind.Mutation;
61547
+ var CompiledQueryKind = ArtifactKind.Query;
61548
+ var CompiledSubscriptionKind = ArtifactKind.Subscription;
61549
+ var RefetchUpdateMode = {
61550
+ append: "append",
61551
+ prepend: "prepend",
61552
+ replace: "replace"
61553
+ };
61554
+ var DataSource = {
61555
+ Cache: "cache",
61556
+ Network: "network",
61557
+ Ssr: "ssr"
61558
+ };
61559
+ var fragmentKey = " $fragments";
61560
+ var PendingValue = Symbol("houdini_loading");
61561
+ function isPending(value) {
61562
+ return typeof value === "symbol";
61563
+ }
61564
+
61521
61565
  // src/runtime/lib/scalars.ts
61522
61566
  async function marshalSelection({
61523
61567
  selection,
@@ -61534,6 +61578,9 @@ async function marshalSelection({
61534
61578
  return Object.fromEntries(
61535
61579
  await Promise.all(
61536
61580
  Object.entries(data).map(async ([fieldName, value]) => {
61581
+ if (fieldName === fragmentKey) {
61582
+ return [fieldName, value];
61583
+ }
61537
61584
  const { type, selection: selection2 } = targetSelection[fieldName];
61538
61585
  if (!type) {
61539
61586
  return [fieldName, value];
@@ -61597,43 +61644,37 @@ function marshalInputs({
61597
61644
  function isScalar(config, type) {
61598
61645
  return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(config.scalars || {})).includes(type);
61599
61646
  }
61600
-
61601
- // src/runtime/lib/types.ts
61602
- var CachePolicy = {
61603
- CacheOrNetwork: "CacheOrNetwork",
61604
- CacheOnly: "CacheOnly",
61605
- NetworkOnly: "NetworkOnly",
61606
- CacheAndNetwork: "CacheAndNetwork",
61607
- NoCache: "NoCache"
61608
- };
61609
- var PaginateMode = {
61610
- Infinite: "Infinite",
61611
- SinglePage: "SinglePage"
61612
- };
61613
- var ArtifactKind = {
61614
- Query: "HoudiniQuery",
61615
- Subscription: "HoudiniSubscription",
61616
- Mutation: "HoudiniMutation",
61617
- Fragment: "HoudiniFragment"
61618
- };
61619
- var CompiledFragmentKind = ArtifactKind.Fragment;
61620
- var CompiledMutationKind = ArtifactKind.Mutation;
61621
- var CompiledQueryKind = ArtifactKind.Query;
61622
- var CompiledSubscriptionKind = ArtifactKind.Subscription;
61623
- var RefetchUpdateMode = {
61624
- append: "append",
61625
- prepend: "prepend",
61626
- replace: "replace"
61627
- };
61628
- var DataSource = {
61629
- Cache: "cache",
61630
- Network: "network",
61631
- Ssr: "ssr"
61632
- };
61633
- var fragmentKey = " $fragments";
61634
- var PendingValue = Symbol("houdini_loading");
61635
- function isPending(value) {
61636
- return typeof value === "symbol";
61647
+ function parseScalar(config, type, value) {
61648
+ if (typeof value === "undefined") {
61649
+ return void 0;
61650
+ }
61651
+ if (type === "Boolean") {
61652
+ return value === "true";
61653
+ }
61654
+ if (type === "ID") {
61655
+ return value;
61656
+ }
61657
+ if (type === "String") {
61658
+ return value;
61659
+ }
61660
+ if (type === "Int") {
61661
+ const result = parseInt(value, 10);
61662
+ if (Number.isNaN(result)) {
61663
+ return void 0;
61664
+ }
61665
+ return result;
61666
+ }
61667
+ if (type === "Float") {
61668
+ const result = parseFloat(value);
61669
+ if (Number.isNaN(result)) {
61670
+ return void 0;
61671
+ }
61672
+ return result;
61673
+ }
61674
+ if (config.scalars?.[type]?.marshal) {
61675
+ return config.scalars[type]?.marshal(value);
61676
+ }
61677
+ return value;
61637
61678
  }
61638
61679
 
61639
61680
  // src/runtime/lib/store.ts
@@ -63438,167 +63479,6 @@ function flatten(source) {
63438
63479
  }, []);
63439
63480
  }
63440
63481
 
63441
- // src/runtime/client/plugins/fetch.ts
63442
- var fetch2 = (target) => {
63443
- return () => {
63444
- return {
63445
- async network(ctx, { client: client2, initialValue, resolve: resolve2, marshalVariables: marshalVariables2 }) {
63446
- if (ctx.artifact.kind === ArtifactKind.Fragment) {
63447
- return resolve2(ctx, initialValue);
63448
- }
63449
- const fetch3 = ctx.fetch ?? globalThis.fetch;
63450
- const fetchParams2 = {
63451
- name: ctx.name,
63452
- text: ctx.text,
63453
- hash: ctx.hash,
63454
- variables: marshalVariables2(ctx)
63455
- };
63456
- let fetchFn = defaultFetch(client2.url, ctx.fetchParams);
63457
- if (target) {
63458
- if (typeof target === "string") {
63459
- fetchFn = defaultFetch(target, ctx.fetchParams);
63460
- } else {
63461
- fetchFn = target;
63462
- }
63463
- }
63464
- const result = await fetchFn({
63465
- fetch: (url, args) => {
63466
- const newArgs = handleMultipart(fetchParams2, args) ?? args;
63467
- return fetch3(url, newArgs);
63468
- },
63469
- metadata: ctx.metadata,
63470
- session: ctx.session || {},
63471
- ...fetchParams2
63472
- });
63473
- resolve2(ctx, {
63474
- fetching: false,
63475
- variables: ctx.variables ?? {},
63476
- data: result.data,
63477
- errors: !result.errors || result.errors.length === 0 ? null : result.errors,
63478
- partial: false,
63479
- stale: false,
63480
- source: DataSource.Network
63481
- });
63482
- }
63483
- };
63484
- };
63485
- };
63486
- var defaultFetch = (url, params) => {
63487
- if (!url) {
63488
- throw new Error(
63489
- "Could not find configured client url. Please specify one in your HoudiniClient constructor."
63490
- );
63491
- }
63492
- return async ({ fetch: fetch3, name, text, variables }) => {
63493
- const result = await fetch3(url, {
63494
- method: "POST",
63495
- body: JSON.stringify({ operationName: name, query: text, variables }),
63496
- ...params,
63497
- headers: {
63498
- Accept: "application/graphql+json, application/json",
63499
- "Content-Type": "application/json",
63500
- ...params?.headers
63501
- }
63502
- });
63503
- return await result.json();
63504
- };
63505
- };
63506
- function handleMultipart(params, args) {
63507
- const { files } = extractFiles({
63508
- variables: params.variables
63509
- });
63510
- if (files.size) {
63511
- const req = args;
63512
- let headers = {};
63513
- if (req?.headers) {
63514
- const filtered = Object.entries(req?.headers).filter(([key, value]) => {
63515
- return !(key.toLowerCase() == "content-type" && value.toLowerCase() == "application/json");
63516
- });
63517
- headers = Object.fromEntries(filtered);
63518
- }
63519
- const form = new FormData();
63520
- if (args && args?.body) {
63521
- form.set("operations", args?.body);
63522
- } else {
63523
- form.set(
63524
- "operations",
63525
- JSON.stringify({
63526
- operationName: params.name,
63527
- query: params.text,
63528
- variables: params.variables
63529
- })
63530
- );
63531
- }
63532
- const map = {};
63533
- let i2 = 0;
63534
- files.forEach((paths) => {
63535
- map[++i2] = paths;
63536
- });
63537
- form.set("map", JSON.stringify(map));
63538
- i2 = 0;
63539
- files.forEach((paths, file) => {
63540
- form.set(`${++i2}`, file, file.name);
63541
- });
63542
- return { ...req, headers, body: form };
63543
- }
63544
- }
63545
- function isExtractableFile(value) {
63546
- return typeof File !== "undefined" && value instanceof File || typeof Blob !== "undefined" && value instanceof Blob;
63547
- }
63548
- function extractFiles(value) {
63549
- if (!arguments.length)
63550
- throw new TypeError("Argument 1 `value` is required.");
63551
- const clones = /* @__PURE__ */ new Map();
63552
- const files = /* @__PURE__ */ new Map();
63553
- function recurse(value2, path3, recursed) {
63554
- if (isExtractableFile(value2)) {
63555
- const filePaths = files.get(value2);
63556
- filePaths ? filePaths.push(path3) : files.set(value2, [path3]);
63557
- return null;
63558
- }
63559
- const valueIsList = Array.isArray(value2) || typeof FileList !== "undefined" && value2 instanceof FileList;
63560
- const valueIsPlainObject = isPlainObject(value2);
63561
- if (valueIsList || valueIsPlainObject) {
63562
- let clone2 = clones.get(value2);
63563
- const uncloned = !clone2;
63564
- if (uncloned) {
63565
- clone2 = valueIsList ? [] : value2 instanceof Object ? {} : /* @__PURE__ */ Object.create(null);
63566
- clones.set(value2, clone2);
63567
- }
63568
- if (!recursed.has(value2)) {
63569
- const pathPrefix = path3 ? `${path3}.` : "";
63570
- const recursedDeeper = new Set(recursed).add(value2);
63571
- if (valueIsList) {
63572
- let index = 0;
63573
- for (const item of value2) {
63574
- const itemClone = recurse(item, pathPrefix + index++, recursedDeeper);
63575
- if (uncloned)
63576
- clone2.push(itemClone);
63577
- }
63578
- } else
63579
- for (const key in value2) {
63580
- const propertyClone = recurse(value2[key], pathPrefix + key, recursedDeeper);
63581
- if (uncloned)
63582
- clone2[key] = propertyClone;
63583
- }
63584
- }
63585
- return clone2;
63586
- }
63587
- return value2;
63588
- }
63589
- return {
63590
- clone: recurse(value, "", /* @__PURE__ */ new Set()),
63591
- files
63592
- };
63593
- }
63594
- function isPlainObject(value) {
63595
- if (typeof value !== "object" || value === null) {
63596
- return false;
63597
- }
63598
- const prototype = Object.getPrototypeOf(value);
63599
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
63600
- }
63601
-
63602
63482
  // src/runtime/cache/gc.ts
63603
63483
  var GarbageCollector = class {
63604
63484
  cache;
@@ -65748,6 +65628,167 @@ function defaultComponentField({
65748
65628
  // src/runtime/cache/index.ts
65749
65629
  var cache_default = new Cache();
65750
65630
 
65631
+ // src/runtime/client/plugins/fetch.ts
65632
+ var fetch2 = (target) => {
65633
+ return () => {
65634
+ return {
65635
+ async network(ctx, { client: client2, initialValue, resolve: resolve2, marshalVariables: marshalVariables2 }) {
65636
+ if (ctx.artifact.kind === ArtifactKind.Fragment) {
65637
+ return resolve2(ctx, initialValue);
65638
+ }
65639
+ const fetch3 = ctx.fetch ?? globalThis.fetch;
65640
+ const fetchParams2 = {
65641
+ name: ctx.name,
65642
+ text: ctx.text,
65643
+ hash: ctx.hash,
65644
+ variables: marshalVariables2(ctx)
65645
+ };
65646
+ let fetchFn = defaultFetch(client2.url, ctx.fetchParams);
65647
+ if (target) {
65648
+ if (typeof target === "string") {
65649
+ fetchFn = defaultFetch(target, ctx.fetchParams);
65650
+ } else {
65651
+ fetchFn = target;
65652
+ }
65653
+ }
65654
+ const result = await fetchFn({
65655
+ fetch: (url, args) => {
65656
+ const newArgs = handleMultipart(fetchParams2, args) ?? args;
65657
+ return fetch3(url, newArgs);
65658
+ },
65659
+ metadata: ctx.metadata,
65660
+ session: ctx.session || {},
65661
+ ...fetchParams2
65662
+ });
65663
+ resolve2(ctx, {
65664
+ fetching: false,
65665
+ variables: ctx.variables ?? {},
65666
+ data: result.data,
65667
+ errors: !result.errors || result.errors.length === 0 ? null : result.errors,
65668
+ partial: false,
65669
+ stale: false,
65670
+ source: DataSource.Network
65671
+ });
65672
+ }
65673
+ };
65674
+ };
65675
+ };
65676
+ var defaultFetch = (url, params) => {
65677
+ if (!url) {
65678
+ throw new Error(
65679
+ "Could not find configured client url. Please specify one in your HoudiniClient constructor."
65680
+ );
65681
+ }
65682
+ return async ({ fetch: fetch3, name, text, variables }) => {
65683
+ const result = await fetch3(url, {
65684
+ method: "POST",
65685
+ body: JSON.stringify({ operationName: name, query: text, variables }),
65686
+ ...params,
65687
+ headers: {
65688
+ Accept: "application/graphql+json, application/json",
65689
+ "Content-Type": "application/json",
65690
+ ...params?.headers
65691
+ }
65692
+ });
65693
+ return await result.json();
65694
+ };
65695
+ };
65696
+ function handleMultipart(params, args) {
65697
+ const { files } = extractFiles({
65698
+ variables: params.variables
65699
+ });
65700
+ if (files.size) {
65701
+ const req = args;
65702
+ let headers = {};
65703
+ if (req?.headers) {
65704
+ const filtered = Object.entries(req?.headers).filter(([key, value]) => {
65705
+ return !(key.toLowerCase() == "content-type" && value.toLowerCase() == "application/json");
65706
+ });
65707
+ headers = Object.fromEntries(filtered);
65708
+ }
65709
+ const form = new FormData();
65710
+ if (args && args?.body) {
65711
+ form.set("operations", args?.body);
65712
+ } else {
65713
+ form.set(
65714
+ "operations",
65715
+ JSON.stringify({
65716
+ operationName: params.name,
65717
+ query: params.text,
65718
+ variables: params.variables
65719
+ })
65720
+ );
65721
+ }
65722
+ const map = {};
65723
+ let i2 = 0;
65724
+ files.forEach((paths) => {
65725
+ map[++i2] = paths;
65726
+ });
65727
+ form.set("map", JSON.stringify(map));
65728
+ i2 = 0;
65729
+ files.forEach((paths, file) => {
65730
+ form.set(`${++i2}`, file, file.name);
65731
+ });
65732
+ return { ...req, headers, body: form };
65733
+ }
65734
+ }
65735
+ function isExtractableFile(value) {
65736
+ return typeof File !== "undefined" && value instanceof File || typeof Blob !== "undefined" && value instanceof Blob;
65737
+ }
65738
+ function extractFiles(value) {
65739
+ if (!arguments.length)
65740
+ throw new TypeError("Argument 1 `value` is required.");
65741
+ const clones = /* @__PURE__ */ new Map();
65742
+ const files = /* @__PURE__ */ new Map();
65743
+ function recurse(value2, path3, recursed) {
65744
+ if (isExtractableFile(value2)) {
65745
+ const filePaths = files.get(value2);
65746
+ filePaths ? filePaths.push(path3) : files.set(value2, [path3]);
65747
+ return null;
65748
+ }
65749
+ const valueIsList = Array.isArray(value2) || typeof FileList !== "undefined" && value2 instanceof FileList;
65750
+ const valueIsPlainObject = isPlainObject(value2);
65751
+ if (valueIsList || valueIsPlainObject) {
65752
+ let clone2 = clones.get(value2);
65753
+ const uncloned = !clone2;
65754
+ if (uncloned) {
65755
+ clone2 = valueIsList ? [] : value2 instanceof Object ? {} : /* @__PURE__ */ Object.create(null);
65756
+ clones.set(value2, clone2);
65757
+ }
65758
+ if (!recursed.has(value2)) {
65759
+ const pathPrefix = path3 ? `${path3}.` : "";
65760
+ const recursedDeeper = new Set(recursed).add(value2);
65761
+ if (valueIsList) {
65762
+ let index = 0;
65763
+ for (const item of value2) {
65764
+ const itemClone = recurse(item, pathPrefix + index++, recursedDeeper);
65765
+ if (uncloned)
65766
+ clone2.push(itemClone);
65767
+ }
65768
+ } else
65769
+ for (const key in value2) {
65770
+ const propertyClone = recurse(value2[key], pathPrefix + key, recursedDeeper);
65771
+ if (uncloned)
65772
+ clone2[key] = propertyClone;
65773
+ }
65774
+ }
65775
+ return clone2;
65776
+ }
65777
+ return value2;
65778
+ }
65779
+ return {
65780
+ clone: recurse(value, "", /* @__PURE__ */ new Set()),
65781
+ files
65782
+ };
65783
+ }
65784
+ function isPlainObject(value) {
65785
+ if (typeof value !== "object" || value === null) {
65786
+ return false;
65787
+ }
65788
+ const prototype = Object.getPrototypeOf(value);
65789
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
65790
+ }
65791
+
65751
65792
  // src/runtime/client/plugins/cache.ts
65752
65793
  var serverSide = typeof globalThis.window === "undefined";
65753
65794
  var cachePolicy = ({
@@ -65878,7 +65919,7 @@ var documentPlugin = (kind, source) => {
65878
65919
  };
65879
65920
 
65880
65921
  // src/runtime/client/plugins/query.ts
65881
- var query = documentPlugin(ArtifactKind.Query, function() {
65922
+ var query = (cache) => documentPlugin(ArtifactKind.Query, function() {
65882
65923
  let subscriptionSpec = null;
65883
65924
  let lastVariables = null;
65884
65925
  return {
@@ -65906,7 +65947,7 @@ var query = documentPlugin(ArtifactKind.Query, function() {
65906
65947
  end(ctx, { resolve: resolve2, marshalVariables: marshalVariables2, variablesChanged: variablesChanged2 }) {
65907
65948
  if (variablesChanged2(ctx) && !ctx.cacheParams?.disableSubscriptions) {
65908
65949
  if (subscriptionSpec) {
65909
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
65950
+ cache.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
65910
65951
  }
65911
65952
  lastVariables = { ...marshalVariables2(ctx) };
65912
65953
  const variables = lastVariables;
@@ -65926,13 +65967,13 @@ var query = documentPlugin(ArtifactKind.Query, function() {
65926
65967
  });
65927
65968
  }
65928
65969
  };
65929
- cache_default.subscribe(subscriptionSpec, lastVariables);
65970
+ cache.subscribe(subscriptionSpec, lastVariables);
65930
65971
  }
65931
65972
  resolve2(ctx);
65932
65973
  },
65933
65974
  cleanup() {
65934
65975
  if (subscriptionSpec) {
65935
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
65976
+ cache.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
65936
65977
  lastVariables = null;
65937
65978
  }
65938
65979
  }
@@ -65940,7 +65981,7 @@ var query = documentPlugin(ArtifactKind.Query, function() {
65940
65981
  });
65941
65982
 
65942
65983
  // src/runtime/client/plugins/fragment.ts
65943
- var fragment = documentPlugin(ArtifactKind.Fragment, function() {
65984
+ var fragment = (cache) => documentPlugin(ArtifactKind.Fragment, function() {
65944
65985
  let subscriptionSpec = null;
65945
65986
  let lastReference = null;
65946
65987
  return {
@@ -65954,7 +65995,7 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
65954
65995
  };
65955
65996
  if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged2(ctx))) {
65956
65997
  if (subscriptionSpec) {
65957
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
65998
+ cache.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
65958
65999
  }
65959
66000
  const variables = marshalVariables2(ctx);
65960
66001
  subscriptionSpec = {
@@ -65974,28 +66015,28 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
65974
66015
  });
65975
66016
  }
65976
66017
  };
65977
- cache_default.subscribe(subscriptionSpec, variables);
66018
+ cache.subscribe(subscriptionSpec, variables);
65978
66019
  lastReference = currentReference;
65979
66020
  }
65980
66021
  next(ctx);
65981
66022
  },
65982
66023
  cleanup() {
65983
66024
  if (subscriptionSpec) {
65984
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
66025
+ cache.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
65985
66026
  }
65986
66027
  }
65987
66028
  };
65988
66029
  });
65989
66030
 
65990
66031
  // src/runtime/client/plugins/mutation.ts
65991
- var mutation = documentPlugin(ArtifactKind.Mutation, () => {
66032
+ var mutation = (cache) => documentPlugin(ArtifactKind.Mutation, () => {
65992
66033
  return {
65993
66034
  async start(ctx, { next, marshalVariables: marshalVariables2 }) {
65994
- const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
66035
+ const layerOptimistic = cache._internal_unstable.storage.createLayer(true);
65995
66036
  const optimisticResponse = ctx.stuff.optimisticResponse;
65996
66037
  let toNotify = [];
65997
66038
  if (optimisticResponse) {
65998
- toNotify = cache_default.write({
66039
+ toNotify = cache.write({
65999
66040
  selection: ctx.artifact.selection,
66000
66041
  data: await marshalSelection({
66001
66042
  selection: ctx.artifact.selection,
@@ -66015,7 +66056,7 @@ var mutation = documentPlugin(ArtifactKind.Mutation, () => {
66015
66056
  },
66016
66057
  afterNetwork(ctx, { resolve: resolve2 }) {
66017
66058
  if (ctx.cacheParams?.layer) {
66018
- cache_default.clearLayer(ctx.cacheParams.layer.id);
66059
+ cache.clearLayer(ctx.cacheParams.layer.id);
66019
66060
  }
66020
66061
  resolve2(ctx);
66021
66062
  },
@@ -66023,19 +66064,19 @@ var mutation = documentPlugin(ArtifactKind.Mutation, () => {
66023
66064
  const hasErrors = value.errors && value.errors.length > 0;
66024
66065
  if (hasErrors) {
66025
66066
  if (ctx.cacheParams?.layer) {
66026
- cache_default.clearLayer(ctx.cacheParams.layer.id);
66067
+ cache.clearLayer(ctx.cacheParams.layer.id);
66027
66068
  }
66028
66069
  }
66029
66070
  if (ctx.cacheParams?.layer) {
66030
- cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
66071
+ cache._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
66031
66072
  }
66032
66073
  resolve2(ctx);
66033
66074
  },
66034
66075
  catch(ctx, { error }) {
66035
66076
  if (ctx.cacheParams?.layer) {
66036
66077
  const { layer } = ctx.cacheParams;
66037
- cache_default.clearLayer(layer.id);
66038
- cache_default._internal_unstable.storage.resolveLayer(layer.id);
66078
+ cache.clearLayer(layer.id);
66079
+ cache._internal_unstable.storage.resolveLayer(layer.id);
66039
66080
  }
66040
66081
  throw error;
66041
66082
  }
@@ -66561,10 +66602,17 @@ var injectedPlugins_default = plugins;
66561
66602
  // src/runtime/client/index.ts
66562
66603
  var HoudiniClient = class {
66563
66604
  url;
66564
- plugins;
66565
66605
  throwOnError_operations;
66606
+ cache = null;
66607
+ throwOnError;
66608
+ fetchParams;
66609
+ pipeline;
66610
+ extraPlugins;
66566
66611
  proxies = {};
66567
66612
  componentCache = {};
66613
+ setCache(cache) {
66614
+ this.cache = cache;
66615
+ }
66568
66616
  constructor({
66569
66617
  url,
66570
66618
  fetchParams: fetchParams2,
@@ -66578,23 +66626,29 @@ var HoudiniClient = class {
66578
66626
  );
66579
66627
  }
66580
66628
  this.throwOnError_operations = throwOnError2?.operations ?? [];
66581
- this.plugins = flatten(
66629
+ let serverPort = globalThis.process?.env?.HOUDINI_PORT ?? "5173";
66630
+ this.url = url ?? (globalThis.window ? "" : `https://localhost:${serverPort}`) + localApiEndpoint(getCurrentConfig());
66631
+ this.throwOnError = throwOnError2;
66632
+ this.fetchParams = fetchParams2;
66633
+ this.pipeline = pipeline2;
66634
+ this.extraPlugins = plugins2;
66635
+ }
66636
+ get plugins() {
66637
+ return flatten(
66582
66638
  [].concat(
66583
- throwOnError2 ? [throwOnError(throwOnError2)] : [],
66584
- fetchParams(fetchParams2),
66585
- pipeline2 ?? [
66586
- query,
66587
- mutation,
66588
- fragment
66639
+ this.throwOnError ? [throwOnError(this.throwOnError)] : [],
66640
+ fetchParams(this.fetchParams),
66641
+ this.pipeline ?? [
66642
+ query(this.cache ?? cache_default),
66643
+ mutation(this.cache ?? cache_default),
66644
+ fragment(this.cache ?? cache_default)
66589
66645
  ].concat(
66590
- plugins2 ?? [],
66646
+ this.extraPlugins ?? [],
66591
66647
  injectedPlugins_default,
66592
66648
  fetch2()
66593
66649
  )
66594
66650
  )
66595
66651
  );
66596
- let serverPort = globalThis.process?.env?.HOUDINI_PORT ?? "5173";
66597
- this.url = url ?? (globalThis.window ? "" : `https://localhost:${serverPort}`) + localApiEndpoint(getCurrentConfig());
66598
66652
  }
66599
66653
  observe({
66600
66654
  enableCache = true,
@@ -66606,6 +66660,7 @@ var HoudiniClient = class {
66606
66660
  plugins: createPluginHooks(this.plugins),
66607
66661
  fetching,
66608
66662
  enableCache,
66663
+ cache: this.cache ?? void 0,
66609
66664
  ...rest
66610
66665
  });
66611
66666
  }
@@ -66706,7 +66761,7 @@ var Config = class {
66706
66761
  defaultListTarget = null,
66707
66762
  defaultPaginateMode = PaginateMode.Infinite,
66708
66763
  defaultKeys,
66709
- types: types4 = {},
66764
+ types: types5 = {},
66710
66765
  logLevel,
66711
66766
  defaultFragmentMasking = "enable",
66712
66767
  watchSchema,
@@ -66754,10 +66809,10 @@ var Config = class {
66754
66809
  if (defaultKeys) {
66755
66810
  this.defaultKeys = defaultKeys;
66756
66811
  }
66757
- if (types4) {
66812
+ if (types5) {
66758
66813
  this.typeConfig = {
66759
66814
  ...this.typeConfig,
66760
- ...types4
66815
+ ...types5
66761
66816
  };
66762
66817
  }
66763
66818
  }
@@ -67691,7 +67746,7 @@ function operation_requires_variables(operation) {
67691
67746
  )
67692
67747
  );
67693
67748
  }
67694
- function unwrapType(config, type, wrappers = []) {
67749
+ function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
67695
67750
  if (type.kind === "NonNullType") {
67696
67751
  return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
67697
67752
  }
@@ -67707,6 +67762,11 @@ function unwrapType(config, type, wrappers = []) {
67707
67762
  if (type instanceof graphql3.GraphQLList) {
67708
67763
  return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
67709
67764
  }
67765
+ if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
67766
+ type = config.schema.getType(
67767
+ config.configFile.features?.runtimeScalars?.[type.name.value].type
67768
+ );
67769
+ }
67710
67770
  const namedType = config.schema.getType(type.name.value || type.name);
67711
67771
  if (!namedType) {
67712
67772
  throw new Error("Unknown type: " + type.name.value || type.name);
@@ -67774,7 +67834,12 @@ function deepMerge2(filepath, ...targets) {
67774
67834
  // src/lib/parse.ts
67775
67835
  function parseJS(str, config) {
67776
67836
  const defaultConfig = {
67777
- plugins: ["typescript", "importAssertions", "decorators-legacy"],
67837
+ plugins: [
67838
+ "typescript",
67839
+ "importAssertions",
67840
+ "decorators-legacy",
67841
+ "explicitResourceManagement"
67842
+ ],
67778
67843
  sourceType: "module"
67779
67844
  };
67780
67845
  return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
@@ -67917,7 +67982,7 @@ async function detectTools(cwd = process.cwd()) {
67917
67982
 
67918
67983
  // src/runtime/router/match.ts
67919
67984
  var param_pattern = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;
67920
- function find_match(manifest, current, allowNull = true) {
67985
+ function find_match(config, manifest, current, allowNull = true) {
67921
67986
  let match = null;
67922
67987
  let matchVariables = null;
67923
67988
  for (const page of Object.values(manifest.pages)) {
@@ -67932,7 +67997,15 @@ function find_match(manifest, current, allowNull = true) {
67932
67997
  if (!match && !allowNull) {
67933
67998
  throw new Error("404");
67934
67999
  }
67935
- return [match, matchVariables];
68000
+ let variables = {};
68001
+ for (const document of Object.values(match?.documents ?? {})) {
68002
+ for (const [variable, { type }] of Object.entries(document.variables)) {
68003
+ if (matchVariables?.[variable]) {
68004
+ variables[variable] = parseScalar(config, type, matchVariables[variable]);
68005
+ }
68006
+ }
68007
+ }
68008
+ return [match, variables];
67936
68009
  }
67937
68010
  function parse_page_pattern(id) {
67938
68011
  const params = [];
@@ -68033,6 +68106,152 @@ function escape2(str) {
68033
68106
  return str.normalize().replace(/[[\]]/g, "\\$&").replace(/%/g, "%25").replace(/\//g, "%2[Ff]").replace(/\?/g, "%3[Ff]").replace(/#/g, "%23").replace(/[.*+?^${}()|\\]/g, "\\$&");
68034
68107
  }
68035
68108
 
68109
+ // src/lib/typescript.ts
68110
+ var graphql4 = __toESM(require("graphql"), 1);
68111
+ var recast2 = __toESM(require_main2(), 1);
68112
+ var AST2 = recast2.types.builders;
68113
+ function unwrappedTsTypeReference(config, filepath, missingScalars, {
68114
+ type,
68115
+ wrappers
68116
+ }, body) {
68117
+ let result;
68118
+ if (graphql4.isScalarType(type)) {
68119
+ result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
68120
+ } else if (graphql4.isEnumType(type)) {
68121
+ result = enumReference(config, body, type.name);
68122
+ } else {
68123
+ result = AST2.tsTypeReference(AST2.identifier(type.name));
68124
+ }
68125
+ for (const toWrap of wrappers) {
68126
+ if (toWrap === "NonNull" /* NonNull */) {
68127
+ continue;
68128
+ } else if (toWrap === "Nullable" /* Nullable */) {
68129
+ result = nullableField(result, true);
68130
+ } else if (toWrap === "List" /* List */) {
68131
+ result = AST2.tsArrayType(AST2.tsParenthesizedType(result));
68132
+ }
68133
+ }
68134
+ return result;
68135
+ }
68136
+ function tsTypeReference(config, filepath, missingScalars, definition, body) {
68137
+ const { type, wrappers } = unwrapType(config, definition.type);
68138
+ return unwrappedTsTypeReference(
68139
+ config,
68140
+ filepath,
68141
+ missingScalars,
68142
+ { type, wrappers },
68143
+ body
68144
+ );
68145
+ }
68146
+ function enumReference(config, body, name) {
68147
+ ensureImports({
68148
+ config,
68149
+ body,
68150
+ import: ["ValueOf"],
68151
+ importKind: "type",
68152
+ sourceModule: "$houdini/runtime/lib/types"
68153
+ });
68154
+ return AST2.tsTypeReference(
68155
+ AST2.identifier("ValueOf"),
68156
+ AST2.tsTypeParameterInstantiation([AST2.tsTypeQuery(AST2.identifier(name))])
68157
+ );
68158
+ }
68159
+ function readonlyProperty(prop, enable = true) {
68160
+ if (enable) {
68161
+ prop.readonly = true;
68162
+ }
68163
+ return prop;
68164
+ }
68165
+ function nullableField(inner, input = false) {
68166
+ const members = [inner, AST2.tsNullKeyword()];
68167
+ if (input) {
68168
+ members.push(AST2.tsUndefinedKeyword());
68169
+ }
68170
+ return AST2.tsUnionType(members);
68171
+ }
68172
+ function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
68173
+ if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
68174
+ if (!field) {
68175
+ return AST2.tsNeverKeyword();
68176
+ }
68177
+ const component = config.componentFields[field.parent][field.field];
68178
+ const sourcePathRelative = path_exports.relative(
68179
+ path_exports.join(config.projectRoot, "src"),
68180
+ component.filepath
68181
+ );
68182
+ let sourcePathParsed = path_exports.parse(sourcePathRelative);
68183
+ let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
68184
+ const localImport = ensureImports({
68185
+ config,
68186
+ body,
68187
+ import: "__component__" + component.fragment,
68188
+ sourceModule: path_exports.join(
68189
+ path_exports.relative(path_exports.dirname(filepath), config.projectRoot),
68190
+ "src",
68191
+ sourcePath
68192
+ )
68193
+ }) ?? "__component__" + component.fragment;
68194
+ const parameters = AST2.tsTypeReference(AST2.identifier("Parameters"));
68195
+ parameters.typeParameters = AST2.tsTypeParameterInstantiation([
68196
+ AST2.tsTypeQuery(AST2.identifier(localImport))
68197
+ ]);
68198
+ const indexed = AST2.tsIndexedAccessType(
68199
+ parameters,
68200
+ AST2.tsLiteralType(AST2.numericLiteral(0))
68201
+ );
68202
+ const omit = AST2.tsTypeReference(AST2.identifier("Omit"));
68203
+ omit.typeParameters = AST2.tsTypeParameterInstantiation([
68204
+ indexed,
68205
+ AST2.tsLiteralType(AST2.stringLiteral(component.prop))
68206
+ ]);
68207
+ const arg = AST2.identifier("props");
68208
+ arg.typeAnnotation = AST2.tsTypeAnnotation(omit);
68209
+ const returnType = AST2.tsTypeReference(AST2.identifier("ReturnType"));
68210
+ returnType.typeParameters = AST2.tsTypeParameterInstantiation([
68211
+ AST2.tsTypeQuery(AST2.identifier(localImport))
68212
+ ]);
68213
+ const fnType = AST2.tsFunctionType([arg]);
68214
+ fnType.typeAnnotation = AST2.tsTypeAnnotation(returnType);
68215
+ return fnType;
68216
+ }
68217
+ switch (target.name) {
68218
+ case "String": {
68219
+ return AST2.tsStringKeyword();
68220
+ }
68221
+ case "Int": {
68222
+ return AST2.tsNumberKeyword();
68223
+ }
68224
+ case "Float": {
68225
+ return AST2.tsNumberKeyword();
68226
+ }
68227
+ case "Boolean": {
68228
+ return AST2.tsBooleanKeyword();
68229
+ }
68230
+ case "ID": {
68231
+ return AST2.tsStringKeyword();
68232
+ }
68233
+ default: {
68234
+ if (graphql4.isNonNullType(target) && "ofType" in target) {
68235
+ return scalarPropertyValue(
68236
+ config,
68237
+ filepath,
68238
+ missingScalars,
68239
+ target.ofType,
68240
+ body,
68241
+ field
68242
+ );
68243
+ }
68244
+ if (config.scalars?.[target.name]) {
68245
+ return AST2.tsTypeReference(AST2.identifier(config.scalars?.[target.name].type));
68246
+ }
68247
+ if (target.name !== config.componentScalar) {
68248
+ missingScalars.add(target.name);
68249
+ }
68250
+ return AST2.tsAnyKeyword();
68251
+ }
68252
+ }
68253
+ }
68254
+
68036
68255
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
68037
68256
  var WalkerBase = class {
68038
68257
  constructor() {
@@ -68146,7 +68365,7 @@ async function asyncWalk(ast, { enter, leave }) {
68146
68365
  }
68147
68366
 
68148
68367
  // src/lib/walk.ts
68149
- var graphql4 = __toESM(require("graphql"), 1);
68368
+ var graphql5 = __toESM(require("graphql"), 1);
68150
68369
  async function find_graphql(config, parsedScript, walker) {
68151
68370
  await asyncWalk(parsedScript, {
68152
68371
  async enter(node, parent) {
@@ -68201,7 +68420,7 @@ async function find_graphql(config, parsedScript, walker) {
68201
68420
  } else if (!documentString) {
68202
68421
  return;
68203
68422
  }
68204
- const parsedTag = graphql4.parse(documentString);
68423
+ const parsedTag = graphql5.parse(documentString);
68205
68424
  if (walker.where && !walker.where(parsedTag, { node, parent })) {
68206
68425
  return;
68207
68426
  }
@@ -68333,7 +68552,7 @@ function extractAnonymousQuery(config, raw, expr, propName) {
68333
68552
  };
68334
68553
  return defs.concat([
68335
68554
  {
68336
- raw: graphql4.print(parsed),
68555
+ raw: graphql5.print(parsed),
68337
68556
  parsed
68338
68557
  }
68339
68558
  ]);
@@ -68474,7 +68693,7 @@ function serialized_manifest_path(config, base = base_dir(config)) {
68474
68693
 
68475
68694
  // src/lib/router/manifest.ts
68476
68695
  var t2 = __toESM(require_lib6(), 1);
68477
- var graphql5 = __toESM(require("graphql"), 1);
68696
+ var graphql6 = __toESM(require("graphql"), 1);
68478
68697
  async function load_manifest(args) {
68479
68698
  const manifest = await walk_routes({
68480
68699
  config: args.config,
@@ -68491,7 +68710,8 @@ async function load_manifest(args) {
68491
68710
  local_yoga: false
68492
68711
  },
68493
68712
  queries: [],
68494
- layouts: []
68713
+ layouts: [],
68714
+ variables: {}
68495
68715
  });
68496
68716
  if (args.includeArtifacts) {
68497
68717
  try {
@@ -68522,6 +68742,7 @@ async function walk_routes(args) {
68522
68742
  const directory_contents = await fs_exports.readdir(args.filepath, {
68523
68743
  withFileTypes: true
68524
68744
  });
68745
+ const variables = { ...args.variables };
68525
68746
  let newLayouts = args.layouts;
68526
68747
  let newLayoutQueries = args.queries;
68527
68748
  let layout = null;
@@ -68545,7 +68766,8 @@ async function walk_routes(args) {
68545
68766
  url: args.url,
68546
68767
  project: args.project,
68547
68768
  type: "layout",
68548
- contents: layoutQueryContents
68769
+ contents: layoutQueryContents,
68770
+ variables
68549
68771
  });
68550
68772
  newLayoutQueries = [...args.queries, layoutQuery.name];
68551
68773
  }
@@ -68558,7 +68780,8 @@ async function walk_routes(args) {
68558
68780
  contents: layoutViewContents,
68559
68781
  layouts: args.layouts,
68560
68782
  queries: newLayoutQueries,
68561
- config: args.config
68783
+ config: args.config,
68784
+ variables
68562
68785
  });
68563
68786
  newLayouts = [...args.layouts, page_id(layout.url)];
68564
68787
  }
@@ -68569,7 +68792,8 @@ async function walk_routes(args) {
68569
68792
  url: args.url,
68570
68793
  project: args.project,
68571
68794
  type: "page",
68572
- contents: pageQueryContents
68795
+ contents: pageQueryContents,
68796
+ variables
68573
68797
  });
68574
68798
  }
68575
68799
  if (pageViewContents) {
@@ -68581,7 +68805,8 @@ async function walk_routes(args) {
68581
68805
  contents: pageViewContents,
68582
68806
  layouts: newLayouts,
68583
68807
  queries: pageQuery ? [...newLayoutQueries, pageQuery.name] : newLayoutQueries,
68584
- config: args.config
68808
+ config: args.config,
68809
+ variables
68585
68810
  });
68586
68811
  }
68587
68812
  await Promise.all(
@@ -68594,7 +68819,8 @@ async function walk_routes(args) {
68594
68819
  filepath: path_exports.join(args.filepath, dir.name),
68595
68820
  url: `${args.url}${dir.name}/`,
68596
68821
  queries: newLayoutQueries,
68597
- layouts: newLayouts
68822
+ layouts: newLayouts,
68823
+ variables
68598
68824
  });
68599
68825
  })
68600
68826
  );
@@ -68616,12 +68842,18 @@ async function add_view(args) {
68616
68842
  url: args.url,
68617
68843
  layouts: args.layouts,
68618
68844
  path: path_exports.relative(args.config.projectRoot, args.path),
68619
- query_options: args.queries
68845
+ query_options: args.queries,
68846
+ params: Object.fromEntries(
68847
+ parse_page_pattern(args.url).params.map((param) => [
68848
+ param.name,
68849
+ args.variables[param.name] ?? null
68850
+ ])
68851
+ )
68620
68852
  };
68621
68853
  return target[id];
68622
68854
  }
68623
68855
  async function add_query(args) {
68624
- const parsed = graphql5.parse(args.contents);
68856
+ const parsed = graphql6.parse(args.contents);
68625
68857
  const query2 = parsed.definitions.find(
68626
68858
  (def) => def.kind === "OperationDefinition" && def.operation === "query"
68627
68859
  );
@@ -68629,20 +68861,30 @@ async function add_query(args) {
68629
68861
  throw new Error("No query found");
68630
68862
  }
68631
68863
  let loading = false;
68632
- await graphql5.visit(parsed, {
68864
+ await graphql6.visit(parsed, {
68633
68865
  Directive(node) {
68634
68866
  if (node.name.value === args.config.loadingDirective) {
68635
68867
  loading = true;
68636
68868
  }
68637
68869
  }
68638
68870
  });
68871
+ const queryVariables = Object.fromEntries(
68872
+ query2.variableDefinitions?.map((variable) => {
68873
+ const { type, wrappers } = unwrapType(args.config, variable.type, [], true);
68874
+ return [
68875
+ variable.variable.name.value,
68876
+ { wrappers, type: type.name }
68877
+ ];
68878
+ }) ?? []
68879
+ );
68880
+ Object.assign(args.variables, queryVariables);
68639
68881
  const target = args.type === "page" ? args.project.page_queries : args.project.layout_queries;
68640
68882
  target[page_id(args.url)] = {
68641
68883
  path: path_exports.relative(args.config.routesDir, args.path),
68642
68884
  name: query2.name.value,
68643
68885
  url: args.url,
68644
68886
  loading,
68645
- variables: query2.variableDefinitions?.map((variable) => variable.variable.name.value) ?? []
68887
+ variables: queryVariables
68646
68888
  };
68647
68889
  return target[page_id(args.url)];
68648
68890
  }
@@ -68696,7 +68938,18 @@ async function extractQueries(source) {
68696
68938
  } else {
68697
68939
  return [];
68698
68940
  }
68699
- return props.filter((p) => p !== "children");
68941
+ return props.reduce((queries, query2) => {
68942
+ if (query2 === "children") {
68943
+ return queries;
68944
+ }
68945
+ if (query2.endsWith("$handle")) {
68946
+ query2 = query2.substring(0, query2.length - "$handle".length);
68947
+ }
68948
+ if (queries.includes(query2)) {
68949
+ return queries;
68950
+ }
68951
+ return queries.concat([query2]);
68952
+ }, []);
68700
68953
  }
68701
68954
 
68702
68955
  // src/lib/router/server.ts
@@ -69035,6 +69288,7 @@ async function get_session(req, secrets) {
69035
69288
  detectTools,
69036
69289
  ensureArtifactImport,
69037
69290
  ensureImports,
69291
+ enumReference,
69038
69292
  exec,
69039
69293
  extractHeaders,
69040
69294
  extractHeadersStr,
@@ -69064,6 +69318,7 @@ async function get_session(req, secrets) {
69064
69318
  localApiEndpoint,
69065
69319
  localApiSessionKeys,
69066
69320
  mutation,
69321
+ nullableField,
69067
69322
  operation_requires_variables,
69068
69323
  orderedPlugins,
69069
69324
  parentField,
@@ -69078,12 +69333,16 @@ async function get_session(req, secrets) {
69078
69333
  pullSchema,
69079
69334
  query,
69080
69335
  readConfigFile,
69336
+ readonlyProperty,
69081
69337
  routerConventions,
69082
69338
  runPipeline,
69339
+ scalarPropertyValue,
69083
69340
  setMockConfig,
69084
69341
  siteURL,
69085
69342
  subscription,
69343
+ tsTypeReference,
69086
69344
  unwrapType,
69345
+ unwrappedTsTypeReference,
69087
69346
  wrapType
69088
69347
  });
69089
69348
  /*!