houdini-svelte 1.2.43 → 1.2.45

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.
@@ -2296,7 +2296,7 @@ var require_path_visitor3 = __commonJS({
2296
2296
  }
2297
2297
  return target;
2298
2298
  }
2299
- PathVisitor.visit = function visit23(node2, methods) {
2299
+ PathVisitor.visit = function visit24(node2, methods) {
2300
2300
  return PathVisitor.fromMethodsObject(methods).visit(node2);
2301
2301
  };
2302
2302
  var PVp = PathVisitor.prototype;
@@ -2487,7 +2487,7 @@ var require_path_visitor3 = __commonJS({
2487
2487
  this.needToCallTraverse = false;
2488
2488
  return visitChildren(path3, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
2489
2489
  };
2490
- sharedContextProtoMethods.visit = function visit23(path3, newVisitor) {
2490
+ sharedContextProtoMethods.visit = function visit24(path3, newVisitor) {
2491
2491
  if (!(this instanceof this.Context)) {
2492
2492
  throw new Error("");
2493
2493
  }
@@ -3880,7 +3880,7 @@ var require_main4 = __commonJS({
3880
3880
  var someField = _a.someField;
3881
3881
  var Type = _a.Type;
3882
3882
  var use = _a.use;
3883
- var visit23 = _a.visit;
3883
+ var visit24 = _a.visit;
3884
3884
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
3885
3885
  exports.builders = builders;
3886
3886
  exports.builtInTypes = builtInTypes;
@@ -3897,7 +3897,7 @@ var require_main4 = __commonJS({
3897
3897
  exports.someField = someField;
3898
3898
  exports.Type = Type;
3899
3899
  exports.use = use;
3900
- exports.visit = visit23;
3900
+ exports.visit = visit24;
3901
3901
  Object.assign(namedTypes_1.namedTypes, n);
3902
3902
  }
3903
3903
  });
@@ -16418,6 +16418,7 @@ var import_node_util4 = require("node:util");
16418
16418
  var graphql3 = __toESM(require("graphql"), 1);
16419
16419
  var graphql4 = __toESM(require("graphql"), 1);
16420
16420
  var graphql5 = __toESM(require("graphql"), 1);
16421
+ var graphql6 = __toESM(require("graphql"), 1);
16421
16422
  var import_meta = {};
16422
16423
  var require2 = (0, import_module.createRequire)(import_meta.url);
16423
16424
  var __create2 = Object.create;
@@ -29867,14 +29868,14 @@ var require_lib3 = __commonJS2({
29867
29868
  this.preserveSpace = !!preserveSpace;
29868
29869
  }
29869
29870
  };
29870
- var types42 = {
29871
+ var types52 = {
29871
29872
  brace: new TokContext3("{"),
29872
29873
  j_oTag: new TokContext3("<tag"),
29873
29874
  j_cTag: new TokContext3("</tag"),
29874
29875
  j_expr: new TokContext3("<tag>...</tag>", true)
29875
29876
  };
29876
29877
  {
29877
- types42.template = new TokContext3("`", true);
29878
+ types52.template = new TokContext3("`", true);
29878
29879
  }
29879
29880
  var beforeExpr2 = true;
29880
29881
  var startsExpr2 = true;
@@ -30412,17 +30413,17 @@ var require_lib3 = __commonJS2({
30412
30413
  context.pop();
30413
30414
  };
30414
30415
  tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
30415
- context.push(types42.brace);
30416
+ context.push(types52.brace);
30416
30417
  };
30417
30418
  tokenTypes[22].updateContext = (context) => {
30418
- if (context[context.length - 1] === types42.template) {
30419
+ if (context[context.length - 1] === types52.template) {
30419
30420
  context.pop();
30420
30421
  } else {
30421
- context.push(types42.template);
30422
+ context.push(types52.template);
30422
30423
  }
30423
30424
  };
30424
30425
  tokenTypes[142].updateContext = (context) => {
30425
- context.push(types42.j_expr, types42.j_oTag);
30426
+ context.push(types52.j_expr, types52.j_oTag);
30426
30427
  };
30427
30428
  }
30428
30429
  var nonASCIIidentifierStartChars2 = "\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";
@@ -30982,7 +30983,7 @@ var require_lib3 = __commonJS2({
30982
30983
  this.end = 0;
30983
30984
  this.lastTokEndLoc = null;
30984
30985
  this.lastTokStartLoc = null;
30985
- this.context = [types42.brace];
30986
+ this.context = [types52.brace];
30986
30987
  this.firstInvalidTemplateEscapePos = null;
30987
30988
  this.strictErrors = /* @__PURE__ */ new Map();
30988
30989
  this.tokensLength = 0;
@@ -34809,7 +34810,7 @@ var require_lib3 = __commonJS2({
34809
34810
  context
34810
34811
  } = this.state;
34811
34812
  const currentContext = context[context.length - 1];
34812
- if (currentContext === types42.j_oTag || currentContext === types42.j_expr) {
34813
+ if (currentContext === types52.j_oTag || currentContext === types52.j_expr) {
34813
34814
  context.pop();
34814
34815
  }
34815
34816
  }
@@ -35831,9 +35832,9 @@ var require_lib3 = __commonJS2({
35831
35832
  switch (this.state.type) {
35832
35833
  case 5:
35833
35834
  node2 = this.startNode();
35834
- this.setContext(types42.brace);
35835
+ this.setContext(types52.brace);
35835
35836
  this.next();
35836
- node2 = this.jsxParseExpressionContainer(node2, types42.j_oTag);
35837
+ node2 = this.jsxParseExpressionContainer(node2, types52.j_oTag);
35837
35838
  if (node2.expression.type === "JSXEmptyExpression") {
35838
35839
  this.raise(JsxErrors.AttributeIsEmpty, node2);
35839
35840
  }
@@ -35852,7 +35853,7 @@ var require_lib3 = __commonJS2({
35852
35853
  jsxParseSpreadChild(node2) {
35853
35854
  this.next();
35854
35855
  node2.expression = this.parseExpression();
35855
- this.setContext(types42.j_expr);
35856
+ this.setContext(types52.j_expr);
35856
35857
  this.state.canStartJSXElement = true;
35857
35858
  this.expect(8);
35858
35859
  return this.finishNode(node2, "JSXSpreadChild");
@@ -35872,11 +35873,11 @@ var require_lib3 = __commonJS2({
35872
35873
  jsxParseAttribute() {
35873
35874
  const node2 = this.startNode();
35874
35875
  if (this.match(5)) {
35875
- this.setContext(types42.brace);
35876
+ this.setContext(types52.brace);
35876
35877
  this.next();
35877
35878
  this.expect(21);
35878
35879
  node2.argument = this.parseMaybeAssignAllowIn();
35879
- this.setContext(types42.j_oTag);
35880
+ this.setContext(types52.j_oTag);
35880
35881
  this.state.canStartJSXElement = true;
35881
35882
  this.expect(8);
35882
35883
  return this.finishNode(node2, "JSXSpreadAttribute");
@@ -35935,12 +35936,12 @@ var require_lib3 = __commonJS2({
35935
35936
  break;
35936
35937
  case 5: {
35937
35938
  const node22 = this.startNode();
35938
- this.setContext(types42.brace);
35939
+ this.setContext(types52.brace);
35939
35940
  this.next();
35940
35941
  if (this.match(21)) {
35941
35942
  children.push(this.jsxParseSpreadChild(node22));
35942
35943
  } else {
35943
- children.push(this.jsxParseExpressionContainer(node22, types42.j_expr));
35944
+ children.push(this.jsxParseExpressionContainer(node22, types52.j_expr));
35944
35945
  }
35945
35946
  break;
35946
35947
  }
@@ -36005,11 +36006,11 @@ var require_lib3 = __commonJS2({
36005
36006
  }
36006
36007
  getTokenFromCode(code2) {
36007
36008
  const context = this.curContext();
36008
- if (context === types42.j_expr) {
36009
+ if (context === types52.j_expr) {
36009
36010
  this.jsxReadToken();
36010
36011
  return;
36011
36012
  }
36012
- if (context === types42.j_oTag || context === types42.j_cTag) {
36013
+ if (context === types52.j_oTag || context === types52.j_cTag) {
36013
36014
  if (isIdentifierStart2(code2)) {
36014
36015
  this.jsxReadWord();
36015
36016
  return;
@@ -36019,7 +36020,7 @@ var require_lib3 = __commonJS2({
36019
36020
  this.finishToken(143);
36020
36021
  return;
36021
36022
  }
36022
- if ((code2 === 34 || code2 === 39) && context === types42.j_oTag) {
36023
+ if ((code2 === 34 || code2 === 39) && context === types52.j_oTag) {
36023
36024
  this.jsxReadString(code2);
36024
36025
  return;
36025
36026
  }
@@ -36037,17 +36038,17 @@ var require_lib3 = __commonJS2({
36037
36038
  type
36038
36039
  } = this.state;
36039
36040
  if (type === 56 && prevType === 142) {
36040
- context.splice(-2, 2, types42.j_cTag);
36041
+ context.splice(-2, 2, types52.j_cTag);
36041
36042
  this.state.canStartJSXElement = false;
36042
36043
  } else if (type === 142) {
36043
- context.push(types42.j_oTag);
36044
+ context.push(types52.j_oTag);
36044
36045
  } else if (type === 143) {
36045
36046
  const out = context[context.length - 1];
36046
- if (out === types42.j_oTag && prevType === 56 || out === types42.j_cTag) {
36047
+ if (out === types52.j_oTag && prevType === 56 || out === types52.j_cTag) {
36047
36048
  context.pop();
36048
- this.state.canStartJSXElement = context[context.length - 1] === types42.j_expr;
36049
+ this.state.canStartJSXElement = context[context.length - 1] === types52.j_expr;
36049
36050
  } else {
36050
- this.setContext(types42.j_expr);
36051
+ this.setContext(types52.j_expr);
36051
36052
  this.state.canStartJSXElement = true;
36052
36053
  }
36053
36054
  } else {
@@ -37422,14 +37423,14 @@ var require_lib3 = __commonJS2({
37422
37423
  tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
37423
37424
  const node2 = this.startNode();
37424
37425
  const hasLeadingOperator = this.eat(operator);
37425
- const types52 = [];
37426
+ const types62 = [];
37426
37427
  do {
37427
- types52.push(parseConstituentType());
37428
+ types62.push(parseConstituentType());
37428
37429
  } while (this.eat(operator));
37429
- if (types52.length === 1 && !hasLeadingOperator) {
37430
- return types52[0];
37430
+ if (types62.length === 1 && !hasLeadingOperator) {
37431
+ return types62[0];
37431
37432
  }
37432
- node2.types = types52;
37433
+ node2.types = types62;
37433
37434
  return this.finishNode(node2, kind);
37434
37435
  }
37435
37436
  tsParseIntersectionTypeOrHigher() {
@@ -37993,7 +37994,7 @@ var require_lib3 = __commonJS2({
37993
37994
  }));
37994
37995
  if (node2.params.length === 0) {
37995
37996
  this.raise(TSErrors.EmptyTypeArguments, node2);
37996
- } else if (!this.state.inType && this.curContext() === types42.brace) {
37997
+ } else if (!this.state.inType && this.curContext() === types52.brace) {
37997
37998
  this.reScan_lt_gt();
37998
37999
  }
37999
38000
  this.expect(48);
@@ -38619,7 +38620,7 @@ var require_lib3 = __commonJS2({
38619
38620
  context
38620
38621
  } = this.state;
38621
38622
  const currentContext = context[context.length - 1];
38622
- if (currentContext === types42.j_oTag || currentContext === types42.j_expr) {
38623
+ if (currentContext === types52.j_oTag || currentContext === types52.j_expr) {
38623
38624
  context.pop();
38624
38625
  }
38625
38626
  }
@@ -43747,9 +43748,9 @@ var require_shared = __commonJS2({
43747
43748
  var tslib_1 = require_tslib();
43748
43749
  var types_110 = tslib_1.__importDefault(require_types());
43749
43750
  function default_1(fork) {
43750
- var types42 = fork.use(types_110.default);
43751
- var Type = types42.Type;
43752
- var builtin = types42.builtInTypes;
43751
+ var types52 = fork.use(types_110.default);
43752
+ var Type = types52.Type;
43753
+ var builtin = types52.builtInTypes;
43753
43754
  var isNumber2 = builtin.number;
43754
43755
  function geq(than) {
43755
43756
  return Type.from(function(value2) {
@@ -43897,9 +43898,9 @@ var require_types = __commonJS2({
43897
43898
  }(BaseType);
43898
43899
  var OrType = function(_super) {
43899
43900
  tslib_1.__extends(OrType2, _super);
43900
- function OrType2(types42) {
43901
+ function OrType2(types52) {
43901
43902
  var _this = _super.call(this) || this;
43902
- _this.types = types42;
43903
+ _this.types = types52;
43903
43904
  _this.kind = "OrType";
43904
43905
  return _this;
43905
43906
  }
@@ -44040,11 +44041,11 @@ var require_types = __commonJS2({
44040
44041
  function typesPlugin(_fork) {
44041
44042
  var Type = {
44042
44043
  or: function() {
44043
- var types42 = [];
44044
+ var types52 = [];
44044
44045
  for (var _i = 0; _i < arguments.length; _i++) {
44045
- types42[_i] = arguments[_i];
44046
+ types52[_i] = arguments[_i];
44046
44047
  }
44047
- return new OrType(types42.map(function(type) {
44048
+ return new OrType(types52.map(function(type) {
44048
44049
  return Type.from(type);
44049
44050
  }));
44050
44051
  },
@@ -44487,9 +44488,9 @@ var require_path2 = __commonJS2({
44487
44488
  var Op = Object.prototype;
44488
44489
  var hasOwn2 = Op.hasOwnProperty;
44489
44490
  function pathPlugin(fork) {
44490
- var types42 = fork.use(types_110.default);
44491
- var isArray2 = types42.builtInTypes.array;
44492
- var isNumber2 = types42.builtInTypes.number;
44491
+ var types52 = fork.use(types_110.default);
44492
+ var isArray2 = types52.builtInTypes.array;
44493
+ var isNumber2 = types52.builtInTypes.number;
44493
44494
  var Path = function Path2(value2, parentPath, name) {
44494
44495
  if (!(this instanceof Path2)) {
44495
44496
  throw new Error("Path constructor cannot be invoked without 'new'");
@@ -44789,13 +44790,13 @@ var require_scope = __commonJS2({
44789
44790
  var types_110 = tslib_1.__importDefault(require_types());
44790
44791
  var hasOwn2 = Object.prototype.hasOwnProperty;
44791
44792
  function scopePlugin(fork) {
44792
- var types42 = fork.use(types_110.default);
44793
- var Type = types42.Type;
44794
- var namedTypes = types42.namedTypes;
44793
+ var types52 = fork.use(types_110.default);
44794
+ var Type = types52.Type;
44795
+ var namedTypes = types52.namedTypes;
44795
44796
  var Node3 = namedTypes.Node;
44796
44797
  var Expression = namedTypes.Expression;
44797
- var isArray2 = types42.builtInTypes.array;
44798
- var b = types42.builders;
44798
+ var isArray2 = types52.builtInTypes.array;
44799
+ var b = types52.builders;
44799
44800
  var Scope3 = function Scope22(path3, parentScope) {
44800
44801
  if (!(this instanceof Scope22)) {
44801
44802
  throw new Error("Scope constructor cannot be invoked without 'new'");
@@ -44858,7 +44859,7 @@ var require_scope = __commonJS2({
44858
44859
  ++index;
44859
44860
  }
44860
44861
  var name = prefix + index;
44861
- return this.bindings[name] = types42.builders.identifier(name);
44862
+ return this.bindings[name] = types52.builders.identifier(name);
44862
44863
  };
44863
44864
  Sp.injectTemporary = function(identifier, init) {
44864
44865
  identifier || (identifier = this.declareTemporary());
@@ -44934,7 +44935,7 @@ var require_scope = __commonJS2({
44934
44935
  bindings
44935
44936
  );
44936
44937
  } else if (Node3.check(node2) && !Expression.check(node2)) {
44937
- types42.eachField(node2, function(name, child) {
44938
+ types52.eachField(node2, function(name, child) {
44938
44939
  var childPath = path3.get(name);
44939
44940
  if (!pathHasValue(childPath, child)) {
44940
44941
  throw new Error("");
@@ -45012,24 +45013,24 @@ var require_scope = __commonJS2({
45012
45013
  addPattern(patternPath.get("argument"), bindings);
45013
45014
  }
45014
45015
  }
45015
- function addTypePattern(patternPath, types52) {
45016
+ function addTypePattern(patternPath, types62) {
45016
45017
  var pattern = patternPath.value;
45017
45018
  namedTypes.Pattern.assert(pattern);
45018
45019
  if (namedTypes.Identifier.check(pattern)) {
45019
- if (hasOwn2.call(types52, pattern.name)) {
45020
- types52[pattern.name].push(patternPath);
45020
+ if (hasOwn2.call(types62, pattern.name)) {
45021
+ types62[pattern.name].push(patternPath);
45021
45022
  } else {
45022
- types52[pattern.name] = [patternPath];
45023
+ types62[pattern.name] = [patternPath];
45023
45024
  }
45024
45025
  }
45025
45026
  }
45026
- function addTypeParameter(parameterPath, types52) {
45027
+ function addTypeParameter(parameterPath, types62) {
45027
45028
  var parameter = parameterPath.value;
45028
45029
  FlowOrTSTypeParameterType.assert(parameter);
45029
- if (hasOwn2.call(types52, parameter.name)) {
45030
- types52[parameter.name].push(parameterPath);
45030
+ if (hasOwn2.call(types62, parameter.name)) {
45031
+ types62[parameter.name].push(parameterPath);
45031
45032
  } else {
45032
- types52[parameter.name] = [parameterPath];
45033
+ types62[parameter.name] = [parameterPath];
45033
45034
  }
45034
45035
  }
45035
45036
  Sp.lookup = function(name) {
@@ -45068,11 +45069,11 @@ var require_node_path = __commonJS2({
45068
45069
  var scope_1 = tslib_1.__importDefault(require_scope());
45069
45070
  var shared_1 = require_shared();
45070
45071
  function nodePathPlugin(fork) {
45071
- var types42 = fork.use(types_110.default);
45072
- var n = types42.namedTypes;
45073
- var b = types42.builders;
45074
- var isNumber2 = types42.builtInTypes.number;
45075
- var isArray2 = types42.builtInTypes.array;
45072
+ var types52 = fork.use(types_110.default);
45073
+ var n = types52.namedTypes;
45074
+ var b = types52.builders;
45075
+ var isNumber2 = types52.builtInTypes.number;
45076
+ var isArray2 = types52.builtInTypes.array;
45076
45077
  var Path = fork.use(path_1.default);
45077
45078
  var Scope3 = fork.use(scope_1.default);
45078
45079
  var NodePath = function NodePath2(value2, parentPath, name) {
@@ -45163,7 +45164,7 @@ var require_node_path = __commonJS2({
45163
45164
  return scope2 || null;
45164
45165
  };
45165
45166
  NPp.getValueProperty = function(name) {
45166
- return types42.getFieldValue(this.value, name);
45167
+ return types52.getFieldValue(this.value, name);
45167
45168
  };
45168
45169
  NPp.needsParens = function(assumeExpressionContext) {
45169
45170
  var pp2 = this.parentPath;
@@ -45305,7 +45306,7 @@ var require_node_path = __commonJS2({
45305
45306
  return node2.some(containsCallExpression);
45306
45307
  }
45307
45308
  if (n.Node.check(node2)) {
45308
- return types42.someField(node2, function(_name, child) {
45309
+ return types52.someField(node2, function(_name, child) {
45309
45310
  return containsCallExpression(child);
45310
45311
  });
45311
45312
  }
@@ -45424,11 +45425,11 @@ var require_path_visitor = __commonJS2({
45424
45425
  var shared_1 = require_shared();
45425
45426
  var hasOwn2 = Object.prototype.hasOwnProperty;
45426
45427
  function pathVisitorPlugin(fork) {
45427
- var types42 = fork.use(types_110.default);
45428
+ var types52 = fork.use(types_110.default);
45428
45429
  var NodePath = fork.use(node_path_1.default);
45429
- var isArray2 = types42.builtInTypes.array;
45430
- var isObject2 = types42.builtInTypes.object;
45431
- var isFunction2 = types42.builtInTypes.function;
45430
+ var isArray2 = types52.builtInTypes.array;
45431
+ var isObject2 = types52.builtInTypes.object;
45432
+ var isFunction2 = types52.builtInTypes.function;
45432
45433
  var undefined2;
45433
45434
  var PathVisitor = function PathVisitor2() {
45434
45435
  if (!(this instanceof PathVisitor2)) {
@@ -45448,7 +45449,7 @@ var require_path_visitor = __commonJS2({
45448
45449
  typeNames[methodName.slice("visit".length)] = true;
45449
45450
  }
45450
45451
  }
45451
- var supertypeTable = types42.computeSupertypeLookupTable(typeNames);
45452
+ var supertypeTable = types52.computeSupertypeLookupTable(typeNames);
45452
45453
  var methodNameTable = /* @__PURE__ */ Object.create(null);
45453
45454
  var typeNameKeys = Object.keys(supertypeTable);
45454
45455
  var typeNameCount = typeNameKeys.length;
@@ -45567,7 +45568,7 @@ var require_path_visitor = __commonJS2({
45567
45568
  path3.each(visitor.visitWithoutReset, visitor);
45568
45569
  } else if (!isObject2.check(value2)) {
45569
45570
  } else {
45570
- var childNames = types42.getFieldNames(value2);
45571
+ var childNames = types52.getFieldNames(value2);
45571
45572
  if (visitor._shouldVisitComments && value2.comments && childNames.indexOf("comments") < 0) {
45572
45573
  childNames.push("comments");
45573
45574
  }
@@ -45576,7 +45577,7 @@ var require_path_visitor = __commonJS2({
45576
45577
  for (var i22 = 0; i22 < childCount; ++i22) {
45577
45578
  var childName = childNames[i22];
45578
45579
  if (!hasOwn2.call(value2, childName)) {
45579
- value2[childName] = types42.getFieldValue(value2, childName);
45580
+ value2[childName] = types52.getFieldValue(value2, childName);
45580
45581
  }
45581
45582
  childPaths.push(path3.get(childName));
45582
45583
  }
@@ -45717,13 +45718,13 @@ var require_equiv = __commonJS2({
45717
45718
  var shared_1 = require_shared();
45718
45719
  var types_110 = tslib_1.__importDefault(require_types());
45719
45720
  function default_1(fork) {
45720
- var types42 = fork.use(types_110.default);
45721
- var getFieldNames = types42.getFieldNames;
45722
- var getFieldValue = types42.getFieldValue;
45723
- var isArray2 = types42.builtInTypes.array;
45724
- var isObject2 = types42.builtInTypes.object;
45725
- var isDate2 = types42.builtInTypes.Date;
45726
- var isRegExp2 = types42.builtInTypes.RegExp;
45721
+ var types52 = fork.use(types_110.default);
45722
+ var getFieldNames = types52.getFieldNames;
45723
+ var getFieldValue = types52.getFieldValue;
45724
+ var isArray2 = types52.builtInTypes.array;
45725
+ var isObject2 = types52.builtInTypes.object;
45726
+ var isDate2 = types52.builtInTypes.Date;
45727
+ var isRegExp2 = types52.builtInTypes.RegExp;
45727
45728
  var hasOwn2 = Object.prototype.hasOwnProperty;
45728
45729
  function astNodesAreEquivalent(a, b, problemPath) {
45729
45730
  if (isArray2.check(problemPath)) {
@@ -45874,24 +45875,24 @@ var require_fork = __commonJS2({
45874
45875
  var shared_1 = require_shared();
45875
45876
  function default_1(plugins2) {
45876
45877
  var fork = createFork();
45877
- var types42 = fork.use(types_110.default);
45878
+ var types52 = fork.use(types_110.default);
45878
45879
  plugins2.forEach(fork.use);
45879
- types42.finalize();
45880
+ types52.finalize();
45880
45881
  var PathVisitor = fork.use(path_visitor_1.default);
45881
45882
  return {
45882
- Type: types42.Type,
45883
- builtInTypes: types42.builtInTypes,
45884
- namedTypes: types42.namedTypes,
45885
- builders: types42.builders,
45886
- defineMethod: types42.defineMethod,
45887
- getFieldNames: types42.getFieldNames,
45888
- getFieldValue: types42.getFieldValue,
45889
- eachField: types42.eachField,
45890
- someField: types42.someField,
45891
- getSupertypeNames: types42.getSupertypeNames,
45892
- getBuilderName: types42.getBuilderName,
45883
+ Type: types52.Type,
45884
+ builtInTypes: types52.builtInTypes,
45885
+ namedTypes: types52.namedTypes,
45886
+ builders: types52.builders,
45887
+ defineMethod: types52.defineMethod,
45888
+ getFieldNames: types52.getFieldNames,
45889
+ getFieldValue: types52.getFieldValue,
45890
+ eachField: types52.eachField,
45891
+ someField: types52.someField,
45892
+ getSupertypeNames: types52.getSupertypeNames,
45893
+ getBuilderName: types52.getBuilderName,
45893
45894
  astNodesAreEquivalent: fork.use(equiv_1.default),
45894
- finalize: types42.finalize,
45895
+ finalize: types52.finalize,
45895
45896
  Path: fork.use(path_1.default),
45896
45897
  NodePath: fork.use(node_path_1.default),
45897
45898
  PathVisitor,
@@ -46051,8 +46052,8 @@ var require_core2 = __commonJS2({
46051
46052
  var types_110 = tslib_1.__importDefault(require_types());
46052
46053
  var shared_1 = tslib_1.__importStar(require_shared());
46053
46054
  function default_1(fork) {
46054
- var types42 = fork.use(types_110.default);
46055
- var Type = types42.Type;
46055
+ var types52 = fork.use(types_110.default);
46056
+ var Type = types52.Type;
46056
46057
  var def = Type.def;
46057
46058
  var or = Type.or;
46058
46059
  var shared = fork.use(shared_1.default);
@@ -46142,9 +46143,9 @@ var require_es6 = __commonJS2({
46142
46143
  var shared_1 = tslib_1.__importStar(require_shared());
46143
46144
  function default_1(fork) {
46144
46145
  fork.use(core_1.default);
46145
- var types42 = fork.use(types_110.default);
46146
- var def = types42.Type.def;
46147
- var or = types42.Type.or;
46146
+ var types52 = fork.use(types_110.default);
46147
+ var def = types52.Type.def;
46148
+ var or = types52.Type.or;
46148
46149
  var defaults2 = fork.use(shared_1.default).defaults;
46149
46150
  def("Function").field("generator", Boolean, defaults2["false"]).field("expression", Boolean, defaults2["false"]).field("defaults", [or(def("Expression"), null)], defaults2.emptyArray).field("rest", or(def("Identifier"), null), defaults2["null"]);
46150
46151
  def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
@@ -46230,8 +46231,8 @@ var require_es2017 = __commonJS2({
46230
46231
  var shared_1 = tslib_1.__importStar(require_shared());
46231
46232
  function default_1(fork) {
46232
46233
  fork.use(es2016_1.default);
46233
- var types42 = fork.use(types_110.default);
46234
- var def = types42.Type.def;
46234
+ var types52 = fork.use(types_110.default);
46235
+ var def = types52.Type.def;
46235
46236
  var defaults2 = fork.use(shared_1.default).defaults;
46236
46237
  def("Function").field("async", Boolean, defaults2["false"]);
46237
46238
  def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
@@ -46252,9 +46253,9 @@ var require_es2018 = __commonJS2({
46252
46253
  var shared_1 = tslib_1.__importStar(require_shared());
46253
46254
  function default_1(fork) {
46254
46255
  fork.use(es2017_1.default);
46255
- var types42 = fork.use(types_110.default);
46256
- var def = types42.Type.def;
46257
- var or = types42.Type.or;
46256
+ var types52 = fork.use(types_110.default);
46257
+ var def = types52.Type.def;
46258
+ var or = types52.Type.or;
46258
46259
  var defaults2 = fork.use(shared_1.default).defaults;
46259
46260
  def("ForOfStatement").field("await", Boolean, defaults2["false"]);
46260
46261
  def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
@@ -46283,9 +46284,9 @@ var require_es2019 = __commonJS2({
46283
46284
  var shared_1 = tslib_1.__importStar(require_shared());
46284
46285
  function default_1(fork) {
46285
46286
  fork.use(es2018_1.default);
46286
- var types42 = fork.use(types_110.default);
46287
- var def = types42.Type.def;
46288
- var or = types42.Type.or;
46287
+ var types52 = fork.use(types_110.default);
46288
+ var def = types52.Type.def;
46289
+ var or = types52.Type.or;
46289
46290
  var defaults2 = fork.use(shared_1.default).defaults;
46290
46291
  def("CatchClause").field("param", or(def("Pattern"), null), defaults2["null"]);
46291
46292
  }
@@ -46307,9 +46308,9 @@ var require_es20202 = __commonJS2({
46307
46308
  function default_1(fork) {
46308
46309
  fork.use(es2020_1.default);
46309
46310
  fork.use(es2019_1.default);
46310
- var types42 = fork.use(types_110.default);
46311
- var def = types42.Type.def;
46312
- var or = types42.Type.or;
46311
+ var types52 = fork.use(types_110.default);
46312
+ var def = types52.Type.def;
46313
+ var or = types52.Type.or;
46313
46314
  var shared = fork.use(shared_1.default);
46314
46315
  var defaults2 = shared.defaults;
46315
46316
  def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
@@ -46355,8 +46356,8 @@ var require_es2022 = __commonJS2({
46355
46356
  var shared_1 = require_shared();
46356
46357
  function default_1(fork) {
46357
46358
  fork.use(es2021_1.default);
46358
- var types42 = fork.use(types_110.default);
46359
- var def = types42.Type.def;
46359
+ var types52 = fork.use(types_110.default);
46360
+ var def = types52.Type.def;
46360
46361
  def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
46361
46362
  }
46362
46363
  exports.default = default_1;
@@ -46375,9 +46376,9 @@ var require_es_proposals = __commonJS2({
46375
46376
  var es2022_1 = tslib_1.__importDefault(require_es2022());
46376
46377
  function default_1(fork) {
46377
46378
  fork.use(es2022_1.default);
46378
- var types42 = fork.use(types_110.default);
46379
- var Type = types42.Type;
46380
- var def = types42.Type.def;
46379
+ var types52 = fork.use(types_110.default);
46380
+ var Type = types52.Type;
46381
+ var def = types52.Type.def;
46381
46382
  var or = Type.or;
46382
46383
  var shared = fork.use(shared_1.default);
46383
46384
  var defaults2 = shared.defaults;
@@ -46415,9 +46416,9 @@ var require_jsx = __commonJS2({
46415
46416
  var shared_1 = tslib_1.__importStar(require_shared());
46416
46417
  function default_1(fork) {
46417
46418
  fork.use(es_proposals_1.default);
46418
- var types42 = fork.use(types_110.default);
46419
- var def = types42.Type.def;
46420
- var or = types42.Type.or;
46419
+ var types52 = fork.use(types_110.default);
46420
+ var def = types52.Type.def;
46421
+ var or = types52.Type.or;
46421
46422
  var defaults2 = fork.use(shared_1.default).defaults;
46422
46423
  def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
46423
46424
  def("Literal"),
@@ -46473,9 +46474,9 @@ var require_type_annotations = __commonJS2({
46473
46474
  var types_110 = tslib_1.__importDefault(require_types());
46474
46475
  var shared_1 = tslib_1.__importStar(require_shared());
46475
46476
  function default_1(fork) {
46476
- var types42 = fork.use(types_110.default);
46477
- var def = types42.Type.def;
46478
- var or = types42.Type.or;
46477
+ var types52 = fork.use(types_110.default);
46478
+ var def = types52.Type.def;
46479
+ var or = types52.Type.or;
46479
46480
  var defaults2 = fork.use(shared_1.default).defaults;
46480
46481
  var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
46481
46482
  var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
@@ -46508,9 +46509,9 @@ var require_flow = __commonJS2({
46508
46509
  function default_1(fork) {
46509
46510
  fork.use(es_proposals_1.default);
46510
46511
  fork.use(type_annotations_1.default);
46511
- var types42 = fork.use(types_110.default);
46512
- var def = types42.Type.def;
46513
- var or = types42.Type.or;
46512
+ var types52 = fork.use(types_110.default);
46513
+ var def = types52.Type.def;
46514
+ var or = types52.Type.or;
46514
46515
  var defaults2 = fork.use(shared_1.default).defaults;
46515
46516
  def("Flow").bases("Node");
46516
46517
  def("FlowType").bases("Flow");
@@ -46622,10 +46623,10 @@ var require_esprima = __commonJS2({
46622
46623
  var shared_1 = tslib_1.__importStar(require_shared());
46623
46624
  function default_1(fork) {
46624
46625
  fork.use(es_proposals_1.default);
46625
- var types42 = fork.use(types_110.default);
46626
+ var types52 = fork.use(types_110.default);
46626
46627
  var defaults2 = fork.use(shared_1.default).defaults;
46627
- var def = types42.Type.def;
46628
- var or = types42.Type.or;
46628
+ var def = types52.Type.def;
46629
+ var or = types52.Type.or;
46629
46630
  def("VariableDeclaration").field("declarations", [or(
46630
46631
  def("VariableDeclarator"),
46631
46632
  def("Identifier")
@@ -46668,11 +46669,11 @@ var require_babel_core = __commonJS2({
46668
46669
  function default_1(fork) {
46669
46670
  var _a, _b, _c, _d, _e;
46670
46671
  fork.use(es_proposals_1.default);
46671
- var types42 = fork.use(types_110.default);
46672
+ var types52 = fork.use(types_110.default);
46672
46673
  var defaults2 = fork.use(shared_1.default).defaults;
46673
- var def = types42.Type.def;
46674
- var or = types42.Type.or;
46675
- var isUndefined = types42.builtInTypes.undefined;
46674
+ var def = types52.Type.def;
46675
+ var or = types52.Type.or;
46676
+ var isUndefined = types52.builtInTypes.undefined;
46676
46677
  def("Noop").bases("Statement").build();
46677
46678
  def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
46678
46679
  def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
@@ -46697,7 +46698,7 @@ var require_babel_core = __commonJS2({
46697
46698
  raw: String
46698
46699
  },
46699
46700
  function getDefault() {
46700
- var value2 = types42.getFieldValue(this, "value");
46701
+ var value2 = types52.getFieldValue(this, "value");
46701
46702
  return {
46702
46703
  rawValue: value2,
46703
46704
  raw: toRaw ? toRaw(value2) : String(value2)
@@ -46798,8 +46799,8 @@ var require_babel = __commonJS2({
46798
46799
  var flow_1 = tslib_1.__importDefault(require_flow());
46799
46800
  var shared_1 = require_shared();
46800
46801
  function default_1(fork) {
46801
- var types42 = fork.use(types_110.default);
46802
- var def = types42.Type.def;
46802
+ var types52 = fork.use(types_110.default);
46803
+ var def = types52.Type.def;
46803
46804
  fork.use(babel_core_1.default);
46804
46805
  fork.use(flow_1.default);
46805
46806
  def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
@@ -46823,12 +46824,12 @@ var require_typescript = __commonJS2({
46823
46824
  function default_1(fork) {
46824
46825
  fork.use(babel_core_1.default);
46825
46826
  fork.use(type_annotations_1.default);
46826
- var types42 = fork.use(types_110.default);
46827
- var n = types42.namedTypes;
46828
- var def = types42.Type.def;
46829
- var or = types42.Type.or;
46827
+ var types52 = fork.use(types_110.default);
46828
+ var n = types52.namedTypes;
46829
+ var def = types52.Type.def;
46830
+ var or = types52.Type.or;
46830
46831
  var defaults2 = fork.use(shared_1.default).defaults;
46831
- var StringLiteral = types42.Type.from(function(value2, deep) {
46832
+ var StringLiteral = types52.Type.from(function(value2, deep) {
46832
46833
  if (n.StringLiteral && n.StringLiteral.check(value2, deep)) {
46833
46834
  return true;
46834
46835
  }
@@ -48776,8 +48777,8 @@ var require_util2 = __commonJS2({
48776
48777
  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;
48777
48778
  var tslib_1 = require_tslib();
48778
48779
  var assert_1 = tslib_1.__importDefault(__require("assert"));
48779
- var types42 = tslib_1.__importStar(require_main());
48780
- var n = types42.namedTypes;
48780
+ var types52 = tslib_1.__importStar(require_main());
48781
+ var n = types52.namedTypes;
48781
48782
  var source_map_1 = tslib_1.__importDefault(require_source_map());
48782
48783
  var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
48783
48784
  var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
@@ -56083,10 +56084,10 @@ var require_comments = __commonJS2({
56083
56084
  exports.printComments = exports.attach = void 0;
56084
56085
  var tslib_1 = require_tslib();
56085
56086
  var assert_1 = tslib_1.__importDefault(__require("assert"));
56086
- var types42 = tslib_1.__importStar(require_main());
56087
- var n = types42.namedTypes;
56088
- var isArray2 = types42.builtInTypes.array;
56089
- var isObject2 = types42.builtInTypes.object;
56087
+ var types52 = tslib_1.__importStar(require_main());
56088
+ var n = types52.namedTypes;
56089
+ var isArray2 = types52.builtInTypes.array;
56090
+ var isObject2 = types52.builtInTypes.object;
56090
56091
  var lines_1 = require_lines();
56091
56092
  var util_110 = require_util2();
56092
56093
  var childNodesCache = /* @__PURE__ */ new WeakMap();
@@ -56117,7 +56118,7 @@ var require_comments = __commonJS2({
56117
56118
  if (isArray2.check(node2)) {
56118
56119
  names = Object.keys(node2);
56119
56120
  } else if (isObject2.check(node2)) {
56120
- names = types42.getFieldNames(node2);
56121
+ names = types52.getFieldNames(node2);
56121
56122
  } else {
56122
56123
  return resultArray;
56123
56124
  }
@@ -56295,7 +56296,7 @@ var require_comments = __commonJS2({
56295
56296
  function printComments(path3, print62) {
56296
56297
  var value2 = path3.getValue();
56297
56298
  var innerLines = print62(path3);
56298
- var comments = n.Node.check(value2) && types42.getFieldValue(value2, "comments");
56299
+ var comments = n.Node.check(value2) && types52.getFieldValue(value2, "comments");
56299
56300
  if (!comments || comments.length === 0) {
56300
56301
  return innerLines;
56301
56302
  }
@@ -56303,8 +56304,8 @@ var require_comments = __commonJS2({
56303
56304
  var trailingParts = [innerLines];
56304
56305
  path3.each(function(commentPath) {
56305
56306
  var comment = commentPath.getValue();
56306
- var leading = types42.getFieldValue(comment, "leading");
56307
- var trailing = types42.getFieldValue(comment, "trailing");
56307
+ var leading = types52.getFieldValue(comment, "leading");
56308
+ var trailing = types52.getFieldValue(comment, "trailing");
56308
56309
  if (leading || trailing && !(n.Statement.check(value2) || comment.type === "Block" || comment.type === "CommentBlock")) {
56309
56310
  leadingParts.push(printLeadingComment(commentPath, print62));
56310
56311
  } else if (trailing) {
@@ -56324,10 +56325,10 @@ var require_parser = __commonJS2({
56324
56325
  exports.parse = void 0;
56325
56326
  var tslib_1 = require_tslib();
56326
56327
  var assert_1 = tslib_1.__importDefault(__require("assert"));
56327
- var types42 = tslib_1.__importStar(require_main());
56328
- var b = types42.builders;
56329
- var isObject2 = types42.builtInTypes.object;
56330
- var isArray2 = types42.builtInTypes.array;
56328
+ var types52 = tslib_1.__importStar(require_main());
56329
+ var b = types52.builders;
56330
+ var isObject2 = types52.builtInTypes.object;
56331
+ var isArray2 = types52.builtInTypes.array;
56331
56332
  var options_1 = require_options();
56332
56333
  var lines_1 = require_lines();
56333
56334
  var comments_1 = require_comments();
@@ -56511,11 +56512,11 @@ var require_fast_path = __commonJS2({
56511
56512
  Object.defineProperty(exports, "__esModule", { value: true });
56512
56513
  var tslib_1 = require_tslib();
56513
56514
  var assert_1 = tslib_1.__importDefault(__require("assert"));
56514
- var types42 = tslib_1.__importStar(require_main());
56515
+ var types52 = tslib_1.__importStar(require_main());
56515
56516
  var util2 = tslib_1.__importStar(require_util2());
56516
- var n = types42.namedTypes;
56517
- var isArray2 = types42.builtInTypes.array;
56518
- var isNumber2 = types42.builtInTypes.number;
56517
+ var n = types52.namedTypes;
56518
+ var isArray2 = types52.builtInTypes.array;
56519
+ var isNumber2 = types52.builtInTypes.number;
56519
56520
  var PRECEDENCE = {};
56520
56521
  [
56521
56522
  ["??"],
@@ -56544,7 +56545,7 @@ var require_fast_path = __commonJS2({
56544
56545
  if (obj instanceof FastPath) {
56545
56546
  return obj.copy();
56546
56547
  }
56547
- if (obj instanceof types42.NodePath) {
56548
+ if (obj instanceof types52.NodePath) {
56548
56549
  var copy = Object.create(FastPath.prototype);
56549
56550
  var stack = [obj.value];
56550
56551
  for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
@@ -56855,7 +56856,7 @@ var require_fast_path = __commonJS2({
56855
56856
  return node2.some(containsCallExpression);
56856
56857
  }
56857
56858
  if (n.Node.check(node2)) {
56858
- return types42.someField(node2, function(_name, child) {
56859
+ return types52.someField(node2, function(_name, child) {
56859
56860
  return containsCallExpression(child);
56860
56861
  });
56861
56862
  }
@@ -56943,16 +56944,16 @@ var require_patcher = __commonJS2({
56943
56944
  var tslib_1 = require_tslib();
56944
56945
  var assert_1 = tslib_1.__importDefault(__require("assert"));
56945
56946
  var linesModule = tslib_1.__importStar(require_lines());
56946
- var types42 = tslib_1.__importStar(require_main());
56947
- var Printable = types42.namedTypes.Printable;
56948
- var Expression = types42.namedTypes.Expression;
56949
- var ReturnStatement = types42.namedTypes.ReturnStatement;
56950
- var SourceLocation3 = types42.namedTypes.SourceLocation;
56947
+ var types52 = tslib_1.__importStar(require_main());
56948
+ var Printable = types52.namedTypes.Printable;
56949
+ var Expression = types52.namedTypes.Expression;
56950
+ var ReturnStatement = types52.namedTypes.ReturnStatement;
56951
+ var SourceLocation3 = types52.namedTypes.SourceLocation;
56951
56952
  var util_110 = require_util2();
56952
56953
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
56953
- var isObject2 = types42.builtInTypes.object;
56954
- var isArray2 = types42.builtInTypes.array;
56955
- var isString3 = types42.builtInTypes.string;
56954
+ var isObject2 = types52.builtInTypes.object;
56955
+ var isArray2 = types52.builtInTypes.array;
56956
+ var isString3 = types52.builtInTypes.string;
56956
56957
  var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
56957
56958
  var Patcher = function Patcher2(lines) {
56958
56959
  assert_1.default.ok(this instanceof Patcher2);
@@ -57222,8 +57223,8 @@ var require_patcher = __commonJS2({
57222
57223
  if (k.charAt(0) === "_") {
57223
57224
  continue;
57224
57225
  }
57225
- newPath.stack.push(k, types42.getFieldValue(newNode, k));
57226
- oldPath.stack.push(k, types42.getFieldValue(oldNode, k));
57226
+ newPath.stack.push(k, types52.getFieldValue(newNode, k));
57227
+ oldPath.stack.push(k, types52.getFieldValue(oldNode, k));
57227
57228
  var canReprint = findAnyReprints(newPath, oldPath, reprints);
57228
57229
  newPath.stack.length -= 2;
57229
57230
  oldPath.stack.length -= 2;
@@ -57245,16 +57246,16 @@ var require_printer = __commonJS2({
57245
57246
  exports.Printer = void 0;
57246
57247
  var tslib_1 = require_tslib();
57247
57248
  var assert_1 = tslib_1.__importDefault(__require("assert"));
57248
- var types42 = tslib_1.__importStar(require_main());
57249
+ var types52 = tslib_1.__importStar(require_main());
57249
57250
  var comments_1 = require_comments();
57250
57251
  var fast_path_1 = tslib_1.__importDefault(require_fast_path());
57251
57252
  var lines_1 = require_lines();
57252
57253
  var options_1 = require_options();
57253
57254
  var patcher_1 = require_patcher();
57254
57255
  var util2 = tslib_1.__importStar(require_util2());
57255
- var namedTypes = types42.namedTypes;
57256
- var isString3 = types42.builtInTypes.string;
57257
- var isObject2 = types42.builtInTypes.object;
57256
+ var namedTypes = types52.namedTypes;
57257
+ var isString3 = types52.builtInTypes.string;
57258
+ var isObject2 = types52.builtInTypes.object;
57258
57259
  var PrintResult = function PrintResult2(code, sourceMap) {
57259
57260
  assert_1.default.ok(this instanceof PrintResult2);
57260
57261
  isString3.assert(code);
@@ -57416,7 +57417,7 @@ var require_printer = __commonJS2({
57416
57417
  case "OptionalMemberExpression": {
57417
57418
  parts.push(path3.call(print62, "object"));
57418
57419
  var property = path3.call(print62, "property");
57419
- var optional = types42.getFieldValue(n, "optional");
57420
+ var optional = types52.getFieldValue(n, "optional");
57420
57421
  if (n.computed) {
57421
57422
  parts.push(optional ? "?.[" : "[", property, "]");
57422
57423
  } else {
@@ -57687,7 +57688,7 @@ var require_printer = __commonJS2({
57687
57688
  if (n.typeArguments) {
57688
57689
  parts.push(path3.call(print62, "typeArguments"));
57689
57690
  }
57690
- if (types42.getFieldValue(n, "optional")) {
57691
+ if (types52.getFieldValue(n, "optional")) {
57691
57692
  parts.push("?.");
57692
57693
  }
57693
57694
  parts.push(printArgumentsList(path3, options, print62));
@@ -59366,8 +59367,8 @@ var require_printer = __commonJS2({
59366
59367
  });
59367
59368
  }
59368
59369
  function getPossibleRaw(node2) {
59369
- var value2 = types42.getFieldValue(node2, "value");
59370
- var extra = types42.getFieldValue(node2, "extra");
59370
+ var value2 = types52.getFieldValue(node2, "value");
59371
+ var extra = types52.getFieldValue(node2, "extra");
59371
59372
  if (extra && typeof extra.raw === "string" && value2 == extra.rawValue) {
59372
59373
  return extra.raw;
59373
59374
  }
@@ -59413,8 +59414,8 @@ var require_main2 = __commonJS2({
59413
59414
  exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
59414
59415
  var tslib_1 = require_tslib();
59415
59416
  var fs_1 = tslib_1.__importDefault(__require("fs"));
59416
- var types42 = tslib_1.__importStar(require_main());
59417
- exports.types = types42;
59417
+ var types52 = tslib_1.__importStar(require_main());
59418
+ exports.types = types52;
59418
59419
  var parser_1 = require_parser();
59419
59420
  Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
59420
59421
  return parser_1.parse;
@@ -63804,30 +63805,30 @@ var require_utils3 = __commonJS2({
63804
63805
  validate22.oneOf = values;
63805
63806
  return validate22;
63806
63807
  }
63807
- function assertNodeType(...types42) {
63808
+ function assertNodeType(...types52) {
63808
63809
  function validate22(node2, key, val) {
63809
- for (const type of types42) {
63810
+ for (const type of types52) {
63810
63811
  if ((0, _is.default)(type, val)) {
63811
63812
  (0, _validate.validateChild)(node2, key, val);
63812
63813
  return;
63813
63814
  }
63814
63815
  }
63815
- throw new TypeError(`Property ${key} of ${node2.type} expected node to be of a type ${JSON.stringify(types42)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
63816
+ throw new TypeError(`Property ${key} of ${node2.type} expected node to be of a type ${JSON.stringify(types52)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
63816
63817
  }
63817
- validate22.oneOfNodeTypes = types42;
63818
+ validate22.oneOfNodeTypes = types52;
63818
63819
  return validate22;
63819
63820
  }
63820
- function assertNodeOrValueType(...types42) {
63821
+ function assertNodeOrValueType(...types52) {
63821
63822
  function validate22(node2, key, val) {
63822
- for (const type of types42) {
63823
+ for (const type of types52) {
63823
63824
  if (getType(val) === type || (0, _is.default)(type, val)) {
63824
63825
  (0, _validate.validateChild)(node2, key, val);
63825
63826
  return;
63826
63827
  }
63827
63828
  }
63828
- throw new TypeError(`Property ${key} of ${node2.type} expected node to be of a type ${JSON.stringify(types42)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
63829
+ throw new TypeError(`Property ${key} of ${node2.type} expected node to be of a type ${JSON.stringify(types52)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
63829
63830
  }
63830
- validate22.oneOfNodeOrValueTypes = types42;
63831
+ validate22.oneOfNodeOrValueTypes = types52;
63831
63832
  return validate22;
63832
63833
  }
63833
63834
  function assertValueType(type) {
@@ -67405,7 +67406,7 @@ var require_generated2 = __commonJS2({
67405
67406
  exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
67406
67407
  exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
67407
67408
  exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
67408
- exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
67409
+ exports.tSTypeReference = exports.tsTypeReference = tsTypeReference2;
67409
67410
  exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
67410
67411
  exports.tSUnionType = exports.tsUnionType = tsUnionType;
67411
67412
  exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
@@ -68231,10 +68232,10 @@ var require_generated2 = __commonJS2({
68231
68232
  body
68232
68233
  });
68233
68234
  }
68234
- function intersectionTypeAnnotation(types42) {
68235
+ function intersectionTypeAnnotation(types52) {
68235
68236
  return (0, _validateNode.default)({
68236
68237
  type: "IntersectionTypeAnnotation",
68237
- types: types42
68238
+ types: types52
68238
68239
  });
68239
68240
  }
68240
68241
  function mixedTypeAnnotation() {
@@ -68357,10 +68358,10 @@ var require_generated2 = __commonJS2({
68357
68358
  type: "ThisTypeAnnotation"
68358
68359
  };
68359
68360
  }
68360
- function tupleTypeAnnotation(types42) {
68361
+ function tupleTypeAnnotation(types52) {
68361
68362
  return (0, _validateNode.default)({
68362
68363
  type: "TupleTypeAnnotation",
68363
- types: types42
68364
+ types: types52
68364
68365
  });
68365
68366
  }
68366
68367
  function typeofTypeAnnotation(argument) {
@@ -68411,10 +68412,10 @@ var require_generated2 = __commonJS2({
68411
68412
  params
68412
68413
  });
68413
68414
  }
68414
- function unionTypeAnnotation(types42) {
68415
+ function unionTypeAnnotation(types52) {
68415
68416
  return (0, _validateNode.default)({
68416
68417
  type: "UnionTypeAnnotation",
68417
- types: types42
68418
+ types: types52
68418
68419
  });
68419
68420
  }
68420
68421
  function variance(kind) {
@@ -68867,7 +68868,7 @@ var require_generated2 = __commonJS2({
68867
68868
  typeAnnotation: typeAnnotation2
68868
68869
  });
68869
68870
  }
68870
- function tsTypeReference(typeName, typeParameters = null) {
68871
+ function tsTypeReference2(typeName, typeParameters = null) {
68871
68872
  return (0, _validateNode.default)({
68872
68873
  type: "TSTypeReference",
68873
68874
  typeName,
@@ -68927,16 +68928,16 @@ var require_generated2 = __commonJS2({
68927
68928
  optional
68928
68929
  });
68929
68930
  }
68930
- function tsUnionType(types42) {
68931
+ function tsUnionType(types52) {
68931
68932
  return (0, _validateNode.default)({
68932
68933
  type: "TSUnionType",
68933
- types: types42
68934
+ types: types52
68934
68935
  });
68935
68936
  }
68936
- function tsIntersectionType(types42) {
68937
+ function tsIntersectionType(types52) {
68937
68938
  return (0, _validateNode.default)({
68938
68939
  type: "TSIntersectionType",
68939
- types: types42
68940
+ types: types52
68940
68941
  });
68941
68942
  }
68942
68943
  function tsConditionalType(checkType, extendsType, trueType, falseType) {
@@ -70537,12 +70538,12 @@ var require_removeTypeDuplicates = __commonJS2({
70537
70538
  const generics = /* @__PURE__ */ new Map();
70538
70539
  const bases = /* @__PURE__ */ new Map();
70539
70540
  const typeGroups = /* @__PURE__ */ new Set();
70540
- const types42 = [];
70541
+ const types52 = [];
70541
70542
  for (let i22 = 0; i22 < nodes.length; i22++) {
70542
70543
  const node2 = nodes[i22];
70543
70544
  if (!node2)
70544
70545
  continue;
70545
- if (types42.indexOf(node2) >= 0) {
70546
+ if (types52.indexOf(node2) >= 0) {
70546
70547
  continue;
70547
70548
  }
70548
70549
  if ((0, _generated.isAnyTypeAnnotation)(node2)) {
@@ -70576,15 +70577,15 @@ var require_removeTypeDuplicates = __commonJS2({
70576
70577
  }
70577
70578
  continue;
70578
70579
  }
70579
- types42.push(node2);
70580
+ types52.push(node2);
70580
70581
  }
70581
70582
  for (const [, baseType] of bases) {
70582
- types42.push(baseType);
70583
+ types52.push(baseType);
70583
70584
  }
70584
70585
  for (const [, genericName] of generics) {
70585
- types42.push(genericName);
70586
+ types52.push(genericName);
70586
70587
  }
70587
- return types42;
70588
+ return types52;
70588
70589
  }
70589
70590
  }
70590
70591
  });
@@ -70597,8 +70598,8 @@ var require_createFlowUnionType = __commonJS2({
70597
70598
  exports.default = createFlowUnionType;
70598
70599
  var _generated = require_generated2();
70599
70600
  var _removeTypeDuplicates = require_removeTypeDuplicates();
70600
- function createFlowUnionType(types42) {
70601
- const flattened = (0, _removeTypeDuplicates.default)(types42);
70601
+ function createFlowUnionType(types52) {
70602
+ const flattened = (0, _removeTypeDuplicates.default)(types52);
70602
70603
  if (flattened.length === 1) {
70603
70604
  return flattened[0];
70604
70605
  } else {
@@ -70623,12 +70624,12 @@ var require_removeTypeDuplicates2 = __commonJS2({
70623
70624
  const generics = /* @__PURE__ */ new Map();
70624
70625
  const bases = /* @__PURE__ */ new Map();
70625
70626
  const typeGroups = /* @__PURE__ */ new Set();
70626
- const types42 = [];
70627
+ const types52 = [];
70627
70628
  for (let i22 = 0; i22 < nodes.length; i22++) {
70628
70629
  const node2 = nodes[i22];
70629
70630
  if (!node2)
70630
70631
  continue;
70631
- if (types42.indexOf(node2) >= 0) {
70632
+ if (types52.indexOf(node2) >= 0) {
70632
70633
  continue;
70633
70634
  }
70634
70635
  if ((0, _generated.isTSAnyKeyword)(node2)) {
@@ -70662,15 +70663,15 @@ var require_removeTypeDuplicates2 = __commonJS2({
70662
70663
  }
70663
70664
  continue;
70664
70665
  }
70665
- types42.push(node2);
70666
+ types52.push(node2);
70666
70667
  }
70667
70668
  for (const [, baseType] of bases) {
70668
- types42.push(baseType);
70669
+ types52.push(baseType);
70669
70670
  }
70670
70671
  for (const [, genericName] of generics) {
70671
- types42.push(genericName);
70672
+ types52.push(genericName);
70672
70673
  }
70673
- return types42;
70674
+ return types52;
70674
70675
  }
70675
70676
  }
70676
70677
  });
@@ -70685,10 +70686,10 @@ var require_createTSUnionType = __commonJS2({
70685
70686
  var _removeTypeDuplicates = require_removeTypeDuplicates2();
70686
70687
  var _index = require_generated();
70687
70688
  function createTSUnionType(typeAnnotations) {
70688
- const types42 = typeAnnotations.map((type) => {
70689
+ const types52 = typeAnnotations.map((type) => {
70689
70690
  return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
70690
70691
  });
70691
- const flattened = (0, _removeTypeDuplicates.default)(types42);
70692
+ const flattened = (0, _removeTypeDuplicates.default)(types52);
70692
70693
  if (flattened.length === 1) {
70693
70694
  return flattened[0];
70694
70695
  } else {
@@ -74376,7 +74377,7 @@ var printDocASTReducer = {
74376
74377
  leave: ({ name, interfaces, directives, fields }) => join(["interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
74377
74378
  },
74378
74379
  UnionTypeDefinition: {
74379
- leave: ({ name, directives, types: types42 }) => join(["union", name, join(directives, " "), wrap("= ", join(types42, " | "))], " ")
74380
+ leave: ({ name, directives, types: types52 }) => join(["union", name, join(directives, " "), wrap("= ", join(types52, " | "))], " ")
74380
74381
  },
74381
74382
  EnumTypeDefinition: {
74382
74383
  leave: ({ name, directives, values }) => join(["enum", name, join(directives, " "), block(values)], " ")
@@ -74403,7 +74404,7 @@ var printDocASTReducer = {
74403
74404
  leave: ({ name, interfaces, directives, fields }) => join(["extend interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
74404
74405
  },
74405
74406
  UnionTypeExtension: {
74406
- leave: ({ name, directives, types: types42 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types42, " | "))], " ")
74407
+ leave: ({ name, directives, types: types52 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types52, " | "))], " ")
74407
74408
  },
74408
74409
  EnumTypeExtension: {
74409
74410
  leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
@@ -74570,45 +74571,6 @@ function deepMerge(...objects) {
74570
74571
  }
74571
74572
  return mergedObj;
74572
74573
  }
74573
- async function marshalSelection({
74574
- selection,
74575
- data: data2
74576
- }) {
74577
- const config2 = getCurrentConfig();
74578
- if (data2 === null || typeof data2 === "undefined") {
74579
- return data2;
74580
- }
74581
- if (Array.isArray(data2)) {
74582
- return await Promise.all(data2.map((val) => marshalSelection({ selection, data: val })));
74583
- }
74584
- const targetSelection = getFieldsForType(selection, data2["__typename"], false);
74585
- return Object.fromEntries(
74586
- await Promise.all(
74587
- Object.entries(data2).map(async ([fieldName, value2]) => {
74588
- const { type, selection: selection2 } = targetSelection[fieldName];
74589
- if (!type) {
74590
- return [fieldName, value2];
74591
- }
74592
- if (selection2) {
74593
- return [fieldName, await marshalSelection({ selection: selection2, data: value2 })];
74594
- }
74595
- if (config2.scalars?.[type]) {
74596
- const marshalFn = config2.scalars[type].marshal;
74597
- if (!marshalFn) {
74598
- throw new Error(
74599
- `scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
74600
- );
74601
- }
74602
- if (Array.isArray(value2)) {
74603
- return [fieldName, value2.map(marshalFn)];
74604
- }
74605
- return [fieldName, marshalFn(value2)];
74606
- }
74607
- return [fieldName, value2];
74608
- })
74609
- )
74610
- );
74611
- }
74612
74574
  var ArtifactKind = {
74613
74575
  Query: "HoudiniQuery",
74614
74576
  Subscription: "HoudiniSubscription",
@@ -74619,11 +74581,6 @@ var CompiledFragmentKind = ArtifactKind.Fragment;
74619
74581
  var CompiledMutationKind = ArtifactKind.Mutation;
74620
74582
  var CompiledQueryKind = ArtifactKind.Query;
74621
74583
  var CompiledSubscriptionKind = ArtifactKind.Subscription;
74622
- var DataSource = {
74623
- Cache: "cache",
74624
- Network: "network",
74625
- Ssr: "ssr"
74626
- };
74627
74584
  var fragmentKey = " $fragments";
74628
74585
  var PendingValue = Symbol("houdini_loading");
74629
74586
  var computeKey = ({ field, args }) => {
@@ -77814,180 +77771,6 @@ function defaultComponentField({
77814
77771
  }
77815
77772
  var cache_default = new Cache();
77816
77773
  var serverSide = typeof globalThis.window === "undefined";
77817
- var documentPlugin = (kind, source) => {
77818
- return () => {
77819
- const sourceHandlers = source();
77820
- const enterWrapper = (handler) => {
77821
- return !handler ? void 0 : (ctx, handlers2) => {
77822
- if (ctx.artifact.kind !== kind) {
77823
- return handlers2.next(ctx);
77824
- }
77825
- return handler(ctx, handlers2);
77826
- };
77827
- };
77828
- const exitWrapper = (handler) => {
77829
- return !handler ? void 0 : (ctx, handlers2) => {
77830
- if (ctx.artifact.kind !== kind) {
77831
- return handlers2.resolve(ctx);
77832
- }
77833
- return handler(ctx, handlers2);
77834
- };
77835
- };
77836
- return {
77837
- start: enterWrapper(sourceHandlers.start),
77838
- network: enterWrapper(sourceHandlers.network),
77839
- afterNetwork: exitWrapper(sourceHandlers.afterNetwork),
77840
- end: exitWrapper(sourceHandlers.end),
77841
- catch: sourceHandlers.catch ? (ctx, handlers2) => sourceHandlers.catch(ctx, handlers2) : void 0,
77842
- cleanup: (...args) => sourceHandlers.cleanup?.(...args)
77843
- };
77844
- };
77845
- };
77846
- var query = documentPlugin(ArtifactKind.Query, function() {
77847
- let subscriptionSpec = null;
77848
- let lastVariables = null;
77849
- return {
77850
- start(ctx, { next }) {
77851
- ctx.variables = {
77852
- ...lastVariables,
77853
- ...ctx.variables
77854
- };
77855
- next(ctx);
77856
- },
77857
- end(ctx, { resolve: resolve22, marshalVariables: marshalVariables2, variablesChanged: variablesChanged2 }) {
77858
- if (variablesChanged2(ctx) && !ctx.cacheParams?.disableSubscriptions) {
77859
- if (subscriptionSpec) {
77860
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
77861
- }
77862
- lastVariables = { ...marshalVariables2(ctx) };
77863
- const variables = lastVariables;
77864
- subscriptionSpec = {
77865
- rootType: ctx.artifact.rootType,
77866
- selection: ctx.artifact.selection,
77867
- variables: () => variables,
77868
- set: (newValue) => {
77869
- resolve22(ctx, {
77870
- data: newValue,
77871
- errors: null,
77872
- fetching: false,
77873
- partial: false,
77874
- stale: false,
77875
- source: DataSource.Cache,
77876
- variables: ctx.variables ?? {}
77877
- });
77878
- }
77879
- };
77880
- cache_default.subscribe(subscriptionSpec, lastVariables);
77881
- }
77882
- resolve22(ctx);
77883
- },
77884
- cleanup() {
77885
- if (subscriptionSpec) {
77886
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
77887
- lastVariables = null;
77888
- }
77889
- }
77890
- };
77891
- });
77892
- var fragment = documentPlugin(ArtifactKind.Fragment, function() {
77893
- let subscriptionSpec = null;
77894
- let lastReference = null;
77895
- return {
77896
- start(ctx, { next, resolve: resolve22, variablesChanged: variablesChanged2, marshalVariables: marshalVariables2 }) {
77897
- if (!ctx.stuff.parentID) {
77898
- return next(ctx);
77899
- }
77900
- const currentReference = {
77901
- parent: ctx.stuff.parentID,
77902
- variables: marshalVariables2(ctx)
77903
- };
77904
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged2(ctx))) {
77905
- if (subscriptionSpec) {
77906
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
77907
- }
77908
- const variables = marshalVariables2(ctx);
77909
- subscriptionSpec = {
77910
- rootType: ctx.artifact.rootType,
77911
- selection: ctx.artifact.selection,
77912
- variables: () => variables,
77913
- parentID: ctx.stuff.parentID,
77914
- set: (newValue) => {
77915
- resolve22(ctx, {
77916
- data: newValue,
77917
- errors: null,
77918
- fetching: false,
77919
- partial: false,
77920
- stale: false,
77921
- source: DataSource.Cache,
77922
- variables
77923
- });
77924
- }
77925
- };
77926
- cache_default.subscribe(subscriptionSpec, variables);
77927
- lastReference = currentReference;
77928
- }
77929
- next(ctx);
77930
- },
77931
- cleanup() {
77932
- if (subscriptionSpec) {
77933
- cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
77934
- }
77935
- }
77936
- };
77937
- });
77938
- var mutation = documentPlugin(ArtifactKind.Mutation, () => {
77939
- return {
77940
- async start(ctx, { next, marshalVariables: marshalVariables2 }) {
77941
- const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
77942
- const optimisticResponse = ctx.stuff.optimisticResponse;
77943
- let toNotify = [];
77944
- if (optimisticResponse) {
77945
- toNotify = cache_default.write({
77946
- selection: ctx.artifact.selection,
77947
- data: await marshalSelection({
77948
- selection: ctx.artifact.selection,
77949
- data: optimisticResponse
77950
- }),
77951
- variables: marshalVariables2(ctx),
77952
- layer: layerOptimistic.id
77953
- });
77954
- }
77955
- ctx.cacheParams = {
77956
- ...ctx.cacheParams,
77957
- layer: layerOptimistic,
77958
- notifySubscribers: toNotify,
77959
- forceNotify: true
77960
- };
77961
- next(ctx);
77962
- },
77963
- afterNetwork(ctx, { resolve: resolve22 }) {
77964
- if (ctx.cacheParams?.layer) {
77965
- cache_default.clearLayer(ctx.cacheParams.layer.id);
77966
- }
77967
- resolve22(ctx);
77968
- },
77969
- end(ctx, { resolve: resolve22, value: value2 }) {
77970
- const hasErrors = value2.errors && value2.errors.length > 0;
77971
- if (hasErrors) {
77972
- if (ctx.cacheParams?.layer) {
77973
- cache_default.clearLayer(ctx.cacheParams.layer.id);
77974
- }
77975
- }
77976
- if (ctx.cacheParams?.layer) {
77977
- cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
77978
- }
77979
- resolve22(ctx);
77980
- },
77981
- catch(ctx, { error: error2 }) {
77982
- if (ctx.cacheParams?.layer) {
77983
- const { layer } = ctx.cacheParams;
77984
- cache_default.clearLayer(layer.id);
77985
- cache_default._internal_unstable.storage.resolveLayer(layer.id);
77986
- }
77987
- throw error2;
77988
- }
77989
- };
77990
- });
77991
77774
  var currentDir = dirname((0, import_node_url.fileURLToPath)(import_meta.url));
77992
77775
  var DEFAULT_CONFIG_PATH = join2(process.cwd(), "houdini.config.js");
77993
77776
  var emptySchema = graphql2.buildSchema("type Query { hello: String }");
@@ -78026,7 +77809,7 @@ function operation_requires_variables(operation) {
78026
77809
  )
78027
77810
  );
78028
77811
  }
78029
- function unwrapType(config2, type, wrappers = []) {
77812
+ function unwrapType(config2, type, wrappers = [], convertRuntimeScalars) {
78030
77813
  if (type.kind === "NonNullType") {
78031
77814
  return unwrapType(config2, type.type, [TypeWrapper.NonNull, ...wrappers]);
78032
77815
  }
@@ -78042,9 +77825,14 @@ function unwrapType(config2, type, wrappers = []) {
78042
77825
  if (type instanceof graphql3.GraphQLList) {
78043
77826
  return unwrapType(config2, type.ofType, [TypeWrapper.List, ...wrappers]);
78044
77827
  }
77828
+ if (convertRuntimeScalars && config2.configFile.features?.runtimeScalars?.[type.name.value]) {
77829
+ type = config2.schema.getType(
77830
+ config2.configFile.features?.runtimeScalars?.[type.name.value].type
77831
+ );
77832
+ }
78045
77833
  const namedType = config2.schema.getType(type.name.value || type.name);
78046
77834
  if (!namedType) {
78047
- throw new Error("Could not unwrap type: " + JSON.stringify(type));
77835
+ throw new Error("Unknown type: " + type.name.value || type.name);
78048
77836
  }
78049
77837
  return { type: namedType, wrappers };
78050
77838
  }
@@ -78168,6 +77956,8 @@ async function detectFromPackageJSON(cwd) {
78168
77956
  module: packageJSON["type"] === "module" ? "esm" : "commonjs"
78169
77957
  };
78170
77958
  }
77959
+ var recast2 = __toESM2(require_main2(), 1);
77960
+ var AST2 = recast2.types.builders;
78171
77961
  var WalkerBase = class {
78172
77962
  constructor() {
78173
77963
  this.should_skip = false;
@@ -78328,7 +78118,7 @@ async function find_graphql(config2, parsedScript, walker) {
78328
78118
  } else if (!documentString) {
78329
78119
  return;
78330
78120
  }
78331
- const parsedTag = graphql4.parse(documentString);
78121
+ const parsedTag = graphql5.parse(documentString);
78332
78122
  if (walker.where && !walker.where(parsedTag, { node: node2, parent: parent2 })) {
78333
78123
  return;
78334
78124
  }
@@ -78460,7 +78250,7 @@ function extractAnonymousQuery(config2, raw, expr, propName) {
78460
78250
  };
78461
78251
  return defs.concat([
78462
78252
  {
78463
- raw: graphql4.print(parsed),
78253
+ raw: graphql5.print(parsed),
78464
78254
  parsed
78465
78255
  }
78466
78256
  ]);
@@ -78603,14 +78393,14 @@ var url = __toESM(require("node:url"), 1);
78603
78393
  var import_vite7 = require("vite");
78604
78394
 
78605
78395
  // src/plugin/artifactData.ts
78606
- var graphql6 = __toESM(require("graphql"), 1);
78396
+ var graphql7 = __toESM(require("graphql"), 1);
78607
78397
  function artifactData({
78608
78398
  config: config2,
78609
78399
  document: document2
78610
78400
  }) {
78611
78401
  let isManualLoad = document2.filename.endsWith(".svelte");
78612
78402
  let set_blocking = void 0;
78613
- graphql6.visit(document2.document, {
78403
+ graphql7.visit(document2.document, {
78614
78404
  Directive(node2, _, __, ___) {
78615
78405
  if (node2.name.value === config2.loadDirective) {
78616
78406
  isManualLoad = false;
@@ -78682,7 +78472,7 @@ var import_promises2 = __toESM(require("node:fs/promises"), 1);
78682
78472
  var import_node_util5 = require("node:util");
78683
78473
  var import_node_os2 = __toESM(require("node:os"), 1);
78684
78474
  var import_node_path2 = __toESM(require("node:path"), 1);
78685
- var graphql7 = __toESM(require("graphql"), 1);
78475
+ var graphql8 = __toESM(require("graphql"), 1);
78686
78476
  var import_node_stream2 = __toESM(require("node:stream"), 1);
78687
78477
  var import_node_util6 = require("node:util");
78688
78478
  var import_node_buffer2 = require("node:buffer");
@@ -78693,26 +78483,25 @@ var import_node_util8 = require("node:util");
78693
78483
  var graphql33 = __toESM(require("graphql"), 1);
78694
78484
  var graphql42 = __toESM(require("graphql"), 1);
78695
78485
  var graphql52 = __toESM(require("graphql"), 1);
78696
- var graphql16 = __toESM(require("graphql"), 1);
78697
- var graphql72 = __toESM(require("graphql"), 1);
78698
78486
  var graphql62 = __toESM(require("graphql"), 1);
78487
+ var graphql17 = __toESM(require("graphql"), 1);
78488
+ var graphql82 = __toESM(require("graphql"), 1);
78489
+ var graphql72 = __toESM(require("graphql"), 1);
78699
78490
  var import_graphql61 = require("graphql");
78700
- var graphql8 = __toESM(require("graphql"), 1);
78701
- var graphql10 = __toESM(require("graphql"), 1);
78702
78491
  var graphql9 = __toESM(require("graphql"), 1);
78703
- var graphql15 = __toESM(require("graphql"), 1);
78704
- var graphql13 = __toESM(require("graphql"), 1);
78705
78492
  var graphql11 = __toESM(require("graphql"), 1);
78706
- var graphql12 = __toESM(require("graphql"), 1);
78493
+ var graphql10 = __toESM(require("graphql"), 1);
78494
+ var graphql16 = __toESM(require("graphql"), 1);
78707
78495
  var graphql14 = __toESM(require("graphql"), 1);
78708
- var graphql19 = __toESM(require("graphql"), 1);
78496
+ var graphql12 = __toESM(require("graphql"), 1);
78497
+ var graphql13 = __toESM(require("graphql"), 1);
78498
+ var graphql15 = __toESM(require("graphql"), 1);
78709
78499
  var graphql18 = __toESM(require("graphql"), 1);
78710
- var graphql17 = __toESM(require("graphql"), 1);
78500
+ var graphql19 = __toESM(require("graphql"), 1);
78711
78501
  var graphql20 = __toESM(require("graphql"), 1);
78712
78502
  var graphql21 = __toESM(require("graphql"), 1);
78713
- var graphql222 = __toESM(require("graphql"), 1);
78714
- var graphql24 = __toESM(require("graphql"), 1);
78715
78503
  var graphql23 = __toESM(require("graphql"), 1);
78504
+ var graphql222 = __toESM(require("graphql"), 1);
78716
78505
  var import_graphql62 = require("graphql");
78717
78506
  var import_graphql63 = require("graphql");
78718
78507
  var import_graphql64 = require("graphql");
@@ -78732,6 +78521,7 @@ var import_graphql77 = require("graphql");
78732
78521
  var import_graphql78 = require("graphql");
78733
78522
  var import_graphql79 = require("graphql");
78734
78523
  var import_graphql80 = require("graphql");
78524
+ var graphql24 = __toESM(require("graphql"), 1);
78735
78525
  var graphql25 = __toESM(require("graphql"), 1);
78736
78526
  var graphql26 = __toESM(require("graphql"), 1);
78737
78527
  var graphql27 = __toESM(require("graphql"), 1);
@@ -110442,7 +110232,7 @@ var require_path_visitor2 = __commonJS3({
110442
110232
  }
110443
110233
  return target;
110444
110234
  }
110445
- PathVisitor.visit = function visit192(node2, methods) {
110235
+ PathVisitor.visit = function visit202(node2, methods) {
110446
110236
  return PathVisitor.fromMethodsObject(methods).visit(node2);
110447
110237
  };
110448
110238
  var PVp = PathVisitor.prototype;
@@ -110633,7 +110423,7 @@ var require_path_visitor2 = __commonJS3({
110633
110423
  this.needToCallTraverse = false;
110634
110424
  return visitChildren(path3, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
110635
110425
  };
110636
- sharedContextProtoMethods.visit = function visit192(path3, newVisitor) {
110426
+ sharedContextProtoMethods.visit = function visit202(path3, newVisitor) {
110637
110427
  if (!(this instanceof this.Context)) {
110638
110428
  throw new Error("");
110639
110429
  }
@@ -111976,7 +111766,7 @@ var require_main3 = __commonJS3({
111976
111766
  var someField = _a.someField;
111977
111767
  var Type = _a.Type;
111978
111768
  var use = _a.use;
111979
- var visit192 = _a.visit;
111769
+ var visit202 = _a.visit;
111980
111770
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
111981
111771
  exports.builders = builders;
111982
111772
  exports.builtInTypes = builtInTypes;
@@ -111993,7 +111783,7 @@ var require_main3 = __commonJS3({
111993
111783
  exports.someField = someField;
111994
111784
  exports.Type = Type;
111995
111785
  exports.use = use;
111996
- exports.visit = visit192;
111786
+ exports.visit = visit202;
111997
111787
  Object.assign(namedTypes_1.namedTypes, n);
111998
111788
  }
111999
111789
  });
@@ -139825,45 +139615,6 @@ function deepMerge3(...objects) {
139825
139615
  }
139826
139616
  return mergedObj;
139827
139617
  }
139828
- async function marshalSelection2({
139829
- selection,
139830
- data: data2
139831
- }) {
139832
- const config2 = getCurrentConfig2();
139833
- if (data2 === null || typeof data2 === "undefined") {
139834
- return data2;
139835
- }
139836
- if (Array.isArray(data2)) {
139837
- return await Promise.all(data2.map((val) => marshalSelection2({ selection, data: val })));
139838
- }
139839
- const targetSelection = getFieldsForType2(selection, data2["__typename"], false);
139840
- return Object.fromEntries(
139841
- await Promise.all(
139842
- Object.entries(data2).map(async ([fieldName, value2]) => {
139843
- const { type, selection: selection2 } = targetSelection[fieldName];
139844
- if (!type) {
139845
- return [fieldName, value2];
139846
- }
139847
- if (selection2) {
139848
- return [fieldName, await marshalSelection2({ selection: selection2, data: value2 })];
139849
- }
139850
- if (config2.scalars?.[type]) {
139851
- const marshalFn = config2.scalars[type].marshal;
139852
- if (!marshalFn) {
139853
- throw new Error(
139854
- `scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
139855
- );
139856
- }
139857
- if (Array.isArray(value2)) {
139858
- return [fieldName, value2.map(marshalFn)];
139859
- }
139860
- return [fieldName, marshalFn(value2)];
139861
- }
139862
- return [fieldName, value2];
139863
- })
139864
- )
139865
- );
139866
- }
139867
139618
  var ArtifactKind2 = {
139868
139619
  Query: "HoudiniQuery",
139869
139620
  Subscription: "HoudiniSubscription",
@@ -139874,11 +139625,6 @@ var CompiledFragmentKind2 = ArtifactKind2.Fragment;
139874
139625
  var CompiledMutationKind2 = ArtifactKind2.Mutation;
139875
139626
  var CompiledQueryKind2 = ArtifactKind2.Query;
139876
139627
  var CompiledSubscriptionKind2 = ArtifactKind2.Subscription;
139877
- var DataSource2 = {
139878
- Cache: "cache",
139879
- Network: "network",
139880
- Ssr: "ssr"
139881
- };
139882
139628
  var fragmentKey2 = " $fragments";
139883
139629
  var PendingValue2 = Symbol("houdini_loading");
139884
139630
  var computeKey2 = ({ field, args }) => {
@@ -142954,180 +142700,6 @@ function defaultComponentField2({
142954
142700
  }
142955
142701
  var cache_default2 = new Cache2();
142956
142702
  var serverSide2 = typeof globalThis.window === "undefined";
142957
- var documentPlugin2 = (kind, source) => {
142958
- return () => {
142959
- const sourceHandlers = source();
142960
- const enterWrapper = (handler) => {
142961
- return !handler ? void 0 : (ctx, handlers2) => {
142962
- if (ctx.artifact.kind !== kind) {
142963
- return handlers2.next(ctx);
142964
- }
142965
- return handler(ctx, handlers2);
142966
- };
142967
- };
142968
- const exitWrapper = (handler) => {
142969
- return !handler ? void 0 : (ctx, handlers2) => {
142970
- if (ctx.artifact.kind !== kind) {
142971
- return handlers2.resolve(ctx);
142972
- }
142973
- return handler(ctx, handlers2);
142974
- };
142975
- };
142976
- return {
142977
- start: enterWrapper(sourceHandlers.start),
142978
- network: enterWrapper(sourceHandlers.network),
142979
- afterNetwork: exitWrapper(sourceHandlers.afterNetwork),
142980
- end: exitWrapper(sourceHandlers.end),
142981
- catch: sourceHandlers.catch ? (ctx, handlers2) => sourceHandlers.catch(ctx, handlers2) : void 0,
142982
- cleanup: (...args) => sourceHandlers.cleanup?.(...args)
142983
- };
142984
- };
142985
- };
142986
- var query2 = documentPlugin2(ArtifactKind2.Query, function() {
142987
- let subscriptionSpec = null;
142988
- let lastVariables = null;
142989
- return {
142990
- start(ctx, { next }) {
142991
- ctx.variables = {
142992
- ...lastVariables,
142993
- ...ctx.variables
142994
- };
142995
- next(ctx);
142996
- },
142997
- end(ctx, { resolve: resolve22, marshalVariables, variablesChanged }) {
142998
- if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
142999
- if (subscriptionSpec) {
143000
- cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
143001
- }
143002
- lastVariables = { ...marshalVariables(ctx) };
143003
- const variables = lastVariables;
143004
- subscriptionSpec = {
143005
- rootType: ctx.artifact.rootType,
143006
- selection: ctx.artifact.selection,
143007
- variables: () => variables,
143008
- set: (newValue) => {
143009
- resolve22(ctx, {
143010
- data: newValue,
143011
- errors: null,
143012
- fetching: false,
143013
- partial: false,
143014
- stale: false,
143015
- source: DataSource2.Cache,
143016
- variables: ctx.variables ?? {}
143017
- });
143018
- }
143019
- };
143020
- cache_default2.subscribe(subscriptionSpec, lastVariables);
143021
- }
143022
- resolve22(ctx);
143023
- },
143024
- cleanup() {
143025
- if (subscriptionSpec) {
143026
- cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
143027
- lastVariables = null;
143028
- }
143029
- }
143030
- };
143031
- });
143032
- var fragment2 = documentPlugin2(ArtifactKind2.Fragment, function() {
143033
- let subscriptionSpec = null;
143034
- let lastReference = null;
143035
- return {
143036
- start(ctx, { next, resolve: resolve22, variablesChanged, marshalVariables }) {
143037
- if (!ctx.stuff.parentID) {
143038
- return next(ctx);
143039
- }
143040
- const currentReference = {
143041
- parent: ctx.stuff.parentID,
143042
- variables: marshalVariables(ctx)
143043
- };
143044
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals2(lastReference, currentReference) || variablesChanged(ctx))) {
143045
- if (subscriptionSpec) {
143046
- cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
143047
- }
143048
- const variables = marshalVariables(ctx);
143049
- subscriptionSpec = {
143050
- rootType: ctx.artifact.rootType,
143051
- selection: ctx.artifact.selection,
143052
- variables: () => variables,
143053
- parentID: ctx.stuff.parentID,
143054
- set: (newValue) => {
143055
- resolve22(ctx, {
143056
- data: newValue,
143057
- errors: null,
143058
- fetching: false,
143059
- partial: false,
143060
- stale: false,
143061
- source: DataSource2.Cache,
143062
- variables
143063
- });
143064
- }
143065
- };
143066
- cache_default2.subscribe(subscriptionSpec, variables);
143067
- lastReference = currentReference;
143068
- }
143069
- next(ctx);
143070
- },
143071
- cleanup() {
143072
- if (subscriptionSpec) {
143073
- cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
143074
- }
143075
- }
143076
- };
143077
- });
143078
- var mutation2 = documentPlugin2(ArtifactKind2.Mutation, () => {
143079
- return {
143080
- async start(ctx, { next, marshalVariables }) {
143081
- const layerOptimistic = cache_default2._internal_unstable.storage.createLayer(true);
143082
- const optimisticResponse = ctx.stuff.optimisticResponse;
143083
- let toNotify = [];
143084
- if (optimisticResponse) {
143085
- toNotify = cache_default2.write({
143086
- selection: ctx.artifact.selection,
143087
- data: await marshalSelection2({
143088
- selection: ctx.artifact.selection,
143089
- data: optimisticResponse
143090
- }),
143091
- variables: marshalVariables(ctx),
143092
- layer: layerOptimistic.id
143093
- });
143094
- }
143095
- ctx.cacheParams = {
143096
- ...ctx.cacheParams,
143097
- layer: layerOptimistic,
143098
- notifySubscribers: toNotify,
143099
- forceNotify: true
143100
- };
143101
- next(ctx);
143102
- },
143103
- afterNetwork(ctx, { resolve: resolve22 }) {
143104
- if (ctx.cacheParams?.layer) {
143105
- cache_default2.clearLayer(ctx.cacheParams.layer.id);
143106
- }
143107
- resolve22(ctx);
143108
- },
143109
- end(ctx, { resolve: resolve22, value: value2 }) {
143110
- const hasErrors = value2.errors && value2.errors.length > 0;
143111
- if (hasErrors) {
143112
- if (ctx.cacheParams?.layer) {
143113
- cache_default2.clearLayer(ctx.cacheParams.layer.id);
143114
- }
143115
- }
143116
- if (ctx.cacheParams?.layer) {
143117
- cache_default2._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
143118
- }
143119
- resolve22(ctx);
143120
- },
143121
- catch(ctx, { error: error2 }) {
143122
- if (ctx.cacheParams?.layer) {
143123
- const { layer } = ctx.cacheParams;
143124
- cache_default2.clearLayer(layer.id);
143125
- cache_default2._internal_unstable.storage.resolveLayer(layer.id);
143126
- }
143127
- throw error2;
143128
- }
143129
- };
143130
- });
143131
142703
  var currentDir2 = dirname2((0, import_node_url3.fileURLToPath)(import_meta2.url));
143132
142704
  var DEFAULT_CONFIG_PATH2 = join22(process.cwd(), "houdini.config.js");
143133
142705
  var emptySchema2 = graphql22.buildSchema("type Query { hello: String }");
@@ -143135,8 +142707,10 @@ var defaultDirectives2 = emptySchema2.getDirectives().map((dir) => dir.name);
143135
142707
  var import_parser2 = __toESM3(require_lib32(), 1);
143136
142708
  var import_recast2 = __toESM3(require_main22(), 1);
143137
142709
  var import_deepmerge2 = __toESM3(require_cjs2(), 1);
143138
- var recast2 = __toESM3(require_main22(), 1);
143139
- var AST2 = recast2.types.builders;
142710
+ var recast3 = __toESM3(require_main22(), 1);
142711
+ var AST3 = recast3.types.builders;
142712
+ var recast22 = __toESM3(require_main22(), 1);
142713
+ var AST22 = recast22.types.builders;
143140
142714
  var conventions_exports2 = {};
143141
142715
  __export3(conventions_exports2, {
143142
142716
  adapter_config_path: () => adapter_config_path2,
@@ -143262,43 +142836,43 @@ function serialized_manifest_path2(config2, base = base_dir2(config2)) {
143262
142836
  return path_exports2.join(base, "manifest.json");
143263
142837
  }
143264
142838
  var t22 = __toESM3(require_lib62(), 1);
143265
- var recast4 = __toESM3(require_main22(), 1);
143266
- var recast22 = __toESM3(require_main22(), 1);
143267
- var AST22 = recast22.types.builders;
142839
+ var recast5 = __toESM3(require_main22(), 1);
142840
+ var recast32 = __toESM3(require_main22(), 1);
142841
+ var AST32 = recast32.types.builders;
143268
142842
  var { toString } = {};
143269
142843
  var { keys } = Object;
143270
- var recast3 = __toESM3(require_main22(), 1);
143271
- var AST3 = recast3.types.builders;
142844
+ var recast4 = __toESM3(require_main22(), 1);
142845
+ var AST4 = recast4.types.builders;
143272
142846
  var pageInfoSelection = [
143273
142847
  {
143274
- kind: graphql12.Kind.FIELD,
142848
+ kind: graphql13.Kind.FIELD,
143275
142849
  name: {
143276
- kind: graphql12.Kind.NAME,
142850
+ kind: graphql13.Kind.NAME,
143277
142851
  value: "edges"
143278
142852
  },
143279
142853
  selectionSet: {
143280
- kind: graphql12.Kind.SELECTION_SET,
142854
+ kind: graphql13.Kind.SELECTION_SET,
143281
142855
  selections: [
143282
142856
  {
143283
- kind: graphql12.Kind.FIELD,
142857
+ kind: graphql13.Kind.FIELD,
143284
142858
  name: {
143285
- kind: graphql12.Kind.NAME,
142859
+ kind: graphql13.Kind.NAME,
143286
142860
  value: "cursor"
143287
142861
  }
143288
142862
  },
143289
142863
  {
143290
- kind: graphql12.Kind.FIELD,
142864
+ kind: graphql13.Kind.FIELD,
143291
142865
  name: {
143292
- kind: graphql12.Kind.NAME,
142866
+ kind: graphql13.Kind.NAME,
143293
142867
  value: "node"
143294
142868
  },
143295
142869
  selectionSet: {
143296
- kind: graphql12.Kind.SELECTION_SET,
142870
+ kind: graphql13.Kind.SELECTION_SET,
143297
142871
  selections: [
143298
142872
  {
143299
- kind: graphql12.Kind.FIELD,
142873
+ kind: graphql13.Kind.FIELD,
143300
142874
  name: {
143301
- kind: graphql12.Kind.NAME,
142875
+ kind: graphql13.Kind.NAME,
143302
142876
  value: "__typename"
143303
142877
  }
143304
142878
  }
@@ -143309,39 +142883,39 @@ var pageInfoSelection = [
143309
142883
  }
143310
142884
  },
143311
142885
  {
143312
- kind: graphql12.Kind.FIELD,
142886
+ kind: graphql13.Kind.FIELD,
143313
142887
  name: {
143314
- kind: graphql12.Kind.NAME,
142888
+ kind: graphql13.Kind.NAME,
143315
142889
  value: "pageInfo"
143316
142890
  },
143317
142891
  selectionSet: {
143318
- kind: graphql12.Kind.SELECTION_SET,
142892
+ kind: graphql13.Kind.SELECTION_SET,
143319
142893
  selections: [
143320
142894
  {
143321
- kind: graphql12.Kind.FIELD,
142895
+ kind: graphql13.Kind.FIELD,
143322
142896
  name: {
143323
- kind: graphql12.Kind.NAME,
142897
+ kind: graphql13.Kind.NAME,
143324
142898
  value: "hasPreviousPage"
143325
142899
  }
143326
142900
  },
143327
142901
  {
143328
- kind: graphql12.Kind.FIELD,
142902
+ kind: graphql13.Kind.FIELD,
143329
142903
  name: {
143330
- kind: graphql12.Kind.NAME,
142904
+ kind: graphql13.Kind.NAME,
143331
142905
  value: "hasNextPage"
143332
142906
  }
143333
142907
  },
143334
142908
  {
143335
- kind: graphql12.Kind.FIELD,
142909
+ kind: graphql13.Kind.FIELD,
143336
142910
  name: {
143337
- kind: graphql12.Kind.NAME,
142911
+ kind: graphql13.Kind.NAME,
143338
142912
  value: "startCursor"
143339
142913
  }
143340
142914
  },
143341
142915
  {
143342
- kind: graphql12.Kind.FIELD,
142916
+ kind: graphql13.Kind.FIELD,
143343
142917
  name: {
143344
- kind: graphql12.Kind.NAME,
142918
+ kind: graphql13.Kind.NAME,
143345
142919
  value: "endCursor"
143346
142920
  }
143347
142921
  }
@@ -143349,17 +142923,15 @@ var pageInfoSelection = [
143349
142923
  }
143350
142924
  }
143351
142925
  ];
143352
- var AST4 = recast4.types.builders;
143353
- var recast5 = __toESM3(require_main22(), 1);
143354
142926
  var AST5 = recast5.types.builders;
143355
- var recast11 = __toESM3(require_main22(), 1);
143356
- var recast8 = __toESM3(require_main22(), 1);
143357
- var recast7 = __toESM3(require_main22(), 1);
143358
142927
  var recast6 = __toESM3(require_main22(), 1);
143359
142928
  var AST6 = recast6.types.builders;
142929
+ var recast11 = __toESM3(require_main22(), 1);
142930
+ var recast7 = __toESM3(require_main22(), 1);
143360
142931
  var AST7 = recast7.types.builders;
143361
- var AST8 = recast8.types.builders;
143362
142932
  var recast9 = __toESM3(require_main22(), 1);
142933
+ var recast8 = __toESM3(require_main22(), 1);
142934
+ var AST8 = recast8.types.builders;
143363
142935
  var AST9 = recast9.types.builders;
143364
142936
  var recast10 = __toESM3(require_main22(), 1);
143365
142937
  var AST10 = recast10.types.builders;
@@ -156262,8 +155834,8 @@ function read_tag_name(parser) {
156262
155834
  let i3 = parser.stack.length;
156263
155835
  let legal = false;
156264
155836
  while (i3--) {
156265
- const fragment4 = parser.stack[i3];
156266
- if (fragment4.type === "IfBlock" || fragment4.type === "EachBlock" || fragment4.type === "InlineComponent") {
155837
+ const fragment2 = parser.stack[i3];
155838
+ if (fragment2.type === "IfBlock" || fragment2.type === "EachBlock" || fragment2.type === "InlineComponent") {
156267
155839
  legal = true;
156268
155840
  break;
156269
155841
  }
@@ -156970,7 +156542,7 @@ function text(parser) {
156970
156542
  };
156971
156543
  parser.current().children.push(node2);
156972
156544
  }
156973
- function fragment3(parser) {
156545
+ function fragment(parser) {
156974
156546
  if (parser.match("<")) {
156975
156547
  return tag;
156976
156548
  }
@@ -157132,9 +156704,9 @@ var Parser$1 = class {
157132
156704
  children: []
157133
156705
  };
157134
156706
  this.stack.push(this.html);
157135
- let state = fragment3;
156707
+ let state = fragment;
157136
156708
  while (this.index < this.template.length) {
157137
- state = state(this) || fragment3;
156709
+ state = state(this) || fragment;
157138
156710
  }
157139
156711
  if (this.stack.length > 1) {
157140
156712
  const current2 = this.current();
@@ -157145,7 +156717,7 @@ var Parser$1 = class {
157145
156717
  message: `${type} was left open`
157146
156718
  }, current2.start);
157147
156719
  }
157148
- if (state !== fragment3) {
156720
+ if (state !== fragment) {
157149
156721
  this.error({
157150
156722
  code: "unexpected-eof",
157151
156723
  message: "Unexpected end of input"
@@ -171518,7 +171090,7 @@ async function extract_load_function(config2, filepath, mockArtifacts) {
171518
171090
  return {
171519
171091
  exports,
171520
171092
  houdini_load: load.map(
171521
- (query3) => graphql34.parse(query3).definitions[0]
171093
+ (query) => graphql34.parse(query).definitions[0]
171522
171094
  )
171523
171095
  };
171524
171096
  }
@@ -171534,14 +171106,14 @@ async function processScript(config2, filepath, program, mockArtifacts) {
171534
171106
  }
171535
171107
  for (const specifier of statement.specifiers ?? []) {
171536
171108
  let name = specifier.local?.name || "";
171537
- let query3 = "";
171109
+ let query = "";
171538
171110
  if (name.endsWith(store_suffix(config2))) {
171539
- query3 = name.substring(0, name.length - store_suffix(config2).length);
171111
+ query = name.substring(0, name.length - store_suffix(config2).length);
171540
171112
  } else if (source.startsWith("$houdini/" + stores_directory_name()) && specifier.type === "ImportDefaultSpecifier") {
171541
- query3 = source.substring(`$houdini/${stores_directory_name()}`.length - 1);
171113
+ query = source.substring(`$houdini/${stores_directory_name()}`.length - 1);
171542
171114
  }
171543
- if (query3) {
171544
- const artifact = mockArtifacts?.[query3] || (await import(path_exports.importPath(path_exports.join(config2.artifactDirectory, query3 + ".js")))).default;
171115
+ if (query) {
171116
+ const artifact = mockArtifacts?.[query] || (await import(path_exports.importPath(path_exports.join(config2.artifactDirectory, query + ".js")))).default;
171545
171117
  globalImports[name] = artifact.raw;
171546
171118
  }
171547
171119
  }
@@ -171831,9 +171403,9 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
171831
171403
  continue;
171832
171404
  }
171833
171405
  try {
171834
- const query3 = config2.extractQueryDefinition(graphql35.parse(contents));
171835
- await visitor.routeLayoutQuery?.(query3, childPath);
171836
- layoutQueries.push(query3);
171406
+ const query = config2.extractQueryDefinition(graphql35.parse(contents));
171407
+ await visitor.routeLayoutQuery?.(query, childPath);
171408
+ layoutQueries.push(query);
171837
171409
  } catch (e3) {
171838
171410
  throw routeQueryError(childPath);
171839
171411
  }
@@ -171844,9 +171416,9 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
171844
171416
  continue;
171845
171417
  }
171846
171418
  try {
171847
- const query3 = config2.extractQueryDefinition(graphql35.parse(contents));
171848
- await visitor.routePageQuery?.(query3, childPath);
171849
- pageQueries.push(query3);
171419
+ const query = config2.extractQueryDefinition(graphql35.parse(contents));
171420
+ await visitor.routePageQuery?.(query, childPath);
171421
+ pageQueries.push(query);
171850
171422
  } catch (e3) {
171851
171423
  throw routeQueryError(childPath);
171852
171424
  }
@@ -172010,13 +171582,13 @@ import ${no_ext} from './${file}'
172010
171582
  ` + typeFile + `
172011
171583
  type ${prop_type} = ComponentProps<${no_ext}>
172012
171584
  `;
172013
- for (const query3 of queries[filepath]) {
171585
+ for (const query of queries[filepath]) {
172014
171586
  typeFile = `
172015
- import type { ${query3.name}$input } from '${path_exports.relative(filepath, path_exports.join(config2.artifactDirectory, query3.name)).replace("/$houdini", "")}'
171587
+ import type { ${query.name}$input } from '${path_exports.relative(filepath, path_exports.join(config2.artifactDirectory, query.name)).replace("/$houdini", "")}'
172016
171588
  ` + typeFile + `
172017
171589
  export type ${config2.variableFunctionName(
172018
- query3.name
172019
- )} = <_Props extends ${prop_type}>(args: { props: _Props }) => ${query3.name}$input
171590
+ query.name
171591
+ )} = <_Props extends ${prop_type}>(args: { props: _Props }) => ${query.name}$input
172020
171592
  `;
172021
171593
  }
172022
171594
  }
@@ -172280,10 +171852,10 @@ async function svelteKitGenerator(framework2, { config: config2 }) {
172280
171852
  const houdiniRelative = path_exports.relative(target, config2.typeRootDir);
172281
171853
  const queryNames = [];
172282
171854
  const uniquePageQueries = [];
172283
- for (const query3 of pageQueries) {
172284
- if (!queryNames.includes(query3.name.value)) {
172285
- queryNames.push(query3.name.value);
172286
- uniquePageQueries.push(query3);
171855
+ for (const query of pageQueries) {
171856
+ if (!queryNames.includes(query.name.value)) {
171857
+ queryNames.push(query.name.value);
171858
+ uniquePageQueries.push(query);
172287
171859
  }
172288
171860
  }
172289
171861
  const layoutNames = [];
@@ -172391,8 +171963,8 @@ import type { ${functionImportsToBring.join(
172391
171963
  utilityTypes = utilityTypes.concat(layoutParams).concat(pageParams).replaceAll(/\$types\.js/gm, "$houdini");
172392
171964
  typeExports = typeExports.concat(append_loadInput([...layoutQueries, ...pageQueries])).concat(layout_append_beforeLoad).concat(page_append_beforeLoad).concat(layout_append_afterLoad).concat(page_append_afterLoad).concat(layout_append_onError).concat(page_append_onError).concat(layout_append_VariablesFunction).concat(page_append_VariablesFunction).concat(component_append_VariablesFunction).replace(
172393
171965
  /(?<=LayoutData = )([\s\S]*?)(?=;)/,
172394
- `Expand<$1 & { ${layoutQueries.map((query3) => {
172395
- const name = query3.name.value;
171966
+ `Expand<$1 & { ${layoutQueries.map((query) => {
171967
+ const name = query.name.value;
172396
171968
  return [name, name + store_suffix(config2)].join(": ");
172397
171969
  }).join("; ")} }${internal_append_TypeDataExtra(
172398
171970
  beforeLayoutLoad,
@@ -172401,8 +171973,8 @@ import type { ${functionImportsToBring.join(
172401
171973
  )}>`
172402
171974
  ).replace(
172403
171975
  /(?<=PageData = )([\s\S]*?)(?=;)/,
172404
- `Expand<$1 & { ${pageQueries.map((query3) => {
172405
- const name = query3.name.value;
171976
+ `Expand<$1 & { ${pageQueries.map((query) => {
171977
+ const name = query.name.value;
172406
171978
  return [name, name + store_suffix(config2)].join(": ");
172407
171979
  }).join("; ")} }${internal_append_TypeDataExtra(
172408
171980
  beforePageLoad,
@@ -172427,8 +171999,8 @@ import type { ${functionImportsToBring.join(
172427
171999
  });
172428
172000
  }
172429
172001
  function getTypeImports(houdiniRelative, config2, queries) {
172430
- return queries.map((query3) => {
172431
- const name = query3.name.value;
172002
+ return queries.map((query) => {
172003
+ const name = query.name.value;
172432
172004
  return `
172433
172005
  import { ${name}$result, ${name}$input } from '${houdiniRelative}/${config2.artifactDirectoryName}/${name}';
172434
172006
  import { ${name}Store } from '${houdiniRelative}/plugins/houdini-svelte/${stores_directory_name()}/${name}';`;
@@ -172439,25 +172011,25 @@ function getComponentTypeImports(dirpath, config2, queries) {
172439
172011
  return "";
172440
172012
  }
172441
172013
  let typeFile = "\nimport type { ComponentProps } from 'svelte'\n";
172442
- return typeFile + queries.map((query3) => {
172443
- const no_ext = path_exports.parse(query3.componentPath).name;
172444
- const file = path_exports.parse(query3.componentPath);
172014
+ return typeFile + queries.map((query) => {
172015
+ const no_ext = path_exports.parse(query.componentPath).name;
172016
+ const file = path_exports.parse(query.componentPath);
172445
172017
  return `
172446
172018
  import ${no_ext} from './${file.base}'
172447
- import type { ${query3.query.name.value}$input } from '${path_exports.relative(dirpath, path_exports.join(config2.artifactDirectory, query3.query.name.value)).replace("/$houdini", "")}'
172019
+ import type { ${query.query.name.value}$input } from '${path_exports.relative(dirpath, path_exports.join(config2.artifactDirectory, query.query.name.value)).replace("/$houdini", "")}'
172448
172020
  `;
172449
172021
  }).join("\n");
172450
172022
  }
172451
172023
  function append_VariablesFunction(type, filepath, config2, queries) {
172452
172024
  const { params } = route_params(filepath);
172453
172025
  const garunteed_args = params.filter((param) => !param.optional).map((param) => param.name);
172454
- return queries.map((query3) => {
172455
- const name = query3.name.value;
172456
- if (!query3.variableDefinitions?.length) {
172026
+ return queries.map((query) => {
172027
+ const name = query.name.value;
172028
+ if (!query.variableDefinitions?.length) {
172457
172029
  return "";
172458
172030
  }
172459
172031
  const make_optional = [];
172460
- for (const def of query3.variableDefinitions) {
172032
+ for (const def of query.variableDefinitions) {
172461
172033
  if (garunteed_args.includes(def.variable.name.value)) {
172462
172034
  make_optional.push(`'${def.variable.name.value}'`);
172463
172035
  }
@@ -172473,21 +172045,21 @@ export type ${config2.variableFunctionName(
172473
172045
  }).join("\n");
172474
172046
  }
172475
172047
  function append_ComponentVariablesFunction(filepath, config2, queries) {
172476
- return queries.map((query3) => {
172477
- const no_ext = path_exports.parse(query3.componentPath).name;
172048
+ return queries.map((query) => {
172049
+ const no_ext = path_exports.parse(query.componentPath).name;
172478
172050
  const prop_type = no_ext + "Props";
172479
172051
  return `
172480
172052
  type ${prop_type} = ComponentProps<${no_ext}>
172481
172053
  export type ${config2.variableFunctionName(
172482
- query3.query.name.value
172483
- )} = <_Props extends ${prop_type}>(args: { props: _Props }) => ${query3.query.name.value}$input
172054
+ query.query.name.value
172055
+ )} = <_Props extends ${prop_type}>(args: { props: _Props }) => ${query.query.name.value}$input
172484
172056
  `;
172485
172057
  }).join("\n");
172486
172058
  }
172487
172059
  function append_loadInput(queries) {
172488
172060
  return `${queries.filter((q) => q.variableDefinitions?.length).length ? `
172489
- type LoadInput = { ${queries.filter((query3) => query3.variableDefinitions?.length).map((query3) => {
172490
- const name = query3.name.value;
172061
+ type LoadInput = { ${queries.filter((query) => query.variableDefinitions?.length).map((query) => {
172062
+ const name = query.name.value;
172491
172063
  return [name, name + "$input"].join(": ");
172492
172064
  }).join("; ")} };` : ""}`;
172493
172065
  }
@@ -172506,8 +172078,8 @@ export type AfterLoadEvent = {
172506
172078
  ` : "";
172507
172079
  }
172508
172080
  function internal_append_afterLoad(queries) {
172509
- return `${queries.map((query3) => {
172510
- const name = query3.name.value;
172081
+ return `${queries.map((query) => {
172082
+ const name = query.name.value;
172511
172083
  return [name, name + "$result"].join(": ");
172512
172084
  }).join(";\n ")}`;
172513
172085
  }
@@ -173048,26 +172620,26 @@ async function QueryProcessor(config2, page2) {
173048
172620
  import: ["isBrowser"],
173049
172621
  sourceModule: "$houdini/plugins/houdini-svelte/runtime/adapter"
173050
172622
  });
173051
- for (const query3 of queries) {
172623
+ for (const query of queries) {
173052
172624
  const factory = ensure_imports({
173053
172625
  script: page2.script,
173054
172626
  config: page2.config,
173055
- import: [`${query3.name.value}Store`],
173056
- sourceModule: store_import_path({ config: config2, name: query3.name.value })
172627
+ import: [`${query.name.value}Store`],
172628
+ sourceModule: store_import_path({ config: config2, name: query.name.value })
173057
172629
  }).ids[0];
173058
172630
  page2.script.body.splice(
173059
172631
  find_insert_index(page2.script),
173060
172632
  0,
173061
172633
  AST16.variableDeclaration("const", [
173062
- AST16.variableDeclarator(store_id(query3.name.value), AST16.newExpression(factory, []))
172634
+ AST16.variableDeclarator(store_id(query.name.value), AST16.newExpression(factory, []))
173063
172635
  ])
173064
172636
  );
173065
172637
  }
173066
172638
  page2.script.body.push(
173067
- ...queries.flatMap((query3) => {
173068
- const variable_fn = query_variable_fn(query3.name.value);
172639
+ ...queries.flatMap((query) => {
172640
+ const variable_fn = query_variable_fn(query.name.value);
173069
172641
  const has_variables = find_exported_fn(page2.script.body, variable_fn);
173070
- if (query3.variableDefinitions && query3.variableDefinitions?.length > 0 && has_variables === null) {
172642
+ if (query.variableDefinitions && query.variableDefinitions?.length > 0 && has_variables === null) {
173071
172643
  formatErrors({
173072
172644
  filepath: page2.filepath,
173073
172645
  message: `Could not find required variable function: ${yellow4(
@@ -173084,7 +172656,7 @@ async function QueryProcessor(config2, page2) {
173084
172656
  AST16.identifier("isBrowser"),
173085
172657
  AST16.callExpression(
173086
172658
  AST16.memberExpression(
173087
- store_id(query3.name.value),
172659
+ store_id(query.name.value),
173088
172660
  AST16.identifier("fetch")
173089
172661
  ),
173090
172662
  [
@@ -173103,7 +172675,7 @@ async function QueryProcessor(config2, page2) {
173103
172675
  AST16.objectProperty(
173104
172676
  AST16.identifier("artifact"),
173105
172677
  AST16.memberExpression(
173106
- store_id(query3.name.value),
172678
+ store_id(query.name.value),
173107
172679
  AST16.identifier("artifact")
173108
172680
  )
173109
172681
  ),
@@ -173324,14 +172896,14 @@ function add_load({
173324
172896
  return;
173325
172897
  }
173326
172898
  let invalid = false;
173327
- for (const query3 of queries) {
173328
- if (!query3.variableDefinitions || query3.variableDefinitions.length === 0) {
172899
+ for (const query of queries) {
172900
+ if (!query.variableDefinitions || query.variableDefinitions.length === 0) {
173329
172901
  continue;
173330
172902
  }
173331
- const variable_fn = query_variable_fn(query3.name.value);
172903
+ const variable_fn = query_variable_fn(query.name.value);
173332
172904
  try {
173333
172905
  page2.script.body.push(
173334
- variable_function_for_query(page2, query3, page_info.exports.includes(variable_fn))
172906
+ variable_function_for_query(page2, query, page_info.exports.includes(variable_fn))
173335
172907
  );
173336
172908
  } catch (e3) {
173337
172909
  formatErrors(e3);
@@ -173394,16 +172966,16 @@ function add_load({
173394
172966
  preload_fn.async = true;
173395
172967
  page2.script.body.push(AST18.exportNamedDeclaration(preload_fn));
173396
172968
  let insert_index = 4;
173397
- for (const query3 of queries) {
172969
+ for (const query of queries) {
173398
172970
  const { ids } = ensure_imports({
173399
172971
  script: page2.script,
173400
172972
  config: page2.config,
173401
- import: [`load_${query3.name.value}`],
173402
- sourceModule: store_import_path({ config: page2.config, name: query3.name.value })
172973
+ import: [`load_${query.name.value}`],
172974
+ sourceModule: store_import_path({ config: page2.config, name: query.name.value })
173403
172975
  });
173404
172976
  const load_fn = ids[0];
173405
- const variables = (query3.variableDefinitions?.length ?? 0) > 0 ? AST18.awaitExpression(
173406
- AST18.callExpression(AST18.identifier(__variable_fn_name(query3.name.value)), [
172977
+ const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST18.awaitExpression(
172978
+ AST18.callExpression(AST18.identifier(__variable_fn_name(query.name.value)), [
173407
172979
  AST18.identifier("houdiniConfig"),
173408
172980
  AST18.identifier("context")
173409
172981
  ])
@@ -173414,7 +172986,7 @@ function add_load({
173414
172986
  AST18.expressionStatement(
173415
172987
  AST18.assignmentExpression(
173416
172988
  "=",
173417
- AST18.memberExpression(input_obj, AST18.literal(query3.name.value)),
172989
+ AST18.memberExpression(input_obj, AST18.literal(query.name.value)),
173418
172990
  variables
173419
172991
  )
173420
172992
  )
@@ -173428,7 +173000,7 @@ function add_load({
173428
173000
  AST18.objectExpression([
173429
173001
  AST18.objectProperty(
173430
173002
  AST18.literal("variables"),
173431
- AST18.memberExpression(input_obj, AST18.literal(query3.name.value))
173003
+ AST18.memberExpression(input_obj, AST18.literal(query.name.value))
173432
173004
  ),
173433
173005
  AST18.objectProperty(AST18.literal("event"), AST18.identifier("context")),
173434
173006
  AST18.objectProperty(
@@ -173584,7 +173156,7 @@ function unexported_data_error(filepath) {
173584
173156
  description: `This is not allowed in a route since it would conflict with Houdini's generated code`
173585
173157
  };
173586
173158
  }
173587
- function variable_function_for_query(page2, query3, has_local) {
173159
+ function variable_function_for_query(page2, query, has_local) {
173588
173160
  const params = route_params(page2.filepath).params.reduce(
173589
173161
  (acc, param) => ({
173590
173162
  ...acc,
@@ -173600,9 +173172,10 @@ function variable_function_for_query(page2, query3, has_local) {
173600
173172
  });
173601
173173
  const missing_args = [];
173602
173174
  const has_args = {};
173603
- for (const definition of query3.variableDefinitions ?? []) {
173175
+ for (const definition of query.variableDefinitions ?? []) {
173604
173176
  const unwrapped = unwrapType(page2.config, definition.type);
173605
- if (unwrapped.wrappers[unwrapped.wrappers.length - 1] === TypeWrapper.NonNull && !definition.defaultValue && (!params[definition.variable.name.value] || params[definition.variable.name.value].optional)) {
173177
+ const runtime_scalar = page2.config.configFile.features?.runtimeScalars?.[unwrapped.type.name];
173178
+ if (unwrapped.wrappers[unwrapped.wrappers.length - 1] === TypeWrapper.NonNull && !definition.defaultValue && !runtime_scalar && (!params[definition.variable.name.value] || params[definition.variable.name.value].optional)) {
173606
173179
  missing_args.push(definition.variable.name);
173607
173180
  }
173608
173181
  if (params[definition.variable.name.value]) {
@@ -173613,7 +173186,7 @@ function variable_function_for_query(page2, query3, has_local) {
173613
173186
  throw {
173614
173187
  filepath: page2.filepath,
173615
173188
  message: `Could not find required variable function: ${yellow4(
173616
- query_variable_fn(query3.name.value)
173189
+ query_variable_fn(query.name.value)
173617
173190
  )}. maybe its not exported?`
173618
173191
  };
173619
173192
  }
@@ -173622,8 +173195,8 @@ function variable_function_for_query(page2, query3, has_local) {
173622
173195
  AST18.variableDeclarator(
173623
173196
  AST18.identifier("result"),
173624
173197
  AST18.objectExpression(
173625
- Object.entries(has_args).map(
173626
- ([arg, type]) => AST18.objectProperty(
173198
+ Object.entries(has_args).map(([arg, type]) => {
173199
+ return AST18.objectProperty(
173627
173200
  AST18.identifier(arg),
173628
173201
  AST18.callExpression(AST18.identifier("parseScalar"), [
173629
173202
  AST18.identifier("config"),
@@ -173636,8 +173209,8 @@ function variable_function_for_query(page2, query3, has_local) {
173636
173209
  AST18.identifier(arg)
173637
173210
  )
173638
173211
  ])
173639
- )
173640
- )
173212
+ );
173213
+ })
173641
173214
  )
173642
173215
  )
173643
173216
  ])
@@ -173659,7 +173232,7 @@ function variable_function_for_query(page2, query3, has_local) {
173659
173232
  AST18.identifier("input"),
173660
173233
  AST18.awaitExpression(
173661
173234
  AST18.callExpression(
173662
- AST18.identifier(query_variable_fn(query3.name.value)),
173235
+ AST18.identifier(query_variable_fn(query.name.value)),
173663
173236
  [AST18.identifier("event")]
173664
173237
  )
173665
173238
  )
@@ -173670,7 +173243,7 @@ function variable_function_for_query(page2, query3, has_local) {
173670
173243
  config: page2.config,
173671
173244
  script: page2.script,
173672
173245
  page: page2,
173673
- artifact: { name: query3.name.value }
173246
+ artifact: { name: query.name.value }
173674
173247
  }).id
173675
173248
  )
173676
173249
  ])
@@ -173682,7 +173255,7 @@ function variable_function_for_query(page2, query3, has_local) {
173682
173255
  }
173683
173256
  fn_body.push(AST18.returnStatement(AST18.identifier("result")));
173684
173257
  const declaration = AST18.functionDeclaration(
173685
- AST18.identifier(__variable_fn_name(query3.name.value)),
173258
+ AST18.identifier(__variable_fn_name(query.name.value)),
173686
173259
  [AST18.identifier("config"), AST18.identifier("event")],
173687
173260
  AST18.blockStatement(fn_body)
173688
173261
  );