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
@@ -13566,14 +13566,14 @@ var require_lib3 = __commonJS({
13566
13566
  this.preserveSpace = !!preserveSpace;
13567
13567
  }
13568
13568
  };
13569
- var types4 = {
13569
+ var types5 = {
13570
13570
  brace: new TokContext("{"),
13571
13571
  j_oTag: new TokContext("<tag"),
13572
13572
  j_cTag: new TokContext("</tag"),
13573
13573
  j_expr: new TokContext("<tag>...</tag>", true)
13574
13574
  };
13575
13575
  {
13576
- types4.template = new TokContext("`", true);
13576
+ types5.template = new TokContext("`", true);
13577
13577
  }
13578
13578
  var beforeExpr = true;
13579
13579
  var startsExpr = true;
@@ -14111,17 +14111,17 @@ var require_lib3 = __commonJS({
14111
14111
  context.pop();
14112
14112
  };
14113
14113
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
14114
- context.push(types4.brace);
14114
+ context.push(types5.brace);
14115
14115
  };
14116
14116
  tokenTypes[22].updateContext = (context) => {
14117
- if (context[context.length - 1] === types4.template) {
14117
+ if (context[context.length - 1] === types5.template) {
14118
14118
  context.pop();
14119
14119
  } else {
14120
- context.push(types4.template);
14120
+ context.push(types5.template);
14121
14121
  }
14122
14122
  };
14123
14123
  tokenTypes[142].updateContext = (context) => {
14124
- context.push(types4.j_expr, types4.j_oTag);
14124
+ context.push(types5.j_expr, types5.j_oTag);
14125
14125
  };
14126
14126
  }
14127
14127
  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";
@@ -14681,7 +14681,7 @@ var require_lib3 = __commonJS({
14681
14681
  this.end = 0;
14682
14682
  this.lastTokEndLoc = null;
14683
14683
  this.lastTokStartLoc = null;
14684
- this.context = [types4.brace];
14684
+ this.context = [types5.brace];
14685
14685
  this.firstInvalidTemplateEscapePos = null;
14686
14686
  this.strictErrors = /* @__PURE__ */ new Map();
14687
14687
  this.tokensLength = 0;
@@ -18508,7 +18508,7 @@ var require_lib3 = __commonJS({
18508
18508
  context
18509
18509
  } = this.state;
18510
18510
  const currentContext = context[context.length - 1];
18511
- if (currentContext === types4.j_oTag || currentContext === types4.j_expr) {
18511
+ if (currentContext === types5.j_oTag || currentContext === types5.j_expr) {
18512
18512
  context.pop();
18513
18513
  }
18514
18514
  }
@@ -19530,9 +19530,9 @@ var require_lib3 = __commonJS({
19530
19530
  switch (this.state.type) {
19531
19531
  case 5:
19532
19532
  node = this.startNode();
19533
- this.setContext(types4.brace);
19533
+ this.setContext(types5.brace);
19534
19534
  this.next();
19535
- node = this.jsxParseExpressionContainer(node, types4.j_oTag);
19535
+ node = this.jsxParseExpressionContainer(node, types5.j_oTag);
19536
19536
  if (node.expression.type === "JSXEmptyExpression") {
19537
19537
  this.raise(JsxErrors.AttributeIsEmpty, node);
19538
19538
  }
@@ -19551,7 +19551,7 @@ var require_lib3 = __commonJS({
19551
19551
  jsxParseSpreadChild(node) {
19552
19552
  this.next();
19553
19553
  node.expression = this.parseExpression();
19554
- this.setContext(types4.j_expr);
19554
+ this.setContext(types5.j_expr);
19555
19555
  this.state.canStartJSXElement = true;
19556
19556
  this.expect(8);
19557
19557
  return this.finishNode(node, "JSXSpreadChild");
@@ -19571,11 +19571,11 @@ var require_lib3 = __commonJS({
19571
19571
  jsxParseAttribute() {
19572
19572
  const node = this.startNode();
19573
19573
  if (this.match(5)) {
19574
- this.setContext(types4.brace);
19574
+ this.setContext(types5.brace);
19575
19575
  this.next();
19576
19576
  this.expect(21);
19577
19577
  node.argument = this.parseMaybeAssignAllowIn();
19578
- this.setContext(types4.j_oTag);
19578
+ this.setContext(types5.j_oTag);
19579
19579
  this.state.canStartJSXElement = true;
19580
19580
  this.expect(8);
19581
19581
  return this.finishNode(node, "JSXSpreadAttribute");
@@ -19634,12 +19634,12 @@ var require_lib3 = __commonJS({
19634
19634
  break;
19635
19635
  case 5: {
19636
19636
  const node2 = this.startNode();
19637
- this.setContext(types4.brace);
19637
+ this.setContext(types5.brace);
19638
19638
  this.next();
19639
19639
  if (this.match(21)) {
19640
19640
  children.push(this.jsxParseSpreadChild(node2));
19641
19641
  } else {
19642
- children.push(this.jsxParseExpressionContainer(node2, types4.j_expr));
19642
+ children.push(this.jsxParseExpressionContainer(node2, types5.j_expr));
19643
19643
  }
19644
19644
  break;
19645
19645
  }
@@ -19704,11 +19704,11 @@ var require_lib3 = __commonJS({
19704
19704
  }
19705
19705
  getTokenFromCode(code2) {
19706
19706
  const context = this.curContext();
19707
- if (context === types4.j_expr) {
19707
+ if (context === types5.j_expr) {
19708
19708
  this.jsxReadToken();
19709
19709
  return;
19710
19710
  }
19711
- if (context === types4.j_oTag || context === types4.j_cTag) {
19711
+ if (context === types5.j_oTag || context === types5.j_cTag) {
19712
19712
  if (isIdentifierStart(code2)) {
19713
19713
  this.jsxReadWord();
19714
19714
  return;
@@ -19718,7 +19718,7 @@ var require_lib3 = __commonJS({
19718
19718
  this.finishToken(143);
19719
19719
  return;
19720
19720
  }
19721
- if ((code2 === 34 || code2 === 39) && context === types4.j_oTag) {
19721
+ if ((code2 === 34 || code2 === 39) && context === types5.j_oTag) {
19722
19722
  this.jsxReadString(code2);
19723
19723
  return;
19724
19724
  }
@@ -19736,17 +19736,17 @@ var require_lib3 = __commonJS({
19736
19736
  type
19737
19737
  } = this.state;
19738
19738
  if (type === 56 && prevType === 142) {
19739
- context.splice(-2, 2, types4.j_cTag);
19739
+ context.splice(-2, 2, types5.j_cTag);
19740
19740
  this.state.canStartJSXElement = false;
19741
19741
  } else if (type === 142) {
19742
- context.push(types4.j_oTag);
19742
+ context.push(types5.j_oTag);
19743
19743
  } else if (type === 143) {
19744
19744
  const out = context[context.length - 1];
19745
- if (out === types4.j_oTag && prevType === 56 || out === types4.j_cTag) {
19745
+ if (out === types5.j_oTag && prevType === 56 || out === types5.j_cTag) {
19746
19746
  context.pop();
19747
- this.state.canStartJSXElement = context[context.length - 1] === types4.j_expr;
19747
+ this.state.canStartJSXElement = context[context.length - 1] === types5.j_expr;
19748
19748
  } else {
19749
- this.setContext(types4.j_expr);
19749
+ this.setContext(types5.j_expr);
19750
19750
  this.state.canStartJSXElement = true;
19751
19751
  }
19752
19752
  } else {
@@ -21121,14 +21121,14 @@ var require_lib3 = __commonJS({
21121
21121
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
21122
21122
  const node = this.startNode();
21123
21123
  const hasLeadingOperator = this.eat(operator);
21124
- const types5 = [];
21124
+ const types6 = [];
21125
21125
  do {
21126
- types5.push(parseConstituentType());
21126
+ types6.push(parseConstituentType());
21127
21127
  } while (this.eat(operator));
21128
- if (types5.length === 1 && !hasLeadingOperator) {
21129
- return types5[0];
21128
+ if (types6.length === 1 && !hasLeadingOperator) {
21129
+ return types6[0];
21130
21130
  }
21131
- node.types = types5;
21131
+ node.types = types6;
21132
21132
  return this.finishNode(node, kind);
21133
21133
  }
21134
21134
  tsParseIntersectionTypeOrHigher() {
@@ -21692,7 +21692,7 @@ var require_lib3 = __commonJS({
21692
21692
  }));
21693
21693
  if (node.params.length === 0) {
21694
21694
  this.raise(TSErrors.EmptyTypeArguments, node);
21695
- } else if (!this.state.inType && this.curContext() === types4.brace) {
21695
+ } else if (!this.state.inType && this.curContext() === types5.brace) {
21696
21696
  this.reScan_lt_gt();
21697
21697
  }
21698
21698
  this.expect(48);
@@ -22318,7 +22318,7 @@ var require_lib3 = __commonJS({
22318
22318
  context
22319
22319
  } = this.state;
22320
22320
  const currentContext = context[context.length - 1];
22321
- if (currentContext === types4.j_oTag || currentContext === types4.j_expr) {
22321
+ if (currentContext === types5.j_oTag || currentContext === types5.j_expr) {
22322
22322
  context.pop();
22323
22323
  }
22324
22324
  }
@@ -27450,9 +27450,9 @@ var require_shared = __commonJS({
27450
27450
  var tslib_1 = require_tslib();
27451
27451
  var types_1 = tslib_1.__importDefault(require_types());
27452
27452
  function default_1(fork) {
27453
- var types4 = fork.use(types_1.default);
27454
- var Type = types4.Type;
27455
- var builtin = types4.builtInTypes;
27453
+ var types5 = fork.use(types_1.default);
27454
+ var Type = types5.Type;
27455
+ var builtin = types5.builtInTypes;
27456
27456
  var isNumber = builtin.number;
27457
27457
  function geq(than) {
27458
27458
  return Type.from(function(value) {
@@ -27602,9 +27602,9 @@ var require_types = __commonJS({
27602
27602
  }(BaseType);
27603
27603
  var OrType = function(_super) {
27604
27604
  tslib_1.__extends(OrType2, _super);
27605
- function OrType2(types4) {
27605
+ function OrType2(types5) {
27606
27606
  var _this = _super.call(this) || this;
27607
- _this.types = types4;
27607
+ _this.types = types5;
27608
27608
  _this.kind = "OrType";
27609
27609
  return _this;
27610
27610
  }
@@ -27745,11 +27745,11 @@ var require_types = __commonJS({
27745
27745
  function typesPlugin(_fork) {
27746
27746
  var Type = {
27747
27747
  or: function() {
27748
- var types4 = [];
27748
+ var types5 = [];
27749
27749
  for (var _i = 0; _i < arguments.length; _i++) {
27750
- types4[_i] = arguments[_i];
27750
+ types5[_i] = arguments[_i];
27751
27751
  }
27752
- return new OrType(types4.map(function(type) {
27752
+ return new OrType(types5.map(function(type) {
27753
27753
  return Type.from(type);
27754
27754
  }));
27755
27755
  },
@@ -28194,9 +28194,9 @@ var require_path2 = __commonJS({
28194
28194
  var Op = Object.prototype;
28195
28195
  var hasOwn = Op.hasOwnProperty;
28196
28196
  function pathPlugin(fork) {
28197
- var types4 = fork.use(types_1.default);
28198
- var isArray = types4.builtInTypes.array;
28199
- var isNumber = types4.builtInTypes.number;
28197
+ var types5 = fork.use(types_1.default);
28198
+ var isArray = types5.builtInTypes.array;
28199
+ var isNumber = types5.builtInTypes.number;
28200
28200
  var Path = function Path2(value, parentPath, name) {
28201
28201
  if (!(this instanceof Path2)) {
28202
28202
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -28498,13 +28498,13 @@ var require_scope = __commonJS({
28498
28498
  var types_1 = tslib_1.__importDefault(require_types());
28499
28499
  var hasOwn = Object.prototype.hasOwnProperty;
28500
28500
  function scopePlugin(fork) {
28501
- var types4 = fork.use(types_1.default);
28502
- var Type = types4.Type;
28503
- var namedTypes = types4.namedTypes;
28501
+ var types5 = fork.use(types_1.default);
28502
+ var Type = types5.Type;
28503
+ var namedTypes = types5.namedTypes;
28504
28504
  var Node = namedTypes.Node;
28505
28505
  var Expression = namedTypes.Expression;
28506
- var isArray = types4.builtInTypes.array;
28507
- var b = types4.builders;
28506
+ var isArray = types5.builtInTypes.array;
28507
+ var b = types5.builders;
28508
28508
  var Scope = function Scope2(path3, parentScope) {
28509
28509
  if (!(this instanceof Scope2)) {
28510
28510
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -28567,7 +28567,7 @@ var require_scope = __commonJS({
28567
28567
  ++index;
28568
28568
  }
28569
28569
  var name = prefix + index;
28570
- return this.bindings[name] = types4.builders.identifier(name);
28570
+ return this.bindings[name] = types5.builders.identifier(name);
28571
28571
  };
28572
28572
  Sp.injectTemporary = function(identifier, init) {
28573
28573
  identifier || (identifier = this.declareTemporary());
@@ -28643,7 +28643,7 @@ var require_scope = __commonJS({
28643
28643
  bindings
28644
28644
  );
28645
28645
  } else if (Node.check(node) && !Expression.check(node)) {
28646
- types4.eachField(node, function(name, child) {
28646
+ types5.eachField(node, function(name, child) {
28647
28647
  var childPath = path3.get(name);
28648
28648
  if (!pathHasValue(childPath, child)) {
28649
28649
  throw new Error("");
@@ -28721,24 +28721,24 @@ var require_scope = __commonJS({
28721
28721
  addPattern(patternPath.get("argument"), bindings);
28722
28722
  }
28723
28723
  }
28724
- function addTypePattern(patternPath, types5) {
28724
+ function addTypePattern(patternPath, types6) {
28725
28725
  var pattern = patternPath.value;
28726
28726
  namedTypes.Pattern.assert(pattern);
28727
28727
  if (namedTypes.Identifier.check(pattern)) {
28728
- if (hasOwn.call(types5, pattern.name)) {
28729
- types5[pattern.name].push(patternPath);
28728
+ if (hasOwn.call(types6, pattern.name)) {
28729
+ types6[pattern.name].push(patternPath);
28730
28730
  } else {
28731
- types5[pattern.name] = [patternPath];
28731
+ types6[pattern.name] = [patternPath];
28732
28732
  }
28733
28733
  }
28734
28734
  }
28735
- function addTypeParameter(parameterPath, types5) {
28735
+ function addTypeParameter(parameterPath, types6) {
28736
28736
  var parameter = parameterPath.value;
28737
28737
  FlowOrTSTypeParameterType.assert(parameter);
28738
- if (hasOwn.call(types5, parameter.name)) {
28739
- types5[parameter.name].push(parameterPath);
28738
+ if (hasOwn.call(types6, parameter.name)) {
28739
+ types6[parameter.name].push(parameterPath);
28740
28740
  } else {
28741
- types5[parameter.name] = [parameterPath];
28741
+ types6[parameter.name] = [parameterPath];
28742
28742
  }
28743
28743
  }
28744
28744
  Sp.lookup = function(name) {
@@ -28779,11 +28779,11 @@ var require_node_path = __commonJS({
28779
28779
  var scope_1 = tslib_1.__importDefault(require_scope());
28780
28780
  var shared_1 = require_shared();
28781
28781
  function nodePathPlugin(fork) {
28782
- var types4 = fork.use(types_1.default);
28783
- var n = types4.namedTypes;
28784
- var b = types4.builders;
28785
- var isNumber = types4.builtInTypes.number;
28786
- var isArray = types4.builtInTypes.array;
28782
+ var types5 = fork.use(types_1.default);
28783
+ var n = types5.namedTypes;
28784
+ var b = types5.builders;
28785
+ var isNumber = types5.builtInTypes.number;
28786
+ var isArray = types5.builtInTypes.array;
28787
28787
  var Path = fork.use(path_1.default);
28788
28788
  var Scope = fork.use(scope_1.default);
28789
28789
  var NodePath = function NodePath2(value, parentPath, name) {
@@ -28874,7 +28874,7 @@ var require_node_path = __commonJS({
28874
28874
  return scope || null;
28875
28875
  };
28876
28876
  NPp.getValueProperty = function(name) {
28877
- return types4.getFieldValue(this.value, name);
28877
+ return types5.getFieldValue(this.value, name);
28878
28878
  };
28879
28879
  NPp.needsParens = function(assumeExpressionContext) {
28880
28880
  var pp = this.parentPath;
@@ -29016,7 +29016,7 @@ var require_node_path = __commonJS({
29016
29016
  return node.some(containsCallExpression);
29017
29017
  }
29018
29018
  if (n.Node.check(node)) {
29019
- return types4.someField(node, function(_name, child) {
29019
+ return types5.someField(node, function(_name, child) {
29020
29020
  return containsCallExpression(child);
29021
29021
  });
29022
29022
  }
@@ -29137,11 +29137,11 @@ var require_path_visitor = __commonJS({
29137
29137
  var shared_1 = require_shared();
29138
29138
  var hasOwn = Object.prototype.hasOwnProperty;
29139
29139
  function pathVisitorPlugin(fork) {
29140
- var types4 = fork.use(types_1.default);
29140
+ var types5 = fork.use(types_1.default);
29141
29141
  var NodePath = fork.use(node_path_1.default);
29142
- var isArray = types4.builtInTypes.array;
29143
- var isObject2 = types4.builtInTypes.object;
29144
- var isFunction = types4.builtInTypes.function;
29142
+ var isArray = types5.builtInTypes.array;
29143
+ var isObject2 = types5.builtInTypes.object;
29144
+ var isFunction = types5.builtInTypes.function;
29145
29145
  var undefined2;
29146
29146
  var PathVisitor = function PathVisitor2() {
29147
29147
  if (!(this instanceof PathVisitor2)) {
@@ -29161,7 +29161,7 @@ var require_path_visitor = __commonJS({
29161
29161
  typeNames[methodName.slice("visit".length)] = true;
29162
29162
  }
29163
29163
  }
29164
- var supertypeTable = types4.computeSupertypeLookupTable(typeNames);
29164
+ var supertypeTable = types5.computeSupertypeLookupTable(typeNames);
29165
29165
  var methodNameTable = /* @__PURE__ */ Object.create(null);
29166
29166
  var typeNameKeys = Object.keys(supertypeTable);
29167
29167
  var typeNameCount = typeNameKeys.length;
@@ -29280,7 +29280,7 @@ var require_path_visitor = __commonJS({
29280
29280
  path3.each(visitor.visitWithoutReset, visitor);
29281
29281
  } else if (!isObject2.check(value)) {
29282
29282
  } else {
29283
- var childNames = types4.getFieldNames(value);
29283
+ var childNames = types5.getFieldNames(value);
29284
29284
  if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
29285
29285
  childNames.push("comments");
29286
29286
  }
@@ -29289,7 +29289,7 @@ var require_path_visitor = __commonJS({
29289
29289
  for (var i2 = 0; i2 < childCount; ++i2) {
29290
29290
  var childName = childNames[i2];
29291
29291
  if (!hasOwn.call(value, childName)) {
29292
- value[childName] = types4.getFieldValue(value, childName);
29292
+ value[childName] = types5.getFieldValue(value, childName);
29293
29293
  }
29294
29294
  childPaths.push(path3.get(childName));
29295
29295
  }
@@ -29432,13 +29432,13 @@ var require_equiv = __commonJS({
29432
29432
  var shared_1 = require_shared();
29433
29433
  var types_1 = tslib_1.__importDefault(require_types());
29434
29434
  function default_1(fork) {
29435
- var types4 = fork.use(types_1.default);
29436
- var getFieldNames = types4.getFieldNames;
29437
- var getFieldValue = types4.getFieldValue;
29438
- var isArray = types4.builtInTypes.array;
29439
- var isObject2 = types4.builtInTypes.object;
29440
- var isDate = types4.builtInTypes.Date;
29441
- var isRegExp = types4.builtInTypes.RegExp;
29435
+ var types5 = fork.use(types_1.default);
29436
+ var getFieldNames = types5.getFieldNames;
29437
+ var getFieldValue = types5.getFieldValue;
29438
+ var isArray = types5.builtInTypes.array;
29439
+ var isObject2 = types5.builtInTypes.object;
29440
+ var isDate = types5.builtInTypes.Date;
29441
+ var isRegExp = types5.builtInTypes.RegExp;
29442
29442
  var hasOwn = Object.prototype.hasOwnProperty;
29443
29443
  function astNodesAreEquivalent(a, b, problemPath) {
29444
29444
  if (isArray.check(problemPath)) {
@@ -29591,24 +29591,24 @@ var require_fork = __commonJS({
29591
29591
  var shared_1 = require_shared();
29592
29592
  function default_1(plugins2) {
29593
29593
  var fork = createFork();
29594
- var types4 = fork.use(types_1.default);
29594
+ var types5 = fork.use(types_1.default);
29595
29595
  plugins2.forEach(fork.use);
29596
- types4.finalize();
29596
+ types5.finalize();
29597
29597
  var PathVisitor = fork.use(path_visitor_1.default);
29598
29598
  return {
29599
- Type: types4.Type,
29600
- builtInTypes: types4.builtInTypes,
29601
- namedTypes: types4.namedTypes,
29602
- builders: types4.builders,
29603
- defineMethod: types4.defineMethod,
29604
- getFieldNames: types4.getFieldNames,
29605
- getFieldValue: types4.getFieldValue,
29606
- eachField: types4.eachField,
29607
- someField: types4.someField,
29608
- getSupertypeNames: types4.getSupertypeNames,
29609
- getBuilderName: types4.getBuilderName,
29599
+ Type: types5.Type,
29600
+ builtInTypes: types5.builtInTypes,
29601
+ namedTypes: types5.namedTypes,
29602
+ builders: types5.builders,
29603
+ defineMethod: types5.defineMethod,
29604
+ getFieldNames: types5.getFieldNames,
29605
+ getFieldValue: types5.getFieldValue,
29606
+ eachField: types5.eachField,
29607
+ someField: types5.someField,
29608
+ getSupertypeNames: types5.getSupertypeNames,
29609
+ getBuilderName: types5.getBuilderName,
29610
29610
  astNodesAreEquivalent: fork.use(equiv_1.default),
29611
- finalize: types4.finalize,
29611
+ finalize: types5.finalize,
29612
29612
  Path: fork.use(path_1.default),
29613
29613
  NodePath: fork.use(node_path_1.default),
29614
29614
  PathVisitor,
@@ -29778,8 +29778,8 @@ var require_core2 = __commonJS({
29778
29778
  var types_1 = tslib_1.__importDefault(require_types());
29779
29779
  var shared_1 = tslib_1.__importStar(require_shared());
29780
29780
  function default_1(fork) {
29781
- var types4 = fork.use(types_1.default);
29782
- var Type = types4.Type;
29781
+ var types5 = fork.use(types_1.default);
29782
+ var Type = types5.Type;
29783
29783
  var def = Type.def;
29784
29784
  var or = Type.or;
29785
29785
  var shared = fork.use(shared_1.default);
@@ -29871,9 +29871,9 @@ var require_es6 = __commonJS({
29871
29871
  var shared_1 = tslib_1.__importStar(require_shared());
29872
29872
  function default_1(fork) {
29873
29873
  fork.use(core_1.default);
29874
- var types4 = fork.use(types_1.default);
29875
- var def = types4.Type.def;
29876
- var or = types4.Type.or;
29874
+ var types5 = fork.use(types_1.default);
29875
+ var def = types5.Type.def;
29876
+ var or = types5.Type.or;
29877
29877
  var defaults = fork.use(shared_1.default).defaults;
29878
29878
  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"]);
29879
29879
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -29963,8 +29963,8 @@ var require_es2017 = __commonJS({
29963
29963
  var shared_1 = tslib_1.__importStar(require_shared());
29964
29964
  function default_1(fork) {
29965
29965
  fork.use(es2016_1.default);
29966
- var types4 = fork.use(types_1.default);
29967
- var def = types4.Type.def;
29966
+ var types5 = fork.use(types_1.default);
29967
+ var def = types5.Type.def;
29968
29968
  var defaults = fork.use(shared_1.default).defaults;
29969
29969
  def("Function").field("async", Boolean, defaults["false"]);
29970
29970
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -29987,9 +29987,9 @@ var require_es2018 = __commonJS({
29987
29987
  var shared_1 = tslib_1.__importStar(require_shared());
29988
29988
  function default_1(fork) {
29989
29989
  fork.use(es2017_1.default);
29990
- var types4 = fork.use(types_1.default);
29991
- var def = types4.Type.def;
29992
- var or = types4.Type.or;
29990
+ var types5 = fork.use(types_1.default);
29991
+ var def = types5.Type.def;
29992
+ var or = types5.Type.or;
29993
29993
  var defaults = fork.use(shared_1.default).defaults;
29994
29994
  def("ForOfStatement").field("await", Boolean, defaults["false"]);
29995
29995
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -30020,9 +30020,9 @@ var require_es2019 = __commonJS({
30020
30020
  var shared_1 = tslib_1.__importStar(require_shared());
30021
30021
  function default_1(fork) {
30022
30022
  fork.use(es2018_1.default);
30023
- var types4 = fork.use(types_1.default);
30024
- var def = types4.Type.def;
30025
- var or = types4.Type.or;
30023
+ var types5 = fork.use(types_1.default);
30024
+ var def = types5.Type.def;
30025
+ var or = types5.Type.or;
30026
30026
  var defaults = fork.use(shared_1.default).defaults;
30027
30027
  def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
30028
30028
  }
@@ -30046,9 +30046,9 @@ var require_es20202 = __commonJS({
30046
30046
  function default_1(fork) {
30047
30047
  fork.use(es2020_1.default);
30048
30048
  fork.use(es2019_1.default);
30049
- var types4 = fork.use(types_1.default);
30050
- var def = types4.Type.def;
30051
- var or = types4.Type.or;
30049
+ var types5 = fork.use(types_1.default);
30050
+ var def = types5.Type.def;
30051
+ var or = types5.Type.or;
30052
30052
  var shared = fork.use(shared_1.default);
30053
30053
  var defaults = shared.defaults;
30054
30054
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -30098,8 +30098,8 @@ var require_es2022 = __commonJS({
30098
30098
  var shared_1 = require_shared();
30099
30099
  function default_1(fork) {
30100
30100
  fork.use(es2021_1.default);
30101
- var types4 = fork.use(types_1.default);
30102
- var def = types4.Type.def;
30101
+ var types5 = fork.use(types_1.default);
30102
+ var def = types5.Type.def;
30103
30103
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
30104
30104
  }
30105
30105
  exports.default = default_1;
@@ -30120,9 +30120,9 @@ var require_es_proposals = __commonJS({
30120
30120
  var es2022_1 = tslib_1.__importDefault(require_es2022());
30121
30121
  function default_1(fork) {
30122
30122
  fork.use(es2022_1.default);
30123
- var types4 = fork.use(types_1.default);
30124
- var Type = types4.Type;
30125
- var def = types4.Type.def;
30123
+ var types5 = fork.use(types_1.default);
30124
+ var Type = types5.Type;
30125
+ var def = types5.Type.def;
30126
30126
  var or = Type.or;
30127
30127
  var shared = fork.use(shared_1.default);
30128
30128
  var defaults = shared.defaults;
@@ -30162,9 +30162,9 @@ var require_jsx = __commonJS({
30162
30162
  var shared_1 = tslib_1.__importStar(require_shared());
30163
30163
  function default_1(fork) {
30164
30164
  fork.use(es_proposals_1.default);
30165
- var types4 = fork.use(types_1.default);
30166
- var def = types4.Type.def;
30167
- var or = types4.Type.or;
30165
+ var types5 = fork.use(types_1.default);
30166
+ var def = types5.Type.def;
30167
+ var or = types5.Type.or;
30168
30168
  var defaults = fork.use(shared_1.default).defaults;
30169
30169
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
30170
30170
  def("Literal"),
@@ -30222,9 +30222,9 @@ var require_type_annotations = __commonJS({
30222
30222
  var types_1 = tslib_1.__importDefault(require_types());
30223
30223
  var shared_1 = tslib_1.__importStar(require_shared());
30224
30224
  function default_1(fork) {
30225
- var types4 = fork.use(types_1.default);
30226
- var def = types4.Type.def;
30227
- var or = types4.Type.or;
30225
+ var types5 = fork.use(types_1.default);
30226
+ var def = types5.Type.def;
30227
+ var or = types5.Type.or;
30228
30228
  var defaults = fork.use(shared_1.default).defaults;
30229
30229
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
30230
30230
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -30259,9 +30259,9 @@ var require_flow = __commonJS({
30259
30259
  function default_1(fork) {
30260
30260
  fork.use(es_proposals_1.default);
30261
30261
  fork.use(type_annotations_1.default);
30262
- var types4 = fork.use(types_1.default);
30263
- var def = types4.Type.def;
30264
- var or = types4.Type.or;
30262
+ var types5 = fork.use(types_1.default);
30263
+ var def = types5.Type.def;
30264
+ var or = types5.Type.or;
30265
30265
  var defaults = fork.use(shared_1.default).defaults;
30266
30266
  def("Flow").bases("Node");
30267
30267
  def("FlowType").bases("Flow");
@@ -30375,10 +30375,10 @@ var require_esprima = __commonJS({
30375
30375
  var shared_1 = tslib_1.__importStar(require_shared());
30376
30376
  function default_1(fork) {
30377
30377
  fork.use(es_proposals_1.default);
30378
- var types4 = fork.use(types_1.default);
30378
+ var types5 = fork.use(types_1.default);
30379
30379
  var defaults = fork.use(shared_1.default).defaults;
30380
- var def = types4.Type.def;
30381
- var or = types4.Type.or;
30380
+ var def = types5.Type.def;
30381
+ var or = types5.Type.or;
30382
30382
  def("VariableDeclaration").field("declarations", [or(
30383
30383
  def("VariableDeclarator"),
30384
30384
  def("Identifier")
@@ -30423,11 +30423,11 @@ var require_babel_core = __commonJS({
30423
30423
  function default_1(fork) {
30424
30424
  var _a, _b, _c, _d, _e;
30425
30425
  fork.use(es_proposals_1.default);
30426
- var types4 = fork.use(types_1.default);
30426
+ var types5 = fork.use(types_1.default);
30427
30427
  var defaults = fork.use(shared_1.default).defaults;
30428
- var def = types4.Type.def;
30429
- var or = types4.Type.or;
30430
- var isUndefined = types4.builtInTypes.undefined;
30428
+ var def = types5.Type.def;
30429
+ var or = types5.Type.or;
30430
+ var isUndefined = types5.builtInTypes.undefined;
30431
30431
  def("Noop").bases("Statement").build();
30432
30432
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
30433
30433
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -30452,7 +30452,7 @@ var require_babel_core = __commonJS({
30452
30452
  raw: String
30453
30453
  },
30454
30454
  function getDefault() {
30455
- var value = types4.getFieldValue(this, "value");
30455
+ var value = types5.getFieldValue(this, "value");
30456
30456
  return {
30457
30457
  rawValue: value,
30458
30458
  raw: toRaw ? toRaw(value) : String(value)
@@ -30555,8 +30555,8 @@ var require_babel = __commonJS({
30555
30555
  var flow_1 = tslib_1.__importDefault(require_flow());
30556
30556
  var shared_1 = require_shared();
30557
30557
  function default_1(fork) {
30558
- var types4 = fork.use(types_1.default);
30559
- var def = types4.Type.def;
30558
+ var types5 = fork.use(types_1.default);
30559
+ var def = types5.Type.def;
30560
30560
  fork.use(babel_core_1.default);
30561
30561
  fork.use(flow_1.default);
30562
30562
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -30582,12 +30582,12 @@ var require_typescript = __commonJS({
30582
30582
  function default_1(fork) {
30583
30583
  fork.use(babel_core_1.default);
30584
30584
  fork.use(type_annotations_1.default);
30585
- var types4 = fork.use(types_1.default);
30586
- var n = types4.namedTypes;
30587
- var def = types4.Type.def;
30588
- var or = types4.Type.or;
30585
+ var types5 = fork.use(types_1.default);
30586
+ var n = types5.namedTypes;
30587
+ var def = types5.Type.def;
30588
+ var or = types5.Type.or;
30589
30589
  var defaults = fork.use(shared_1.default).defaults;
30590
- var StringLiteral = types4.Type.from(function(value, deep) {
30590
+ var StringLiteral = types5.Type.from(function(value, deep) {
30591
30591
  if (n.StringLiteral && n.StringLiteral.check(value, deep)) {
30592
30592
  return true;
30593
30593
  }
@@ -32563,8 +32563,8 @@ var require_util2 = __commonJS({
32563
32563
  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;
32564
32564
  var tslib_1 = require_tslib();
32565
32565
  var assert_1 = tslib_1.__importDefault(__require("assert"));
32566
- var types4 = tslib_1.__importStar(require_main());
32567
- var n = types4.namedTypes;
32566
+ var types5 = tslib_1.__importStar(require_main());
32567
+ var n = types5.namedTypes;
32568
32568
  var source_map_1 = tslib_1.__importDefault(require_source_map());
32569
32569
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
32570
32570
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -39882,10 +39882,10 @@ var require_comments = __commonJS({
39882
39882
  exports.printComments = exports.attach = void 0;
39883
39883
  var tslib_1 = require_tslib();
39884
39884
  var assert_1 = tslib_1.__importDefault(__require("assert"));
39885
- var types4 = tslib_1.__importStar(require_main());
39886
- var n = types4.namedTypes;
39887
- var isArray = types4.builtInTypes.array;
39888
- var isObject2 = types4.builtInTypes.object;
39885
+ var types5 = tslib_1.__importStar(require_main());
39886
+ var n = types5.namedTypes;
39887
+ var isArray = types5.builtInTypes.array;
39888
+ var isObject2 = types5.builtInTypes.object;
39889
39889
  var lines_1 = require_lines();
39890
39890
  var util_1 = require_util2();
39891
39891
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -39916,7 +39916,7 @@ var require_comments = __commonJS({
39916
39916
  if (isArray.check(node)) {
39917
39917
  names = Object.keys(node);
39918
39918
  } else if (isObject2.check(node)) {
39919
- names = types4.getFieldNames(node);
39919
+ names = types5.getFieldNames(node);
39920
39920
  } else {
39921
39921
  return resultArray;
39922
39922
  }
@@ -40094,7 +40094,7 @@ var require_comments = __commonJS({
40094
40094
  function printComments(path3, print6) {
40095
40095
  var value = path3.getValue();
40096
40096
  var innerLines = print6(path3);
40097
- var comments = n.Node.check(value) && types4.getFieldValue(value, "comments");
40097
+ var comments = n.Node.check(value) && types5.getFieldValue(value, "comments");
40098
40098
  if (!comments || comments.length === 0) {
40099
40099
  return innerLines;
40100
40100
  }
@@ -40102,8 +40102,8 @@ var require_comments = __commonJS({
40102
40102
  var trailingParts = [innerLines];
40103
40103
  path3.each(function(commentPath) {
40104
40104
  var comment = commentPath.getValue();
40105
- var leading = types4.getFieldValue(comment, "leading");
40106
- var trailing = types4.getFieldValue(comment, "trailing");
40105
+ var leading = types5.getFieldValue(comment, "leading");
40106
+ var trailing = types5.getFieldValue(comment, "trailing");
40107
40107
  if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
40108
40108
  leadingParts.push(printLeadingComment(commentPath, print6));
40109
40109
  } else if (trailing) {
@@ -40125,10 +40125,10 @@ var require_parser = __commonJS({
40125
40125
  exports.parse = void 0;
40126
40126
  var tslib_1 = require_tslib();
40127
40127
  var assert_1 = tslib_1.__importDefault(__require("assert"));
40128
- var types4 = tslib_1.__importStar(require_main());
40129
- var b = types4.builders;
40130
- var isObject2 = types4.builtInTypes.object;
40131
- var isArray = types4.builtInTypes.array;
40128
+ var types5 = tslib_1.__importStar(require_main());
40129
+ var b = types5.builders;
40130
+ var isObject2 = types5.builtInTypes.object;
40131
+ var isArray = types5.builtInTypes.array;
40132
40132
  var options_1 = require_options();
40133
40133
  var lines_1 = require_lines();
40134
40134
  var comments_1 = require_comments();
@@ -40314,11 +40314,11 @@ var require_fast_path = __commonJS({
40314
40314
  Object.defineProperty(exports, "__esModule", { value: true });
40315
40315
  var tslib_1 = require_tslib();
40316
40316
  var assert_1 = tslib_1.__importDefault(__require("assert"));
40317
- var types4 = tslib_1.__importStar(require_main());
40317
+ var types5 = tslib_1.__importStar(require_main());
40318
40318
  var util = tslib_1.__importStar(require_util2());
40319
- var n = types4.namedTypes;
40320
- var isArray = types4.builtInTypes.array;
40321
- var isNumber = types4.builtInTypes.number;
40319
+ var n = types5.namedTypes;
40320
+ var isArray = types5.builtInTypes.array;
40321
+ var isNumber = types5.builtInTypes.number;
40322
40322
  var PRECEDENCE = {};
40323
40323
  [
40324
40324
  ["??"],
@@ -40347,7 +40347,7 @@ var require_fast_path = __commonJS({
40347
40347
  if (obj instanceof FastPath) {
40348
40348
  return obj.copy();
40349
40349
  }
40350
- if (obj instanceof types4.NodePath) {
40350
+ if (obj instanceof types5.NodePath) {
40351
40351
  var copy = Object.create(FastPath.prototype);
40352
40352
  var stack = [obj.value];
40353
40353
  for (var pp = void 0; pp = obj.parentPath; obj = pp)
@@ -40658,7 +40658,7 @@ var require_fast_path = __commonJS({
40658
40658
  return node.some(containsCallExpression);
40659
40659
  }
40660
40660
  if (n.Node.check(node)) {
40661
- return types4.someField(node, function(_name, child) {
40661
+ return types5.someField(node, function(_name, child) {
40662
40662
  return containsCallExpression(child);
40663
40663
  });
40664
40664
  }
@@ -40748,16 +40748,16 @@ var require_patcher = __commonJS({
40748
40748
  var tslib_1 = require_tslib();
40749
40749
  var assert_1 = tslib_1.__importDefault(__require("assert"));
40750
40750
  var linesModule = tslib_1.__importStar(require_lines());
40751
- var types4 = tslib_1.__importStar(require_main());
40752
- var Printable = types4.namedTypes.Printable;
40753
- var Expression = types4.namedTypes.Expression;
40754
- var ReturnStatement = types4.namedTypes.ReturnStatement;
40755
- var SourceLocation = types4.namedTypes.SourceLocation;
40751
+ var types5 = tslib_1.__importStar(require_main());
40752
+ var Printable = types5.namedTypes.Printable;
40753
+ var Expression = types5.namedTypes.Expression;
40754
+ var ReturnStatement = types5.namedTypes.ReturnStatement;
40755
+ var SourceLocation = types5.namedTypes.SourceLocation;
40756
40756
  var util_1 = require_util2();
40757
40757
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
40758
- var isObject2 = types4.builtInTypes.object;
40759
- var isArray = types4.builtInTypes.array;
40760
- var isString = types4.builtInTypes.string;
40758
+ var isObject2 = types5.builtInTypes.object;
40759
+ var isArray = types5.builtInTypes.array;
40760
+ var isString = types5.builtInTypes.string;
40761
40761
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
40762
40762
  var Patcher = function Patcher2(lines) {
40763
40763
  assert_1.default.ok(this instanceof Patcher2);
@@ -41027,8 +41027,8 @@ var require_patcher = __commonJS({
41027
41027
  if (k.charAt(0) === "_") {
41028
41028
  continue;
41029
41029
  }
41030
- newPath.stack.push(k, types4.getFieldValue(newNode, k));
41031
- oldPath.stack.push(k, types4.getFieldValue(oldNode, k));
41030
+ newPath.stack.push(k, types5.getFieldValue(newNode, k));
41031
+ oldPath.stack.push(k, types5.getFieldValue(oldNode, k));
41032
41032
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
41033
41033
  newPath.stack.length -= 2;
41034
41034
  oldPath.stack.length -= 2;
@@ -41052,16 +41052,16 @@ var require_printer = __commonJS({
41052
41052
  exports.Printer = void 0;
41053
41053
  var tslib_1 = require_tslib();
41054
41054
  var assert_1 = tslib_1.__importDefault(__require("assert"));
41055
- var types4 = tslib_1.__importStar(require_main());
41055
+ var types5 = tslib_1.__importStar(require_main());
41056
41056
  var comments_1 = require_comments();
41057
41057
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
41058
41058
  var lines_1 = require_lines();
41059
41059
  var options_1 = require_options();
41060
41060
  var patcher_1 = require_patcher();
41061
41061
  var util = tslib_1.__importStar(require_util2());
41062
- var namedTypes = types4.namedTypes;
41063
- var isString = types4.builtInTypes.string;
41064
- var isObject2 = types4.builtInTypes.object;
41062
+ var namedTypes = types5.namedTypes;
41063
+ var isString = types5.builtInTypes.string;
41064
+ var isObject2 = types5.builtInTypes.object;
41065
41065
  var PrintResult = function PrintResult2(code, sourceMap) {
41066
41066
  assert_1.default.ok(this instanceof PrintResult2);
41067
41067
  isString.assert(code);
@@ -41223,7 +41223,7 @@ var require_printer = __commonJS({
41223
41223
  case "OptionalMemberExpression": {
41224
41224
  parts.push(path3.call(print6, "object"));
41225
41225
  var property = path3.call(print6, "property");
41226
- var optional = types4.getFieldValue(n, "optional");
41226
+ var optional = types5.getFieldValue(n, "optional");
41227
41227
  if (n.computed) {
41228
41228
  parts.push(optional ? "?.[" : "[", property, "]");
41229
41229
  } else {
@@ -41494,7 +41494,7 @@ var require_printer = __commonJS({
41494
41494
  if (n.typeArguments) {
41495
41495
  parts.push(path3.call(print6, "typeArguments"));
41496
41496
  }
41497
- if (types4.getFieldValue(n, "optional")) {
41497
+ if (types5.getFieldValue(n, "optional")) {
41498
41498
  parts.push("?.");
41499
41499
  }
41500
41500
  parts.push(printArgumentsList(path3, options, print6));
@@ -43173,8 +43173,8 @@ var require_printer = __commonJS({
43173
43173
  });
43174
43174
  }
43175
43175
  function getPossibleRaw(node) {
43176
- var value = types4.getFieldValue(node, "value");
43177
- var extra = types4.getFieldValue(node, "extra");
43176
+ var value = types5.getFieldValue(node, "value");
43177
+ var extra = types5.getFieldValue(node, "extra");
43178
43178
  if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
43179
43179
  return extra.raw;
43180
43180
  }
@@ -43222,8 +43222,8 @@ var require_main2 = __commonJS({
43222
43222
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
43223
43223
  var tslib_1 = require_tslib();
43224
43224
  var fs_1 = tslib_1.__importDefault(__require("fs"));
43225
- var types4 = tslib_1.__importStar(require_main());
43226
- exports.types = types4;
43225
+ var types5 = tslib_1.__importStar(require_main());
43226
+ exports.types = types5;
43227
43227
  var parser_1 = require_parser();
43228
43228
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
43229
43229
  return parser_1.parse;
@@ -47651,30 +47651,30 @@ var require_utils3 = __commonJS({
47651
47651
  validate2.oneOf = values;
47652
47652
  return validate2;
47653
47653
  }
47654
- function assertNodeType(...types4) {
47654
+ function assertNodeType(...types5) {
47655
47655
  function validate2(node, key, val) {
47656
- for (const type of types4) {
47656
+ for (const type of types5) {
47657
47657
  if ((0, _is.default)(type, val)) {
47658
47658
  (0, _validate.validateChild)(node, key, val);
47659
47659
  return;
47660
47660
  }
47661
47661
  }
47662
- 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)}`);
47662
+ 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)}`);
47663
47663
  }
47664
- validate2.oneOfNodeTypes = types4;
47664
+ validate2.oneOfNodeTypes = types5;
47665
47665
  return validate2;
47666
47666
  }
47667
- function assertNodeOrValueType(...types4) {
47667
+ function assertNodeOrValueType(...types5) {
47668
47668
  function validate2(node, key, val) {
47669
- for (const type of types4) {
47669
+ for (const type of types5) {
47670
47670
  if (getType(val) === type || (0, _is.default)(type, val)) {
47671
47671
  (0, _validate.validateChild)(node, key, val);
47672
47672
  return;
47673
47673
  }
47674
47674
  }
47675
- 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)}`);
47675
+ 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)}`);
47676
47676
  }
47677
- validate2.oneOfNodeOrValueTypes = types4;
47677
+ validate2.oneOfNodeOrValueTypes = types5;
47678
47678
  return validate2;
47679
47679
  }
47680
47680
  function assertValueType(type) {
@@ -51276,7 +51276,7 @@ var require_generated2 = __commonJS({
51276
51276
  exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
51277
51277
  exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
51278
51278
  exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
51279
- exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
51279
+ exports.tSTypeReference = exports.tsTypeReference = tsTypeReference2;
51280
51280
  exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
51281
51281
  exports.tSUnionType = exports.tsUnionType = tsUnionType;
51282
51282
  exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
@@ -52102,10 +52102,10 @@ var require_generated2 = __commonJS({
52102
52102
  body
52103
52103
  });
52104
52104
  }
52105
- function intersectionTypeAnnotation(types4) {
52105
+ function intersectionTypeAnnotation(types5) {
52106
52106
  return (0, _validateNode.default)({
52107
52107
  type: "IntersectionTypeAnnotation",
52108
- types: types4
52108
+ types: types5
52109
52109
  });
52110
52110
  }
52111
52111
  function mixedTypeAnnotation() {
@@ -52228,10 +52228,10 @@ var require_generated2 = __commonJS({
52228
52228
  type: "ThisTypeAnnotation"
52229
52229
  };
52230
52230
  }
52231
- function tupleTypeAnnotation(types4) {
52231
+ function tupleTypeAnnotation(types5) {
52232
52232
  return (0, _validateNode.default)({
52233
52233
  type: "TupleTypeAnnotation",
52234
- types: types4
52234
+ types: types5
52235
52235
  });
52236
52236
  }
52237
52237
  function typeofTypeAnnotation(argument) {
@@ -52282,10 +52282,10 @@ var require_generated2 = __commonJS({
52282
52282
  params
52283
52283
  });
52284
52284
  }
52285
- function unionTypeAnnotation(types4) {
52285
+ function unionTypeAnnotation(types5) {
52286
52286
  return (0, _validateNode.default)({
52287
52287
  type: "UnionTypeAnnotation",
52288
- types: types4
52288
+ types: types5
52289
52289
  });
52290
52290
  }
52291
52291
  function variance(kind) {
@@ -52738,7 +52738,7 @@ var require_generated2 = __commonJS({
52738
52738
  typeAnnotation: typeAnnotation2
52739
52739
  });
52740
52740
  }
52741
- function tsTypeReference(typeName, typeParameters = null) {
52741
+ function tsTypeReference2(typeName, typeParameters = null) {
52742
52742
  return (0, _validateNode.default)({
52743
52743
  type: "TSTypeReference",
52744
52744
  typeName,
@@ -52798,16 +52798,16 @@ var require_generated2 = __commonJS({
52798
52798
  optional
52799
52799
  });
52800
52800
  }
52801
- function tsUnionType(types4) {
52801
+ function tsUnionType(types5) {
52802
52802
  return (0, _validateNode.default)({
52803
52803
  type: "TSUnionType",
52804
- types: types4
52804
+ types: types5
52805
52805
  });
52806
52806
  }
52807
- function tsIntersectionType(types4) {
52807
+ function tsIntersectionType(types5) {
52808
52808
  return (0, _validateNode.default)({
52809
52809
  type: "TSIntersectionType",
52810
- types: types4
52810
+ types: types5
52811
52811
  });
52812
52812
  }
52813
52813
  function tsConditionalType(checkType, extendsType, trueType, falseType) {
@@ -54422,12 +54422,12 @@ var require_removeTypeDuplicates = __commonJS({
54422
54422
  const generics = /* @__PURE__ */ new Map();
54423
54423
  const bases = /* @__PURE__ */ new Map();
54424
54424
  const typeGroups = /* @__PURE__ */ new Set();
54425
- const types4 = [];
54425
+ const types5 = [];
54426
54426
  for (let i2 = 0; i2 < nodes.length; i2++) {
54427
54427
  const node = nodes[i2];
54428
54428
  if (!node)
54429
54429
  continue;
54430
- if (types4.indexOf(node) >= 0) {
54430
+ if (types5.indexOf(node) >= 0) {
54431
54431
  continue;
54432
54432
  }
54433
54433
  if ((0, _generated.isAnyTypeAnnotation)(node)) {
@@ -54461,15 +54461,15 @@ var require_removeTypeDuplicates = __commonJS({
54461
54461
  }
54462
54462
  continue;
54463
54463
  }
54464
- types4.push(node);
54464
+ types5.push(node);
54465
54465
  }
54466
54466
  for (const [, baseType] of bases) {
54467
- types4.push(baseType);
54467
+ types5.push(baseType);
54468
54468
  }
54469
54469
  for (const [, genericName] of generics) {
54470
- types4.push(genericName);
54470
+ types5.push(genericName);
54471
54471
  }
54472
- return types4;
54472
+ return types5;
54473
54473
  }
54474
54474
  }
54475
54475
  });
@@ -54484,8 +54484,8 @@ var require_createFlowUnionType = __commonJS({
54484
54484
  exports.default = createFlowUnionType;
54485
54485
  var _generated = require_generated2();
54486
54486
  var _removeTypeDuplicates = require_removeTypeDuplicates();
54487
- function createFlowUnionType(types4) {
54488
- const flattened = (0, _removeTypeDuplicates.default)(types4);
54487
+ function createFlowUnionType(types5) {
54488
+ const flattened = (0, _removeTypeDuplicates.default)(types5);
54489
54489
  if (flattened.length === 1) {
54490
54490
  return flattened[0];
54491
54491
  } else {
@@ -54512,12 +54512,12 @@ var require_removeTypeDuplicates2 = __commonJS({
54512
54512
  const generics = /* @__PURE__ */ new Map();
54513
54513
  const bases = /* @__PURE__ */ new Map();
54514
54514
  const typeGroups = /* @__PURE__ */ new Set();
54515
- const types4 = [];
54515
+ const types5 = [];
54516
54516
  for (let i2 = 0; i2 < nodes.length; i2++) {
54517
54517
  const node = nodes[i2];
54518
54518
  if (!node)
54519
54519
  continue;
54520
- if (types4.indexOf(node) >= 0) {
54520
+ if (types5.indexOf(node) >= 0) {
54521
54521
  continue;
54522
54522
  }
54523
54523
  if ((0, _generated.isTSAnyKeyword)(node)) {
@@ -54551,15 +54551,15 @@ var require_removeTypeDuplicates2 = __commonJS({
54551
54551
  }
54552
54552
  continue;
54553
54553
  }
54554
- types4.push(node);
54554
+ types5.push(node);
54555
54555
  }
54556
54556
  for (const [, baseType] of bases) {
54557
- types4.push(baseType);
54557
+ types5.push(baseType);
54558
54558
  }
54559
54559
  for (const [, genericName] of generics) {
54560
- types4.push(genericName);
54560
+ types5.push(genericName);
54561
54561
  }
54562
- return types4;
54562
+ return types5;
54563
54563
  }
54564
54564
  }
54565
54565
  });
@@ -54576,10 +54576,10 @@ var require_createTSUnionType = __commonJS({
54576
54576
  var _removeTypeDuplicates = require_removeTypeDuplicates2();
54577
54577
  var _index = require_generated();
54578
54578
  function createTSUnionType(typeAnnotations) {
54579
- const types4 = typeAnnotations.map((type) => {
54579
+ const types5 = typeAnnotations.map((type) => {
54580
54580
  return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
54581
54581
  });
54582
- const flattened = (0, _removeTypeDuplicates.default)(types4);
54582
+ const flattened = (0, _removeTypeDuplicates.default)(types5);
54583
54583
  if (flattened.length === 1) {
54584
54584
  return flattened[0];
54585
54585
  } else {
@@ -59049,7 +59049,7 @@ var printDocASTReducer = {
59049
59049
  leave: ({ name, interfaces, directives, fields }) => join(["interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
59050
59050
  },
59051
59051
  UnionTypeDefinition: {
59052
- leave: ({ name, directives, types: types4 }) => join(["union", name, join(directives, " "), wrap("= ", join(types4, " | "))], " ")
59052
+ leave: ({ name, directives, types: types5 }) => join(["union", name, join(directives, " "), wrap("= ", join(types5, " | "))], " ")
59053
59053
  },
59054
59054
  EnumTypeDefinition: {
59055
59055
  leave: ({ name, directives, values }) => join(["enum", name, join(directives, " "), block(values)], " ")
@@ -59076,7 +59076,7 @@ var printDocASTReducer = {
59076
59076
  leave: ({ name, interfaces, directives, fields }) => join(["extend interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
59077
59077
  },
59078
59078
  UnionTypeExtension: {
59079
- leave: ({ name, directives, types: types4 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types4, " | "))], " ")
59079
+ leave: ({ name, directives, types: types5 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types5, " | "))], " ")
59080
59080
  },
59081
59081
  EnumTypeExtension: {
59082
59082
  leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
@@ -59956,8 +59956,8 @@ function healTypes(originalTypeMap, directives) {
59956
59956
  }
59957
59957
  }
59958
59958
  function healUnderlyingTypes(type) {
59959
- const types4 = type.getTypes();
59960
- types4.push(...types4.splice(0).map((t3) => healType(t3)).filter(Boolean));
59959
+ const types5 = type.getTypes();
59960
+ types5.push(...types5.splice(0).map((t3) => healType(t3)).filter(Boolean));
59961
59961
  }
59962
59962
  function healType(type) {
59963
59963
  if (isListType5(type)) {
@@ -60741,11 +60741,11 @@ function mergeEnum(e1, e2, config) {
60741
60741
 
60742
60742
  // ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
60743
60743
  import { Source, Kind as Kind8 } from "graphql";
60744
- function isStringTypes(types4) {
60745
- return typeof types4 === "string";
60744
+ function isStringTypes(types5) {
60745
+ return typeof types5 === "string";
60746
60746
  }
60747
- function isSourceTypes(types4) {
60748
- return types4 instanceof Source;
60747
+ function isSourceTypes(types5) {
60748
+ return types5 instanceof Source;
60749
60749
  }
60750
60750
  function extractType(type) {
60751
60751
  let visitedType = type;
@@ -61440,6 +61440,44 @@ function deepMerge(...objects) {
61440
61440
  return mergedObj;
61441
61441
  }
61442
61442
 
61443
+ // src/runtime/lib/types.ts
61444
+ var CachePolicy = {
61445
+ CacheOrNetwork: "CacheOrNetwork",
61446
+ CacheOnly: "CacheOnly",
61447
+ NetworkOnly: "NetworkOnly",
61448
+ CacheAndNetwork: "CacheAndNetwork",
61449
+ NoCache: "NoCache"
61450
+ };
61451
+ var PaginateMode = {
61452
+ Infinite: "Infinite",
61453
+ SinglePage: "SinglePage"
61454
+ };
61455
+ var ArtifactKind = {
61456
+ Query: "HoudiniQuery",
61457
+ Subscription: "HoudiniSubscription",
61458
+ Mutation: "HoudiniMutation",
61459
+ Fragment: "HoudiniFragment"
61460
+ };
61461
+ var CompiledFragmentKind = ArtifactKind.Fragment;
61462
+ var CompiledMutationKind = ArtifactKind.Mutation;
61463
+ var CompiledQueryKind = ArtifactKind.Query;
61464
+ var CompiledSubscriptionKind = ArtifactKind.Subscription;
61465
+ var RefetchUpdateMode = {
61466
+ append: "append",
61467
+ prepend: "prepend",
61468
+ replace: "replace"
61469
+ };
61470
+ var DataSource = {
61471
+ Cache: "cache",
61472
+ Network: "network",
61473
+ Ssr: "ssr"
61474
+ };
61475
+ var fragmentKey = " $fragments";
61476
+ var PendingValue = Symbol("houdini_loading");
61477
+ function isPending(value) {
61478
+ return typeof value === "symbol";
61479
+ }
61480
+
61443
61481
  // src/runtime/lib/scalars.ts
61444
61482
  async function marshalSelection({
61445
61483
  selection,
@@ -61456,6 +61494,9 @@ async function marshalSelection({
61456
61494
  return Object.fromEntries(
61457
61495
  await Promise.all(
61458
61496
  Object.entries(data).map(async ([fieldName, value]) => {
61497
+ if (fieldName === fragmentKey) {
61498
+ return [fieldName, value];
61499
+ }
61459
61500
  const { type, selection: selection2 } = targetSelection[fieldName];
61460
61501
  if (!type) {
61461
61502
  return [fieldName, value];
@@ -61519,43 +61560,37 @@ function marshalInputs({
61519
61560
  function isScalar(config, type) {
61520
61561
  return ["String", "Boolean", "Float", "ID", "Int"].concat(Object.keys(config.scalars || {})).includes(type);
61521
61562
  }
61522
-
61523
- // src/runtime/lib/types.ts
61524
- var CachePolicy = {
61525
- CacheOrNetwork: "CacheOrNetwork",
61526
- CacheOnly: "CacheOnly",
61527
- NetworkOnly: "NetworkOnly",
61528
- CacheAndNetwork: "CacheAndNetwork",
61529
- NoCache: "NoCache"
61530
- };
61531
- var PaginateMode = {
61532
- Infinite: "Infinite",
61533
- SinglePage: "SinglePage"
61534
- };
61535
- var ArtifactKind = {
61536
- Query: "HoudiniQuery",
61537
- Subscription: "HoudiniSubscription",
61538
- Mutation: "HoudiniMutation",
61539
- Fragment: "HoudiniFragment"
61540
- };
61541
- var CompiledFragmentKind = ArtifactKind.Fragment;
61542
- var CompiledMutationKind = ArtifactKind.Mutation;
61543
- var CompiledQueryKind = ArtifactKind.Query;
61544
- var CompiledSubscriptionKind = ArtifactKind.Subscription;
61545
- var RefetchUpdateMode = {
61546
- append: "append",
61547
- prepend: "prepend",
61548
- replace: "replace"
61549
- };
61550
- var DataSource = {
61551
- Cache: "cache",
61552
- Network: "network",
61553
- Ssr: "ssr"
61554
- };
61555
- var fragmentKey = " $fragments";
61556
- var PendingValue = Symbol("houdini_loading");
61557
- function isPending(value) {
61558
- return typeof value === "symbol";
61563
+ function parseScalar(config, type, value) {
61564
+ if (typeof value === "undefined") {
61565
+ return void 0;
61566
+ }
61567
+ if (type === "Boolean") {
61568
+ return value === "true";
61569
+ }
61570
+ if (type === "ID") {
61571
+ return value;
61572
+ }
61573
+ if (type === "String") {
61574
+ return value;
61575
+ }
61576
+ if (type === "Int") {
61577
+ const result = parseInt(value, 10);
61578
+ if (Number.isNaN(result)) {
61579
+ return void 0;
61580
+ }
61581
+ return result;
61582
+ }
61583
+ if (type === "Float") {
61584
+ const result = parseFloat(value);
61585
+ if (Number.isNaN(result)) {
61586
+ return void 0;
61587
+ }
61588
+ return result;
61589
+ }
61590
+ if (config.scalars?.[type]?.marshal) {
61591
+ return config.scalars[type]?.marshal(value);
61592
+ }
61593
+ return value;
61559
61594
  }
61560
61595
 
61561
61596
  // src/runtime/lib/store.ts
@@ -63360,167 +63395,6 @@ function flatten(source) {
63360
63395
  }, []);
63361
63396
  }
63362
63397
 
63363
- // src/runtime/client/plugins/fetch.ts
63364
- var fetch2 = (target) => {
63365
- return () => {
63366
- return {
63367
- async network(ctx, { client: client2, initialValue, resolve: resolve2, marshalVariables: marshalVariables2 }) {
63368
- if (ctx.artifact.kind === ArtifactKind.Fragment) {
63369
- return resolve2(ctx, initialValue);
63370
- }
63371
- const fetch3 = ctx.fetch ?? globalThis.fetch;
63372
- const fetchParams2 = {
63373
- name: ctx.name,
63374
- text: ctx.text,
63375
- hash: ctx.hash,
63376
- variables: marshalVariables2(ctx)
63377
- };
63378
- let fetchFn = defaultFetch(client2.url, ctx.fetchParams);
63379
- if (target) {
63380
- if (typeof target === "string") {
63381
- fetchFn = defaultFetch(target, ctx.fetchParams);
63382
- } else {
63383
- fetchFn = target;
63384
- }
63385
- }
63386
- const result = await fetchFn({
63387
- fetch: (url, args) => {
63388
- const newArgs = handleMultipart(fetchParams2, args) ?? args;
63389
- return fetch3(url, newArgs);
63390
- },
63391
- metadata: ctx.metadata,
63392
- session: ctx.session || {},
63393
- ...fetchParams2
63394
- });
63395
- resolve2(ctx, {
63396
- fetching: false,
63397
- variables: ctx.variables ?? {},
63398
- data: result.data,
63399
- errors: !result.errors || result.errors.length === 0 ? null : result.errors,
63400
- partial: false,
63401
- stale: false,
63402
- source: DataSource.Network
63403
- });
63404
- }
63405
- };
63406
- };
63407
- };
63408
- var defaultFetch = (url, params) => {
63409
- if (!url) {
63410
- throw new Error(
63411
- "Could not find configured client url. Please specify one in your HoudiniClient constructor."
63412
- );
63413
- }
63414
- return async ({ fetch: fetch3, name, text, variables }) => {
63415
- const result = await fetch3(url, {
63416
- method: "POST",
63417
- body: JSON.stringify({ operationName: name, query: text, variables }),
63418
- ...params,
63419
- headers: {
63420
- Accept: "application/graphql+json, application/json",
63421
- "Content-Type": "application/json",
63422
- ...params?.headers
63423
- }
63424
- });
63425
- return await result.json();
63426
- };
63427
- };
63428
- function handleMultipart(params, args) {
63429
- const { files } = extractFiles({
63430
- variables: params.variables
63431
- });
63432
- if (files.size) {
63433
- const req = args;
63434
- let headers = {};
63435
- if (req?.headers) {
63436
- const filtered = Object.entries(req?.headers).filter(([key, value]) => {
63437
- return !(key.toLowerCase() == "content-type" && value.toLowerCase() == "application/json");
63438
- });
63439
- headers = Object.fromEntries(filtered);
63440
- }
63441
- const form = new FormData();
63442
- if (args && args?.body) {
63443
- form.set("operations", args?.body);
63444
- } else {
63445
- form.set(
63446
- "operations",
63447
- JSON.stringify({
63448
- operationName: params.name,
63449
- query: params.text,
63450
- variables: params.variables
63451
- })
63452
- );
63453
- }
63454
- const map = {};
63455
- let i2 = 0;
63456
- files.forEach((paths) => {
63457
- map[++i2] = paths;
63458
- });
63459
- form.set("map", JSON.stringify(map));
63460
- i2 = 0;
63461
- files.forEach((paths, file) => {
63462
- form.set(`${++i2}`, file, file.name);
63463
- });
63464
- return { ...req, headers, body: form };
63465
- }
63466
- }
63467
- function isExtractableFile(value) {
63468
- return typeof File !== "undefined" && value instanceof File || typeof Blob !== "undefined" && value instanceof Blob;
63469
- }
63470
- function extractFiles(value) {
63471
- if (!arguments.length)
63472
- throw new TypeError("Argument 1 `value` is required.");
63473
- const clones = /* @__PURE__ */ new Map();
63474
- const files = /* @__PURE__ */ new Map();
63475
- function recurse(value2, path3, recursed) {
63476
- if (isExtractableFile(value2)) {
63477
- const filePaths = files.get(value2);
63478
- filePaths ? filePaths.push(path3) : files.set(value2, [path3]);
63479
- return null;
63480
- }
63481
- const valueIsList = Array.isArray(value2) || typeof FileList !== "undefined" && value2 instanceof FileList;
63482
- const valueIsPlainObject = isPlainObject(value2);
63483
- if (valueIsList || valueIsPlainObject) {
63484
- let clone2 = clones.get(value2);
63485
- const uncloned = !clone2;
63486
- if (uncloned) {
63487
- clone2 = valueIsList ? [] : value2 instanceof Object ? {} : /* @__PURE__ */ Object.create(null);
63488
- clones.set(value2, clone2);
63489
- }
63490
- if (!recursed.has(value2)) {
63491
- const pathPrefix = path3 ? `${path3}.` : "";
63492
- const recursedDeeper = new Set(recursed).add(value2);
63493
- if (valueIsList) {
63494
- let index = 0;
63495
- for (const item of value2) {
63496
- const itemClone = recurse(item, pathPrefix + index++, recursedDeeper);
63497
- if (uncloned)
63498
- clone2.push(itemClone);
63499
- }
63500
- } else
63501
- for (const key in value2) {
63502
- const propertyClone = recurse(value2[key], pathPrefix + key, recursedDeeper);
63503
- if (uncloned)
63504
- clone2[key] = propertyClone;
63505
- }
63506
- }
63507
- return clone2;
63508
- }
63509
- return value2;
63510
- }
63511
- return {
63512
- clone: recurse(value, "", /* @__PURE__ */ new Set()),
63513
- files
63514
- };
63515
- }
63516
- function isPlainObject(value) {
63517
- if (typeof value !== "object" || value === null) {
63518
- return false;
63519
- }
63520
- const prototype = Object.getPrototypeOf(value);
63521
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
63522
- }
63523
-
63524
63398
  // src/runtime/cache/gc.ts
63525
63399
  var GarbageCollector = class {
63526
63400
  cache;
@@ -65670,6 +65544,167 @@ function defaultComponentField({
65670
65544
  // src/runtime/cache/index.ts
65671
65545
  var cache_default = new Cache();
65672
65546
 
65547
+ // src/runtime/client/plugins/fetch.ts
65548
+ var fetch2 = (target) => {
65549
+ return () => {
65550
+ return {
65551
+ async network(ctx, { client: client2, initialValue, resolve: resolve2, marshalVariables: marshalVariables2 }) {
65552
+ if (ctx.artifact.kind === ArtifactKind.Fragment) {
65553
+ return resolve2(ctx, initialValue);
65554
+ }
65555
+ const fetch3 = ctx.fetch ?? globalThis.fetch;
65556
+ const fetchParams2 = {
65557
+ name: ctx.name,
65558
+ text: ctx.text,
65559
+ hash: ctx.hash,
65560
+ variables: marshalVariables2(ctx)
65561
+ };
65562
+ let fetchFn = defaultFetch(client2.url, ctx.fetchParams);
65563
+ if (target) {
65564
+ if (typeof target === "string") {
65565
+ fetchFn = defaultFetch(target, ctx.fetchParams);
65566
+ } else {
65567
+ fetchFn = target;
65568
+ }
65569
+ }
65570
+ const result = await fetchFn({
65571
+ fetch: (url, args) => {
65572
+ const newArgs = handleMultipart(fetchParams2, args) ?? args;
65573
+ return fetch3(url, newArgs);
65574
+ },
65575
+ metadata: ctx.metadata,
65576
+ session: ctx.session || {},
65577
+ ...fetchParams2
65578
+ });
65579
+ resolve2(ctx, {
65580
+ fetching: false,
65581
+ variables: ctx.variables ?? {},
65582
+ data: result.data,
65583
+ errors: !result.errors || result.errors.length === 0 ? null : result.errors,
65584
+ partial: false,
65585
+ stale: false,
65586
+ source: DataSource.Network
65587
+ });
65588
+ }
65589
+ };
65590
+ };
65591
+ };
65592
+ var defaultFetch = (url, params) => {
65593
+ if (!url) {
65594
+ throw new Error(
65595
+ "Could not find configured client url. Please specify one in your HoudiniClient constructor."
65596
+ );
65597
+ }
65598
+ return async ({ fetch: fetch3, name, text, variables }) => {
65599
+ const result = await fetch3(url, {
65600
+ method: "POST",
65601
+ body: JSON.stringify({ operationName: name, query: text, variables }),
65602
+ ...params,
65603
+ headers: {
65604
+ Accept: "application/graphql+json, application/json",
65605
+ "Content-Type": "application/json",
65606
+ ...params?.headers
65607
+ }
65608
+ });
65609
+ return await result.json();
65610
+ };
65611
+ };
65612
+ function handleMultipart(params, args) {
65613
+ const { files } = extractFiles({
65614
+ variables: params.variables
65615
+ });
65616
+ if (files.size) {
65617
+ const req = args;
65618
+ let headers = {};
65619
+ if (req?.headers) {
65620
+ const filtered = Object.entries(req?.headers).filter(([key, value]) => {
65621
+ return !(key.toLowerCase() == "content-type" && value.toLowerCase() == "application/json");
65622
+ });
65623
+ headers = Object.fromEntries(filtered);
65624
+ }
65625
+ const form = new FormData();
65626
+ if (args && args?.body) {
65627
+ form.set("operations", args?.body);
65628
+ } else {
65629
+ form.set(
65630
+ "operations",
65631
+ JSON.stringify({
65632
+ operationName: params.name,
65633
+ query: params.text,
65634
+ variables: params.variables
65635
+ })
65636
+ );
65637
+ }
65638
+ const map = {};
65639
+ let i2 = 0;
65640
+ files.forEach((paths) => {
65641
+ map[++i2] = paths;
65642
+ });
65643
+ form.set("map", JSON.stringify(map));
65644
+ i2 = 0;
65645
+ files.forEach((paths, file) => {
65646
+ form.set(`${++i2}`, file, file.name);
65647
+ });
65648
+ return { ...req, headers, body: form };
65649
+ }
65650
+ }
65651
+ function isExtractableFile(value) {
65652
+ return typeof File !== "undefined" && value instanceof File || typeof Blob !== "undefined" && value instanceof Blob;
65653
+ }
65654
+ function extractFiles(value) {
65655
+ if (!arguments.length)
65656
+ throw new TypeError("Argument 1 `value` is required.");
65657
+ const clones = /* @__PURE__ */ new Map();
65658
+ const files = /* @__PURE__ */ new Map();
65659
+ function recurse(value2, path3, recursed) {
65660
+ if (isExtractableFile(value2)) {
65661
+ const filePaths = files.get(value2);
65662
+ filePaths ? filePaths.push(path3) : files.set(value2, [path3]);
65663
+ return null;
65664
+ }
65665
+ const valueIsList = Array.isArray(value2) || typeof FileList !== "undefined" && value2 instanceof FileList;
65666
+ const valueIsPlainObject = isPlainObject(value2);
65667
+ if (valueIsList || valueIsPlainObject) {
65668
+ let clone2 = clones.get(value2);
65669
+ const uncloned = !clone2;
65670
+ if (uncloned) {
65671
+ clone2 = valueIsList ? [] : value2 instanceof Object ? {} : /* @__PURE__ */ Object.create(null);
65672
+ clones.set(value2, clone2);
65673
+ }
65674
+ if (!recursed.has(value2)) {
65675
+ const pathPrefix = path3 ? `${path3}.` : "";
65676
+ const recursedDeeper = new Set(recursed).add(value2);
65677
+ if (valueIsList) {
65678
+ let index = 0;
65679
+ for (const item of value2) {
65680
+ const itemClone = recurse(item, pathPrefix + index++, recursedDeeper);
65681
+ if (uncloned)
65682
+ clone2.push(itemClone);
65683
+ }
65684
+ } else
65685
+ for (const key in value2) {
65686
+ const propertyClone = recurse(value2[key], pathPrefix + key, recursedDeeper);
65687
+ if (uncloned)
65688
+ clone2[key] = propertyClone;
65689
+ }
65690
+ }
65691
+ return clone2;
65692
+ }
65693
+ return value2;
65694
+ }
65695
+ return {
65696
+ clone: recurse(value, "", /* @__PURE__ */ new Set()),
65697
+ files
65698
+ };
65699
+ }
65700
+ function isPlainObject(value) {
65701
+ if (typeof value !== "object" || value === null) {
65702
+ return false;
65703
+ }
65704
+ const prototype = Object.getPrototypeOf(value);
65705
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
65706
+ }
65707
+
65673
65708
  // src/runtime/client/plugins/cache.ts
65674
65709
  var serverSide = typeof globalThis.window === "undefined";
65675
65710
  var cachePolicy = ({
@@ -65800,7 +65835,7 @@ var documentPlugin = (kind, source) => {
65800
65835
  };
65801
65836
 
65802
65837
  // src/runtime/client/plugins/query.ts
65803
- var query = documentPlugin(ArtifactKind.Query, function() {
65838
+ var query = (cache) => documentPlugin(ArtifactKind.Query, function() {
65804
65839
  let subscriptionSpec = null;
65805
65840
  let lastVariables = null;
65806
65841
  return {
@@ -65828,7 +65863,7 @@ var query = documentPlugin(ArtifactKind.Query, function() {
65828
65863
  end(ctx, { resolve: resolve2, marshalVariables: marshalVariables2, variablesChanged: variablesChanged2 }) {
65829
65864
  if (variablesChanged2(ctx) && !ctx.cacheParams?.disableSubscriptions) {
65830
65865
  if (subscriptionSpec) {
65831
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
65866
+ cache.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
65832
65867
  }
65833
65868
  lastVariables = { ...marshalVariables2(ctx) };
65834
65869
  const variables = lastVariables;
@@ -65848,13 +65883,13 @@ var query = documentPlugin(ArtifactKind.Query, function() {
65848
65883
  });
65849
65884
  }
65850
65885
  };
65851
- cache_default.subscribe(subscriptionSpec, lastVariables);
65886
+ cache.subscribe(subscriptionSpec, lastVariables);
65852
65887
  }
65853
65888
  resolve2(ctx);
65854
65889
  },
65855
65890
  cleanup() {
65856
65891
  if (subscriptionSpec) {
65857
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
65892
+ cache.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
65858
65893
  lastVariables = null;
65859
65894
  }
65860
65895
  }
@@ -65862,7 +65897,7 @@ var query = documentPlugin(ArtifactKind.Query, function() {
65862
65897
  });
65863
65898
 
65864
65899
  // src/runtime/client/plugins/fragment.ts
65865
- var fragment = documentPlugin(ArtifactKind.Fragment, function() {
65900
+ var fragment = (cache) => documentPlugin(ArtifactKind.Fragment, function() {
65866
65901
  let subscriptionSpec = null;
65867
65902
  let lastReference = null;
65868
65903
  return {
@@ -65876,7 +65911,7 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
65876
65911
  };
65877
65912
  if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged2(ctx))) {
65878
65913
  if (subscriptionSpec) {
65879
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
65914
+ cache.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
65880
65915
  }
65881
65916
  const variables = marshalVariables2(ctx);
65882
65917
  subscriptionSpec = {
@@ -65896,28 +65931,28 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
65896
65931
  });
65897
65932
  }
65898
65933
  };
65899
- cache_default.subscribe(subscriptionSpec, variables);
65934
+ cache.subscribe(subscriptionSpec, variables);
65900
65935
  lastReference = currentReference;
65901
65936
  }
65902
65937
  next(ctx);
65903
65938
  },
65904
65939
  cleanup() {
65905
65940
  if (subscriptionSpec) {
65906
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
65941
+ cache.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
65907
65942
  }
65908
65943
  }
65909
65944
  };
65910
65945
  });
65911
65946
 
65912
65947
  // src/runtime/client/plugins/mutation.ts
65913
- var mutation = documentPlugin(ArtifactKind.Mutation, () => {
65948
+ var mutation = (cache) => documentPlugin(ArtifactKind.Mutation, () => {
65914
65949
  return {
65915
65950
  async start(ctx, { next, marshalVariables: marshalVariables2 }) {
65916
- const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
65951
+ const layerOptimistic = cache._internal_unstable.storage.createLayer(true);
65917
65952
  const optimisticResponse = ctx.stuff.optimisticResponse;
65918
65953
  let toNotify = [];
65919
65954
  if (optimisticResponse) {
65920
- toNotify = cache_default.write({
65955
+ toNotify = cache.write({
65921
65956
  selection: ctx.artifact.selection,
65922
65957
  data: await marshalSelection({
65923
65958
  selection: ctx.artifact.selection,
@@ -65937,7 +65972,7 @@ var mutation = documentPlugin(ArtifactKind.Mutation, () => {
65937
65972
  },
65938
65973
  afterNetwork(ctx, { resolve: resolve2 }) {
65939
65974
  if (ctx.cacheParams?.layer) {
65940
- cache_default.clearLayer(ctx.cacheParams.layer.id);
65975
+ cache.clearLayer(ctx.cacheParams.layer.id);
65941
65976
  }
65942
65977
  resolve2(ctx);
65943
65978
  },
@@ -65945,19 +65980,19 @@ var mutation = documentPlugin(ArtifactKind.Mutation, () => {
65945
65980
  const hasErrors = value.errors && value.errors.length > 0;
65946
65981
  if (hasErrors) {
65947
65982
  if (ctx.cacheParams?.layer) {
65948
- cache_default.clearLayer(ctx.cacheParams.layer.id);
65983
+ cache.clearLayer(ctx.cacheParams.layer.id);
65949
65984
  }
65950
65985
  }
65951
65986
  if (ctx.cacheParams?.layer) {
65952
- cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
65987
+ cache._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
65953
65988
  }
65954
65989
  resolve2(ctx);
65955
65990
  },
65956
65991
  catch(ctx, { error }) {
65957
65992
  if (ctx.cacheParams?.layer) {
65958
65993
  const { layer } = ctx.cacheParams;
65959
- cache_default.clearLayer(layer.id);
65960
- cache_default._internal_unstable.storage.resolveLayer(layer.id);
65994
+ cache.clearLayer(layer.id);
65995
+ cache._internal_unstable.storage.resolveLayer(layer.id);
65961
65996
  }
65962
65997
  throw error;
65963
65998
  }
@@ -66483,10 +66518,17 @@ var injectedPlugins_default = plugins;
66483
66518
  // src/runtime/client/index.ts
66484
66519
  var HoudiniClient = class {
66485
66520
  url;
66486
- plugins;
66487
66521
  throwOnError_operations;
66522
+ cache = null;
66523
+ throwOnError;
66524
+ fetchParams;
66525
+ pipeline;
66526
+ extraPlugins;
66488
66527
  proxies = {};
66489
66528
  componentCache = {};
66529
+ setCache(cache) {
66530
+ this.cache = cache;
66531
+ }
66490
66532
  constructor({
66491
66533
  url,
66492
66534
  fetchParams: fetchParams2,
@@ -66500,23 +66542,29 @@ var HoudiniClient = class {
66500
66542
  );
66501
66543
  }
66502
66544
  this.throwOnError_operations = throwOnError2?.operations ?? [];
66503
- this.plugins = flatten(
66545
+ let serverPort = globalThis.process?.env?.HOUDINI_PORT ?? "5173";
66546
+ this.url = url ?? (globalThis.window ? "" : `https://localhost:${serverPort}`) + localApiEndpoint(getCurrentConfig());
66547
+ this.throwOnError = throwOnError2;
66548
+ this.fetchParams = fetchParams2;
66549
+ this.pipeline = pipeline2;
66550
+ this.extraPlugins = plugins2;
66551
+ }
66552
+ get plugins() {
66553
+ return flatten(
66504
66554
  [].concat(
66505
- throwOnError2 ? [throwOnError(throwOnError2)] : [],
66506
- fetchParams(fetchParams2),
66507
- pipeline2 ?? [
66508
- query,
66509
- mutation,
66510
- fragment
66555
+ this.throwOnError ? [throwOnError(this.throwOnError)] : [],
66556
+ fetchParams(this.fetchParams),
66557
+ this.pipeline ?? [
66558
+ query(this.cache ?? cache_default),
66559
+ mutation(this.cache ?? cache_default),
66560
+ fragment(this.cache ?? cache_default)
66511
66561
  ].concat(
66512
- plugins2 ?? [],
66562
+ this.extraPlugins ?? [],
66513
66563
  injectedPlugins_default,
66514
66564
  fetch2()
66515
66565
  )
66516
66566
  )
66517
66567
  );
66518
- let serverPort = globalThis.process?.env?.HOUDINI_PORT ?? "5173";
66519
- this.url = url ?? (globalThis.window ? "" : `https://localhost:${serverPort}`) + localApiEndpoint(getCurrentConfig());
66520
66568
  }
66521
66569
  observe({
66522
66570
  enableCache = true,
@@ -66528,6 +66576,7 @@ var HoudiniClient = class {
66528
66576
  plugins: createPluginHooks(this.plugins),
66529
66577
  fetching,
66530
66578
  enableCache,
66579
+ cache: this.cache ?? void 0,
66531
66580
  ...rest
66532
66581
  });
66533
66582
  }
@@ -66627,7 +66676,7 @@ var Config = class {
66627
66676
  defaultListTarget = null,
66628
66677
  defaultPaginateMode = PaginateMode.Infinite,
66629
66678
  defaultKeys,
66630
- types: types4 = {},
66679
+ types: types5 = {},
66631
66680
  logLevel,
66632
66681
  defaultFragmentMasking = "enable",
66633
66682
  watchSchema,
@@ -66675,10 +66724,10 @@ var Config = class {
66675
66724
  if (defaultKeys) {
66676
66725
  this.defaultKeys = defaultKeys;
66677
66726
  }
66678
- if (types4) {
66727
+ if (types5) {
66679
66728
  this.typeConfig = {
66680
66729
  ...this.typeConfig,
66681
- ...types4
66730
+ ...types5
66682
66731
  };
66683
66732
  }
66684
66733
  }
@@ -67612,7 +67661,7 @@ function operation_requires_variables(operation) {
67612
67661
  )
67613
67662
  );
67614
67663
  }
67615
- function unwrapType(config, type, wrappers = []) {
67664
+ function unwrapType(config, type, wrappers = [], convertRuntimeScalars) {
67616
67665
  if (type.kind === "NonNullType") {
67617
67666
  return unwrapType(config, type.type, [TypeWrapper.NonNull, ...wrappers]);
67618
67667
  }
@@ -67628,6 +67677,11 @@ function unwrapType(config, type, wrappers = []) {
67628
67677
  if (type instanceof graphql3.GraphQLList) {
67629
67678
  return unwrapType(config, type.ofType, [TypeWrapper.List, ...wrappers]);
67630
67679
  }
67680
+ if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
67681
+ type = config.schema.getType(
67682
+ config.configFile.features?.runtimeScalars?.[type.name.value].type
67683
+ );
67684
+ }
67631
67685
  const namedType = config.schema.getType(type.name.value || type.name);
67632
67686
  if (!namedType) {
67633
67687
  throw new Error("Unknown type: " + type.name.value || type.name);
@@ -67695,7 +67749,12 @@ function deepMerge2(filepath, ...targets) {
67695
67749
  // src/lib/parse.ts
67696
67750
  function parseJS(str, config) {
67697
67751
  const defaultConfig = {
67698
- plugins: ["typescript", "importAssertions", "decorators-legacy"],
67752
+ plugins: [
67753
+ "typescript",
67754
+ "importAssertions",
67755
+ "decorators-legacy",
67756
+ "explicitResourceManagement"
67757
+ ],
67699
67758
  sourceType: "module"
67700
67759
  };
67701
67760
  return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
@@ -67838,7 +67897,7 @@ async function detectTools(cwd = process.cwd()) {
67838
67897
 
67839
67898
  // src/runtime/router/match.ts
67840
67899
  var param_pattern = /^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;
67841
- function find_match(manifest, current, allowNull = true) {
67900
+ function find_match(config, manifest, current, allowNull = true) {
67842
67901
  let match = null;
67843
67902
  let matchVariables = null;
67844
67903
  for (const page of Object.values(manifest.pages)) {
@@ -67853,7 +67912,15 @@ function find_match(manifest, current, allowNull = true) {
67853
67912
  if (!match && !allowNull) {
67854
67913
  throw new Error("404");
67855
67914
  }
67856
- return [match, matchVariables];
67915
+ let variables = {};
67916
+ for (const document of Object.values(match?.documents ?? {})) {
67917
+ for (const [variable, { type }] of Object.entries(document.variables)) {
67918
+ if (matchVariables?.[variable]) {
67919
+ variables[variable] = parseScalar(config, type, matchVariables[variable]);
67920
+ }
67921
+ }
67922
+ }
67923
+ return [match, variables];
67857
67924
  }
67858
67925
  function parse_page_pattern(id) {
67859
67926
  const params = [];
@@ -67954,6 +68021,152 @@ function escape2(str) {
67954
68021
  return str.normalize().replace(/[[\]]/g, "\\$&").replace(/%/g, "%25").replace(/\//g, "%2[Ff]").replace(/\?/g, "%3[Ff]").replace(/#/g, "%23").replace(/[.*+?^${}()|\\]/g, "\\$&");
67955
68022
  }
67956
68023
 
68024
+ // src/lib/typescript.ts
68025
+ var recast2 = __toESM(require_main2(), 1);
68026
+ import * as graphql4 from "graphql";
68027
+ var AST2 = recast2.types.builders;
68028
+ function unwrappedTsTypeReference(config, filepath, missingScalars, {
68029
+ type,
68030
+ wrappers
68031
+ }, body) {
68032
+ let result;
68033
+ if (graphql4.isScalarType(type)) {
68034
+ result = scalarPropertyValue(config, filepath, missingScalars, type, body, null);
68035
+ } else if (graphql4.isEnumType(type)) {
68036
+ result = enumReference(config, body, type.name);
68037
+ } else {
68038
+ result = AST2.tsTypeReference(AST2.identifier(type.name));
68039
+ }
68040
+ for (const toWrap of wrappers) {
68041
+ if (toWrap === "NonNull" /* NonNull */) {
68042
+ continue;
68043
+ } else if (toWrap === "Nullable" /* Nullable */) {
68044
+ result = nullableField(result, true);
68045
+ } else if (toWrap === "List" /* List */) {
68046
+ result = AST2.tsArrayType(AST2.tsParenthesizedType(result));
68047
+ }
68048
+ }
68049
+ return result;
68050
+ }
68051
+ function tsTypeReference(config, filepath, missingScalars, definition, body) {
68052
+ const { type, wrappers } = unwrapType(config, definition.type);
68053
+ return unwrappedTsTypeReference(
68054
+ config,
68055
+ filepath,
68056
+ missingScalars,
68057
+ { type, wrappers },
68058
+ body
68059
+ );
68060
+ }
68061
+ function enumReference(config, body, name) {
68062
+ ensureImports({
68063
+ config,
68064
+ body,
68065
+ import: ["ValueOf"],
68066
+ importKind: "type",
68067
+ sourceModule: "$houdini/runtime/lib/types"
68068
+ });
68069
+ return AST2.tsTypeReference(
68070
+ AST2.identifier("ValueOf"),
68071
+ AST2.tsTypeParameterInstantiation([AST2.tsTypeQuery(AST2.identifier(name))])
68072
+ );
68073
+ }
68074
+ function readonlyProperty(prop, enable = true) {
68075
+ if (enable) {
68076
+ prop.readonly = true;
68077
+ }
68078
+ return prop;
68079
+ }
68080
+ function nullableField(inner, input = false) {
68081
+ const members = [inner, AST2.tsNullKeyword()];
68082
+ if (input) {
68083
+ members.push(AST2.tsUndefinedKeyword());
68084
+ }
68085
+ return AST2.tsUnionType(members);
68086
+ }
68087
+ function scalarPropertyValue(config, filepath, missingScalars, target, body, field) {
68088
+ if (config.configFile.features?.componentFields && target.name === config.componentScalar) {
68089
+ if (!field) {
68090
+ return AST2.tsNeverKeyword();
68091
+ }
68092
+ const component = config.componentFields[field.parent][field.field];
68093
+ const sourcePathRelative = path_exports.relative(
68094
+ path_exports.join(config.projectRoot, "src"),
68095
+ component.filepath
68096
+ );
68097
+ let sourcePathParsed = path_exports.parse(sourcePathRelative);
68098
+ let sourcePath = path_exports.join(sourcePathParsed.dir, sourcePathParsed.name);
68099
+ const localImport = ensureImports({
68100
+ config,
68101
+ body,
68102
+ import: "__component__" + component.fragment,
68103
+ sourceModule: path_exports.join(
68104
+ path_exports.relative(path_exports.dirname(filepath), config.projectRoot),
68105
+ "src",
68106
+ sourcePath
68107
+ )
68108
+ }) ?? "__component__" + component.fragment;
68109
+ const parameters = AST2.tsTypeReference(AST2.identifier("Parameters"));
68110
+ parameters.typeParameters = AST2.tsTypeParameterInstantiation([
68111
+ AST2.tsTypeQuery(AST2.identifier(localImport))
68112
+ ]);
68113
+ const indexed = AST2.tsIndexedAccessType(
68114
+ parameters,
68115
+ AST2.tsLiteralType(AST2.numericLiteral(0))
68116
+ );
68117
+ const omit = AST2.tsTypeReference(AST2.identifier("Omit"));
68118
+ omit.typeParameters = AST2.tsTypeParameterInstantiation([
68119
+ indexed,
68120
+ AST2.tsLiteralType(AST2.stringLiteral(component.prop))
68121
+ ]);
68122
+ const arg = AST2.identifier("props");
68123
+ arg.typeAnnotation = AST2.tsTypeAnnotation(omit);
68124
+ const returnType = AST2.tsTypeReference(AST2.identifier("ReturnType"));
68125
+ returnType.typeParameters = AST2.tsTypeParameterInstantiation([
68126
+ AST2.tsTypeQuery(AST2.identifier(localImport))
68127
+ ]);
68128
+ const fnType = AST2.tsFunctionType([arg]);
68129
+ fnType.typeAnnotation = AST2.tsTypeAnnotation(returnType);
68130
+ return fnType;
68131
+ }
68132
+ switch (target.name) {
68133
+ case "String": {
68134
+ return AST2.tsStringKeyword();
68135
+ }
68136
+ case "Int": {
68137
+ return AST2.tsNumberKeyword();
68138
+ }
68139
+ case "Float": {
68140
+ return AST2.tsNumberKeyword();
68141
+ }
68142
+ case "Boolean": {
68143
+ return AST2.tsBooleanKeyword();
68144
+ }
68145
+ case "ID": {
68146
+ return AST2.tsStringKeyword();
68147
+ }
68148
+ default: {
68149
+ if (graphql4.isNonNullType(target) && "ofType" in target) {
68150
+ return scalarPropertyValue(
68151
+ config,
68152
+ filepath,
68153
+ missingScalars,
68154
+ target.ofType,
68155
+ body,
68156
+ field
68157
+ );
68158
+ }
68159
+ if (config.scalars?.[target.name]) {
68160
+ return AST2.tsTypeReference(AST2.identifier(config.scalars?.[target.name].type));
68161
+ }
68162
+ if (target.name !== config.componentScalar) {
68163
+ missingScalars.add(target.name);
68164
+ }
68165
+ return AST2.tsAnyKeyword();
68166
+ }
68167
+ }
68168
+ }
68169
+
67957
68170
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
67958
68171
  var WalkerBase = class {
67959
68172
  constructor() {
@@ -68067,7 +68280,7 @@ async function asyncWalk(ast, { enter, leave }) {
68067
68280
  }
68068
68281
 
68069
68282
  // src/lib/walk.ts
68070
- import * as graphql4 from "graphql";
68283
+ import * as graphql5 from "graphql";
68071
68284
  async function find_graphql(config, parsedScript, walker) {
68072
68285
  await asyncWalk(parsedScript, {
68073
68286
  async enter(node, parent) {
@@ -68122,7 +68335,7 @@ async function find_graphql(config, parsedScript, walker) {
68122
68335
  } else if (!documentString) {
68123
68336
  return;
68124
68337
  }
68125
- const parsedTag = graphql4.parse(documentString);
68338
+ const parsedTag = graphql5.parse(documentString);
68126
68339
  if (walker.where && !walker.where(parsedTag, { node, parent })) {
68127
68340
  return;
68128
68341
  }
@@ -68254,7 +68467,7 @@ function extractAnonymousQuery(config, raw, expr, propName) {
68254
68467
  };
68255
68468
  return defs.concat([
68256
68469
  {
68257
- raw: graphql4.print(parsed),
68470
+ raw: graphql5.print(parsed),
68258
68471
  parsed
68259
68472
  }
68260
68473
  ]);
@@ -68395,7 +68608,7 @@ function serialized_manifest_path(config, base = base_dir(config)) {
68395
68608
 
68396
68609
  // src/lib/router/manifest.ts
68397
68610
  var t2 = __toESM(require_lib6(), 1);
68398
- import * as graphql5 from "graphql";
68611
+ import * as graphql6 from "graphql";
68399
68612
  async function load_manifest(args) {
68400
68613
  const manifest = await walk_routes({
68401
68614
  config: args.config,
@@ -68412,7 +68625,8 @@ async function load_manifest(args) {
68412
68625
  local_yoga: false
68413
68626
  },
68414
68627
  queries: [],
68415
- layouts: []
68628
+ layouts: [],
68629
+ variables: {}
68416
68630
  });
68417
68631
  if (args.includeArtifacts) {
68418
68632
  try {
@@ -68443,6 +68657,7 @@ async function walk_routes(args) {
68443
68657
  const directory_contents = await fs_exports.readdir(args.filepath, {
68444
68658
  withFileTypes: true
68445
68659
  });
68660
+ const variables = { ...args.variables };
68446
68661
  let newLayouts = args.layouts;
68447
68662
  let newLayoutQueries = args.queries;
68448
68663
  let layout = null;
@@ -68466,7 +68681,8 @@ async function walk_routes(args) {
68466
68681
  url: args.url,
68467
68682
  project: args.project,
68468
68683
  type: "layout",
68469
- contents: layoutQueryContents
68684
+ contents: layoutQueryContents,
68685
+ variables
68470
68686
  });
68471
68687
  newLayoutQueries = [...args.queries, layoutQuery.name];
68472
68688
  }
@@ -68479,7 +68695,8 @@ async function walk_routes(args) {
68479
68695
  contents: layoutViewContents,
68480
68696
  layouts: args.layouts,
68481
68697
  queries: newLayoutQueries,
68482
- config: args.config
68698
+ config: args.config,
68699
+ variables
68483
68700
  });
68484
68701
  newLayouts = [...args.layouts, page_id(layout.url)];
68485
68702
  }
@@ -68490,7 +68707,8 @@ async function walk_routes(args) {
68490
68707
  url: args.url,
68491
68708
  project: args.project,
68492
68709
  type: "page",
68493
- contents: pageQueryContents
68710
+ contents: pageQueryContents,
68711
+ variables
68494
68712
  });
68495
68713
  }
68496
68714
  if (pageViewContents) {
@@ -68502,7 +68720,8 @@ async function walk_routes(args) {
68502
68720
  contents: pageViewContents,
68503
68721
  layouts: newLayouts,
68504
68722
  queries: pageQuery ? [...newLayoutQueries, pageQuery.name] : newLayoutQueries,
68505
- config: args.config
68723
+ config: args.config,
68724
+ variables
68506
68725
  });
68507
68726
  }
68508
68727
  await Promise.all(
@@ -68515,7 +68734,8 @@ async function walk_routes(args) {
68515
68734
  filepath: path_exports.join(args.filepath, dir.name),
68516
68735
  url: `${args.url}${dir.name}/`,
68517
68736
  queries: newLayoutQueries,
68518
- layouts: newLayouts
68737
+ layouts: newLayouts,
68738
+ variables
68519
68739
  });
68520
68740
  })
68521
68741
  );
@@ -68537,12 +68757,18 @@ async function add_view(args) {
68537
68757
  url: args.url,
68538
68758
  layouts: args.layouts,
68539
68759
  path: path_exports.relative(args.config.projectRoot, args.path),
68540
- query_options: args.queries
68760
+ query_options: args.queries,
68761
+ params: Object.fromEntries(
68762
+ parse_page_pattern(args.url).params.map((param) => [
68763
+ param.name,
68764
+ args.variables[param.name] ?? null
68765
+ ])
68766
+ )
68541
68767
  };
68542
68768
  return target[id];
68543
68769
  }
68544
68770
  async function add_query(args) {
68545
- const parsed = graphql5.parse(args.contents);
68771
+ const parsed = graphql6.parse(args.contents);
68546
68772
  const query2 = parsed.definitions.find(
68547
68773
  (def) => def.kind === "OperationDefinition" && def.operation === "query"
68548
68774
  );
@@ -68550,20 +68776,30 @@ async function add_query(args) {
68550
68776
  throw new Error("No query found");
68551
68777
  }
68552
68778
  let loading = false;
68553
- await graphql5.visit(parsed, {
68779
+ await graphql6.visit(parsed, {
68554
68780
  Directive(node) {
68555
68781
  if (node.name.value === args.config.loadingDirective) {
68556
68782
  loading = true;
68557
68783
  }
68558
68784
  }
68559
68785
  });
68786
+ const queryVariables = Object.fromEntries(
68787
+ query2.variableDefinitions?.map((variable) => {
68788
+ const { type, wrappers } = unwrapType(args.config, variable.type, [], true);
68789
+ return [
68790
+ variable.variable.name.value,
68791
+ { wrappers, type: type.name }
68792
+ ];
68793
+ }) ?? []
68794
+ );
68795
+ Object.assign(args.variables, queryVariables);
68560
68796
  const target = args.type === "page" ? args.project.page_queries : args.project.layout_queries;
68561
68797
  target[page_id(args.url)] = {
68562
68798
  path: path_exports.relative(args.config.routesDir, args.path),
68563
68799
  name: query2.name.value,
68564
68800
  url: args.url,
68565
68801
  loading,
68566
- variables: query2.variableDefinitions?.map((variable) => variable.variable.name.value) ?? []
68802
+ variables: queryVariables
68567
68803
  };
68568
68804
  return target[page_id(args.url)];
68569
68805
  }
@@ -68617,7 +68853,18 @@ async function extractQueries(source) {
68617
68853
  } else {
68618
68854
  return [];
68619
68855
  }
68620
- return props.filter((p) => p !== "children");
68856
+ return props.reduce((queries, query2) => {
68857
+ if (query2 === "children") {
68858
+ return queries;
68859
+ }
68860
+ if (query2.endsWith("$handle")) {
68861
+ query2 = query2.substring(0, query2.length - "$handle".length);
68862
+ }
68863
+ if (queries.includes(query2)) {
68864
+ return queries;
68865
+ }
68866
+ return queries.concat([query2]);
68867
+ }, []);
68621
68868
  }
68622
68869
 
68623
68870
  // src/lib/router/server.ts
@@ -68955,6 +69202,7 @@ export {
68955
69202
  detectTools,
68956
69203
  ensureArtifactImport,
68957
69204
  ensureImports,
69205
+ enumReference,
68958
69206
  exec,
68959
69207
  extractHeaders,
68960
69208
  extractHeadersStr,
@@ -68984,6 +69232,7 @@ export {
68984
69232
  localApiEndpoint,
68985
69233
  localApiSessionKeys,
68986
69234
  mutation,
69235
+ nullableField,
68987
69236
  operation_requires_variables,
68988
69237
  orderedPlugins,
68989
69238
  parentField,
@@ -68998,12 +69247,16 @@ export {
68998
69247
  pullSchema,
68999
69248
  query,
69000
69249
  readConfigFile,
69250
+ readonlyProperty,
69001
69251
  conventions_exports as routerConventions,
69002
69252
  runPipeline,
69253
+ scalarPropertyValue,
69003
69254
  setMockConfig,
69004
69255
  siteURL,
69005
69256
  subscription,
69257
+ tsTypeReference,
69006
69258
  unwrapType,
69259
+ unwrappedTsTypeReference,
69007
69260
  wrapType
69008
69261
  };
69009
69262
  /*!