houdini-svelte 1.2.44 → 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.
- package/build/plugin-cjs/index.js +349 -806
- package/build/plugin-esm/index.js +352 -809
- package/build/preprocess-cjs/index.js +322 -779
- package/build/preprocess-esm/index.js +325 -782
- package/build/test-cjs/index.js +935 -1789
- package/build/test-esm/index.js +937 -1791
- package/package.json +2 -2
|
@@ -16422,6 +16422,7 @@ var import_node_net = require("node:net");
|
|
|
16422
16422
|
var graphql3 = __toESM(require("graphql"), 1);
|
|
16423
16423
|
var graphql4 = __toESM(require("graphql"), 1);
|
|
16424
16424
|
var graphql5 = __toESM(require("graphql"), 1);
|
|
16425
|
+
var graphql6 = __toESM(require("graphql"), 1);
|
|
16425
16426
|
var import_meta = {};
|
|
16426
16427
|
var require2 = (0, import_module.createRequire)(import_meta.url);
|
|
16427
16428
|
var __create2 = Object.create;
|
|
@@ -29871,14 +29872,14 @@ var require_lib3 = __commonJS2({
|
|
|
29871
29872
|
this.preserveSpace = !!preserveSpace;
|
|
29872
29873
|
}
|
|
29873
29874
|
};
|
|
29874
|
-
var
|
|
29875
|
+
var types52 = {
|
|
29875
29876
|
brace: new TokContext3("{"),
|
|
29876
29877
|
j_oTag: new TokContext3("<tag"),
|
|
29877
29878
|
j_cTag: new TokContext3("</tag"),
|
|
29878
29879
|
j_expr: new TokContext3("<tag>...</tag>", true)
|
|
29879
29880
|
};
|
|
29880
29881
|
{
|
|
29881
|
-
|
|
29882
|
+
types52.template = new TokContext3("`", true);
|
|
29882
29883
|
}
|
|
29883
29884
|
var beforeExpr2 = true;
|
|
29884
29885
|
var startsExpr2 = true;
|
|
@@ -30416,17 +30417,17 @@ var require_lib3 = __commonJS2({
|
|
|
30416
30417
|
context.pop();
|
|
30417
30418
|
};
|
|
30418
30419
|
tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
|
|
30419
|
-
context.push(
|
|
30420
|
+
context.push(types52.brace);
|
|
30420
30421
|
};
|
|
30421
30422
|
tokenTypes[22].updateContext = (context) => {
|
|
30422
|
-
if (context[context.length - 1] ===
|
|
30423
|
+
if (context[context.length - 1] === types52.template) {
|
|
30423
30424
|
context.pop();
|
|
30424
30425
|
} else {
|
|
30425
|
-
context.push(
|
|
30426
|
+
context.push(types52.template);
|
|
30426
30427
|
}
|
|
30427
30428
|
};
|
|
30428
30429
|
tokenTypes[142].updateContext = (context) => {
|
|
30429
|
-
context.push(
|
|
30430
|
+
context.push(types52.j_expr, types52.j_oTag);
|
|
30430
30431
|
};
|
|
30431
30432
|
}
|
|
30432
30433
|
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";
|
|
@@ -30986,7 +30987,7 @@ var require_lib3 = __commonJS2({
|
|
|
30986
30987
|
this.end = 0;
|
|
30987
30988
|
this.lastTokEndLoc = null;
|
|
30988
30989
|
this.lastTokStartLoc = null;
|
|
30989
|
-
this.context = [
|
|
30990
|
+
this.context = [types52.brace];
|
|
30990
30991
|
this.firstInvalidTemplateEscapePos = null;
|
|
30991
30992
|
this.strictErrors = /* @__PURE__ */ new Map();
|
|
30992
30993
|
this.tokensLength = 0;
|
|
@@ -34813,7 +34814,7 @@ var require_lib3 = __commonJS2({
|
|
|
34813
34814
|
context
|
|
34814
34815
|
} = this.state;
|
|
34815
34816
|
const currentContext = context[context.length - 1];
|
|
34816
|
-
if (currentContext ===
|
|
34817
|
+
if (currentContext === types52.j_oTag || currentContext === types52.j_expr) {
|
|
34817
34818
|
context.pop();
|
|
34818
34819
|
}
|
|
34819
34820
|
}
|
|
@@ -35835,9 +35836,9 @@ var require_lib3 = __commonJS2({
|
|
|
35835
35836
|
switch (this.state.type) {
|
|
35836
35837
|
case 5:
|
|
35837
35838
|
node2 = this.startNode();
|
|
35838
|
-
this.setContext(
|
|
35839
|
+
this.setContext(types52.brace);
|
|
35839
35840
|
this.next();
|
|
35840
|
-
node2 = this.jsxParseExpressionContainer(node2,
|
|
35841
|
+
node2 = this.jsxParseExpressionContainer(node2, types52.j_oTag);
|
|
35841
35842
|
if (node2.expression.type === "JSXEmptyExpression") {
|
|
35842
35843
|
this.raise(JsxErrors.AttributeIsEmpty, node2);
|
|
35843
35844
|
}
|
|
@@ -35856,7 +35857,7 @@ var require_lib3 = __commonJS2({
|
|
|
35856
35857
|
jsxParseSpreadChild(node2) {
|
|
35857
35858
|
this.next();
|
|
35858
35859
|
node2.expression = this.parseExpression();
|
|
35859
|
-
this.setContext(
|
|
35860
|
+
this.setContext(types52.j_expr);
|
|
35860
35861
|
this.state.canStartJSXElement = true;
|
|
35861
35862
|
this.expect(8);
|
|
35862
35863
|
return this.finishNode(node2, "JSXSpreadChild");
|
|
@@ -35876,11 +35877,11 @@ var require_lib3 = __commonJS2({
|
|
|
35876
35877
|
jsxParseAttribute() {
|
|
35877
35878
|
const node2 = this.startNode();
|
|
35878
35879
|
if (this.match(5)) {
|
|
35879
|
-
this.setContext(
|
|
35880
|
+
this.setContext(types52.brace);
|
|
35880
35881
|
this.next();
|
|
35881
35882
|
this.expect(21);
|
|
35882
35883
|
node2.argument = this.parseMaybeAssignAllowIn();
|
|
35883
|
-
this.setContext(
|
|
35884
|
+
this.setContext(types52.j_oTag);
|
|
35884
35885
|
this.state.canStartJSXElement = true;
|
|
35885
35886
|
this.expect(8);
|
|
35886
35887
|
return this.finishNode(node2, "JSXSpreadAttribute");
|
|
@@ -35939,12 +35940,12 @@ var require_lib3 = __commonJS2({
|
|
|
35939
35940
|
break;
|
|
35940
35941
|
case 5: {
|
|
35941
35942
|
const node22 = this.startNode();
|
|
35942
|
-
this.setContext(
|
|
35943
|
+
this.setContext(types52.brace);
|
|
35943
35944
|
this.next();
|
|
35944
35945
|
if (this.match(21)) {
|
|
35945
35946
|
children.push(this.jsxParseSpreadChild(node22));
|
|
35946
35947
|
} else {
|
|
35947
|
-
children.push(this.jsxParseExpressionContainer(node22,
|
|
35948
|
+
children.push(this.jsxParseExpressionContainer(node22, types52.j_expr));
|
|
35948
35949
|
}
|
|
35949
35950
|
break;
|
|
35950
35951
|
}
|
|
@@ -36009,11 +36010,11 @@ var require_lib3 = __commonJS2({
|
|
|
36009
36010
|
}
|
|
36010
36011
|
getTokenFromCode(code2) {
|
|
36011
36012
|
const context = this.curContext();
|
|
36012
|
-
if (context ===
|
|
36013
|
+
if (context === types52.j_expr) {
|
|
36013
36014
|
this.jsxReadToken();
|
|
36014
36015
|
return;
|
|
36015
36016
|
}
|
|
36016
|
-
if (context ===
|
|
36017
|
+
if (context === types52.j_oTag || context === types52.j_cTag) {
|
|
36017
36018
|
if (isIdentifierStart2(code2)) {
|
|
36018
36019
|
this.jsxReadWord();
|
|
36019
36020
|
return;
|
|
@@ -36023,7 +36024,7 @@ var require_lib3 = __commonJS2({
|
|
|
36023
36024
|
this.finishToken(143);
|
|
36024
36025
|
return;
|
|
36025
36026
|
}
|
|
36026
|
-
if ((code2 === 34 || code2 === 39) && context ===
|
|
36027
|
+
if ((code2 === 34 || code2 === 39) && context === types52.j_oTag) {
|
|
36027
36028
|
this.jsxReadString(code2);
|
|
36028
36029
|
return;
|
|
36029
36030
|
}
|
|
@@ -36041,17 +36042,17 @@ var require_lib3 = __commonJS2({
|
|
|
36041
36042
|
type
|
|
36042
36043
|
} = this.state;
|
|
36043
36044
|
if (type === 56 && prevType === 142) {
|
|
36044
|
-
context.splice(-2, 2,
|
|
36045
|
+
context.splice(-2, 2, types52.j_cTag);
|
|
36045
36046
|
this.state.canStartJSXElement = false;
|
|
36046
36047
|
} else if (type === 142) {
|
|
36047
|
-
context.push(
|
|
36048
|
+
context.push(types52.j_oTag);
|
|
36048
36049
|
} else if (type === 143) {
|
|
36049
36050
|
const out = context[context.length - 1];
|
|
36050
|
-
if (out ===
|
|
36051
|
+
if (out === types52.j_oTag && prevType === 56 || out === types52.j_cTag) {
|
|
36051
36052
|
context.pop();
|
|
36052
|
-
this.state.canStartJSXElement = context[context.length - 1] ===
|
|
36053
|
+
this.state.canStartJSXElement = context[context.length - 1] === types52.j_expr;
|
|
36053
36054
|
} else {
|
|
36054
|
-
this.setContext(
|
|
36055
|
+
this.setContext(types52.j_expr);
|
|
36055
36056
|
this.state.canStartJSXElement = true;
|
|
36056
36057
|
}
|
|
36057
36058
|
} else {
|
|
@@ -37426,14 +37427,14 @@ var require_lib3 = __commonJS2({
|
|
|
37426
37427
|
tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
|
|
37427
37428
|
const node2 = this.startNode();
|
|
37428
37429
|
const hasLeadingOperator = this.eat(operator);
|
|
37429
|
-
const
|
|
37430
|
+
const types62 = [];
|
|
37430
37431
|
do {
|
|
37431
|
-
|
|
37432
|
+
types62.push(parseConstituentType());
|
|
37432
37433
|
} while (this.eat(operator));
|
|
37433
|
-
if (
|
|
37434
|
-
return
|
|
37434
|
+
if (types62.length === 1 && !hasLeadingOperator) {
|
|
37435
|
+
return types62[0];
|
|
37435
37436
|
}
|
|
37436
|
-
node2.types =
|
|
37437
|
+
node2.types = types62;
|
|
37437
37438
|
return this.finishNode(node2, kind);
|
|
37438
37439
|
}
|
|
37439
37440
|
tsParseIntersectionTypeOrHigher() {
|
|
@@ -37997,7 +37998,7 @@ var require_lib3 = __commonJS2({
|
|
|
37997
37998
|
}));
|
|
37998
37999
|
if (node2.params.length === 0) {
|
|
37999
38000
|
this.raise(TSErrors.EmptyTypeArguments, node2);
|
|
38000
|
-
} else if (!this.state.inType && this.curContext() ===
|
|
38001
|
+
} else if (!this.state.inType && this.curContext() === types52.brace) {
|
|
38001
38002
|
this.reScan_lt_gt();
|
|
38002
38003
|
}
|
|
38003
38004
|
this.expect(48);
|
|
@@ -38623,7 +38624,7 @@ var require_lib3 = __commonJS2({
|
|
|
38623
38624
|
context
|
|
38624
38625
|
} = this.state;
|
|
38625
38626
|
const currentContext = context[context.length - 1];
|
|
38626
|
-
if (currentContext ===
|
|
38627
|
+
if (currentContext === types52.j_oTag || currentContext === types52.j_expr) {
|
|
38627
38628
|
context.pop();
|
|
38628
38629
|
}
|
|
38629
38630
|
}
|
|
@@ -43751,9 +43752,9 @@ var require_shared = __commonJS2({
|
|
|
43751
43752
|
var tslib_1 = require_tslib();
|
|
43752
43753
|
var types_110 = tslib_1.__importDefault(require_types());
|
|
43753
43754
|
function default_1(fork) {
|
|
43754
|
-
var
|
|
43755
|
-
var Type =
|
|
43756
|
-
var builtin =
|
|
43755
|
+
var types52 = fork.use(types_110.default);
|
|
43756
|
+
var Type = types52.Type;
|
|
43757
|
+
var builtin = types52.builtInTypes;
|
|
43757
43758
|
var isNumber2 = builtin.number;
|
|
43758
43759
|
function geq(than) {
|
|
43759
43760
|
return Type.from(function(value2) {
|
|
@@ -43901,9 +43902,9 @@ var require_types = __commonJS2({
|
|
|
43901
43902
|
}(BaseType);
|
|
43902
43903
|
var OrType = function(_super) {
|
|
43903
43904
|
tslib_1.__extends(OrType2, _super);
|
|
43904
|
-
function OrType2(
|
|
43905
|
+
function OrType2(types52) {
|
|
43905
43906
|
var _this = _super.call(this) || this;
|
|
43906
|
-
_this.types =
|
|
43907
|
+
_this.types = types52;
|
|
43907
43908
|
_this.kind = "OrType";
|
|
43908
43909
|
return _this;
|
|
43909
43910
|
}
|
|
@@ -44044,11 +44045,11 @@ var require_types = __commonJS2({
|
|
|
44044
44045
|
function typesPlugin(_fork) {
|
|
44045
44046
|
var Type = {
|
|
44046
44047
|
or: function() {
|
|
44047
|
-
var
|
|
44048
|
+
var types52 = [];
|
|
44048
44049
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
44049
|
-
|
|
44050
|
+
types52[_i] = arguments[_i];
|
|
44050
44051
|
}
|
|
44051
|
-
return new OrType(
|
|
44052
|
+
return new OrType(types52.map(function(type) {
|
|
44052
44053
|
return Type.from(type);
|
|
44053
44054
|
}));
|
|
44054
44055
|
},
|
|
@@ -44491,9 +44492,9 @@ var require_path2 = __commonJS2({
|
|
|
44491
44492
|
var Op = Object.prototype;
|
|
44492
44493
|
var hasOwn2 = Op.hasOwnProperty;
|
|
44493
44494
|
function pathPlugin(fork) {
|
|
44494
|
-
var
|
|
44495
|
-
var isArray2 =
|
|
44496
|
-
var isNumber2 =
|
|
44495
|
+
var types52 = fork.use(types_110.default);
|
|
44496
|
+
var isArray2 = types52.builtInTypes.array;
|
|
44497
|
+
var isNumber2 = types52.builtInTypes.number;
|
|
44497
44498
|
var Path = function Path2(value2, parentPath, name) {
|
|
44498
44499
|
if (!(this instanceof Path2)) {
|
|
44499
44500
|
throw new Error("Path constructor cannot be invoked without 'new'");
|
|
@@ -44793,13 +44794,13 @@ var require_scope = __commonJS2({
|
|
|
44793
44794
|
var types_110 = tslib_1.__importDefault(require_types());
|
|
44794
44795
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
44795
44796
|
function scopePlugin(fork) {
|
|
44796
|
-
var
|
|
44797
|
-
var Type =
|
|
44798
|
-
var namedTypes =
|
|
44797
|
+
var types52 = fork.use(types_110.default);
|
|
44798
|
+
var Type = types52.Type;
|
|
44799
|
+
var namedTypes = types52.namedTypes;
|
|
44799
44800
|
var Node3 = namedTypes.Node;
|
|
44800
44801
|
var Expression = namedTypes.Expression;
|
|
44801
|
-
var isArray2 =
|
|
44802
|
-
var b =
|
|
44802
|
+
var isArray2 = types52.builtInTypes.array;
|
|
44803
|
+
var b = types52.builders;
|
|
44803
44804
|
var Scope3 = function Scope22(path3, parentScope) {
|
|
44804
44805
|
if (!(this instanceof Scope22)) {
|
|
44805
44806
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
@@ -44862,7 +44863,7 @@ var require_scope = __commonJS2({
|
|
|
44862
44863
|
++index;
|
|
44863
44864
|
}
|
|
44864
44865
|
var name = prefix + index;
|
|
44865
|
-
return this.bindings[name] =
|
|
44866
|
+
return this.bindings[name] = types52.builders.identifier(name);
|
|
44866
44867
|
};
|
|
44867
44868
|
Sp.injectTemporary = function(identifier, init) {
|
|
44868
44869
|
identifier || (identifier = this.declareTemporary());
|
|
@@ -44938,7 +44939,7 @@ var require_scope = __commonJS2({
|
|
|
44938
44939
|
bindings
|
|
44939
44940
|
);
|
|
44940
44941
|
} else if (Node3.check(node2) && !Expression.check(node2)) {
|
|
44941
|
-
|
|
44942
|
+
types52.eachField(node2, function(name, child) {
|
|
44942
44943
|
var childPath = path3.get(name);
|
|
44943
44944
|
if (!pathHasValue(childPath, child)) {
|
|
44944
44945
|
throw new Error("");
|
|
@@ -45016,24 +45017,24 @@ var require_scope = __commonJS2({
|
|
|
45016
45017
|
addPattern(patternPath.get("argument"), bindings);
|
|
45017
45018
|
}
|
|
45018
45019
|
}
|
|
45019
|
-
function addTypePattern(patternPath,
|
|
45020
|
+
function addTypePattern(patternPath, types62) {
|
|
45020
45021
|
var pattern = patternPath.value;
|
|
45021
45022
|
namedTypes.Pattern.assert(pattern);
|
|
45022
45023
|
if (namedTypes.Identifier.check(pattern)) {
|
|
45023
|
-
if (hasOwn2.call(
|
|
45024
|
-
|
|
45024
|
+
if (hasOwn2.call(types62, pattern.name)) {
|
|
45025
|
+
types62[pattern.name].push(patternPath);
|
|
45025
45026
|
} else {
|
|
45026
|
-
|
|
45027
|
+
types62[pattern.name] = [patternPath];
|
|
45027
45028
|
}
|
|
45028
45029
|
}
|
|
45029
45030
|
}
|
|
45030
|
-
function addTypeParameter(parameterPath,
|
|
45031
|
+
function addTypeParameter(parameterPath, types62) {
|
|
45031
45032
|
var parameter = parameterPath.value;
|
|
45032
45033
|
FlowOrTSTypeParameterType.assert(parameter);
|
|
45033
|
-
if (hasOwn2.call(
|
|
45034
|
-
|
|
45034
|
+
if (hasOwn2.call(types62, parameter.name)) {
|
|
45035
|
+
types62[parameter.name].push(parameterPath);
|
|
45035
45036
|
} else {
|
|
45036
|
-
|
|
45037
|
+
types62[parameter.name] = [parameterPath];
|
|
45037
45038
|
}
|
|
45038
45039
|
}
|
|
45039
45040
|
Sp.lookup = function(name) {
|
|
@@ -45072,11 +45073,11 @@ var require_node_path = __commonJS2({
|
|
|
45072
45073
|
var scope_1 = tslib_1.__importDefault(require_scope());
|
|
45073
45074
|
var shared_1 = require_shared();
|
|
45074
45075
|
function nodePathPlugin(fork) {
|
|
45075
|
-
var
|
|
45076
|
-
var n =
|
|
45077
|
-
var b =
|
|
45078
|
-
var isNumber2 =
|
|
45079
|
-
var isArray2 =
|
|
45076
|
+
var types52 = fork.use(types_110.default);
|
|
45077
|
+
var n = types52.namedTypes;
|
|
45078
|
+
var b = types52.builders;
|
|
45079
|
+
var isNumber2 = types52.builtInTypes.number;
|
|
45080
|
+
var isArray2 = types52.builtInTypes.array;
|
|
45080
45081
|
var Path = fork.use(path_1.default);
|
|
45081
45082
|
var Scope3 = fork.use(scope_1.default);
|
|
45082
45083
|
var NodePath = function NodePath2(value2, parentPath, name) {
|
|
@@ -45167,7 +45168,7 @@ var require_node_path = __commonJS2({
|
|
|
45167
45168
|
return scope2 || null;
|
|
45168
45169
|
};
|
|
45169
45170
|
NPp.getValueProperty = function(name) {
|
|
45170
|
-
return
|
|
45171
|
+
return types52.getFieldValue(this.value, name);
|
|
45171
45172
|
};
|
|
45172
45173
|
NPp.needsParens = function(assumeExpressionContext) {
|
|
45173
45174
|
var pp2 = this.parentPath;
|
|
@@ -45309,7 +45310,7 @@ var require_node_path = __commonJS2({
|
|
|
45309
45310
|
return node2.some(containsCallExpression);
|
|
45310
45311
|
}
|
|
45311
45312
|
if (n.Node.check(node2)) {
|
|
45312
|
-
return
|
|
45313
|
+
return types52.someField(node2, function(_name, child) {
|
|
45313
45314
|
return containsCallExpression(child);
|
|
45314
45315
|
});
|
|
45315
45316
|
}
|
|
@@ -45428,11 +45429,11 @@ var require_path_visitor = __commonJS2({
|
|
|
45428
45429
|
var shared_1 = require_shared();
|
|
45429
45430
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
45430
45431
|
function pathVisitorPlugin(fork) {
|
|
45431
|
-
var
|
|
45432
|
+
var types52 = fork.use(types_110.default);
|
|
45432
45433
|
var NodePath = fork.use(node_path_1.default);
|
|
45433
|
-
var isArray2 =
|
|
45434
|
-
var isObject2 =
|
|
45435
|
-
var isFunction2 =
|
|
45434
|
+
var isArray2 = types52.builtInTypes.array;
|
|
45435
|
+
var isObject2 = types52.builtInTypes.object;
|
|
45436
|
+
var isFunction2 = types52.builtInTypes.function;
|
|
45436
45437
|
var undefined2;
|
|
45437
45438
|
var PathVisitor = function PathVisitor2() {
|
|
45438
45439
|
if (!(this instanceof PathVisitor2)) {
|
|
@@ -45452,7 +45453,7 @@ var require_path_visitor = __commonJS2({
|
|
|
45452
45453
|
typeNames[methodName.slice("visit".length)] = true;
|
|
45453
45454
|
}
|
|
45454
45455
|
}
|
|
45455
|
-
var supertypeTable =
|
|
45456
|
+
var supertypeTable = types52.computeSupertypeLookupTable(typeNames);
|
|
45456
45457
|
var methodNameTable = /* @__PURE__ */ Object.create(null);
|
|
45457
45458
|
var typeNameKeys = Object.keys(supertypeTable);
|
|
45458
45459
|
var typeNameCount = typeNameKeys.length;
|
|
@@ -45571,7 +45572,7 @@ var require_path_visitor = __commonJS2({
|
|
|
45571
45572
|
path3.each(visitor.visitWithoutReset, visitor);
|
|
45572
45573
|
} else if (!isObject2.check(value2)) {
|
|
45573
45574
|
} else {
|
|
45574
|
-
var childNames =
|
|
45575
|
+
var childNames = types52.getFieldNames(value2);
|
|
45575
45576
|
if (visitor._shouldVisitComments && value2.comments && childNames.indexOf("comments") < 0) {
|
|
45576
45577
|
childNames.push("comments");
|
|
45577
45578
|
}
|
|
@@ -45580,7 +45581,7 @@ var require_path_visitor = __commonJS2({
|
|
|
45580
45581
|
for (var i22 = 0; i22 < childCount; ++i22) {
|
|
45581
45582
|
var childName = childNames[i22];
|
|
45582
45583
|
if (!hasOwn2.call(value2, childName)) {
|
|
45583
|
-
value2[childName] =
|
|
45584
|
+
value2[childName] = types52.getFieldValue(value2, childName);
|
|
45584
45585
|
}
|
|
45585
45586
|
childPaths.push(path3.get(childName));
|
|
45586
45587
|
}
|
|
@@ -45721,13 +45722,13 @@ var require_equiv = __commonJS2({
|
|
|
45721
45722
|
var shared_1 = require_shared();
|
|
45722
45723
|
var types_110 = tslib_1.__importDefault(require_types());
|
|
45723
45724
|
function default_1(fork) {
|
|
45724
|
-
var
|
|
45725
|
-
var getFieldNames =
|
|
45726
|
-
var getFieldValue =
|
|
45727
|
-
var isArray2 =
|
|
45728
|
-
var isObject2 =
|
|
45729
|
-
var isDate2 =
|
|
45730
|
-
var isRegExp2 =
|
|
45725
|
+
var types52 = fork.use(types_110.default);
|
|
45726
|
+
var getFieldNames = types52.getFieldNames;
|
|
45727
|
+
var getFieldValue = types52.getFieldValue;
|
|
45728
|
+
var isArray2 = types52.builtInTypes.array;
|
|
45729
|
+
var isObject2 = types52.builtInTypes.object;
|
|
45730
|
+
var isDate2 = types52.builtInTypes.Date;
|
|
45731
|
+
var isRegExp2 = types52.builtInTypes.RegExp;
|
|
45731
45732
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
45732
45733
|
function astNodesAreEquivalent(a, b, problemPath) {
|
|
45733
45734
|
if (isArray2.check(problemPath)) {
|
|
@@ -45878,24 +45879,24 @@ var require_fork = __commonJS2({
|
|
|
45878
45879
|
var shared_1 = require_shared();
|
|
45879
45880
|
function default_1(plugins2) {
|
|
45880
45881
|
var fork = createFork();
|
|
45881
|
-
var
|
|
45882
|
+
var types52 = fork.use(types_110.default);
|
|
45882
45883
|
plugins2.forEach(fork.use);
|
|
45883
|
-
|
|
45884
|
+
types52.finalize();
|
|
45884
45885
|
var PathVisitor = fork.use(path_visitor_1.default);
|
|
45885
45886
|
return {
|
|
45886
|
-
Type:
|
|
45887
|
-
builtInTypes:
|
|
45888
|
-
namedTypes:
|
|
45889
|
-
builders:
|
|
45890
|
-
defineMethod:
|
|
45891
|
-
getFieldNames:
|
|
45892
|
-
getFieldValue:
|
|
45893
|
-
eachField:
|
|
45894
|
-
someField:
|
|
45895
|
-
getSupertypeNames:
|
|
45896
|
-
getBuilderName:
|
|
45887
|
+
Type: types52.Type,
|
|
45888
|
+
builtInTypes: types52.builtInTypes,
|
|
45889
|
+
namedTypes: types52.namedTypes,
|
|
45890
|
+
builders: types52.builders,
|
|
45891
|
+
defineMethod: types52.defineMethod,
|
|
45892
|
+
getFieldNames: types52.getFieldNames,
|
|
45893
|
+
getFieldValue: types52.getFieldValue,
|
|
45894
|
+
eachField: types52.eachField,
|
|
45895
|
+
someField: types52.someField,
|
|
45896
|
+
getSupertypeNames: types52.getSupertypeNames,
|
|
45897
|
+
getBuilderName: types52.getBuilderName,
|
|
45897
45898
|
astNodesAreEquivalent: fork.use(equiv_1.default),
|
|
45898
|
-
finalize:
|
|
45899
|
+
finalize: types52.finalize,
|
|
45899
45900
|
Path: fork.use(path_1.default),
|
|
45900
45901
|
NodePath: fork.use(node_path_1.default),
|
|
45901
45902
|
PathVisitor,
|
|
@@ -46055,8 +46056,8 @@ var require_core2 = __commonJS2({
|
|
|
46055
46056
|
var types_110 = tslib_1.__importDefault(require_types());
|
|
46056
46057
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46057
46058
|
function default_1(fork) {
|
|
46058
|
-
var
|
|
46059
|
-
var Type =
|
|
46059
|
+
var types52 = fork.use(types_110.default);
|
|
46060
|
+
var Type = types52.Type;
|
|
46060
46061
|
var def = Type.def;
|
|
46061
46062
|
var or = Type.or;
|
|
46062
46063
|
var shared = fork.use(shared_1.default);
|
|
@@ -46146,9 +46147,9 @@ var require_es6 = __commonJS2({
|
|
|
46146
46147
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46147
46148
|
function default_1(fork) {
|
|
46148
46149
|
fork.use(core_1.default);
|
|
46149
|
-
var
|
|
46150
|
-
var def =
|
|
46151
|
-
var or =
|
|
46150
|
+
var types52 = fork.use(types_110.default);
|
|
46151
|
+
var def = types52.Type.def;
|
|
46152
|
+
var or = types52.Type.or;
|
|
46152
46153
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46153
46154
|
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"]);
|
|
46154
46155
|
def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
|
|
@@ -46234,8 +46235,8 @@ var require_es2017 = __commonJS2({
|
|
|
46234
46235
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46235
46236
|
function default_1(fork) {
|
|
46236
46237
|
fork.use(es2016_1.default);
|
|
46237
|
-
var
|
|
46238
|
-
var def =
|
|
46238
|
+
var types52 = fork.use(types_110.default);
|
|
46239
|
+
var def = types52.Type.def;
|
|
46239
46240
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46240
46241
|
def("Function").field("async", Boolean, defaults2["false"]);
|
|
46241
46242
|
def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
|
|
@@ -46256,9 +46257,9 @@ var require_es2018 = __commonJS2({
|
|
|
46256
46257
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46257
46258
|
function default_1(fork) {
|
|
46258
46259
|
fork.use(es2017_1.default);
|
|
46259
|
-
var
|
|
46260
|
-
var def =
|
|
46261
|
-
var or =
|
|
46260
|
+
var types52 = fork.use(types_110.default);
|
|
46261
|
+
var def = types52.Type.def;
|
|
46262
|
+
var or = types52.Type.or;
|
|
46262
46263
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46263
46264
|
def("ForOfStatement").field("await", Boolean, defaults2["false"]);
|
|
46264
46265
|
def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
@@ -46287,9 +46288,9 @@ var require_es2019 = __commonJS2({
|
|
|
46287
46288
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46288
46289
|
function default_1(fork) {
|
|
46289
46290
|
fork.use(es2018_1.default);
|
|
46290
|
-
var
|
|
46291
|
-
var def =
|
|
46292
|
-
var or =
|
|
46291
|
+
var types52 = fork.use(types_110.default);
|
|
46292
|
+
var def = types52.Type.def;
|
|
46293
|
+
var or = types52.Type.or;
|
|
46293
46294
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46294
46295
|
def("CatchClause").field("param", or(def("Pattern"), null), defaults2["null"]);
|
|
46295
46296
|
}
|
|
@@ -46311,9 +46312,9 @@ var require_es20202 = __commonJS2({
|
|
|
46311
46312
|
function default_1(fork) {
|
|
46312
46313
|
fork.use(es2020_1.default);
|
|
46313
46314
|
fork.use(es2019_1.default);
|
|
46314
|
-
var
|
|
46315
|
-
var def =
|
|
46316
|
-
var or =
|
|
46315
|
+
var types52 = fork.use(types_110.default);
|
|
46316
|
+
var def = types52.Type.def;
|
|
46317
|
+
var or = types52.Type.or;
|
|
46317
46318
|
var shared = fork.use(shared_1.default);
|
|
46318
46319
|
var defaults2 = shared.defaults;
|
|
46319
46320
|
def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
|
|
@@ -46359,8 +46360,8 @@ var require_es2022 = __commonJS2({
|
|
|
46359
46360
|
var shared_1 = require_shared();
|
|
46360
46361
|
function default_1(fork) {
|
|
46361
46362
|
fork.use(es2021_1.default);
|
|
46362
|
-
var
|
|
46363
|
-
var def =
|
|
46363
|
+
var types52 = fork.use(types_110.default);
|
|
46364
|
+
var def = types52.Type.def;
|
|
46364
46365
|
def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
|
|
46365
46366
|
}
|
|
46366
46367
|
exports.default = default_1;
|
|
@@ -46379,9 +46380,9 @@ var require_es_proposals = __commonJS2({
|
|
|
46379
46380
|
var es2022_1 = tslib_1.__importDefault(require_es2022());
|
|
46380
46381
|
function default_1(fork) {
|
|
46381
46382
|
fork.use(es2022_1.default);
|
|
46382
|
-
var
|
|
46383
|
-
var Type =
|
|
46384
|
-
var def =
|
|
46383
|
+
var types52 = fork.use(types_110.default);
|
|
46384
|
+
var Type = types52.Type;
|
|
46385
|
+
var def = types52.Type.def;
|
|
46385
46386
|
var or = Type.or;
|
|
46386
46387
|
var shared = fork.use(shared_1.default);
|
|
46387
46388
|
var defaults2 = shared.defaults;
|
|
@@ -46419,9 +46420,9 @@ var require_jsx = __commonJS2({
|
|
|
46419
46420
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46420
46421
|
function default_1(fork) {
|
|
46421
46422
|
fork.use(es_proposals_1.default);
|
|
46422
|
-
var
|
|
46423
|
-
var def =
|
|
46424
|
-
var or =
|
|
46423
|
+
var types52 = fork.use(types_110.default);
|
|
46424
|
+
var def = types52.Type.def;
|
|
46425
|
+
var or = types52.Type.or;
|
|
46425
46426
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46426
46427
|
def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
|
|
46427
46428
|
def("Literal"),
|
|
@@ -46477,9 +46478,9 @@ var require_type_annotations = __commonJS2({
|
|
|
46477
46478
|
var types_110 = tslib_1.__importDefault(require_types());
|
|
46478
46479
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46479
46480
|
function default_1(fork) {
|
|
46480
|
-
var
|
|
46481
|
-
var def =
|
|
46482
|
-
var or =
|
|
46481
|
+
var types52 = fork.use(types_110.default);
|
|
46482
|
+
var def = types52.Type.def;
|
|
46483
|
+
var or = types52.Type.or;
|
|
46483
46484
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46484
46485
|
var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
|
|
46485
46486
|
var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
|
|
@@ -46512,9 +46513,9 @@ var require_flow = __commonJS2({
|
|
|
46512
46513
|
function default_1(fork) {
|
|
46513
46514
|
fork.use(es_proposals_1.default);
|
|
46514
46515
|
fork.use(type_annotations_1.default);
|
|
46515
|
-
var
|
|
46516
|
-
var def =
|
|
46517
|
-
var or =
|
|
46516
|
+
var types52 = fork.use(types_110.default);
|
|
46517
|
+
var def = types52.Type.def;
|
|
46518
|
+
var or = types52.Type.or;
|
|
46518
46519
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46519
46520
|
def("Flow").bases("Node");
|
|
46520
46521
|
def("FlowType").bases("Flow");
|
|
@@ -46626,10 +46627,10 @@ var require_esprima = __commonJS2({
|
|
|
46626
46627
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46627
46628
|
function default_1(fork) {
|
|
46628
46629
|
fork.use(es_proposals_1.default);
|
|
46629
|
-
var
|
|
46630
|
+
var types52 = fork.use(types_110.default);
|
|
46630
46631
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46631
|
-
var def =
|
|
46632
|
-
var or =
|
|
46632
|
+
var def = types52.Type.def;
|
|
46633
|
+
var or = types52.Type.or;
|
|
46633
46634
|
def("VariableDeclaration").field("declarations", [or(
|
|
46634
46635
|
def("VariableDeclarator"),
|
|
46635
46636
|
def("Identifier")
|
|
@@ -46672,11 +46673,11 @@ var require_babel_core = __commonJS2({
|
|
|
46672
46673
|
function default_1(fork) {
|
|
46673
46674
|
var _a, _b, _c, _d, _e;
|
|
46674
46675
|
fork.use(es_proposals_1.default);
|
|
46675
|
-
var
|
|
46676
|
+
var types52 = fork.use(types_110.default);
|
|
46676
46677
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46677
|
-
var def =
|
|
46678
|
-
var or =
|
|
46679
|
-
var isUndefined =
|
|
46678
|
+
var def = types52.Type.def;
|
|
46679
|
+
var or = types52.Type.or;
|
|
46680
|
+
var isUndefined = types52.builtInTypes.undefined;
|
|
46680
46681
|
def("Noop").bases("Statement").build();
|
|
46681
46682
|
def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
|
|
46682
46683
|
def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
|
|
@@ -46701,7 +46702,7 @@ var require_babel_core = __commonJS2({
|
|
|
46701
46702
|
raw: String
|
|
46702
46703
|
},
|
|
46703
46704
|
function getDefault() {
|
|
46704
|
-
var value2 =
|
|
46705
|
+
var value2 = types52.getFieldValue(this, "value");
|
|
46705
46706
|
return {
|
|
46706
46707
|
rawValue: value2,
|
|
46707
46708
|
raw: toRaw ? toRaw(value2) : String(value2)
|
|
@@ -46802,8 +46803,8 @@ var require_babel = __commonJS2({
|
|
|
46802
46803
|
var flow_1 = tslib_1.__importDefault(require_flow());
|
|
46803
46804
|
var shared_1 = require_shared();
|
|
46804
46805
|
function default_1(fork) {
|
|
46805
|
-
var
|
|
46806
|
-
var def =
|
|
46806
|
+
var types52 = fork.use(types_110.default);
|
|
46807
|
+
var def = types52.Type.def;
|
|
46807
46808
|
fork.use(babel_core_1.default);
|
|
46808
46809
|
fork.use(flow_1.default);
|
|
46809
46810
|
def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
|
|
@@ -46827,12 +46828,12 @@ var require_typescript = __commonJS2({
|
|
|
46827
46828
|
function default_1(fork) {
|
|
46828
46829
|
fork.use(babel_core_1.default);
|
|
46829
46830
|
fork.use(type_annotations_1.default);
|
|
46830
|
-
var
|
|
46831
|
-
var n =
|
|
46832
|
-
var def =
|
|
46833
|
-
var or =
|
|
46831
|
+
var types52 = fork.use(types_110.default);
|
|
46832
|
+
var n = types52.namedTypes;
|
|
46833
|
+
var def = types52.Type.def;
|
|
46834
|
+
var or = types52.Type.or;
|
|
46834
46835
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46835
|
-
var StringLiteral =
|
|
46836
|
+
var StringLiteral = types52.Type.from(function(value2, deep) {
|
|
46836
46837
|
if (n.StringLiteral && n.StringLiteral.check(value2, deep)) {
|
|
46837
46838
|
return true;
|
|
46838
46839
|
}
|
|
@@ -48780,8 +48781,8 @@ var require_util2 = __commonJS2({
|
|
|
48780
48781
|
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;
|
|
48781
48782
|
var tslib_1 = require_tslib();
|
|
48782
48783
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
48783
|
-
var
|
|
48784
|
-
var n =
|
|
48784
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
48785
|
+
var n = types52.namedTypes;
|
|
48785
48786
|
var source_map_1 = tslib_1.__importDefault(require_source_map());
|
|
48786
48787
|
var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
|
|
48787
48788
|
var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
|
|
@@ -56087,10 +56088,10 @@ var require_comments = __commonJS2({
|
|
|
56087
56088
|
exports.printComments = exports.attach = void 0;
|
|
56088
56089
|
var tslib_1 = require_tslib();
|
|
56089
56090
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
56090
|
-
var
|
|
56091
|
-
var n =
|
|
56092
|
-
var isArray2 =
|
|
56093
|
-
var isObject2 =
|
|
56091
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
56092
|
+
var n = types52.namedTypes;
|
|
56093
|
+
var isArray2 = types52.builtInTypes.array;
|
|
56094
|
+
var isObject2 = types52.builtInTypes.object;
|
|
56094
56095
|
var lines_1 = require_lines();
|
|
56095
56096
|
var util_110 = require_util2();
|
|
56096
56097
|
var childNodesCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -56121,7 +56122,7 @@ var require_comments = __commonJS2({
|
|
|
56121
56122
|
if (isArray2.check(node2)) {
|
|
56122
56123
|
names = Object.keys(node2);
|
|
56123
56124
|
} else if (isObject2.check(node2)) {
|
|
56124
|
-
names =
|
|
56125
|
+
names = types52.getFieldNames(node2);
|
|
56125
56126
|
} else {
|
|
56126
56127
|
return resultArray;
|
|
56127
56128
|
}
|
|
@@ -56299,7 +56300,7 @@ var require_comments = __commonJS2({
|
|
|
56299
56300
|
function printComments(path3, print62) {
|
|
56300
56301
|
var value2 = path3.getValue();
|
|
56301
56302
|
var innerLines = print62(path3);
|
|
56302
|
-
var comments = n.Node.check(value2) &&
|
|
56303
|
+
var comments = n.Node.check(value2) && types52.getFieldValue(value2, "comments");
|
|
56303
56304
|
if (!comments || comments.length === 0) {
|
|
56304
56305
|
return innerLines;
|
|
56305
56306
|
}
|
|
@@ -56307,8 +56308,8 @@ var require_comments = __commonJS2({
|
|
|
56307
56308
|
var trailingParts = [innerLines];
|
|
56308
56309
|
path3.each(function(commentPath) {
|
|
56309
56310
|
var comment = commentPath.getValue();
|
|
56310
|
-
var leading =
|
|
56311
|
-
var trailing =
|
|
56311
|
+
var leading = types52.getFieldValue(comment, "leading");
|
|
56312
|
+
var trailing = types52.getFieldValue(comment, "trailing");
|
|
56312
56313
|
if (leading || trailing && !(n.Statement.check(value2) || comment.type === "Block" || comment.type === "CommentBlock")) {
|
|
56313
56314
|
leadingParts.push(printLeadingComment(commentPath, print62));
|
|
56314
56315
|
} else if (trailing) {
|
|
@@ -56328,10 +56329,10 @@ var require_parser = __commonJS2({
|
|
|
56328
56329
|
exports.parse = void 0;
|
|
56329
56330
|
var tslib_1 = require_tslib();
|
|
56330
56331
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
56331
|
-
var
|
|
56332
|
-
var b =
|
|
56333
|
-
var isObject2 =
|
|
56334
|
-
var isArray2 =
|
|
56332
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
56333
|
+
var b = types52.builders;
|
|
56334
|
+
var isObject2 = types52.builtInTypes.object;
|
|
56335
|
+
var isArray2 = types52.builtInTypes.array;
|
|
56335
56336
|
var options_1 = require_options();
|
|
56336
56337
|
var lines_1 = require_lines();
|
|
56337
56338
|
var comments_1 = require_comments();
|
|
@@ -56515,11 +56516,11 @@ var require_fast_path = __commonJS2({
|
|
|
56515
56516
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56516
56517
|
var tslib_1 = require_tslib();
|
|
56517
56518
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
56518
|
-
var
|
|
56519
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
56519
56520
|
var util2 = tslib_1.__importStar(require_util2());
|
|
56520
|
-
var n =
|
|
56521
|
-
var isArray2 =
|
|
56522
|
-
var isNumber2 =
|
|
56521
|
+
var n = types52.namedTypes;
|
|
56522
|
+
var isArray2 = types52.builtInTypes.array;
|
|
56523
|
+
var isNumber2 = types52.builtInTypes.number;
|
|
56523
56524
|
var PRECEDENCE = {};
|
|
56524
56525
|
[
|
|
56525
56526
|
["??"],
|
|
@@ -56548,7 +56549,7 @@ var require_fast_path = __commonJS2({
|
|
|
56548
56549
|
if (obj instanceof FastPath) {
|
|
56549
56550
|
return obj.copy();
|
|
56550
56551
|
}
|
|
56551
|
-
if (obj instanceof
|
|
56552
|
+
if (obj instanceof types52.NodePath) {
|
|
56552
56553
|
var copy = Object.create(FastPath.prototype);
|
|
56553
56554
|
var stack = [obj.value];
|
|
56554
56555
|
for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
|
|
@@ -56859,7 +56860,7 @@ var require_fast_path = __commonJS2({
|
|
|
56859
56860
|
return node2.some(containsCallExpression);
|
|
56860
56861
|
}
|
|
56861
56862
|
if (n.Node.check(node2)) {
|
|
56862
|
-
return
|
|
56863
|
+
return types52.someField(node2, function(_name, child) {
|
|
56863
56864
|
return containsCallExpression(child);
|
|
56864
56865
|
});
|
|
56865
56866
|
}
|
|
@@ -56947,16 +56948,16 @@ var require_patcher = __commonJS2({
|
|
|
56947
56948
|
var tslib_1 = require_tslib();
|
|
56948
56949
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
56949
56950
|
var linesModule = tslib_1.__importStar(require_lines());
|
|
56950
|
-
var
|
|
56951
|
-
var Printable =
|
|
56952
|
-
var Expression =
|
|
56953
|
-
var ReturnStatement =
|
|
56954
|
-
var SourceLocation3 =
|
|
56951
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
56952
|
+
var Printable = types52.namedTypes.Printable;
|
|
56953
|
+
var Expression = types52.namedTypes.Expression;
|
|
56954
|
+
var ReturnStatement = types52.namedTypes.ReturnStatement;
|
|
56955
|
+
var SourceLocation3 = types52.namedTypes.SourceLocation;
|
|
56955
56956
|
var util_110 = require_util2();
|
|
56956
56957
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path());
|
|
56957
|
-
var isObject2 =
|
|
56958
|
-
var isArray2 =
|
|
56959
|
-
var isString3 =
|
|
56958
|
+
var isObject2 = types52.builtInTypes.object;
|
|
56959
|
+
var isArray2 = types52.builtInTypes.array;
|
|
56960
|
+
var isString3 = types52.builtInTypes.string;
|
|
56960
56961
|
var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
|
|
56961
56962
|
var Patcher = function Patcher2(lines) {
|
|
56962
56963
|
assert_1.default.ok(this instanceof Patcher2);
|
|
@@ -57226,8 +57227,8 @@ var require_patcher = __commonJS2({
|
|
|
57226
57227
|
if (k.charAt(0) === "_") {
|
|
57227
57228
|
continue;
|
|
57228
57229
|
}
|
|
57229
|
-
newPath.stack.push(k,
|
|
57230
|
-
oldPath.stack.push(k,
|
|
57230
|
+
newPath.stack.push(k, types52.getFieldValue(newNode, k));
|
|
57231
|
+
oldPath.stack.push(k, types52.getFieldValue(oldNode, k));
|
|
57231
57232
|
var canReprint = findAnyReprints(newPath, oldPath, reprints);
|
|
57232
57233
|
newPath.stack.length -= 2;
|
|
57233
57234
|
oldPath.stack.length -= 2;
|
|
@@ -57249,16 +57250,16 @@ var require_printer = __commonJS2({
|
|
|
57249
57250
|
exports.Printer = void 0;
|
|
57250
57251
|
var tslib_1 = require_tslib();
|
|
57251
57252
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
57252
|
-
var
|
|
57253
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
57253
57254
|
var comments_1 = require_comments();
|
|
57254
57255
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path());
|
|
57255
57256
|
var lines_1 = require_lines();
|
|
57256
57257
|
var options_1 = require_options();
|
|
57257
57258
|
var patcher_1 = require_patcher();
|
|
57258
57259
|
var util2 = tslib_1.__importStar(require_util2());
|
|
57259
|
-
var namedTypes =
|
|
57260
|
-
var isString3 =
|
|
57261
|
-
var isObject2 =
|
|
57260
|
+
var namedTypes = types52.namedTypes;
|
|
57261
|
+
var isString3 = types52.builtInTypes.string;
|
|
57262
|
+
var isObject2 = types52.builtInTypes.object;
|
|
57262
57263
|
var PrintResult = function PrintResult2(code, sourceMap) {
|
|
57263
57264
|
assert_1.default.ok(this instanceof PrintResult2);
|
|
57264
57265
|
isString3.assert(code);
|
|
@@ -57420,7 +57421,7 @@ var require_printer = __commonJS2({
|
|
|
57420
57421
|
case "OptionalMemberExpression": {
|
|
57421
57422
|
parts.push(path3.call(print62, "object"));
|
|
57422
57423
|
var property = path3.call(print62, "property");
|
|
57423
|
-
var optional =
|
|
57424
|
+
var optional = types52.getFieldValue(n, "optional");
|
|
57424
57425
|
if (n.computed) {
|
|
57425
57426
|
parts.push(optional ? "?.[" : "[", property, "]");
|
|
57426
57427
|
} else {
|
|
@@ -57691,7 +57692,7 @@ var require_printer = __commonJS2({
|
|
|
57691
57692
|
if (n.typeArguments) {
|
|
57692
57693
|
parts.push(path3.call(print62, "typeArguments"));
|
|
57693
57694
|
}
|
|
57694
|
-
if (
|
|
57695
|
+
if (types52.getFieldValue(n, "optional")) {
|
|
57695
57696
|
parts.push("?.");
|
|
57696
57697
|
}
|
|
57697
57698
|
parts.push(printArgumentsList(path3, options, print62));
|
|
@@ -59370,8 +59371,8 @@ var require_printer = __commonJS2({
|
|
|
59370
59371
|
});
|
|
59371
59372
|
}
|
|
59372
59373
|
function getPossibleRaw(node2) {
|
|
59373
|
-
var value2 =
|
|
59374
|
-
var extra =
|
|
59374
|
+
var value2 = types52.getFieldValue(node2, "value");
|
|
59375
|
+
var extra = types52.getFieldValue(node2, "extra");
|
|
59375
59376
|
if (extra && typeof extra.raw === "string" && value2 == extra.rawValue) {
|
|
59376
59377
|
return extra.raw;
|
|
59377
59378
|
}
|
|
@@ -59417,8 +59418,8 @@ var require_main2 = __commonJS2({
|
|
|
59417
59418
|
exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
|
|
59418
59419
|
var tslib_1 = require_tslib();
|
|
59419
59420
|
var fs_1 = tslib_1.__importDefault(__require("fs"));
|
|
59420
|
-
var
|
|
59421
|
-
exports.types =
|
|
59421
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
59422
|
+
exports.types = types52;
|
|
59422
59423
|
var parser_1 = require_parser();
|
|
59423
59424
|
Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
|
|
59424
59425
|
return parser_1.parse;
|
|
@@ -63808,30 +63809,30 @@ var require_utils3 = __commonJS2({
|
|
|
63808
63809
|
validate22.oneOf = values;
|
|
63809
63810
|
return validate22;
|
|
63810
63811
|
}
|
|
63811
|
-
function assertNodeType(...
|
|
63812
|
+
function assertNodeType(...types52) {
|
|
63812
63813
|
function validate22(node2, key, val) {
|
|
63813
|
-
for (const type of
|
|
63814
|
+
for (const type of types52) {
|
|
63814
63815
|
if ((0, _is.default)(type, val)) {
|
|
63815
63816
|
(0, _validate.validateChild)(node2, key, val);
|
|
63816
63817
|
return;
|
|
63817
63818
|
}
|
|
63818
63819
|
}
|
|
63819
|
-
throw new TypeError(`Property ${key} of ${node2.type} expected node to be of a type ${JSON.stringify(
|
|
63820
|
+
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)}`);
|
|
63820
63821
|
}
|
|
63821
|
-
validate22.oneOfNodeTypes =
|
|
63822
|
+
validate22.oneOfNodeTypes = types52;
|
|
63822
63823
|
return validate22;
|
|
63823
63824
|
}
|
|
63824
|
-
function assertNodeOrValueType(...
|
|
63825
|
+
function assertNodeOrValueType(...types52) {
|
|
63825
63826
|
function validate22(node2, key, val) {
|
|
63826
|
-
for (const type of
|
|
63827
|
+
for (const type of types52) {
|
|
63827
63828
|
if (getType(val) === type || (0, _is.default)(type, val)) {
|
|
63828
63829
|
(0, _validate.validateChild)(node2, key, val);
|
|
63829
63830
|
return;
|
|
63830
63831
|
}
|
|
63831
63832
|
}
|
|
63832
|
-
throw new TypeError(`Property ${key} of ${node2.type} expected node to be of a type ${JSON.stringify(
|
|
63833
|
+
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)}`);
|
|
63833
63834
|
}
|
|
63834
|
-
validate22.oneOfNodeOrValueTypes =
|
|
63835
|
+
validate22.oneOfNodeOrValueTypes = types52;
|
|
63835
63836
|
return validate22;
|
|
63836
63837
|
}
|
|
63837
63838
|
function assertValueType(type) {
|
|
@@ -67409,7 +67410,7 @@ var require_generated2 = __commonJS2({
|
|
|
67409
67410
|
exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
|
|
67410
67411
|
exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
|
|
67411
67412
|
exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
|
|
67412
|
-
exports.tSTypeReference = exports.tsTypeReference =
|
|
67413
|
+
exports.tSTypeReference = exports.tsTypeReference = tsTypeReference2;
|
|
67413
67414
|
exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
|
|
67414
67415
|
exports.tSUnionType = exports.tsUnionType = tsUnionType;
|
|
67415
67416
|
exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
|
|
@@ -68235,10 +68236,10 @@ var require_generated2 = __commonJS2({
|
|
|
68235
68236
|
body
|
|
68236
68237
|
});
|
|
68237
68238
|
}
|
|
68238
|
-
function intersectionTypeAnnotation(
|
|
68239
|
+
function intersectionTypeAnnotation(types52) {
|
|
68239
68240
|
return (0, _validateNode.default)({
|
|
68240
68241
|
type: "IntersectionTypeAnnotation",
|
|
68241
|
-
types:
|
|
68242
|
+
types: types52
|
|
68242
68243
|
});
|
|
68243
68244
|
}
|
|
68244
68245
|
function mixedTypeAnnotation() {
|
|
@@ -68361,10 +68362,10 @@ var require_generated2 = __commonJS2({
|
|
|
68361
68362
|
type: "ThisTypeAnnotation"
|
|
68362
68363
|
};
|
|
68363
68364
|
}
|
|
68364
|
-
function tupleTypeAnnotation(
|
|
68365
|
+
function tupleTypeAnnotation(types52) {
|
|
68365
68366
|
return (0, _validateNode.default)({
|
|
68366
68367
|
type: "TupleTypeAnnotation",
|
|
68367
|
-
types:
|
|
68368
|
+
types: types52
|
|
68368
68369
|
});
|
|
68369
68370
|
}
|
|
68370
68371
|
function typeofTypeAnnotation(argument) {
|
|
@@ -68415,10 +68416,10 @@ var require_generated2 = __commonJS2({
|
|
|
68415
68416
|
params
|
|
68416
68417
|
});
|
|
68417
68418
|
}
|
|
68418
|
-
function unionTypeAnnotation(
|
|
68419
|
+
function unionTypeAnnotation(types52) {
|
|
68419
68420
|
return (0, _validateNode.default)({
|
|
68420
68421
|
type: "UnionTypeAnnotation",
|
|
68421
|
-
types:
|
|
68422
|
+
types: types52
|
|
68422
68423
|
});
|
|
68423
68424
|
}
|
|
68424
68425
|
function variance(kind) {
|
|
@@ -68871,7 +68872,7 @@ var require_generated2 = __commonJS2({
|
|
|
68871
68872
|
typeAnnotation: typeAnnotation2
|
|
68872
68873
|
});
|
|
68873
68874
|
}
|
|
68874
|
-
function
|
|
68875
|
+
function tsTypeReference2(typeName, typeParameters = null) {
|
|
68875
68876
|
return (0, _validateNode.default)({
|
|
68876
68877
|
type: "TSTypeReference",
|
|
68877
68878
|
typeName,
|
|
@@ -68931,16 +68932,16 @@ var require_generated2 = __commonJS2({
|
|
|
68931
68932
|
optional
|
|
68932
68933
|
});
|
|
68933
68934
|
}
|
|
68934
|
-
function tsUnionType(
|
|
68935
|
+
function tsUnionType(types52) {
|
|
68935
68936
|
return (0, _validateNode.default)({
|
|
68936
68937
|
type: "TSUnionType",
|
|
68937
|
-
types:
|
|
68938
|
+
types: types52
|
|
68938
68939
|
});
|
|
68939
68940
|
}
|
|
68940
|
-
function tsIntersectionType(
|
|
68941
|
+
function tsIntersectionType(types52) {
|
|
68941
68942
|
return (0, _validateNode.default)({
|
|
68942
68943
|
type: "TSIntersectionType",
|
|
68943
|
-
types:
|
|
68944
|
+
types: types52
|
|
68944
68945
|
});
|
|
68945
68946
|
}
|
|
68946
68947
|
function tsConditionalType(checkType, extendsType, trueType, falseType) {
|
|
@@ -70541,12 +70542,12 @@ var require_removeTypeDuplicates = __commonJS2({
|
|
|
70541
70542
|
const generics = /* @__PURE__ */ new Map();
|
|
70542
70543
|
const bases = /* @__PURE__ */ new Map();
|
|
70543
70544
|
const typeGroups = /* @__PURE__ */ new Set();
|
|
70544
|
-
const
|
|
70545
|
+
const types52 = [];
|
|
70545
70546
|
for (let i22 = 0; i22 < nodes.length; i22++) {
|
|
70546
70547
|
const node2 = nodes[i22];
|
|
70547
70548
|
if (!node2)
|
|
70548
70549
|
continue;
|
|
70549
|
-
if (
|
|
70550
|
+
if (types52.indexOf(node2) >= 0) {
|
|
70550
70551
|
continue;
|
|
70551
70552
|
}
|
|
70552
70553
|
if ((0, _generated.isAnyTypeAnnotation)(node2)) {
|
|
@@ -70580,15 +70581,15 @@ var require_removeTypeDuplicates = __commonJS2({
|
|
|
70580
70581
|
}
|
|
70581
70582
|
continue;
|
|
70582
70583
|
}
|
|
70583
|
-
|
|
70584
|
+
types52.push(node2);
|
|
70584
70585
|
}
|
|
70585
70586
|
for (const [, baseType] of bases) {
|
|
70586
|
-
|
|
70587
|
+
types52.push(baseType);
|
|
70587
70588
|
}
|
|
70588
70589
|
for (const [, genericName] of generics) {
|
|
70589
|
-
|
|
70590
|
+
types52.push(genericName);
|
|
70590
70591
|
}
|
|
70591
|
-
return
|
|
70592
|
+
return types52;
|
|
70592
70593
|
}
|
|
70593
70594
|
}
|
|
70594
70595
|
});
|
|
@@ -70601,8 +70602,8 @@ var require_createFlowUnionType = __commonJS2({
|
|
|
70601
70602
|
exports.default = createFlowUnionType;
|
|
70602
70603
|
var _generated = require_generated2();
|
|
70603
70604
|
var _removeTypeDuplicates = require_removeTypeDuplicates();
|
|
70604
|
-
function createFlowUnionType(
|
|
70605
|
-
const flattened = (0, _removeTypeDuplicates.default)(
|
|
70605
|
+
function createFlowUnionType(types52) {
|
|
70606
|
+
const flattened = (0, _removeTypeDuplicates.default)(types52);
|
|
70606
70607
|
if (flattened.length === 1) {
|
|
70607
70608
|
return flattened[0];
|
|
70608
70609
|
} else {
|
|
@@ -70627,12 +70628,12 @@ var require_removeTypeDuplicates2 = __commonJS2({
|
|
|
70627
70628
|
const generics = /* @__PURE__ */ new Map();
|
|
70628
70629
|
const bases = /* @__PURE__ */ new Map();
|
|
70629
70630
|
const typeGroups = /* @__PURE__ */ new Set();
|
|
70630
|
-
const
|
|
70631
|
+
const types52 = [];
|
|
70631
70632
|
for (let i22 = 0; i22 < nodes.length; i22++) {
|
|
70632
70633
|
const node2 = nodes[i22];
|
|
70633
70634
|
if (!node2)
|
|
70634
70635
|
continue;
|
|
70635
|
-
if (
|
|
70636
|
+
if (types52.indexOf(node2) >= 0) {
|
|
70636
70637
|
continue;
|
|
70637
70638
|
}
|
|
70638
70639
|
if ((0, _generated.isTSAnyKeyword)(node2)) {
|
|
@@ -70666,15 +70667,15 @@ var require_removeTypeDuplicates2 = __commonJS2({
|
|
|
70666
70667
|
}
|
|
70667
70668
|
continue;
|
|
70668
70669
|
}
|
|
70669
|
-
|
|
70670
|
+
types52.push(node2);
|
|
70670
70671
|
}
|
|
70671
70672
|
for (const [, baseType] of bases) {
|
|
70672
|
-
|
|
70673
|
+
types52.push(baseType);
|
|
70673
70674
|
}
|
|
70674
70675
|
for (const [, genericName] of generics) {
|
|
70675
|
-
|
|
70676
|
+
types52.push(genericName);
|
|
70676
70677
|
}
|
|
70677
|
-
return
|
|
70678
|
+
return types52;
|
|
70678
70679
|
}
|
|
70679
70680
|
}
|
|
70680
70681
|
});
|
|
@@ -70689,10 +70690,10 @@ var require_createTSUnionType = __commonJS2({
|
|
|
70689
70690
|
var _removeTypeDuplicates = require_removeTypeDuplicates2();
|
|
70690
70691
|
var _index = require_generated();
|
|
70691
70692
|
function createTSUnionType(typeAnnotations) {
|
|
70692
|
-
const
|
|
70693
|
+
const types52 = typeAnnotations.map((type) => {
|
|
70693
70694
|
return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
|
|
70694
70695
|
});
|
|
70695
|
-
const flattened = (0, _removeTypeDuplicates.default)(
|
|
70696
|
+
const flattened = (0, _removeTypeDuplicates.default)(types52);
|
|
70696
70697
|
if (flattened.length === 1) {
|
|
70697
70698
|
return flattened[0];
|
|
70698
70699
|
} else {
|
|
@@ -75035,7 +75036,7 @@ var printDocASTReducer = {
|
|
|
75035
75036
|
leave: ({ name, interfaces, directives, fields }) => join(["interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
|
|
75036
75037
|
},
|
|
75037
75038
|
UnionTypeDefinition: {
|
|
75038
|
-
leave: ({ name, directives, types:
|
|
75039
|
+
leave: ({ name, directives, types: types52 }) => join(["union", name, join(directives, " "), wrap("= ", join(types52, " | "))], " ")
|
|
75039
75040
|
},
|
|
75040
75041
|
EnumTypeDefinition: {
|
|
75041
75042
|
leave: ({ name, directives, values }) => join(["enum", name, join(directives, " "), block(values)], " ")
|
|
@@ -75062,7 +75063,7 @@ var printDocASTReducer = {
|
|
|
75062
75063
|
leave: ({ name, interfaces, directives, fields }) => join(["extend interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
|
|
75063
75064
|
},
|
|
75064
75065
|
UnionTypeExtension: {
|
|
75065
|
-
leave: ({ name, directives, types:
|
|
75066
|
+
leave: ({ name, directives, types: types52 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types52, " | "))], " ")
|
|
75066
75067
|
},
|
|
75067
75068
|
EnumTypeExtension: {
|
|
75068
75069
|
leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
|
|
@@ -75918,8 +75919,8 @@ function healTypes(originalTypeMap, directives) {
|
|
|
75918
75919
|
}
|
|
75919
75920
|
}
|
|
75920
75921
|
function healUnderlyingTypes(type) {
|
|
75921
|
-
const
|
|
75922
|
-
|
|
75922
|
+
const types52 = type.getTypes();
|
|
75923
|
+
types52.push(...types52.splice(0).map((t32) => healType(t32)).filter(Boolean));
|
|
75923
75924
|
}
|
|
75924
75925
|
function healType(type) {
|
|
75925
75926
|
if ((0, import_graphql13.isListType)(type)) {
|
|
@@ -76658,11 +76659,11 @@ function mergeEnum(e1, e22, config2) {
|
|
|
76658
76659
|
kind: import_graphql21.Kind.ENUM_TYPE_DEFINITION
|
|
76659
76660
|
} : e1;
|
|
76660
76661
|
}
|
|
76661
|
-
function isStringTypes(
|
|
76662
|
-
return typeof
|
|
76662
|
+
function isStringTypes(types52) {
|
|
76663
|
+
return typeof types52 === "string";
|
|
76663
76664
|
}
|
|
76664
|
-
function isSourceTypes(
|
|
76665
|
-
return
|
|
76665
|
+
function isSourceTypes(types52) {
|
|
76666
|
+
return types52 instanceof import_graphql22.Source;
|
|
76666
76667
|
}
|
|
76667
76668
|
function extractType(type) {
|
|
76668
76669
|
let visitedType = type;
|
|
@@ -77300,45 +77301,6 @@ function deepMerge(...objects) {
|
|
|
77300
77301
|
}
|
|
77301
77302
|
return mergedObj;
|
|
77302
77303
|
}
|
|
77303
|
-
async function marshalSelection({
|
|
77304
|
-
selection,
|
|
77305
|
-
data: data2
|
|
77306
|
-
}) {
|
|
77307
|
-
const config2 = getCurrentConfig();
|
|
77308
|
-
if (data2 === null || typeof data2 === "undefined") {
|
|
77309
|
-
return data2;
|
|
77310
|
-
}
|
|
77311
|
-
if (Array.isArray(data2)) {
|
|
77312
|
-
return await Promise.all(data2.map((val) => marshalSelection({ selection, data: val })));
|
|
77313
|
-
}
|
|
77314
|
-
const targetSelection = getFieldsForType(selection, data2["__typename"], false);
|
|
77315
|
-
return Object.fromEntries(
|
|
77316
|
-
await Promise.all(
|
|
77317
|
-
Object.entries(data2).map(async ([fieldName, value2]) => {
|
|
77318
|
-
const { type, selection: selection2 } = targetSelection[fieldName];
|
|
77319
|
-
if (!type) {
|
|
77320
|
-
return [fieldName, value2];
|
|
77321
|
-
}
|
|
77322
|
-
if (selection2) {
|
|
77323
|
-
return [fieldName, await marshalSelection({ selection: selection2, data: value2 })];
|
|
77324
|
-
}
|
|
77325
|
-
if (config2.scalars?.[type]) {
|
|
77326
|
-
const marshalFn = config2.scalars[type].marshal;
|
|
77327
|
-
if (!marshalFn) {
|
|
77328
|
-
throw new Error(
|
|
77329
|
-
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
77330
|
-
);
|
|
77331
|
-
}
|
|
77332
|
-
if (Array.isArray(value2)) {
|
|
77333
|
-
return [fieldName, value2.map(marshalFn)];
|
|
77334
|
-
}
|
|
77335
|
-
return [fieldName, marshalFn(value2)];
|
|
77336
|
-
}
|
|
77337
|
-
return [fieldName, value2];
|
|
77338
|
-
})
|
|
77339
|
-
)
|
|
77340
|
-
);
|
|
77341
|
-
}
|
|
77342
77304
|
var CachePolicy = {
|
|
77343
77305
|
CacheOrNetwork: "CacheOrNetwork",
|
|
77344
77306
|
CacheOnly: "CacheOnly",
|
|
@@ -77360,11 +77322,6 @@ var CompiledFragmentKind = ArtifactKind.Fragment;
|
|
|
77360
77322
|
var CompiledMutationKind = ArtifactKind.Mutation;
|
|
77361
77323
|
var CompiledQueryKind = ArtifactKind.Query;
|
|
77362
77324
|
var CompiledSubscriptionKind = ArtifactKind.Subscription;
|
|
77363
|
-
var DataSource = {
|
|
77364
|
-
Cache: "cache",
|
|
77365
|
-
Network: "network",
|
|
77366
|
-
Ssr: "ssr"
|
|
77367
|
-
};
|
|
77368
77325
|
var fragmentKey = " $fragments";
|
|
77369
77326
|
var PendingValue = Symbol("houdini_loading");
|
|
77370
77327
|
var computeKey = ({ field, args }) => {
|
|
@@ -81149,194 +81106,6 @@ function defaultComponentField({
|
|
|
81149
81106
|
}
|
|
81150
81107
|
var cache_default = new Cache();
|
|
81151
81108
|
var serverSide = typeof globalThis.window === "undefined";
|
|
81152
|
-
var documentPlugin = (kind, source) => {
|
|
81153
|
-
return () => {
|
|
81154
|
-
const sourceHandlers = source();
|
|
81155
|
-
const enterWrapper = (handler) => {
|
|
81156
|
-
return !handler ? void 0 : (ctx, handlers2) => {
|
|
81157
|
-
if (ctx.artifact.kind !== kind) {
|
|
81158
|
-
return handlers2.next(ctx);
|
|
81159
|
-
}
|
|
81160
|
-
return handler(ctx, handlers2);
|
|
81161
|
-
};
|
|
81162
|
-
};
|
|
81163
|
-
const exitWrapper = (handler) => {
|
|
81164
|
-
return !handler ? void 0 : (ctx, handlers2) => {
|
|
81165
|
-
if (ctx.artifact.kind !== kind) {
|
|
81166
|
-
return handlers2.resolve(ctx);
|
|
81167
|
-
}
|
|
81168
|
-
return handler(ctx, handlers2);
|
|
81169
|
-
};
|
|
81170
|
-
};
|
|
81171
|
-
return {
|
|
81172
|
-
start: enterWrapper(sourceHandlers.start),
|
|
81173
|
-
network: enterWrapper(sourceHandlers.network),
|
|
81174
|
-
afterNetwork: exitWrapper(sourceHandlers.afterNetwork),
|
|
81175
|
-
end: exitWrapper(sourceHandlers.end),
|
|
81176
|
-
catch: sourceHandlers.catch ? (ctx, handlers2) => sourceHandlers.catch(ctx, handlers2) : void 0,
|
|
81177
|
-
cleanup: (...args) => sourceHandlers.cleanup?.(...args)
|
|
81178
|
-
};
|
|
81179
|
-
};
|
|
81180
|
-
};
|
|
81181
|
-
var query = documentPlugin(ArtifactKind.Query, function() {
|
|
81182
|
-
let subscriptionSpec = null;
|
|
81183
|
-
let lastVariables = null;
|
|
81184
|
-
return {
|
|
81185
|
-
start(ctx, { next }) {
|
|
81186
|
-
const runtimeScalarPayload = {
|
|
81187
|
-
session: ctx.session
|
|
81188
|
-
};
|
|
81189
|
-
ctx.variables = {
|
|
81190
|
-
...lastVariables,
|
|
81191
|
-
...Object.fromEntries(
|
|
81192
|
-
Object.entries(ctx.artifact.input?.runtimeScalars ?? {}).map(
|
|
81193
|
-
([field, type]) => {
|
|
81194
|
-
const runtimeScalar = ctx.config.features?.runtimeScalars?.[type];
|
|
81195
|
-
if (!runtimeScalar) {
|
|
81196
|
-
return [field, type];
|
|
81197
|
-
}
|
|
81198
|
-
return [field, runtimeScalar.resolve(runtimeScalarPayload)];
|
|
81199
|
-
}
|
|
81200
|
-
)
|
|
81201
|
-
),
|
|
81202
|
-
...ctx.variables
|
|
81203
|
-
};
|
|
81204
|
-
next(ctx);
|
|
81205
|
-
},
|
|
81206
|
-
end(ctx, { resolve: resolve22, marshalVariables: marshalVariables2, variablesChanged: variablesChanged2 }) {
|
|
81207
|
-
if (variablesChanged2(ctx) && !ctx.cacheParams?.disableSubscriptions) {
|
|
81208
|
-
if (subscriptionSpec) {
|
|
81209
|
-
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
81210
|
-
}
|
|
81211
|
-
lastVariables = { ...marshalVariables2(ctx) };
|
|
81212
|
-
const variables = lastVariables;
|
|
81213
|
-
subscriptionSpec = {
|
|
81214
|
-
rootType: ctx.artifact.rootType,
|
|
81215
|
-
selection: ctx.artifact.selection,
|
|
81216
|
-
variables: () => variables,
|
|
81217
|
-
set: (newValue) => {
|
|
81218
|
-
resolve22(ctx, {
|
|
81219
|
-
data: newValue,
|
|
81220
|
-
errors: null,
|
|
81221
|
-
fetching: false,
|
|
81222
|
-
partial: false,
|
|
81223
|
-
stale: false,
|
|
81224
|
-
source: DataSource.Cache,
|
|
81225
|
-
variables: ctx.variables ?? {}
|
|
81226
|
-
});
|
|
81227
|
-
}
|
|
81228
|
-
};
|
|
81229
|
-
cache_default.subscribe(subscriptionSpec, lastVariables);
|
|
81230
|
-
}
|
|
81231
|
-
resolve22(ctx);
|
|
81232
|
-
},
|
|
81233
|
-
cleanup() {
|
|
81234
|
-
if (subscriptionSpec) {
|
|
81235
|
-
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
|
|
81236
|
-
lastVariables = null;
|
|
81237
|
-
}
|
|
81238
|
-
}
|
|
81239
|
-
};
|
|
81240
|
-
});
|
|
81241
|
-
var fragment = documentPlugin(ArtifactKind.Fragment, function() {
|
|
81242
|
-
let subscriptionSpec = null;
|
|
81243
|
-
let lastReference = null;
|
|
81244
|
-
return {
|
|
81245
|
-
start(ctx, { next, resolve: resolve22, variablesChanged: variablesChanged2, marshalVariables: marshalVariables2 }) {
|
|
81246
|
-
if (!ctx.stuff.parentID) {
|
|
81247
|
-
return next(ctx);
|
|
81248
|
-
}
|
|
81249
|
-
const currentReference = {
|
|
81250
|
-
parent: ctx.stuff.parentID,
|
|
81251
|
-
variables: marshalVariables2(ctx)
|
|
81252
|
-
};
|
|
81253
|
-
if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged2(ctx))) {
|
|
81254
|
-
if (subscriptionSpec) {
|
|
81255
|
-
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
81256
|
-
}
|
|
81257
|
-
const variables = marshalVariables2(ctx);
|
|
81258
|
-
subscriptionSpec = {
|
|
81259
|
-
rootType: ctx.artifact.rootType,
|
|
81260
|
-
selection: ctx.artifact.selection,
|
|
81261
|
-
variables: () => variables,
|
|
81262
|
-
parentID: ctx.stuff.parentID,
|
|
81263
|
-
set: (newValue) => {
|
|
81264
|
-
resolve22(ctx, {
|
|
81265
|
-
data: newValue,
|
|
81266
|
-
errors: null,
|
|
81267
|
-
fetching: false,
|
|
81268
|
-
partial: false,
|
|
81269
|
-
stale: false,
|
|
81270
|
-
source: DataSource.Cache,
|
|
81271
|
-
variables
|
|
81272
|
-
});
|
|
81273
|
-
}
|
|
81274
|
-
};
|
|
81275
|
-
cache_default.subscribe(subscriptionSpec, variables);
|
|
81276
|
-
lastReference = currentReference;
|
|
81277
|
-
}
|
|
81278
|
-
next(ctx);
|
|
81279
|
-
},
|
|
81280
|
-
cleanup() {
|
|
81281
|
-
if (subscriptionSpec) {
|
|
81282
|
-
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
|
|
81283
|
-
}
|
|
81284
|
-
}
|
|
81285
|
-
};
|
|
81286
|
-
});
|
|
81287
|
-
var mutation = documentPlugin(ArtifactKind.Mutation, () => {
|
|
81288
|
-
return {
|
|
81289
|
-
async start(ctx, { next, marshalVariables: marshalVariables2 }) {
|
|
81290
|
-
const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
|
|
81291
|
-
const optimisticResponse = ctx.stuff.optimisticResponse;
|
|
81292
|
-
let toNotify = [];
|
|
81293
|
-
if (optimisticResponse) {
|
|
81294
|
-
toNotify = cache_default.write({
|
|
81295
|
-
selection: ctx.artifact.selection,
|
|
81296
|
-
data: await marshalSelection({
|
|
81297
|
-
selection: ctx.artifact.selection,
|
|
81298
|
-
data: optimisticResponse
|
|
81299
|
-
}),
|
|
81300
|
-
variables: marshalVariables2(ctx),
|
|
81301
|
-
layer: layerOptimistic.id
|
|
81302
|
-
});
|
|
81303
|
-
}
|
|
81304
|
-
ctx.cacheParams = {
|
|
81305
|
-
...ctx.cacheParams,
|
|
81306
|
-
layer: layerOptimistic,
|
|
81307
|
-
notifySubscribers: toNotify,
|
|
81308
|
-
forceNotify: true
|
|
81309
|
-
};
|
|
81310
|
-
next(ctx);
|
|
81311
|
-
},
|
|
81312
|
-
afterNetwork(ctx, { resolve: resolve22 }) {
|
|
81313
|
-
if (ctx.cacheParams?.layer) {
|
|
81314
|
-
cache_default.clearLayer(ctx.cacheParams.layer.id);
|
|
81315
|
-
}
|
|
81316
|
-
resolve22(ctx);
|
|
81317
|
-
},
|
|
81318
|
-
end(ctx, { resolve: resolve22, value: value2 }) {
|
|
81319
|
-
const hasErrors = value2.errors && value2.errors.length > 0;
|
|
81320
|
-
if (hasErrors) {
|
|
81321
|
-
if (ctx.cacheParams?.layer) {
|
|
81322
|
-
cache_default.clearLayer(ctx.cacheParams.layer.id);
|
|
81323
|
-
}
|
|
81324
|
-
}
|
|
81325
|
-
if (ctx.cacheParams?.layer) {
|
|
81326
|
-
cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
|
|
81327
|
-
}
|
|
81328
|
-
resolve22(ctx);
|
|
81329
|
-
},
|
|
81330
|
-
catch(ctx, { error: error2 }) {
|
|
81331
|
-
if (ctx.cacheParams?.layer) {
|
|
81332
|
-
const { layer } = ctx.cacheParams;
|
|
81333
|
-
cache_default.clearLayer(layer.id);
|
|
81334
|
-
cache_default._internal_unstable.storage.resolveLayer(layer.id);
|
|
81335
|
-
}
|
|
81336
|
-
throw error2;
|
|
81337
|
-
}
|
|
81338
|
-
};
|
|
81339
|
-
});
|
|
81340
81109
|
var LogLevel = {
|
|
81341
81110
|
Full: "full",
|
|
81342
81111
|
Summary: "summary",
|
|
@@ -81401,7 +81170,7 @@ var Config = class {
|
|
|
81401
81170
|
defaultListTarget = null,
|
|
81402
81171
|
defaultPaginateMode = PaginateMode.Infinite,
|
|
81403
81172
|
defaultKeys,
|
|
81404
|
-
types:
|
|
81173
|
+
types: types52 = {},
|
|
81405
81174
|
logLevel,
|
|
81406
81175
|
defaultFragmentMasking = "enable",
|
|
81407
81176
|
watchSchema,
|
|
@@ -81449,10 +81218,10 @@ var Config = class {
|
|
|
81449
81218
|
if (defaultKeys) {
|
|
81450
81219
|
this.defaultKeys = defaultKeys;
|
|
81451
81220
|
}
|
|
81452
|
-
if (
|
|
81221
|
+
if (types52) {
|
|
81453
81222
|
this.typeConfig = {
|
|
81454
81223
|
...this.typeConfig,
|
|
81455
|
-
...
|
|
81224
|
+
...types52
|
|
81456
81225
|
};
|
|
81457
81226
|
}
|
|
81458
81227
|
}
|
|
@@ -81885,11 +81654,11 @@ var Config = class {
|
|
|
81885
81654
|
registerFragmentVariablesHash({
|
|
81886
81655
|
hash,
|
|
81887
81656
|
args,
|
|
81888
|
-
fragment:
|
|
81657
|
+
fragment: fragment2
|
|
81889
81658
|
}) {
|
|
81890
81659
|
this.#fragmentVariableMaps[hash] = {
|
|
81891
81660
|
args: this.serializeValueMap(args),
|
|
81892
|
-
fragment:
|
|
81661
|
+
fragment: fragment2
|
|
81893
81662
|
};
|
|
81894
81663
|
}
|
|
81895
81664
|
getFragmentVariablesHash(hash) {
|
|
@@ -82242,7 +82011,7 @@ function formatErrors(e22, afterError) {
|
|
|
82242
82011
|
afterError?.(e22);
|
|
82243
82012
|
}
|
|
82244
82013
|
}
|
|
82245
|
-
function unwrapType(config2, type, wrappers = []) {
|
|
82014
|
+
function unwrapType(config2, type, wrappers = [], convertRuntimeScalars) {
|
|
82246
82015
|
if (type.kind === "NonNullType") {
|
|
82247
82016
|
return unwrapType(config2, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
82248
82017
|
}
|
|
@@ -82258,6 +82027,11 @@ function unwrapType(config2, type, wrappers = []) {
|
|
|
82258
82027
|
if (type instanceof graphql3.GraphQLList) {
|
|
82259
82028
|
return unwrapType(config2, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
82260
82029
|
}
|
|
82030
|
+
if (convertRuntimeScalars && config2.configFile.features?.runtimeScalars?.[type.name.value]) {
|
|
82031
|
+
type = config2.schema.getType(
|
|
82032
|
+
config2.configFile.features?.runtimeScalars?.[type.name.value].type
|
|
82033
|
+
);
|
|
82034
|
+
}
|
|
82261
82035
|
const namedType = config2.schema.getType(type.name.value || type.name);
|
|
82262
82036
|
if (!namedType) {
|
|
82263
82037
|
throw new Error("Unknown type: " + type.name.value || type.name);
|
|
@@ -82307,6 +82081,8 @@ async function printJS(script, options) {
|
|
|
82307
82081
|
}
|
|
82308
82082
|
var recast = __toESM2(require_main2(), 1);
|
|
82309
82083
|
var AST = recast.types.builders;
|
|
82084
|
+
var recast2 = __toESM2(require_main2(), 1);
|
|
82085
|
+
var AST2 = recast2.types.builders;
|
|
82310
82086
|
var WalkerBase = class {
|
|
82311
82087
|
constructor() {
|
|
82312
82088
|
this.should_skip = false;
|
|
@@ -82467,7 +82243,7 @@ async function find_graphql(config2, parsedScript, walker) {
|
|
|
82467
82243
|
} else if (!documentString) {
|
|
82468
82244
|
return;
|
|
82469
82245
|
}
|
|
82470
|
-
const parsedTag =
|
|
82246
|
+
const parsedTag = graphql5.parse(documentString);
|
|
82471
82247
|
if (walker.where && !walker.where(parsedTag, { node: node2, parent: parent2 })) {
|
|
82472
82248
|
return;
|
|
82473
82249
|
}
|
|
@@ -82599,7 +82375,7 @@ function extractAnonymousQuery(config2, raw, expr, propName) {
|
|
|
82599
82375
|
};
|
|
82600
82376
|
return defs.concat([
|
|
82601
82377
|
{
|
|
82602
|
-
raw:
|
|
82378
|
+
raw: graphql5.print(parsed),
|
|
82603
82379
|
parsed
|
|
82604
82380
|
}
|
|
82605
82381
|
]);
|
|
@@ -95267,8 +95043,8 @@ function read_tag_name(parser) {
|
|
|
95267
95043
|
let i3 = parser.stack.length;
|
|
95268
95044
|
let legal = false;
|
|
95269
95045
|
while (i3--) {
|
|
95270
|
-
const
|
|
95271
|
-
if (
|
|
95046
|
+
const fragment2 = parser.stack[i3];
|
|
95047
|
+
if (fragment2.type === "IfBlock" || fragment2.type === "EachBlock" || fragment2.type === "InlineComponent") {
|
|
95272
95048
|
legal = true;
|
|
95273
95049
|
break;
|
|
95274
95050
|
}
|
|
@@ -95975,7 +95751,7 @@ function text(parser) {
|
|
|
95975
95751
|
};
|
|
95976
95752
|
parser.current().children.push(node2);
|
|
95977
95753
|
}
|
|
95978
|
-
function
|
|
95754
|
+
function fragment(parser) {
|
|
95979
95755
|
if (parser.match("<")) {
|
|
95980
95756
|
return tag;
|
|
95981
95757
|
}
|
|
@@ -96137,9 +95913,9 @@ var Parser$1 = class {
|
|
|
96137
95913
|
children: []
|
|
96138
95914
|
};
|
|
96139
95915
|
this.stack.push(this.html);
|
|
96140
|
-
let state =
|
|
95916
|
+
let state = fragment;
|
|
96141
95917
|
while (this.index < this.template.length) {
|
|
96142
|
-
state = state(this) ||
|
|
95918
|
+
state = state(this) || fragment;
|
|
96143
95919
|
}
|
|
96144
95920
|
if (this.stack.length > 1) {
|
|
96145
95921
|
const current2 = this.current();
|
|
@@ -96150,7 +95926,7 @@ var Parser$1 = class {
|
|
|
96150
95926
|
message: `${type} was left open`
|
|
96151
95927
|
}, current2.start);
|
|
96152
95928
|
}
|
|
96153
|
-
if (state !==
|
|
95929
|
+
if (state !== fragment) {
|
|
96154
95930
|
this.error({
|
|
96155
95931
|
code: "unexpected-eof",
|
|
96156
95932
|
message: "Unexpected end of input"
|
|
@@ -110471,7 +110247,7 @@ var yellow3 = (str) => {
|
|
|
110471
110247
|
// ../houdini/build/vite-esm/index.js
|
|
110472
110248
|
var import_module2 = require("module");
|
|
110473
110249
|
var import_node_fs2 = require("node:fs");
|
|
110474
|
-
var
|
|
110250
|
+
var graphql32 = __toESM(require("graphql"), 1);
|
|
110475
110251
|
var import_graphql31 = require("graphql");
|
|
110476
110252
|
var import_graphql32 = require("graphql");
|
|
110477
110253
|
var import_graphql33 = require("graphql");
|
|
@@ -110508,7 +110284,7 @@ var import_promises2 = __toESM(require("node:fs/promises"), 1);
|
|
|
110508
110284
|
var import_node_util5 = require("node:util");
|
|
110509
110285
|
var import_node_os2 = __toESM(require("node:os"), 1);
|
|
110510
110286
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
110511
|
-
var
|
|
110287
|
+
var graphql7 = __toESM(require("graphql"), 1);
|
|
110512
110288
|
var import_node_stream3 = __toESM(require("node:stream"), 1);
|
|
110513
110289
|
var import_node_util6 = require("node:util");
|
|
110514
110290
|
var import_node_buffer3 = require("node:buffer");
|
|
@@ -110516,29 +110292,28 @@ var import_node_util7 = require("node:util");
|
|
|
110516
110292
|
var import_node_http3 = __toESM(require("node:http"), 1);
|
|
110517
110293
|
var import_node_url4 = require("node:url");
|
|
110518
110294
|
var import_node_util8 = require("node:util");
|
|
110519
|
-
var
|
|
110295
|
+
var graphql33 = __toESM(require("graphql"), 1);
|
|
110520
110296
|
var graphql42 = __toESM(require("graphql"), 1);
|
|
110521
110297
|
var graphql52 = __toESM(require("graphql"), 1);
|
|
110522
|
-
var graphql16 = __toESM(require("graphql"), 1);
|
|
110523
|
-
var graphql7 = __toESM(require("graphql"), 1);
|
|
110524
110298
|
var graphql62 = __toESM(require("graphql"), 1);
|
|
110525
|
-
var
|
|
110299
|
+
var graphql17 = __toESM(require("graphql"), 1);
|
|
110526
110300
|
var graphql8 = __toESM(require("graphql"), 1);
|
|
110527
|
-
var
|
|
110301
|
+
var graphql72 = __toESM(require("graphql"), 1);
|
|
110302
|
+
var import_graphql61 = require("graphql");
|
|
110528
110303
|
var graphql9 = __toESM(require("graphql"), 1);
|
|
110529
|
-
var graphql15 = __toESM(require("graphql"), 1);
|
|
110530
|
-
var graphql13 = __toESM(require("graphql"), 1);
|
|
110531
110304
|
var graphql11 = __toESM(require("graphql"), 1);
|
|
110532
|
-
var
|
|
110305
|
+
var graphql10 = __toESM(require("graphql"), 1);
|
|
110306
|
+
var graphql16 = __toESM(require("graphql"), 1);
|
|
110533
110307
|
var graphql14 = __toESM(require("graphql"), 1);
|
|
110534
|
-
var
|
|
110308
|
+
var graphql12 = __toESM(require("graphql"), 1);
|
|
110309
|
+
var graphql13 = __toESM(require("graphql"), 1);
|
|
110310
|
+
var graphql15 = __toESM(require("graphql"), 1);
|
|
110535
110311
|
var graphql18 = __toESM(require("graphql"), 1);
|
|
110536
|
-
var
|
|
110312
|
+
var graphql19 = __toESM(require("graphql"), 1);
|
|
110537
110313
|
var graphql20 = __toESM(require("graphql"), 1);
|
|
110538
110314
|
var graphql21 = __toESM(require("graphql"), 1);
|
|
110539
|
-
var graphql222 = __toESM(require("graphql"), 1);
|
|
110540
|
-
var graphql24 = __toESM(require("graphql"), 1);
|
|
110541
110315
|
var graphql23 = __toESM(require("graphql"), 1);
|
|
110316
|
+
var graphql222 = __toESM(require("graphql"), 1);
|
|
110542
110317
|
var import_graphql62 = require("graphql");
|
|
110543
110318
|
var import_graphql63 = require("graphql");
|
|
110544
110319
|
var import_graphql64 = require("graphql");
|
|
@@ -110558,6 +110333,7 @@ var import_graphql77 = require("graphql");
|
|
|
110558
110333
|
var import_graphql78 = require("graphql");
|
|
110559
110334
|
var import_graphql79 = require("graphql");
|
|
110560
110335
|
var import_graphql80 = require("graphql");
|
|
110336
|
+
var graphql24 = __toESM(require("graphql"), 1);
|
|
110561
110337
|
var graphql25 = __toESM(require("graphql"), 1);
|
|
110562
110338
|
var graphql26 = __toESM(require("graphql"), 1);
|
|
110563
110339
|
var graphql27 = __toESM(require("graphql"), 1);
|
|
@@ -110565,7 +110341,6 @@ var graphql28 = __toESM(require("graphql"), 1);
|
|
|
110565
110341
|
var graphql29 = __toESM(require("graphql"), 1);
|
|
110566
110342
|
var graphql30 = __toESM(require("graphql"), 1);
|
|
110567
110343
|
var graphql31 = __toESM(require("graphql"), 1);
|
|
110568
|
-
var graphql322 = __toESM(require("graphql"), 1);
|
|
110569
110344
|
var import_meta2 = {};
|
|
110570
110345
|
var require3 = (0, import_module2.createRequire)(import_meta2.url);
|
|
110571
110346
|
var __create3 = Object.create;
|
|
@@ -171652,45 +171427,6 @@ function deepMerge3(...objects) {
|
|
|
171652
171427
|
}
|
|
171653
171428
|
return mergedObj;
|
|
171654
171429
|
}
|
|
171655
|
-
async function marshalSelection2({
|
|
171656
|
-
selection,
|
|
171657
|
-
data: data2
|
|
171658
|
-
}) {
|
|
171659
|
-
const config2 = getCurrentConfig2();
|
|
171660
|
-
if (data2 === null || typeof data2 === "undefined") {
|
|
171661
|
-
return data2;
|
|
171662
|
-
}
|
|
171663
|
-
if (Array.isArray(data2)) {
|
|
171664
|
-
return await Promise.all(data2.map((val) => marshalSelection2({ selection, data: val })));
|
|
171665
|
-
}
|
|
171666
|
-
const targetSelection = getFieldsForType2(selection, data2["__typename"], false);
|
|
171667
|
-
return Object.fromEntries(
|
|
171668
|
-
await Promise.all(
|
|
171669
|
-
Object.entries(data2).map(async ([fieldName, value2]) => {
|
|
171670
|
-
const { type, selection: selection2 } = targetSelection[fieldName];
|
|
171671
|
-
if (!type) {
|
|
171672
|
-
return [fieldName, value2];
|
|
171673
|
-
}
|
|
171674
|
-
if (selection2) {
|
|
171675
|
-
return [fieldName, await marshalSelection2({ selection: selection2, data: value2 })];
|
|
171676
|
-
}
|
|
171677
|
-
if (config2.scalars?.[type]) {
|
|
171678
|
-
const marshalFn = config2.scalars[type].marshal;
|
|
171679
|
-
if (!marshalFn) {
|
|
171680
|
-
throw new Error(
|
|
171681
|
-
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
171682
|
-
);
|
|
171683
|
-
}
|
|
171684
|
-
if (Array.isArray(value2)) {
|
|
171685
|
-
return [fieldName, value2.map(marshalFn)];
|
|
171686
|
-
}
|
|
171687
|
-
return [fieldName, marshalFn(value2)];
|
|
171688
|
-
}
|
|
171689
|
-
return [fieldName, value2];
|
|
171690
|
-
})
|
|
171691
|
-
)
|
|
171692
|
-
);
|
|
171693
|
-
}
|
|
171694
171430
|
var ArtifactKind2 = {
|
|
171695
171431
|
Query: "HoudiniQuery",
|
|
171696
171432
|
Subscription: "HoudiniSubscription",
|
|
@@ -171701,11 +171437,6 @@ var CompiledFragmentKind2 = ArtifactKind2.Fragment;
|
|
|
171701
171437
|
var CompiledMutationKind2 = ArtifactKind2.Mutation;
|
|
171702
171438
|
var CompiledQueryKind2 = ArtifactKind2.Query;
|
|
171703
171439
|
var CompiledSubscriptionKind2 = ArtifactKind2.Subscription;
|
|
171704
|
-
var DataSource2 = {
|
|
171705
|
-
Cache: "cache",
|
|
171706
|
-
Network: "network",
|
|
171707
|
-
Ssr: "ssr"
|
|
171708
|
-
};
|
|
171709
171440
|
var fragmentKey2 = " $fragments";
|
|
171710
171441
|
var PendingValue2 = Symbol("houdini_loading");
|
|
171711
171442
|
var computeKey2 = ({ field, args }) => {
|
|
@@ -174781,194 +174512,6 @@ function defaultComponentField2({
|
|
|
174781
174512
|
}
|
|
174782
174513
|
var cache_default2 = new Cache2();
|
|
174783
174514
|
var serverSide2 = typeof globalThis.window === "undefined";
|
|
174784
|
-
var documentPlugin2 = (kind, source) => {
|
|
174785
|
-
return () => {
|
|
174786
|
-
const sourceHandlers = source();
|
|
174787
|
-
const enterWrapper = (handler) => {
|
|
174788
|
-
return !handler ? void 0 : (ctx, handlers2) => {
|
|
174789
|
-
if (ctx.artifact.kind !== kind) {
|
|
174790
|
-
return handlers2.next(ctx);
|
|
174791
|
-
}
|
|
174792
|
-
return handler(ctx, handlers2);
|
|
174793
|
-
};
|
|
174794
|
-
};
|
|
174795
|
-
const exitWrapper = (handler) => {
|
|
174796
|
-
return !handler ? void 0 : (ctx, handlers2) => {
|
|
174797
|
-
if (ctx.artifact.kind !== kind) {
|
|
174798
|
-
return handlers2.resolve(ctx);
|
|
174799
|
-
}
|
|
174800
|
-
return handler(ctx, handlers2);
|
|
174801
|
-
};
|
|
174802
|
-
};
|
|
174803
|
-
return {
|
|
174804
|
-
start: enterWrapper(sourceHandlers.start),
|
|
174805
|
-
network: enterWrapper(sourceHandlers.network),
|
|
174806
|
-
afterNetwork: exitWrapper(sourceHandlers.afterNetwork),
|
|
174807
|
-
end: exitWrapper(sourceHandlers.end),
|
|
174808
|
-
catch: sourceHandlers.catch ? (ctx, handlers2) => sourceHandlers.catch(ctx, handlers2) : void 0,
|
|
174809
|
-
cleanup: (...args) => sourceHandlers.cleanup?.(...args)
|
|
174810
|
-
};
|
|
174811
|
-
};
|
|
174812
|
-
};
|
|
174813
|
-
var query2 = documentPlugin2(ArtifactKind2.Query, function() {
|
|
174814
|
-
let subscriptionSpec = null;
|
|
174815
|
-
let lastVariables = null;
|
|
174816
|
-
return {
|
|
174817
|
-
start(ctx, { next }) {
|
|
174818
|
-
const runtimeScalarPayload = {
|
|
174819
|
-
session: ctx.session
|
|
174820
|
-
};
|
|
174821
|
-
ctx.variables = {
|
|
174822
|
-
...lastVariables,
|
|
174823
|
-
...Object.fromEntries(
|
|
174824
|
-
Object.entries(ctx.artifact.input?.runtimeScalars ?? {}).map(
|
|
174825
|
-
([field, type]) => {
|
|
174826
|
-
const runtimeScalar = ctx.config.features?.runtimeScalars?.[type];
|
|
174827
|
-
if (!runtimeScalar) {
|
|
174828
|
-
return [field, type];
|
|
174829
|
-
}
|
|
174830
|
-
return [field, runtimeScalar.resolve(runtimeScalarPayload)];
|
|
174831
|
-
}
|
|
174832
|
-
)
|
|
174833
|
-
),
|
|
174834
|
-
...ctx.variables
|
|
174835
|
-
};
|
|
174836
|
-
next(ctx);
|
|
174837
|
-
},
|
|
174838
|
-
end(ctx, { resolve: resolve22, marshalVariables, variablesChanged }) {
|
|
174839
|
-
if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
|
|
174840
|
-
if (subscriptionSpec) {
|
|
174841
|
-
cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
174842
|
-
}
|
|
174843
|
-
lastVariables = { ...marshalVariables(ctx) };
|
|
174844
|
-
const variables = lastVariables;
|
|
174845
|
-
subscriptionSpec = {
|
|
174846
|
-
rootType: ctx.artifact.rootType,
|
|
174847
|
-
selection: ctx.artifact.selection,
|
|
174848
|
-
variables: () => variables,
|
|
174849
|
-
set: (newValue) => {
|
|
174850
|
-
resolve22(ctx, {
|
|
174851
|
-
data: newValue,
|
|
174852
|
-
errors: null,
|
|
174853
|
-
fetching: false,
|
|
174854
|
-
partial: false,
|
|
174855
|
-
stale: false,
|
|
174856
|
-
source: DataSource2.Cache,
|
|
174857
|
-
variables: ctx.variables ?? {}
|
|
174858
|
-
});
|
|
174859
|
-
}
|
|
174860
|
-
};
|
|
174861
|
-
cache_default2.subscribe(subscriptionSpec, lastVariables);
|
|
174862
|
-
}
|
|
174863
|
-
resolve22(ctx);
|
|
174864
|
-
},
|
|
174865
|
-
cleanup() {
|
|
174866
|
-
if (subscriptionSpec) {
|
|
174867
|
-
cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
|
|
174868
|
-
lastVariables = null;
|
|
174869
|
-
}
|
|
174870
|
-
}
|
|
174871
|
-
};
|
|
174872
|
-
});
|
|
174873
|
-
var fragment3 = documentPlugin2(ArtifactKind2.Fragment, function() {
|
|
174874
|
-
let subscriptionSpec = null;
|
|
174875
|
-
let lastReference = null;
|
|
174876
|
-
return {
|
|
174877
|
-
start(ctx, { next, resolve: resolve22, variablesChanged, marshalVariables }) {
|
|
174878
|
-
if (!ctx.stuff.parentID) {
|
|
174879
|
-
return next(ctx);
|
|
174880
|
-
}
|
|
174881
|
-
const currentReference = {
|
|
174882
|
-
parent: ctx.stuff.parentID,
|
|
174883
|
-
variables: marshalVariables(ctx)
|
|
174884
|
-
};
|
|
174885
|
-
if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals2(lastReference, currentReference) || variablesChanged(ctx))) {
|
|
174886
|
-
if (subscriptionSpec) {
|
|
174887
|
-
cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
174888
|
-
}
|
|
174889
|
-
const variables = marshalVariables(ctx);
|
|
174890
|
-
subscriptionSpec = {
|
|
174891
|
-
rootType: ctx.artifact.rootType,
|
|
174892
|
-
selection: ctx.artifact.selection,
|
|
174893
|
-
variables: () => variables,
|
|
174894
|
-
parentID: ctx.stuff.parentID,
|
|
174895
|
-
set: (newValue) => {
|
|
174896
|
-
resolve22(ctx, {
|
|
174897
|
-
data: newValue,
|
|
174898
|
-
errors: null,
|
|
174899
|
-
fetching: false,
|
|
174900
|
-
partial: false,
|
|
174901
|
-
stale: false,
|
|
174902
|
-
source: DataSource2.Cache,
|
|
174903
|
-
variables
|
|
174904
|
-
});
|
|
174905
|
-
}
|
|
174906
|
-
};
|
|
174907
|
-
cache_default2.subscribe(subscriptionSpec, variables);
|
|
174908
|
-
lastReference = currentReference;
|
|
174909
|
-
}
|
|
174910
|
-
next(ctx);
|
|
174911
|
-
},
|
|
174912
|
-
cleanup() {
|
|
174913
|
-
if (subscriptionSpec) {
|
|
174914
|
-
cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
|
|
174915
|
-
}
|
|
174916
|
-
}
|
|
174917
|
-
};
|
|
174918
|
-
});
|
|
174919
|
-
var mutation2 = documentPlugin2(ArtifactKind2.Mutation, () => {
|
|
174920
|
-
return {
|
|
174921
|
-
async start(ctx, { next, marshalVariables }) {
|
|
174922
|
-
const layerOptimistic = cache_default2._internal_unstable.storage.createLayer(true);
|
|
174923
|
-
const optimisticResponse = ctx.stuff.optimisticResponse;
|
|
174924
|
-
let toNotify = [];
|
|
174925
|
-
if (optimisticResponse) {
|
|
174926
|
-
toNotify = cache_default2.write({
|
|
174927
|
-
selection: ctx.artifact.selection,
|
|
174928
|
-
data: await marshalSelection2({
|
|
174929
|
-
selection: ctx.artifact.selection,
|
|
174930
|
-
data: optimisticResponse
|
|
174931
|
-
}),
|
|
174932
|
-
variables: marshalVariables(ctx),
|
|
174933
|
-
layer: layerOptimistic.id
|
|
174934
|
-
});
|
|
174935
|
-
}
|
|
174936
|
-
ctx.cacheParams = {
|
|
174937
|
-
...ctx.cacheParams,
|
|
174938
|
-
layer: layerOptimistic,
|
|
174939
|
-
notifySubscribers: toNotify,
|
|
174940
|
-
forceNotify: true
|
|
174941
|
-
};
|
|
174942
|
-
next(ctx);
|
|
174943
|
-
},
|
|
174944
|
-
afterNetwork(ctx, { resolve: resolve22 }) {
|
|
174945
|
-
if (ctx.cacheParams?.layer) {
|
|
174946
|
-
cache_default2.clearLayer(ctx.cacheParams.layer.id);
|
|
174947
|
-
}
|
|
174948
|
-
resolve22(ctx);
|
|
174949
|
-
},
|
|
174950
|
-
end(ctx, { resolve: resolve22, value: value2 }) {
|
|
174951
|
-
const hasErrors = value2.errors && value2.errors.length > 0;
|
|
174952
|
-
if (hasErrors) {
|
|
174953
|
-
if (ctx.cacheParams?.layer) {
|
|
174954
|
-
cache_default2.clearLayer(ctx.cacheParams.layer.id);
|
|
174955
|
-
}
|
|
174956
|
-
}
|
|
174957
|
-
if (ctx.cacheParams?.layer) {
|
|
174958
|
-
cache_default2._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
|
|
174959
|
-
}
|
|
174960
|
-
resolve22(ctx);
|
|
174961
|
-
},
|
|
174962
|
-
catch(ctx, { error: error2 }) {
|
|
174963
|
-
if (ctx.cacheParams?.layer) {
|
|
174964
|
-
const { layer } = ctx.cacheParams;
|
|
174965
|
-
cache_default2.clearLayer(layer.id);
|
|
174966
|
-
cache_default2._internal_unstable.storage.resolveLayer(layer.id);
|
|
174967
|
-
}
|
|
174968
|
-
throw error2;
|
|
174969
|
-
}
|
|
174970
|
-
};
|
|
174971
|
-
});
|
|
174972
174515
|
var currentDir2 = dirname2((0, import_node_url3.fileURLToPath)(import_meta2.url));
|
|
174973
174516
|
var DEFAULT_CONFIG_PATH2 = join22(process.cwd(), "houdini.config.js");
|
|
174974
174517
|
var emptySchema2 = graphql22.buildSchema("type Query { hello: String }");
|
|
@@ -174976,8 +174519,10 @@ var defaultDirectives2 = emptySchema2.getDirectives().map((dir) => dir.name);
|
|
|
174976
174519
|
var import_parser2 = __toESM3(require_lib32(), 1);
|
|
174977
174520
|
var import_recast2 = __toESM3(require_main22(), 1);
|
|
174978
174521
|
var import_deepmerge2 = __toESM3(require_cjs2(), 1);
|
|
174979
|
-
var
|
|
174980
|
-
var
|
|
174522
|
+
var recast3 = __toESM3(require_main22(), 1);
|
|
174523
|
+
var AST3 = recast3.types.builders;
|
|
174524
|
+
var recast22 = __toESM3(require_main22(), 1);
|
|
174525
|
+
var AST22 = recast22.types.builders;
|
|
174981
174526
|
var conventions_exports2 = {};
|
|
174982
174527
|
__export3(conventions_exports2, {
|
|
174983
174528
|
adapter_config_path: () => adapter_config_path2,
|
|
@@ -175103,43 +174648,43 @@ function serialized_manifest_path2(config2, base = base_dir2(config2)) {
|
|
|
175103
174648
|
return path_exports2.join(base, "manifest.json");
|
|
175104
174649
|
}
|
|
175105
174650
|
var t22 = __toESM3(require_lib62(), 1);
|
|
175106
|
-
var
|
|
175107
|
-
var
|
|
175108
|
-
var
|
|
174651
|
+
var recast5 = __toESM3(require_main22(), 1);
|
|
174652
|
+
var recast32 = __toESM3(require_main22(), 1);
|
|
174653
|
+
var AST32 = recast32.types.builders;
|
|
175109
174654
|
var { toString: toString2 } = {};
|
|
175110
174655
|
var { keys: keys2 } = Object;
|
|
175111
|
-
var
|
|
175112
|
-
var
|
|
174656
|
+
var recast4 = __toESM3(require_main22(), 1);
|
|
174657
|
+
var AST4 = recast4.types.builders;
|
|
175113
174658
|
var pageInfoSelection = [
|
|
175114
174659
|
{
|
|
175115
|
-
kind:
|
|
174660
|
+
kind: graphql13.Kind.FIELD,
|
|
175116
174661
|
name: {
|
|
175117
|
-
kind:
|
|
174662
|
+
kind: graphql13.Kind.NAME,
|
|
175118
174663
|
value: "edges"
|
|
175119
174664
|
},
|
|
175120
174665
|
selectionSet: {
|
|
175121
|
-
kind:
|
|
174666
|
+
kind: graphql13.Kind.SELECTION_SET,
|
|
175122
174667
|
selections: [
|
|
175123
174668
|
{
|
|
175124
|
-
kind:
|
|
174669
|
+
kind: graphql13.Kind.FIELD,
|
|
175125
174670
|
name: {
|
|
175126
|
-
kind:
|
|
174671
|
+
kind: graphql13.Kind.NAME,
|
|
175127
174672
|
value: "cursor"
|
|
175128
174673
|
}
|
|
175129
174674
|
},
|
|
175130
174675
|
{
|
|
175131
|
-
kind:
|
|
174676
|
+
kind: graphql13.Kind.FIELD,
|
|
175132
174677
|
name: {
|
|
175133
|
-
kind:
|
|
174678
|
+
kind: graphql13.Kind.NAME,
|
|
175134
174679
|
value: "node"
|
|
175135
174680
|
},
|
|
175136
174681
|
selectionSet: {
|
|
175137
|
-
kind:
|
|
174682
|
+
kind: graphql13.Kind.SELECTION_SET,
|
|
175138
174683
|
selections: [
|
|
175139
174684
|
{
|
|
175140
|
-
kind:
|
|
174685
|
+
kind: graphql13.Kind.FIELD,
|
|
175141
174686
|
name: {
|
|
175142
|
-
kind:
|
|
174687
|
+
kind: graphql13.Kind.NAME,
|
|
175143
174688
|
value: "__typename"
|
|
175144
174689
|
}
|
|
175145
174690
|
}
|
|
@@ -175150,39 +174695,39 @@ var pageInfoSelection = [
|
|
|
175150
174695
|
}
|
|
175151
174696
|
},
|
|
175152
174697
|
{
|
|
175153
|
-
kind:
|
|
174698
|
+
kind: graphql13.Kind.FIELD,
|
|
175154
174699
|
name: {
|
|
175155
|
-
kind:
|
|
174700
|
+
kind: graphql13.Kind.NAME,
|
|
175156
174701
|
value: "pageInfo"
|
|
175157
174702
|
},
|
|
175158
174703
|
selectionSet: {
|
|
175159
|
-
kind:
|
|
174704
|
+
kind: graphql13.Kind.SELECTION_SET,
|
|
175160
174705
|
selections: [
|
|
175161
174706
|
{
|
|
175162
|
-
kind:
|
|
174707
|
+
kind: graphql13.Kind.FIELD,
|
|
175163
174708
|
name: {
|
|
175164
|
-
kind:
|
|
174709
|
+
kind: graphql13.Kind.NAME,
|
|
175165
174710
|
value: "hasPreviousPage"
|
|
175166
174711
|
}
|
|
175167
174712
|
},
|
|
175168
174713
|
{
|
|
175169
|
-
kind:
|
|
174714
|
+
kind: graphql13.Kind.FIELD,
|
|
175170
174715
|
name: {
|
|
175171
|
-
kind:
|
|
174716
|
+
kind: graphql13.Kind.NAME,
|
|
175172
174717
|
value: "hasNextPage"
|
|
175173
174718
|
}
|
|
175174
174719
|
},
|
|
175175
174720
|
{
|
|
175176
|
-
kind:
|
|
174721
|
+
kind: graphql13.Kind.FIELD,
|
|
175177
174722
|
name: {
|
|
175178
|
-
kind:
|
|
174723
|
+
kind: graphql13.Kind.NAME,
|
|
175179
174724
|
value: "startCursor"
|
|
175180
174725
|
}
|
|
175181
174726
|
},
|
|
175182
174727
|
{
|
|
175183
|
-
kind:
|
|
174728
|
+
kind: graphql13.Kind.FIELD,
|
|
175184
174729
|
name: {
|
|
175185
|
-
kind:
|
|
174730
|
+
kind: graphql13.Kind.NAME,
|
|
175186
174731
|
value: "endCursor"
|
|
175187
174732
|
}
|
|
175188
174733
|
}
|
|
@@ -175190,17 +174735,15 @@ var pageInfoSelection = [
|
|
|
175190
174735
|
}
|
|
175191
174736
|
}
|
|
175192
174737
|
];
|
|
175193
|
-
var AST4 = recast4.types.builders;
|
|
175194
|
-
var recast5 = __toESM3(require_main22(), 1);
|
|
175195
174738
|
var AST5 = recast5.types.builders;
|
|
175196
|
-
var recast11 = __toESM3(require_main22(), 1);
|
|
175197
|
-
var recast8 = __toESM3(require_main22(), 1);
|
|
175198
|
-
var recast7 = __toESM3(require_main22(), 1);
|
|
175199
174739
|
var recast6 = __toESM3(require_main22(), 1);
|
|
175200
174740
|
var AST6 = recast6.types.builders;
|
|
174741
|
+
var recast11 = __toESM3(require_main22(), 1);
|
|
174742
|
+
var recast7 = __toESM3(require_main22(), 1);
|
|
175201
174743
|
var AST7 = recast7.types.builders;
|
|
175202
|
-
var AST8 = recast8.types.builders;
|
|
175203
174744
|
var recast9 = __toESM3(require_main22(), 1);
|
|
174745
|
+
var recast8 = __toESM3(require_main22(), 1);
|
|
174746
|
+
var AST8 = recast8.types.builders;
|
|
175204
174747
|
var AST9 = recast9.types.builders;
|
|
175205
174748
|
var recast10 = __toESM3(require_main22(), 1);
|
|
175206
174749
|
var AST10 = recast10.types.builders;
|
|
@@ -175620,7 +175163,7 @@ async function extract_load_function(config2, filepath, mockArtifacts) {
|
|
|
175620
175163
|
return {
|
|
175621
175164
|
exports,
|
|
175622
175165
|
houdini_load: load.map(
|
|
175623
|
-
(
|
|
175166
|
+
(query) => graphql34.parse(query).definitions[0]
|
|
175624
175167
|
)
|
|
175625
175168
|
};
|
|
175626
175169
|
}
|
|
@@ -175636,14 +175179,14 @@ async function processScript(config2, filepath, program, mockArtifacts) {
|
|
|
175636
175179
|
}
|
|
175637
175180
|
for (const specifier of statement.specifiers ?? []) {
|
|
175638
175181
|
let name = specifier.local?.name || "";
|
|
175639
|
-
let
|
|
175182
|
+
let query = "";
|
|
175640
175183
|
if (name.endsWith(store_suffix(config2))) {
|
|
175641
|
-
|
|
175184
|
+
query = name.substring(0, name.length - store_suffix(config2).length);
|
|
175642
175185
|
} else if (source.startsWith("$houdini/" + stores_directory_name()) && specifier.type === "ImportDefaultSpecifier") {
|
|
175643
|
-
|
|
175186
|
+
query = source.substring(`$houdini/${stores_directory_name()}`.length - 1);
|
|
175644
175187
|
}
|
|
175645
|
-
if (
|
|
175646
|
-
const artifact = mockArtifacts?.[
|
|
175188
|
+
if (query) {
|
|
175189
|
+
const artifact = mockArtifacts?.[query] || (await import(path_exports.importPath(path_exports.join(config2.artifactDirectory, query + ".js")))).default;
|
|
175647
175190
|
globalImports[name] = artifact.raw;
|
|
175648
175191
|
}
|
|
175649
175192
|
}
|
|
@@ -175924,26 +175467,26 @@ async function QueryProcessor(config2, page2) {
|
|
|
175924
175467
|
import: ["isBrowser"],
|
|
175925
175468
|
sourceModule: "$houdini/plugins/houdini-svelte/runtime/adapter"
|
|
175926
175469
|
});
|
|
175927
|
-
for (const
|
|
175470
|
+
for (const query of queries) {
|
|
175928
175471
|
const factory = ensure_imports({
|
|
175929
175472
|
script: page2.script,
|
|
175930
175473
|
config: page2.config,
|
|
175931
|
-
import: [`${
|
|
175932
|
-
sourceModule: store_import_path({ config: config2, name:
|
|
175474
|
+
import: [`${query.name.value}Store`],
|
|
175475
|
+
sourceModule: store_import_path({ config: config2, name: query.name.value })
|
|
175933
175476
|
}).ids[0];
|
|
175934
175477
|
page2.script.body.splice(
|
|
175935
175478
|
find_insert_index(page2.script),
|
|
175936
175479
|
0,
|
|
175937
175480
|
AST15.variableDeclaration("const", [
|
|
175938
|
-
AST15.variableDeclarator(store_id(
|
|
175481
|
+
AST15.variableDeclarator(store_id(query.name.value), AST15.newExpression(factory, []))
|
|
175939
175482
|
])
|
|
175940
175483
|
);
|
|
175941
175484
|
}
|
|
175942
175485
|
page2.script.body.push(
|
|
175943
|
-
...queries.flatMap((
|
|
175944
|
-
const variable_fn = query_variable_fn(
|
|
175486
|
+
...queries.flatMap((query) => {
|
|
175487
|
+
const variable_fn = query_variable_fn(query.name.value);
|
|
175945
175488
|
const has_variables = find_exported_fn(page2.script.body, variable_fn);
|
|
175946
|
-
if (
|
|
175489
|
+
if (query.variableDefinitions && query.variableDefinitions?.length > 0 && has_variables === null) {
|
|
175947
175490
|
formatErrors({
|
|
175948
175491
|
filepath: page2.filepath,
|
|
175949
175492
|
message: `Could not find required variable function: ${yellow3(
|
|
@@ -175960,7 +175503,7 @@ async function QueryProcessor(config2, page2) {
|
|
|
175960
175503
|
AST15.identifier("isBrowser"),
|
|
175961
175504
|
AST15.callExpression(
|
|
175962
175505
|
AST15.memberExpression(
|
|
175963
|
-
store_id(
|
|
175506
|
+
store_id(query.name.value),
|
|
175964
175507
|
AST15.identifier("fetch")
|
|
175965
175508
|
),
|
|
175966
175509
|
[
|
|
@@ -175979,7 +175522,7 @@ async function QueryProcessor(config2, page2) {
|
|
|
175979
175522
|
AST15.objectProperty(
|
|
175980
175523
|
AST15.identifier("artifact"),
|
|
175981
175524
|
AST15.memberExpression(
|
|
175982
|
-
store_id(
|
|
175525
|
+
store_id(query.name.value),
|
|
175983
175526
|
AST15.identifier("artifact")
|
|
175984
175527
|
)
|
|
175985
175528
|
),
|
|
@@ -176281,14 +175824,14 @@ function add_load({
|
|
|
176281
175824
|
return;
|
|
176282
175825
|
}
|
|
176283
175826
|
let invalid = false;
|
|
176284
|
-
for (const
|
|
176285
|
-
if (!
|
|
175827
|
+
for (const query of queries) {
|
|
175828
|
+
if (!query.variableDefinitions || query.variableDefinitions.length === 0) {
|
|
176286
175829
|
continue;
|
|
176287
175830
|
}
|
|
176288
|
-
const variable_fn = query_variable_fn(
|
|
175831
|
+
const variable_fn = query_variable_fn(query.name.value);
|
|
176289
175832
|
try {
|
|
176290
175833
|
page2.script.body.push(
|
|
176291
|
-
variable_function_for_query(page2,
|
|
175834
|
+
variable_function_for_query(page2, query, page_info.exports.includes(variable_fn))
|
|
176292
175835
|
);
|
|
176293
175836
|
} catch (e3) {
|
|
176294
175837
|
formatErrors(e3);
|
|
@@ -176351,16 +175894,16 @@ function add_load({
|
|
|
176351
175894
|
preload_fn.async = true;
|
|
176352
175895
|
page2.script.body.push(AST17.exportNamedDeclaration(preload_fn));
|
|
176353
175896
|
let insert_index = 4;
|
|
176354
|
-
for (const
|
|
175897
|
+
for (const query of queries) {
|
|
176355
175898
|
const { ids } = ensure_imports({
|
|
176356
175899
|
script: page2.script,
|
|
176357
175900
|
config: page2.config,
|
|
176358
|
-
import: [`load_${
|
|
176359
|
-
sourceModule: store_import_path({ config: page2.config, name:
|
|
175901
|
+
import: [`load_${query.name.value}`],
|
|
175902
|
+
sourceModule: store_import_path({ config: page2.config, name: query.name.value })
|
|
176360
175903
|
});
|
|
176361
175904
|
const load_fn = ids[0];
|
|
176362
|
-
const variables = (
|
|
176363
|
-
AST17.callExpression(AST17.identifier(__variable_fn_name(
|
|
175905
|
+
const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST17.awaitExpression(
|
|
175906
|
+
AST17.callExpression(AST17.identifier(__variable_fn_name(query.name.value)), [
|
|
176364
175907
|
AST17.identifier("houdiniConfig"),
|
|
176365
175908
|
AST17.identifier("context")
|
|
176366
175909
|
])
|
|
@@ -176371,7 +175914,7 @@ function add_load({
|
|
|
176371
175914
|
AST17.expressionStatement(
|
|
176372
175915
|
AST17.assignmentExpression(
|
|
176373
175916
|
"=",
|
|
176374
|
-
AST17.memberExpression(input_obj, AST17.literal(
|
|
175917
|
+
AST17.memberExpression(input_obj, AST17.literal(query.name.value)),
|
|
176375
175918
|
variables
|
|
176376
175919
|
)
|
|
176377
175920
|
)
|
|
@@ -176385,7 +175928,7 @@ function add_load({
|
|
|
176385
175928
|
AST17.objectExpression([
|
|
176386
175929
|
AST17.objectProperty(
|
|
176387
175930
|
AST17.literal("variables"),
|
|
176388
|
-
AST17.memberExpression(input_obj, AST17.literal(
|
|
175931
|
+
AST17.memberExpression(input_obj, AST17.literal(query.name.value))
|
|
176389
175932
|
),
|
|
176390
175933
|
AST17.objectProperty(AST17.literal("event"), AST17.identifier("context")),
|
|
176391
175934
|
AST17.objectProperty(
|
|
@@ -176541,7 +176084,7 @@ function unexported_data_error(filepath) {
|
|
|
176541
176084
|
description: `This is not allowed in a route since it would conflict with Houdini's generated code`
|
|
176542
176085
|
};
|
|
176543
176086
|
}
|
|
176544
|
-
function variable_function_for_query(page2,
|
|
176087
|
+
function variable_function_for_query(page2, query, has_local) {
|
|
176545
176088
|
const params = route_params(page2.filepath).params.reduce(
|
|
176546
176089
|
(acc, param) => ({
|
|
176547
176090
|
...acc,
|
|
@@ -176557,7 +176100,7 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176557
176100
|
});
|
|
176558
176101
|
const missing_args = [];
|
|
176559
176102
|
const has_args = {};
|
|
176560
|
-
for (const definition of
|
|
176103
|
+
for (const definition of query.variableDefinitions ?? []) {
|
|
176561
176104
|
const unwrapped = unwrapType(page2.config, definition.type);
|
|
176562
176105
|
const runtime_scalar = page2.config.configFile.features?.runtimeScalars?.[unwrapped.type.name];
|
|
176563
176106
|
if (unwrapped.wrappers[unwrapped.wrappers.length - 1] === TypeWrapper.NonNull && !definition.defaultValue && !runtime_scalar && (!params[definition.variable.name.value] || params[definition.variable.name.value].optional)) {
|
|
@@ -176571,7 +176114,7 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176571
176114
|
throw {
|
|
176572
176115
|
filepath: page2.filepath,
|
|
176573
176116
|
message: `Could not find required variable function: ${yellow3(
|
|
176574
|
-
query_variable_fn(
|
|
176117
|
+
query_variable_fn(query.name.value)
|
|
176575
176118
|
)}. maybe its not exported?`
|
|
176576
176119
|
};
|
|
176577
176120
|
}
|
|
@@ -176617,7 +176160,7 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176617
176160
|
AST17.identifier("input"),
|
|
176618
176161
|
AST17.awaitExpression(
|
|
176619
176162
|
AST17.callExpression(
|
|
176620
|
-
AST17.identifier(query_variable_fn(
|
|
176163
|
+
AST17.identifier(query_variable_fn(query.name.value)),
|
|
176621
176164
|
[AST17.identifier("event")]
|
|
176622
176165
|
)
|
|
176623
176166
|
)
|
|
@@ -176628,7 +176171,7 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176628
176171
|
config: page2.config,
|
|
176629
176172
|
script: page2.script,
|
|
176630
176173
|
page: page2,
|
|
176631
|
-
artifact: { name:
|
|
176174
|
+
artifact: { name: query.name.value }
|
|
176632
176175
|
}).id
|
|
176633
176176
|
)
|
|
176634
176177
|
])
|
|
@@ -176640,7 +176183,7 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176640
176183
|
}
|
|
176641
176184
|
fn_body.push(AST17.returnStatement(AST17.identifier("result")));
|
|
176642
176185
|
const declaration = AST17.functionDeclaration(
|
|
176643
|
-
AST17.identifier(__variable_fn_name(
|
|
176186
|
+
AST17.identifier(__variable_fn_name(query.name.value)),
|
|
176644
176187
|
[AST17.identifier("config"), AST17.identifier("event")],
|
|
176645
176188
|
AST17.blockStatement(fn_body)
|
|
176646
176189
|
);
|