houdini-svelte 1.2.43 → 1.2.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/plugin-cjs/index.js +362 -789
- package/build/plugin-esm/index.js +365 -792
- package/build/preprocess-cjs/index.js +339 -763
- package/build/preprocess-esm/index.js +342 -766
- package/build/test-cjs/index.js +976 -1690
- package/build/test-esm/index.js +979 -1693
- package/package.json +2 -2
|
@@ -2301,7 +2301,7 @@ var require_path_visitor2 = __commonJS({
|
|
|
2301
2301
|
}
|
|
2302
2302
|
return target;
|
|
2303
2303
|
}
|
|
2304
|
-
PathVisitor.visit = function
|
|
2304
|
+
PathVisitor.visit = function visit22(node2, methods) {
|
|
2305
2305
|
return PathVisitor.fromMethodsObject(methods).visit(node2);
|
|
2306
2306
|
};
|
|
2307
2307
|
var PVp = PathVisitor.prototype;
|
|
@@ -2492,7 +2492,7 @@ var require_path_visitor2 = __commonJS({
|
|
|
2492
2492
|
this.needToCallTraverse = false;
|
|
2493
2493
|
return visitChildren(path3, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
|
|
2494
2494
|
};
|
|
2495
|
-
sharedContextProtoMethods.visit = function
|
|
2495
|
+
sharedContextProtoMethods.visit = function visit22(path3, newVisitor) {
|
|
2496
2496
|
if (!(this instanceof this.Context)) {
|
|
2497
2497
|
throw new Error("");
|
|
2498
2498
|
}
|
|
@@ -3885,7 +3885,7 @@ var require_main3 = __commonJS({
|
|
|
3885
3885
|
var someField = _a.someField;
|
|
3886
3886
|
var Type = _a.Type;
|
|
3887
3887
|
var use = _a.use;
|
|
3888
|
-
var
|
|
3888
|
+
var visit22 = _a.visit;
|
|
3889
3889
|
exports.astNodesAreEquivalent = astNodesAreEquivalent;
|
|
3890
3890
|
exports.builders = builders;
|
|
3891
3891
|
exports.builtInTypes = builtInTypes;
|
|
@@ -3902,7 +3902,7 @@ var require_main3 = __commonJS({
|
|
|
3902
3902
|
exports.someField = someField;
|
|
3903
3903
|
exports.Type = Type;
|
|
3904
3904
|
exports.use = use;
|
|
3905
|
-
exports.visit =
|
|
3905
|
+
exports.visit = visit22;
|
|
3906
3906
|
Object.assign(namedTypes_1.namedTypes, n);
|
|
3907
3907
|
}
|
|
3908
3908
|
});
|
|
@@ -16420,6 +16420,7 @@ import { isIP } from "node:net";
|
|
|
16420
16420
|
import * as graphql3 from "graphql";
|
|
16421
16421
|
import * as graphql4 from "graphql";
|
|
16422
16422
|
import * as graphql5 from "graphql";
|
|
16423
|
+
import * as graphql6 from "graphql";
|
|
16423
16424
|
var require2 = conflict_free(import.meta.url);
|
|
16424
16425
|
var __create2 = Object.create;
|
|
16425
16426
|
var __defProp2 = Object.defineProperty;
|
|
@@ -29868,14 +29869,14 @@ var require_lib3 = __commonJS2({
|
|
|
29868
29869
|
this.preserveSpace = !!preserveSpace;
|
|
29869
29870
|
}
|
|
29870
29871
|
};
|
|
29871
|
-
var
|
|
29872
|
+
var types52 = {
|
|
29872
29873
|
brace: new TokContext3("{"),
|
|
29873
29874
|
j_oTag: new TokContext3("<tag"),
|
|
29874
29875
|
j_cTag: new TokContext3("</tag"),
|
|
29875
29876
|
j_expr: new TokContext3("<tag>...</tag>", true)
|
|
29876
29877
|
};
|
|
29877
29878
|
{
|
|
29878
|
-
|
|
29879
|
+
types52.template = new TokContext3("`", true);
|
|
29879
29880
|
}
|
|
29880
29881
|
var beforeExpr2 = true;
|
|
29881
29882
|
var startsExpr2 = true;
|
|
@@ -30413,17 +30414,17 @@ var require_lib3 = __commonJS2({
|
|
|
30413
30414
|
context.pop();
|
|
30414
30415
|
};
|
|
30415
30416
|
tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
|
|
30416
|
-
context.push(
|
|
30417
|
+
context.push(types52.brace);
|
|
30417
30418
|
};
|
|
30418
30419
|
tokenTypes[22].updateContext = (context) => {
|
|
30419
|
-
if (context[context.length - 1] ===
|
|
30420
|
+
if (context[context.length - 1] === types52.template) {
|
|
30420
30421
|
context.pop();
|
|
30421
30422
|
} else {
|
|
30422
|
-
context.push(
|
|
30423
|
+
context.push(types52.template);
|
|
30423
30424
|
}
|
|
30424
30425
|
};
|
|
30425
30426
|
tokenTypes[142].updateContext = (context) => {
|
|
30426
|
-
context.push(
|
|
30427
|
+
context.push(types52.j_expr, types52.j_oTag);
|
|
30427
30428
|
};
|
|
30428
30429
|
}
|
|
30429
30430
|
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";
|
|
@@ -30983,7 +30984,7 @@ var require_lib3 = __commonJS2({
|
|
|
30983
30984
|
this.end = 0;
|
|
30984
30985
|
this.lastTokEndLoc = null;
|
|
30985
30986
|
this.lastTokStartLoc = null;
|
|
30986
|
-
this.context = [
|
|
30987
|
+
this.context = [types52.brace];
|
|
30987
30988
|
this.firstInvalidTemplateEscapePos = null;
|
|
30988
30989
|
this.strictErrors = /* @__PURE__ */ new Map();
|
|
30989
30990
|
this.tokensLength = 0;
|
|
@@ -34810,7 +34811,7 @@ var require_lib3 = __commonJS2({
|
|
|
34810
34811
|
context
|
|
34811
34812
|
} = this.state;
|
|
34812
34813
|
const currentContext = context[context.length - 1];
|
|
34813
|
-
if (currentContext ===
|
|
34814
|
+
if (currentContext === types52.j_oTag || currentContext === types52.j_expr) {
|
|
34814
34815
|
context.pop();
|
|
34815
34816
|
}
|
|
34816
34817
|
}
|
|
@@ -35832,9 +35833,9 @@ var require_lib3 = __commonJS2({
|
|
|
35832
35833
|
switch (this.state.type) {
|
|
35833
35834
|
case 5:
|
|
35834
35835
|
node2 = this.startNode();
|
|
35835
|
-
this.setContext(
|
|
35836
|
+
this.setContext(types52.brace);
|
|
35836
35837
|
this.next();
|
|
35837
|
-
node2 = this.jsxParseExpressionContainer(node2,
|
|
35838
|
+
node2 = this.jsxParseExpressionContainer(node2, types52.j_oTag);
|
|
35838
35839
|
if (node2.expression.type === "JSXEmptyExpression") {
|
|
35839
35840
|
this.raise(JsxErrors.AttributeIsEmpty, node2);
|
|
35840
35841
|
}
|
|
@@ -35853,7 +35854,7 @@ var require_lib3 = __commonJS2({
|
|
|
35853
35854
|
jsxParseSpreadChild(node2) {
|
|
35854
35855
|
this.next();
|
|
35855
35856
|
node2.expression = this.parseExpression();
|
|
35856
|
-
this.setContext(
|
|
35857
|
+
this.setContext(types52.j_expr);
|
|
35857
35858
|
this.state.canStartJSXElement = true;
|
|
35858
35859
|
this.expect(8);
|
|
35859
35860
|
return this.finishNode(node2, "JSXSpreadChild");
|
|
@@ -35873,11 +35874,11 @@ var require_lib3 = __commonJS2({
|
|
|
35873
35874
|
jsxParseAttribute() {
|
|
35874
35875
|
const node2 = this.startNode();
|
|
35875
35876
|
if (this.match(5)) {
|
|
35876
|
-
this.setContext(
|
|
35877
|
+
this.setContext(types52.brace);
|
|
35877
35878
|
this.next();
|
|
35878
35879
|
this.expect(21);
|
|
35879
35880
|
node2.argument = this.parseMaybeAssignAllowIn();
|
|
35880
|
-
this.setContext(
|
|
35881
|
+
this.setContext(types52.j_oTag);
|
|
35881
35882
|
this.state.canStartJSXElement = true;
|
|
35882
35883
|
this.expect(8);
|
|
35883
35884
|
return this.finishNode(node2, "JSXSpreadAttribute");
|
|
@@ -35936,12 +35937,12 @@ var require_lib3 = __commonJS2({
|
|
|
35936
35937
|
break;
|
|
35937
35938
|
case 5: {
|
|
35938
35939
|
const node22 = this.startNode();
|
|
35939
|
-
this.setContext(
|
|
35940
|
+
this.setContext(types52.brace);
|
|
35940
35941
|
this.next();
|
|
35941
35942
|
if (this.match(21)) {
|
|
35942
35943
|
children.push(this.jsxParseSpreadChild(node22));
|
|
35943
35944
|
} else {
|
|
35944
|
-
children.push(this.jsxParseExpressionContainer(node22,
|
|
35945
|
+
children.push(this.jsxParseExpressionContainer(node22, types52.j_expr));
|
|
35945
35946
|
}
|
|
35946
35947
|
break;
|
|
35947
35948
|
}
|
|
@@ -36006,11 +36007,11 @@ var require_lib3 = __commonJS2({
|
|
|
36006
36007
|
}
|
|
36007
36008
|
getTokenFromCode(code2) {
|
|
36008
36009
|
const context = this.curContext();
|
|
36009
|
-
if (context ===
|
|
36010
|
+
if (context === types52.j_expr) {
|
|
36010
36011
|
this.jsxReadToken();
|
|
36011
36012
|
return;
|
|
36012
36013
|
}
|
|
36013
|
-
if (context ===
|
|
36014
|
+
if (context === types52.j_oTag || context === types52.j_cTag) {
|
|
36014
36015
|
if (isIdentifierStart2(code2)) {
|
|
36015
36016
|
this.jsxReadWord();
|
|
36016
36017
|
return;
|
|
@@ -36020,7 +36021,7 @@ var require_lib3 = __commonJS2({
|
|
|
36020
36021
|
this.finishToken(143);
|
|
36021
36022
|
return;
|
|
36022
36023
|
}
|
|
36023
|
-
if ((code2 === 34 || code2 === 39) && context ===
|
|
36024
|
+
if ((code2 === 34 || code2 === 39) && context === types52.j_oTag) {
|
|
36024
36025
|
this.jsxReadString(code2);
|
|
36025
36026
|
return;
|
|
36026
36027
|
}
|
|
@@ -36038,17 +36039,17 @@ var require_lib3 = __commonJS2({
|
|
|
36038
36039
|
type
|
|
36039
36040
|
} = this.state;
|
|
36040
36041
|
if (type === 56 && prevType === 142) {
|
|
36041
|
-
context.splice(-2, 2,
|
|
36042
|
+
context.splice(-2, 2, types52.j_cTag);
|
|
36042
36043
|
this.state.canStartJSXElement = false;
|
|
36043
36044
|
} else if (type === 142) {
|
|
36044
|
-
context.push(
|
|
36045
|
+
context.push(types52.j_oTag);
|
|
36045
36046
|
} else if (type === 143) {
|
|
36046
36047
|
const out = context[context.length - 1];
|
|
36047
|
-
if (out ===
|
|
36048
|
+
if (out === types52.j_oTag && prevType === 56 || out === types52.j_cTag) {
|
|
36048
36049
|
context.pop();
|
|
36049
|
-
this.state.canStartJSXElement = context[context.length - 1] ===
|
|
36050
|
+
this.state.canStartJSXElement = context[context.length - 1] === types52.j_expr;
|
|
36050
36051
|
} else {
|
|
36051
|
-
this.setContext(
|
|
36052
|
+
this.setContext(types52.j_expr);
|
|
36052
36053
|
this.state.canStartJSXElement = true;
|
|
36053
36054
|
}
|
|
36054
36055
|
} else {
|
|
@@ -37423,14 +37424,14 @@ var require_lib3 = __commonJS2({
|
|
|
37423
37424
|
tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
|
|
37424
37425
|
const node2 = this.startNode();
|
|
37425
37426
|
const hasLeadingOperator = this.eat(operator);
|
|
37426
|
-
const
|
|
37427
|
+
const types62 = [];
|
|
37427
37428
|
do {
|
|
37428
|
-
|
|
37429
|
+
types62.push(parseConstituentType());
|
|
37429
37430
|
} while (this.eat(operator));
|
|
37430
|
-
if (
|
|
37431
|
-
return
|
|
37431
|
+
if (types62.length === 1 && !hasLeadingOperator) {
|
|
37432
|
+
return types62[0];
|
|
37432
37433
|
}
|
|
37433
|
-
node2.types =
|
|
37434
|
+
node2.types = types62;
|
|
37434
37435
|
return this.finishNode(node2, kind);
|
|
37435
37436
|
}
|
|
37436
37437
|
tsParseIntersectionTypeOrHigher() {
|
|
@@ -37994,7 +37995,7 @@ var require_lib3 = __commonJS2({
|
|
|
37994
37995
|
}));
|
|
37995
37996
|
if (node2.params.length === 0) {
|
|
37996
37997
|
this.raise(TSErrors.EmptyTypeArguments, node2);
|
|
37997
|
-
} else if (!this.state.inType && this.curContext() ===
|
|
37998
|
+
} else if (!this.state.inType && this.curContext() === types52.brace) {
|
|
37998
37999
|
this.reScan_lt_gt();
|
|
37999
38000
|
}
|
|
38000
38001
|
this.expect(48);
|
|
@@ -38620,7 +38621,7 @@ var require_lib3 = __commonJS2({
|
|
|
38620
38621
|
context
|
|
38621
38622
|
} = this.state;
|
|
38622
38623
|
const currentContext = context[context.length - 1];
|
|
38623
|
-
if (currentContext ===
|
|
38624
|
+
if (currentContext === types52.j_oTag || currentContext === types52.j_expr) {
|
|
38624
38625
|
context.pop();
|
|
38625
38626
|
}
|
|
38626
38627
|
}
|
|
@@ -43748,9 +43749,9 @@ var require_shared = __commonJS2({
|
|
|
43748
43749
|
var tslib_1 = require_tslib();
|
|
43749
43750
|
var types_110 = tslib_1.__importDefault(require_types());
|
|
43750
43751
|
function default_1(fork) {
|
|
43751
|
-
var
|
|
43752
|
-
var Type =
|
|
43753
|
-
var builtin =
|
|
43752
|
+
var types52 = fork.use(types_110.default);
|
|
43753
|
+
var Type = types52.Type;
|
|
43754
|
+
var builtin = types52.builtInTypes;
|
|
43754
43755
|
var isNumber2 = builtin.number;
|
|
43755
43756
|
function geq(than) {
|
|
43756
43757
|
return Type.from(function(value2) {
|
|
@@ -43898,9 +43899,9 @@ var require_types = __commonJS2({
|
|
|
43898
43899
|
}(BaseType);
|
|
43899
43900
|
var OrType = function(_super) {
|
|
43900
43901
|
tslib_1.__extends(OrType2, _super);
|
|
43901
|
-
function OrType2(
|
|
43902
|
+
function OrType2(types52) {
|
|
43902
43903
|
var _this = _super.call(this) || this;
|
|
43903
|
-
_this.types =
|
|
43904
|
+
_this.types = types52;
|
|
43904
43905
|
_this.kind = "OrType";
|
|
43905
43906
|
return _this;
|
|
43906
43907
|
}
|
|
@@ -44041,11 +44042,11 @@ var require_types = __commonJS2({
|
|
|
44041
44042
|
function typesPlugin(_fork) {
|
|
44042
44043
|
var Type = {
|
|
44043
44044
|
or: function() {
|
|
44044
|
-
var
|
|
44045
|
+
var types52 = [];
|
|
44045
44046
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
44046
|
-
|
|
44047
|
+
types52[_i] = arguments[_i];
|
|
44047
44048
|
}
|
|
44048
|
-
return new OrType(
|
|
44049
|
+
return new OrType(types52.map(function(type) {
|
|
44049
44050
|
return Type.from(type);
|
|
44050
44051
|
}));
|
|
44051
44052
|
},
|
|
@@ -44488,9 +44489,9 @@ var require_path2 = __commonJS2({
|
|
|
44488
44489
|
var Op = Object.prototype;
|
|
44489
44490
|
var hasOwn2 = Op.hasOwnProperty;
|
|
44490
44491
|
function pathPlugin(fork) {
|
|
44491
|
-
var
|
|
44492
|
-
var isArray2 =
|
|
44493
|
-
var isNumber2 =
|
|
44492
|
+
var types52 = fork.use(types_110.default);
|
|
44493
|
+
var isArray2 = types52.builtInTypes.array;
|
|
44494
|
+
var isNumber2 = types52.builtInTypes.number;
|
|
44494
44495
|
var Path = function Path2(value2, parentPath, name) {
|
|
44495
44496
|
if (!(this instanceof Path2)) {
|
|
44496
44497
|
throw new Error("Path constructor cannot be invoked without 'new'");
|
|
@@ -44790,13 +44791,13 @@ var require_scope = __commonJS2({
|
|
|
44790
44791
|
var types_110 = tslib_1.__importDefault(require_types());
|
|
44791
44792
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
44792
44793
|
function scopePlugin(fork) {
|
|
44793
|
-
var
|
|
44794
|
-
var Type =
|
|
44795
|
-
var namedTypes =
|
|
44794
|
+
var types52 = fork.use(types_110.default);
|
|
44795
|
+
var Type = types52.Type;
|
|
44796
|
+
var namedTypes = types52.namedTypes;
|
|
44796
44797
|
var Node3 = namedTypes.Node;
|
|
44797
44798
|
var Expression = namedTypes.Expression;
|
|
44798
|
-
var isArray2 =
|
|
44799
|
-
var b =
|
|
44799
|
+
var isArray2 = types52.builtInTypes.array;
|
|
44800
|
+
var b = types52.builders;
|
|
44800
44801
|
var Scope3 = function Scope22(path3, parentScope) {
|
|
44801
44802
|
if (!(this instanceof Scope22)) {
|
|
44802
44803
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
@@ -44859,7 +44860,7 @@ var require_scope = __commonJS2({
|
|
|
44859
44860
|
++index;
|
|
44860
44861
|
}
|
|
44861
44862
|
var name = prefix + index;
|
|
44862
|
-
return this.bindings[name] =
|
|
44863
|
+
return this.bindings[name] = types52.builders.identifier(name);
|
|
44863
44864
|
};
|
|
44864
44865
|
Sp.injectTemporary = function(identifier, init) {
|
|
44865
44866
|
identifier || (identifier = this.declareTemporary());
|
|
@@ -44935,7 +44936,7 @@ var require_scope = __commonJS2({
|
|
|
44935
44936
|
bindings
|
|
44936
44937
|
);
|
|
44937
44938
|
} else if (Node3.check(node2) && !Expression.check(node2)) {
|
|
44938
|
-
|
|
44939
|
+
types52.eachField(node2, function(name, child) {
|
|
44939
44940
|
var childPath = path3.get(name);
|
|
44940
44941
|
if (!pathHasValue(childPath, child)) {
|
|
44941
44942
|
throw new Error("");
|
|
@@ -45013,24 +45014,24 @@ var require_scope = __commonJS2({
|
|
|
45013
45014
|
addPattern(patternPath.get("argument"), bindings);
|
|
45014
45015
|
}
|
|
45015
45016
|
}
|
|
45016
|
-
function addTypePattern(patternPath,
|
|
45017
|
+
function addTypePattern(patternPath, types62) {
|
|
45017
45018
|
var pattern = patternPath.value;
|
|
45018
45019
|
namedTypes.Pattern.assert(pattern);
|
|
45019
45020
|
if (namedTypes.Identifier.check(pattern)) {
|
|
45020
|
-
if (hasOwn2.call(
|
|
45021
|
-
|
|
45021
|
+
if (hasOwn2.call(types62, pattern.name)) {
|
|
45022
|
+
types62[pattern.name].push(patternPath);
|
|
45022
45023
|
} else {
|
|
45023
|
-
|
|
45024
|
+
types62[pattern.name] = [patternPath];
|
|
45024
45025
|
}
|
|
45025
45026
|
}
|
|
45026
45027
|
}
|
|
45027
|
-
function addTypeParameter(parameterPath,
|
|
45028
|
+
function addTypeParameter(parameterPath, types62) {
|
|
45028
45029
|
var parameter = parameterPath.value;
|
|
45029
45030
|
FlowOrTSTypeParameterType.assert(parameter);
|
|
45030
|
-
if (hasOwn2.call(
|
|
45031
|
-
|
|
45031
|
+
if (hasOwn2.call(types62, parameter.name)) {
|
|
45032
|
+
types62[parameter.name].push(parameterPath);
|
|
45032
45033
|
} else {
|
|
45033
|
-
|
|
45034
|
+
types62[parameter.name] = [parameterPath];
|
|
45034
45035
|
}
|
|
45035
45036
|
}
|
|
45036
45037
|
Sp.lookup = function(name) {
|
|
@@ -45069,11 +45070,11 @@ var require_node_path = __commonJS2({
|
|
|
45069
45070
|
var scope_1 = tslib_1.__importDefault(require_scope());
|
|
45070
45071
|
var shared_1 = require_shared();
|
|
45071
45072
|
function nodePathPlugin(fork) {
|
|
45072
|
-
var
|
|
45073
|
-
var n =
|
|
45074
|
-
var b =
|
|
45075
|
-
var isNumber2 =
|
|
45076
|
-
var isArray2 =
|
|
45073
|
+
var types52 = fork.use(types_110.default);
|
|
45074
|
+
var n = types52.namedTypes;
|
|
45075
|
+
var b = types52.builders;
|
|
45076
|
+
var isNumber2 = types52.builtInTypes.number;
|
|
45077
|
+
var isArray2 = types52.builtInTypes.array;
|
|
45077
45078
|
var Path = fork.use(path_1.default);
|
|
45078
45079
|
var Scope3 = fork.use(scope_1.default);
|
|
45079
45080
|
var NodePath = function NodePath2(value2, parentPath, name) {
|
|
@@ -45164,7 +45165,7 @@ var require_node_path = __commonJS2({
|
|
|
45164
45165
|
return scope2 || null;
|
|
45165
45166
|
};
|
|
45166
45167
|
NPp.getValueProperty = function(name) {
|
|
45167
|
-
return
|
|
45168
|
+
return types52.getFieldValue(this.value, name);
|
|
45168
45169
|
};
|
|
45169
45170
|
NPp.needsParens = function(assumeExpressionContext) {
|
|
45170
45171
|
var pp2 = this.parentPath;
|
|
@@ -45306,7 +45307,7 @@ var require_node_path = __commonJS2({
|
|
|
45306
45307
|
return node2.some(containsCallExpression);
|
|
45307
45308
|
}
|
|
45308
45309
|
if (n.Node.check(node2)) {
|
|
45309
|
-
return
|
|
45310
|
+
return types52.someField(node2, function(_name, child) {
|
|
45310
45311
|
return containsCallExpression(child);
|
|
45311
45312
|
});
|
|
45312
45313
|
}
|
|
@@ -45425,11 +45426,11 @@ var require_path_visitor = __commonJS2({
|
|
|
45425
45426
|
var shared_1 = require_shared();
|
|
45426
45427
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
45427
45428
|
function pathVisitorPlugin(fork) {
|
|
45428
|
-
var
|
|
45429
|
+
var types52 = fork.use(types_110.default);
|
|
45429
45430
|
var NodePath = fork.use(node_path_1.default);
|
|
45430
|
-
var isArray2 =
|
|
45431
|
-
var isObject2 =
|
|
45432
|
-
var isFunction2 =
|
|
45431
|
+
var isArray2 = types52.builtInTypes.array;
|
|
45432
|
+
var isObject2 = types52.builtInTypes.object;
|
|
45433
|
+
var isFunction2 = types52.builtInTypes.function;
|
|
45433
45434
|
var undefined2;
|
|
45434
45435
|
var PathVisitor = function PathVisitor2() {
|
|
45435
45436
|
if (!(this instanceof PathVisitor2)) {
|
|
@@ -45449,7 +45450,7 @@ var require_path_visitor = __commonJS2({
|
|
|
45449
45450
|
typeNames[methodName.slice("visit".length)] = true;
|
|
45450
45451
|
}
|
|
45451
45452
|
}
|
|
45452
|
-
var supertypeTable =
|
|
45453
|
+
var supertypeTable = types52.computeSupertypeLookupTable(typeNames);
|
|
45453
45454
|
var methodNameTable = /* @__PURE__ */ Object.create(null);
|
|
45454
45455
|
var typeNameKeys = Object.keys(supertypeTable);
|
|
45455
45456
|
var typeNameCount = typeNameKeys.length;
|
|
@@ -45568,7 +45569,7 @@ var require_path_visitor = __commonJS2({
|
|
|
45568
45569
|
path3.each(visitor.visitWithoutReset, visitor);
|
|
45569
45570
|
} else if (!isObject2.check(value2)) {
|
|
45570
45571
|
} else {
|
|
45571
|
-
var childNames =
|
|
45572
|
+
var childNames = types52.getFieldNames(value2);
|
|
45572
45573
|
if (visitor._shouldVisitComments && value2.comments && childNames.indexOf("comments") < 0) {
|
|
45573
45574
|
childNames.push("comments");
|
|
45574
45575
|
}
|
|
@@ -45577,7 +45578,7 @@ var require_path_visitor = __commonJS2({
|
|
|
45577
45578
|
for (var i22 = 0; i22 < childCount; ++i22) {
|
|
45578
45579
|
var childName = childNames[i22];
|
|
45579
45580
|
if (!hasOwn2.call(value2, childName)) {
|
|
45580
|
-
value2[childName] =
|
|
45581
|
+
value2[childName] = types52.getFieldValue(value2, childName);
|
|
45581
45582
|
}
|
|
45582
45583
|
childPaths.push(path3.get(childName));
|
|
45583
45584
|
}
|
|
@@ -45718,13 +45719,13 @@ var require_equiv = __commonJS2({
|
|
|
45718
45719
|
var shared_1 = require_shared();
|
|
45719
45720
|
var types_110 = tslib_1.__importDefault(require_types());
|
|
45720
45721
|
function default_1(fork) {
|
|
45721
|
-
var
|
|
45722
|
-
var getFieldNames =
|
|
45723
|
-
var getFieldValue =
|
|
45724
|
-
var isArray2 =
|
|
45725
|
-
var isObject2 =
|
|
45726
|
-
var isDate2 =
|
|
45727
|
-
var isRegExp2 =
|
|
45722
|
+
var types52 = fork.use(types_110.default);
|
|
45723
|
+
var getFieldNames = types52.getFieldNames;
|
|
45724
|
+
var getFieldValue = types52.getFieldValue;
|
|
45725
|
+
var isArray2 = types52.builtInTypes.array;
|
|
45726
|
+
var isObject2 = types52.builtInTypes.object;
|
|
45727
|
+
var isDate2 = types52.builtInTypes.Date;
|
|
45728
|
+
var isRegExp2 = types52.builtInTypes.RegExp;
|
|
45728
45729
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
45729
45730
|
function astNodesAreEquivalent(a, b, problemPath) {
|
|
45730
45731
|
if (isArray2.check(problemPath)) {
|
|
@@ -45875,24 +45876,24 @@ var require_fork = __commonJS2({
|
|
|
45875
45876
|
var shared_1 = require_shared();
|
|
45876
45877
|
function default_1(plugins2) {
|
|
45877
45878
|
var fork = createFork();
|
|
45878
|
-
var
|
|
45879
|
+
var types52 = fork.use(types_110.default);
|
|
45879
45880
|
plugins2.forEach(fork.use);
|
|
45880
|
-
|
|
45881
|
+
types52.finalize();
|
|
45881
45882
|
var PathVisitor = fork.use(path_visitor_1.default);
|
|
45882
45883
|
return {
|
|
45883
|
-
Type:
|
|
45884
|
-
builtInTypes:
|
|
45885
|
-
namedTypes:
|
|
45886
|
-
builders:
|
|
45887
|
-
defineMethod:
|
|
45888
|
-
getFieldNames:
|
|
45889
|
-
getFieldValue:
|
|
45890
|
-
eachField:
|
|
45891
|
-
someField:
|
|
45892
|
-
getSupertypeNames:
|
|
45893
|
-
getBuilderName:
|
|
45884
|
+
Type: types52.Type,
|
|
45885
|
+
builtInTypes: types52.builtInTypes,
|
|
45886
|
+
namedTypes: types52.namedTypes,
|
|
45887
|
+
builders: types52.builders,
|
|
45888
|
+
defineMethod: types52.defineMethod,
|
|
45889
|
+
getFieldNames: types52.getFieldNames,
|
|
45890
|
+
getFieldValue: types52.getFieldValue,
|
|
45891
|
+
eachField: types52.eachField,
|
|
45892
|
+
someField: types52.someField,
|
|
45893
|
+
getSupertypeNames: types52.getSupertypeNames,
|
|
45894
|
+
getBuilderName: types52.getBuilderName,
|
|
45894
45895
|
astNodesAreEquivalent: fork.use(equiv_1.default),
|
|
45895
|
-
finalize:
|
|
45896
|
+
finalize: types52.finalize,
|
|
45896
45897
|
Path: fork.use(path_1.default),
|
|
45897
45898
|
NodePath: fork.use(node_path_1.default),
|
|
45898
45899
|
PathVisitor,
|
|
@@ -46052,8 +46053,8 @@ var require_core2 = __commonJS2({
|
|
|
46052
46053
|
var types_110 = tslib_1.__importDefault(require_types());
|
|
46053
46054
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46054
46055
|
function default_1(fork) {
|
|
46055
|
-
var
|
|
46056
|
-
var Type =
|
|
46056
|
+
var types52 = fork.use(types_110.default);
|
|
46057
|
+
var Type = types52.Type;
|
|
46057
46058
|
var def = Type.def;
|
|
46058
46059
|
var or = Type.or;
|
|
46059
46060
|
var shared = fork.use(shared_1.default);
|
|
@@ -46143,9 +46144,9 @@ var require_es6 = __commonJS2({
|
|
|
46143
46144
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46144
46145
|
function default_1(fork) {
|
|
46145
46146
|
fork.use(core_1.default);
|
|
46146
|
-
var
|
|
46147
|
-
var def =
|
|
46148
|
-
var or =
|
|
46147
|
+
var types52 = fork.use(types_110.default);
|
|
46148
|
+
var def = types52.Type.def;
|
|
46149
|
+
var or = types52.Type.or;
|
|
46149
46150
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46150
46151
|
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"]);
|
|
46151
46152
|
def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
|
|
@@ -46231,8 +46232,8 @@ var require_es2017 = __commonJS2({
|
|
|
46231
46232
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46232
46233
|
function default_1(fork) {
|
|
46233
46234
|
fork.use(es2016_1.default);
|
|
46234
|
-
var
|
|
46235
|
-
var def =
|
|
46235
|
+
var types52 = fork.use(types_110.default);
|
|
46236
|
+
var def = types52.Type.def;
|
|
46236
46237
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46237
46238
|
def("Function").field("async", Boolean, defaults2["false"]);
|
|
46238
46239
|
def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
|
|
@@ -46253,9 +46254,9 @@ var require_es2018 = __commonJS2({
|
|
|
46253
46254
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46254
46255
|
function default_1(fork) {
|
|
46255
46256
|
fork.use(es2017_1.default);
|
|
46256
|
-
var
|
|
46257
|
-
var def =
|
|
46258
|
-
var or =
|
|
46257
|
+
var types52 = fork.use(types_110.default);
|
|
46258
|
+
var def = types52.Type.def;
|
|
46259
|
+
var or = types52.Type.or;
|
|
46259
46260
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46260
46261
|
def("ForOfStatement").field("await", Boolean, defaults2["false"]);
|
|
46261
46262
|
def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
@@ -46284,9 +46285,9 @@ var require_es2019 = __commonJS2({
|
|
|
46284
46285
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46285
46286
|
function default_1(fork) {
|
|
46286
46287
|
fork.use(es2018_1.default);
|
|
46287
|
-
var
|
|
46288
|
-
var def =
|
|
46289
|
-
var or =
|
|
46288
|
+
var types52 = fork.use(types_110.default);
|
|
46289
|
+
var def = types52.Type.def;
|
|
46290
|
+
var or = types52.Type.or;
|
|
46290
46291
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46291
46292
|
def("CatchClause").field("param", or(def("Pattern"), null), defaults2["null"]);
|
|
46292
46293
|
}
|
|
@@ -46308,9 +46309,9 @@ var require_es20202 = __commonJS2({
|
|
|
46308
46309
|
function default_1(fork) {
|
|
46309
46310
|
fork.use(es2020_1.default);
|
|
46310
46311
|
fork.use(es2019_1.default);
|
|
46311
|
-
var
|
|
46312
|
-
var def =
|
|
46313
|
-
var or =
|
|
46312
|
+
var types52 = fork.use(types_110.default);
|
|
46313
|
+
var def = types52.Type.def;
|
|
46314
|
+
var or = types52.Type.or;
|
|
46314
46315
|
var shared = fork.use(shared_1.default);
|
|
46315
46316
|
var defaults2 = shared.defaults;
|
|
46316
46317
|
def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
|
|
@@ -46356,8 +46357,8 @@ var require_es2022 = __commonJS2({
|
|
|
46356
46357
|
var shared_1 = require_shared();
|
|
46357
46358
|
function default_1(fork) {
|
|
46358
46359
|
fork.use(es2021_1.default);
|
|
46359
|
-
var
|
|
46360
|
-
var def =
|
|
46360
|
+
var types52 = fork.use(types_110.default);
|
|
46361
|
+
var def = types52.Type.def;
|
|
46361
46362
|
def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
|
|
46362
46363
|
}
|
|
46363
46364
|
exports.default = default_1;
|
|
@@ -46376,9 +46377,9 @@ var require_es_proposals = __commonJS2({
|
|
|
46376
46377
|
var es2022_1 = tslib_1.__importDefault(require_es2022());
|
|
46377
46378
|
function default_1(fork) {
|
|
46378
46379
|
fork.use(es2022_1.default);
|
|
46379
|
-
var
|
|
46380
|
-
var Type =
|
|
46381
|
-
var def =
|
|
46380
|
+
var types52 = fork.use(types_110.default);
|
|
46381
|
+
var Type = types52.Type;
|
|
46382
|
+
var def = types52.Type.def;
|
|
46382
46383
|
var or = Type.or;
|
|
46383
46384
|
var shared = fork.use(shared_1.default);
|
|
46384
46385
|
var defaults2 = shared.defaults;
|
|
@@ -46416,9 +46417,9 @@ var require_jsx = __commonJS2({
|
|
|
46416
46417
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46417
46418
|
function default_1(fork) {
|
|
46418
46419
|
fork.use(es_proposals_1.default);
|
|
46419
|
-
var
|
|
46420
|
-
var def =
|
|
46421
|
-
var or =
|
|
46420
|
+
var types52 = fork.use(types_110.default);
|
|
46421
|
+
var def = types52.Type.def;
|
|
46422
|
+
var or = types52.Type.or;
|
|
46422
46423
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46423
46424
|
def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
|
|
46424
46425
|
def("Literal"),
|
|
@@ -46474,9 +46475,9 @@ var require_type_annotations = __commonJS2({
|
|
|
46474
46475
|
var types_110 = tslib_1.__importDefault(require_types());
|
|
46475
46476
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46476
46477
|
function default_1(fork) {
|
|
46477
|
-
var
|
|
46478
|
-
var def =
|
|
46479
|
-
var or =
|
|
46478
|
+
var types52 = fork.use(types_110.default);
|
|
46479
|
+
var def = types52.Type.def;
|
|
46480
|
+
var or = types52.Type.or;
|
|
46480
46481
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46481
46482
|
var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
|
|
46482
46483
|
var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
|
|
@@ -46509,9 +46510,9 @@ var require_flow = __commonJS2({
|
|
|
46509
46510
|
function default_1(fork) {
|
|
46510
46511
|
fork.use(es_proposals_1.default);
|
|
46511
46512
|
fork.use(type_annotations_1.default);
|
|
46512
|
-
var
|
|
46513
|
-
var def =
|
|
46514
|
-
var or =
|
|
46513
|
+
var types52 = fork.use(types_110.default);
|
|
46514
|
+
var def = types52.Type.def;
|
|
46515
|
+
var or = types52.Type.or;
|
|
46515
46516
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46516
46517
|
def("Flow").bases("Node");
|
|
46517
46518
|
def("FlowType").bases("Flow");
|
|
@@ -46623,10 +46624,10 @@ var require_esprima = __commonJS2({
|
|
|
46623
46624
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
46624
46625
|
function default_1(fork) {
|
|
46625
46626
|
fork.use(es_proposals_1.default);
|
|
46626
|
-
var
|
|
46627
|
+
var types52 = fork.use(types_110.default);
|
|
46627
46628
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46628
|
-
var def =
|
|
46629
|
-
var or =
|
|
46629
|
+
var def = types52.Type.def;
|
|
46630
|
+
var or = types52.Type.or;
|
|
46630
46631
|
def("VariableDeclaration").field("declarations", [or(
|
|
46631
46632
|
def("VariableDeclarator"),
|
|
46632
46633
|
def("Identifier")
|
|
@@ -46669,11 +46670,11 @@ var require_babel_core = __commonJS2({
|
|
|
46669
46670
|
function default_1(fork) {
|
|
46670
46671
|
var _a, _b, _c, _d, _e;
|
|
46671
46672
|
fork.use(es_proposals_1.default);
|
|
46672
|
-
var
|
|
46673
|
+
var types52 = fork.use(types_110.default);
|
|
46673
46674
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46674
|
-
var def =
|
|
46675
|
-
var or =
|
|
46676
|
-
var isUndefined =
|
|
46675
|
+
var def = types52.Type.def;
|
|
46676
|
+
var or = types52.Type.or;
|
|
46677
|
+
var isUndefined = types52.builtInTypes.undefined;
|
|
46677
46678
|
def("Noop").bases("Statement").build();
|
|
46678
46679
|
def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
|
|
46679
46680
|
def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
|
|
@@ -46698,7 +46699,7 @@ var require_babel_core = __commonJS2({
|
|
|
46698
46699
|
raw: String
|
|
46699
46700
|
},
|
|
46700
46701
|
function getDefault() {
|
|
46701
|
-
var value2 =
|
|
46702
|
+
var value2 = types52.getFieldValue(this, "value");
|
|
46702
46703
|
return {
|
|
46703
46704
|
rawValue: value2,
|
|
46704
46705
|
raw: toRaw ? toRaw(value2) : String(value2)
|
|
@@ -46799,8 +46800,8 @@ var require_babel = __commonJS2({
|
|
|
46799
46800
|
var flow_1 = tslib_1.__importDefault(require_flow());
|
|
46800
46801
|
var shared_1 = require_shared();
|
|
46801
46802
|
function default_1(fork) {
|
|
46802
|
-
var
|
|
46803
|
-
var def =
|
|
46803
|
+
var types52 = fork.use(types_110.default);
|
|
46804
|
+
var def = types52.Type.def;
|
|
46804
46805
|
fork.use(babel_core_1.default);
|
|
46805
46806
|
fork.use(flow_1.default);
|
|
46806
46807
|
def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
|
|
@@ -46824,12 +46825,12 @@ var require_typescript = __commonJS2({
|
|
|
46824
46825
|
function default_1(fork) {
|
|
46825
46826
|
fork.use(babel_core_1.default);
|
|
46826
46827
|
fork.use(type_annotations_1.default);
|
|
46827
|
-
var
|
|
46828
|
-
var n =
|
|
46829
|
-
var def =
|
|
46830
|
-
var or =
|
|
46828
|
+
var types52 = fork.use(types_110.default);
|
|
46829
|
+
var n = types52.namedTypes;
|
|
46830
|
+
var def = types52.Type.def;
|
|
46831
|
+
var or = types52.Type.or;
|
|
46831
46832
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
46832
|
-
var StringLiteral =
|
|
46833
|
+
var StringLiteral = types52.Type.from(function(value2, deep) {
|
|
46833
46834
|
if (n.StringLiteral && n.StringLiteral.check(value2, deep)) {
|
|
46834
46835
|
return true;
|
|
46835
46836
|
}
|
|
@@ -48777,8 +48778,8 @@ var require_util2 = __commonJS2({
|
|
|
48777
48778
|
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;
|
|
48778
48779
|
var tslib_1 = require_tslib();
|
|
48779
48780
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
48780
|
-
var
|
|
48781
|
-
var n =
|
|
48781
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
48782
|
+
var n = types52.namedTypes;
|
|
48782
48783
|
var source_map_1 = tslib_1.__importDefault(require_source_map());
|
|
48783
48784
|
var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
|
|
48784
48785
|
var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
|
|
@@ -56084,10 +56085,10 @@ var require_comments = __commonJS2({
|
|
|
56084
56085
|
exports.printComments = exports.attach = void 0;
|
|
56085
56086
|
var tslib_1 = require_tslib();
|
|
56086
56087
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
56087
|
-
var
|
|
56088
|
-
var n =
|
|
56089
|
-
var isArray2 =
|
|
56090
|
-
var isObject2 =
|
|
56088
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
56089
|
+
var n = types52.namedTypes;
|
|
56090
|
+
var isArray2 = types52.builtInTypes.array;
|
|
56091
|
+
var isObject2 = types52.builtInTypes.object;
|
|
56091
56092
|
var lines_1 = require_lines();
|
|
56092
56093
|
var util_110 = require_util2();
|
|
56093
56094
|
var childNodesCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -56118,7 +56119,7 @@ var require_comments = __commonJS2({
|
|
|
56118
56119
|
if (isArray2.check(node2)) {
|
|
56119
56120
|
names = Object.keys(node2);
|
|
56120
56121
|
} else if (isObject2.check(node2)) {
|
|
56121
|
-
names =
|
|
56122
|
+
names = types52.getFieldNames(node2);
|
|
56122
56123
|
} else {
|
|
56123
56124
|
return resultArray;
|
|
56124
56125
|
}
|
|
@@ -56296,7 +56297,7 @@ var require_comments = __commonJS2({
|
|
|
56296
56297
|
function printComments(path3, print62) {
|
|
56297
56298
|
var value2 = path3.getValue();
|
|
56298
56299
|
var innerLines = print62(path3);
|
|
56299
|
-
var comments = n.Node.check(value2) &&
|
|
56300
|
+
var comments = n.Node.check(value2) && types52.getFieldValue(value2, "comments");
|
|
56300
56301
|
if (!comments || comments.length === 0) {
|
|
56301
56302
|
return innerLines;
|
|
56302
56303
|
}
|
|
@@ -56304,8 +56305,8 @@ var require_comments = __commonJS2({
|
|
|
56304
56305
|
var trailingParts = [innerLines];
|
|
56305
56306
|
path3.each(function(commentPath) {
|
|
56306
56307
|
var comment = commentPath.getValue();
|
|
56307
|
-
var leading =
|
|
56308
|
-
var trailing =
|
|
56308
|
+
var leading = types52.getFieldValue(comment, "leading");
|
|
56309
|
+
var trailing = types52.getFieldValue(comment, "trailing");
|
|
56309
56310
|
if (leading || trailing && !(n.Statement.check(value2) || comment.type === "Block" || comment.type === "CommentBlock")) {
|
|
56310
56311
|
leadingParts.push(printLeadingComment(commentPath, print62));
|
|
56311
56312
|
} else if (trailing) {
|
|
@@ -56325,10 +56326,10 @@ var require_parser = __commonJS2({
|
|
|
56325
56326
|
exports.parse = void 0;
|
|
56326
56327
|
var tslib_1 = require_tslib();
|
|
56327
56328
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
56328
|
-
var
|
|
56329
|
-
var b =
|
|
56330
|
-
var isObject2 =
|
|
56331
|
-
var isArray2 =
|
|
56329
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
56330
|
+
var b = types52.builders;
|
|
56331
|
+
var isObject2 = types52.builtInTypes.object;
|
|
56332
|
+
var isArray2 = types52.builtInTypes.array;
|
|
56332
56333
|
var options_1 = require_options();
|
|
56333
56334
|
var lines_1 = require_lines();
|
|
56334
56335
|
var comments_1 = require_comments();
|
|
@@ -56512,11 +56513,11 @@ var require_fast_path = __commonJS2({
|
|
|
56512
56513
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56513
56514
|
var tslib_1 = require_tslib();
|
|
56514
56515
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
56515
|
-
var
|
|
56516
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
56516
56517
|
var util2 = tslib_1.__importStar(require_util2());
|
|
56517
|
-
var n =
|
|
56518
|
-
var isArray2 =
|
|
56519
|
-
var isNumber2 =
|
|
56518
|
+
var n = types52.namedTypes;
|
|
56519
|
+
var isArray2 = types52.builtInTypes.array;
|
|
56520
|
+
var isNumber2 = types52.builtInTypes.number;
|
|
56520
56521
|
var PRECEDENCE = {};
|
|
56521
56522
|
[
|
|
56522
56523
|
["??"],
|
|
@@ -56545,7 +56546,7 @@ var require_fast_path = __commonJS2({
|
|
|
56545
56546
|
if (obj instanceof FastPath) {
|
|
56546
56547
|
return obj.copy();
|
|
56547
56548
|
}
|
|
56548
|
-
if (obj instanceof
|
|
56549
|
+
if (obj instanceof types52.NodePath) {
|
|
56549
56550
|
var copy = Object.create(FastPath.prototype);
|
|
56550
56551
|
var stack = [obj.value];
|
|
56551
56552
|
for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
|
|
@@ -56856,7 +56857,7 @@ var require_fast_path = __commonJS2({
|
|
|
56856
56857
|
return node2.some(containsCallExpression);
|
|
56857
56858
|
}
|
|
56858
56859
|
if (n.Node.check(node2)) {
|
|
56859
|
-
return
|
|
56860
|
+
return types52.someField(node2, function(_name, child) {
|
|
56860
56861
|
return containsCallExpression(child);
|
|
56861
56862
|
});
|
|
56862
56863
|
}
|
|
@@ -56944,16 +56945,16 @@ var require_patcher = __commonJS2({
|
|
|
56944
56945
|
var tslib_1 = require_tslib();
|
|
56945
56946
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
56946
56947
|
var linesModule = tslib_1.__importStar(require_lines());
|
|
56947
|
-
var
|
|
56948
|
-
var Printable =
|
|
56949
|
-
var Expression =
|
|
56950
|
-
var ReturnStatement =
|
|
56951
|
-
var SourceLocation3 =
|
|
56948
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
56949
|
+
var Printable = types52.namedTypes.Printable;
|
|
56950
|
+
var Expression = types52.namedTypes.Expression;
|
|
56951
|
+
var ReturnStatement = types52.namedTypes.ReturnStatement;
|
|
56952
|
+
var SourceLocation3 = types52.namedTypes.SourceLocation;
|
|
56952
56953
|
var util_110 = require_util2();
|
|
56953
56954
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path());
|
|
56954
|
-
var isObject2 =
|
|
56955
|
-
var isArray2 =
|
|
56956
|
-
var isString3 =
|
|
56955
|
+
var isObject2 = types52.builtInTypes.object;
|
|
56956
|
+
var isArray2 = types52.builtInTypes.array;
|
|
56957
|
+
var isString3 = types52.builtInTypes.string;
|
|
56957
56958
|
var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
|
|
56958
56959
|
var Patcher = function Patcher2(lines) {
|
|
56959
56960
|
assert_1.default.ok(this instanceof Patcher2);
|
|
@@ -57223,8 +57224,8 @@ var require_patcher = __commonJS2({
|
|
|
57223
57224
|
if (k.charAt(0) === "_") {
|
|
57224
57225
|
continue;
|
|
57225
57226
|
}
|
|
57226
|
-
newPath.stack.push(k,
|
|
57227
|
-
oldPath.stack.push(k,
|
|
57227
|
+
newPath.stack.push(k, types52.getFieldValue(newNode, k));
|
|
57228
|
+
oldPath.stack.push(k, types52.getFieldValue(oldNode, k));
|
|
57228
57229
|
var canReprint = findAnyReprints(newPath, oldPath, reprints);
|
|
57229
57230
|
newPath.stack.length -= 2;
|
|
57230
57231
|
oldPath.stack.length -= 2;
|
|
@@ -57246,16 +57247,16 @@ var require_printer = __commonJS2({
|
|
|
57246
57247
|
exports.Printer = void 0;
|
|
57247
57248
|
var tslib_1 = require_tslib();
|
|
57248
57249
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
57249
|
-
var
|
|
57250
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
57250
57251
|
var comments_1 = require_comments();
|
|
57251
57252
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path());
|
|
57252
57253
|
var lines_1 = require_lines();
|
|
57253
57254
|
var options_1 = require_options();
|
|
57254
57255
|
var patcher_1 = require_patcher();
|
|
57255
57256
|
var util2 = tslib_1.__importStar(require_util2());
|
|
57256
|
-
var namedTypes =
|
|
57257
|
-
var isString3 =
|
|
57258
|
-
var isObject2 =
|
|
57257
|
+
var namedTypes = types52.namedTypes;
|
|
57258
|
+
var isString3 = types52.builtInTypes.string;
|
|
57259
|
+
var isObject2 = types52.builtInTypes.object;
|
|
57259
57260
|
var PrintResult = function PrintResult2(code, sourceMap) {
|
|
57260
57261
|
assert_1.default.ok(this instanceof PrintResult2);
|
|
57261
57262
|
isString3.assert(code);
|
|
@@ -57417,7 +57418,7 @@ var require_printer = __commonJS2({
|
|
|
57417
57418
|
case "OptionalMemberExpression": {
|
|
57418
57419
|
parts.push(path3.call(print62, "object"));
|
|
57419
57420
|
var property = path3.call(print62, "property");
|
|
57420
|
-
var optional =
|
|
57421
|
+
var optional = types52.getFieldValue(n, "optional");
|
|
57421
57422
|
if (n.computed) {
|
|
57422
57423
|
parts.push(optional ? "?.[" : "[", property, "]");
|
|
57423
57424
|
} else {
|
|
@@ -57688,7 +57689,7 @@ var require_printer = __commonJS2({
|
|
|
57688
57689
|
if (n.typeArguments) {
|
|
57689
57690
|
parts.push(path3.call(print62, "typeArguments"));
|
|
57690
57691
|
}
|
|
57691
|
-
if (
|
|
57692
|
+
if (types52.getFieldValue(n, "optional")) {
|
|
57692
57693
|
parts.push("?.");
|
|
57693
57694
|
}
|
|
57694
57695
|
parts.push(printArgumentsList(path3, options, print62));
|
|
@@ -59367,8 +59368,8 @@ var require_printer = __commonJS2({
|
|
|
59367
59368
|
});
|
|
59368
59369
|
}
|
|
59369
59370
|
function getPossibleRaw(node2) {
|
|
59370
|
-
var value2 =
|
|
59371
|
-
var extra =
|
|
59371
|
+
var value2 = types52.getFieldValue(node2, "value");
|
|
59372
|
+
var extra = types52.getFieldValue(node2, "extra");
|
|
59372
59373
|
if (extra && typeof extra.raw === "string" && value2 == extra.rawValue) {
|
|
59373
59374
|
return extra.raw;
|
|
59374
59375
|
}
|
|
@@ -59414,8 +59415,8 @@ var require_main2 = __commonJS2({
|
|
|
59414
59415
|
exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
|
|
59415
59416
|
var tslib_1 = require_tslib();
|
|
59416
59417
|
var fs_1 = tslib_1.__importDefault(__require2("fs"));
|
|
59417
|
-
var
|
|
59418
|
-
exports.types =
|
|
59418
|
+
var types52 = tslib_1.__importStar(require_main());
|
|
59419
|
+
exports.types = types52;
|
|
59419
59420
|
var parser_1 = require_parser();
|
|
59420
59421
|
Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
|
|
59421
59422
|
return parser_1.parse;
|
|
@@ -63805,30 +63806,30 @@ var require_utils3 = __commonJS2({
|
|
|
63805
63806
|
validate22.oneOf = values;
|
|
63806
63807
|
return validate22;
|
|
63807
63808
|
}
|
|
63808
|
-
function assertNodeType(...
|
|
63809
|
+
function assertNodeType(...types52) {
|
|
63809
63810
|
function validate22(node2, key, val) {
|
|
63810
|
-
for (const type of
|
|
63811
|
+
for (const type of types52) {
|
|
63811
63812
|
if ((0, _is.default)(type, val)) {
|
|
63812
63813
|
(0, _validate.validateChild)(node2, key, val);
|
|
63813
63814
|
return;
|
|
63814
63815
|
}
|
|
63815
63816
|
}
|
|
63816
|
-
throw new TypeError(`Property ${key} of ${node2.type} expected node to be of a type ${JSON.stringify(
|
|
63817
|
+
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)}`);
|
|
63817
63818
|
}
|
|
63818
|
-
validate22.oneOfNodeTypes =
|
|
63819
|
+
validate22.oneOfNodeTypes = types52;
|
|
63819
63820
|
return validate22;
|
|
63820
63821
|
}
|
|
63821
|
-
function assertNodeOrValueType(...
|
|
63822
|
+
function assertNodeOrValueType(...types52) {
|
|
63822
63823
|
function validate22(node2, key, val) {
|
|
63823
|
-
for (const type of
|
|
63824
|
+
for (const type of types52) {
|
|
63824
63825
|
if (getType(val) === type || (0, _is.default)(type, val)) {
|
|
63825
63826
|
(0, _validate.validateChild)(node2, key, val);
|
|
63826
63827
|
return;
|
|
63827
63828
|
}
|
|
63828
63829
|
}
|
|
63829
|
-
throw new TypeError(`Property ${key} of ${node2.type} expected node to be of a type ${JSON.stringify(
|
|
63830
|
+
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)}`);
|
|
63830
63831
|
}
|
|
63831
|
-
validate22.oneOfNodeOrValueTypes =
|
|
63832
|
+
validate22.oneOfNodeOrValueTypes = types52;
|
|
63832
63833
|
return validate22;
|
|
63833
63834
|
}
|
|
63834
63835
|
function assertValueType(type) {
|
|
@@ -67406,7 +67407,7 @@ var require_generated2 = __commonJS2({
|
|
|
67406
67407
|
exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
|
|
67407
67408
|
exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
|
|
67408
67409
|
exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
|
|
67409
|
-
exports.tSTypeReference = exports.tsTypeReference =
|
|
67410
|
+
exports.tSTypeReference = exports.tsTypeReference = tsTypeReference2;
|
|
67410
67411
|
exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
|
|
67411
67412
|
exports.tSUnionType = exports.tsUnionType = tsUnionType;
|
|
67412
67413
|
exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
|
|
@@ -68232,10 +68233,10 @@ var require_generated2 = __commonJS2({
|
|
|
68232
68233
|
body
|
|
68233
68234
|
});
|
|
68234
68235
|
}
|
|
68235
|
-
function intersectionTypeAnnotation(
|
|
68236
|
+
function intersectionTypeAnnotation(types52) {
|
|
68236
68237
|
return (0, _validateNode.default)({
|
|
68237
68238
|
type: "IntersectionTypeAnnotation",
|
|
68238
|
-
types:
|
|
68239
|
+
types: types52
|
|
68239
68240
|
});
|
|
68240
68241
|
}
|
|
68241
68242
|
function mixedTypeAnnotation() {
|
|
@@ -68358,10 +68359,10 @@ var require_generated2 = __commonJS2({
|
|
|
68358
68359
|
type: "ThisTypeAnnotation"
|
|
68359
68360
|
};
|
|
68360
68361
|
}
|
|
68361
|
-
function tupleTypeAnnotation(
|
|
68362
|
+
function tupleTypeAnnotation(types52) {
|
|
68362
68363
|
return (0, _validateNode.default)({
|
|
68363
68364
|
type: "TupleTypeAnnotation",
|
|
68364
|
-
types:
|
|
68365
|
+
types: types52
|
|
68365
68366
|
});
|
|
68366
68367
|
}
|
|
68367
68368
|
function typeofTypeAnnotation(argument) {
|
|
@@ -68412,10 +68413,10 @@ var require_generated2 = __commonJS2({
|
|
|
68412
68413
|
params
|
|
68413
68414
|
});
|
|
68414
68415
|
}
|
|
68415
|
-
function unionTypeAnnotation(
|
|
68416
|
+
function unionTypeAnnotation(types52) {
|
|
68416
68417
|
return (0, _validateNode.default)({
|
|
68417
68418
|
type: "UnionTypeAnnotation",
|
|
68418
|
-
types:
|
|
68419
|
+
types: types52
|
|
68419
68420
|
});
|
|
68420
68421
|
}
|
|
68421
68422
|
function variance(kind) {
|
|
@@ -68868,7 +68869,7 @@ var require_generated2 = __commonJS2({
|
|
|
68868
68869
|
typeAnnotation: typeAnnotation2
|
|
68869
68870
|
});
|
|
68870
68871
|
}
|
|
68871
|
-
function
|
|
68872
|
+
function tsTypeReference2(typeName, typeParameters = null) {
|
|
68872
68873
|
return (0, _validateNode.default)({
|
|
68873
68874
|
type: "TSTypeReference",
|
|
68874
68875
|
typeName,
|
|
@@ -68928,16 +68929,16 @@ var require_generated2 = __commonJS2({
|
|
|
68928
68929
|
optional
|
|
68929
68930
|
});
|
|
68930
68931
|
}
|
|
68931
|
-
function tsUnionType(
|
|
68932
|
+
function tsUnionType(types52) {
|
|
68932
68933
|
return (0, _validateNode.default)({
|
|
68933
68934
|
type: "TSUnionType",
|
|
68934
|
-
types:
|
|
68935
|
+
types: types52
|
|
68935
68936
|
});
|
|
68936
68937
|
}
|
|
68937
|
-
function tsIntersectionType(
|
|
68938
|
+
function tsIntersectionType(types52) {
|
|
68938
68939
|
return (0, _validateNode.default)({
|
|
68939
68940
|
type: "TSIntersectionType",
|
|
68940
|
-
types:
|
|
68941
|
+
types: types52
|
|
68941
68942
|
});
|
|
68942
68943
|
}
|
|
68943
68944
|
function tsConditionalType(checkType, extendsType, trueType, falseType) {
|
|
@@ -70538,12 +70539,12 @@ var require_removeTypeDuplicates = __commonJS2({
|
|
|
70538
70539
|
const generics = /* @__PURE__ */ new Map();
|
|
70539
70540
|
const bases = /* @__PURE__ */ new Map();
|
|
70540
70541
|
const typeGroups = /* @__PURE__ */ new Set();
|
|
70541
|
-
const
|
|
70542
|
+
const types52 = [];
|
|
70542
70543
|
for (let i22 = 0; i22 < nodes.length; i22++) {
|
|
70543
70544
|
const node2 = nodes[i22];
|
|
70544
70545
|
if (!node2)
|
|
70545
70546
|
continue;
|
|
70546
|
-
if (
|
|
70547
|
+
if (types52.indexOf(node2) >= 0) {
|
|
70547
70548
|
continue;
|
|
70548
70549
|
}
|
|
70549
70550
|
if ((0, _generated.isAnyTypeAnnotation)(node2)) {
|
|
@@ -70577,15 +70578,15 @@ var require_removeTypeDuplicates = __commonJS2({
|
|
|
70577
70578
|
}
|
|
70578
70579
|
continue;
|
|
70579
70580
|
}
|
|
70580
|
-
|
|
70581
|
+
types52.push(node2);
|
|
70581
70582
|
}
|
|
70582
70583
|
for (const [, baseType] of bases) {
|
|
70583
|
-
|
|
70584
|
+
types52.push(baseType);
|
|
70584
70585
|
}
|
|
70585
70586
|
for (const [, genericName] of generics) {
|
|
70586
|
-
|
|
70587
|
+
types52.push(genericName);
|
|
70587
70588
|
}
|
|
70588
|
-
return
|
|
70589
|
+
return types52;
|
|
70589
70590
|
}
|
|
70590
70591
|
}
|
|
70591
70592
|
});
|
|
@@ -70598,8 +70599,8 @@ var require_createFlowUnionType = __commonJS2({
|
|
|
70598
70599
|
exports.default = createFlowUnionType;
|
|
70599
70600
|
var _generated = require_generated2();
|
|
70600
70601
|
var _removeTypeDuplicates = require_removeTypeDuplicates();
|
|
70601
|
-
function createFlowUnionType(
|
|
70602
|
-
const flattened = (0, _removeTypeDuplicates.default)(
|
|
70602
|
+
function createFlowUnionType(types52) {
|
|
70603
|
+
const flattened = (0, _removeTypeDuplicates.default)(types52);
|
|
70603
70604
|
if (flattened.length === 1) {
|
|
70604
70605
|
return flattened[0];
|
|
70605
70606
|
} else {
|
|
@@ -70624,12 +70625,12 @@ var require_removeTypeDuplicates2 = __commonJS2({
|
|
|
70624
70625
|
const generics = /* @__PURE__ */ new Map();
|
|
70625
70626
|
const bases = /* @__PURE__ */ new Map();
|
|
70626
70627
|
const typeGroups = /* @__PURE__ */ new Set();
|
|
70627
|
-
const
|
|
70628
|
+
const types52 = [];
|
|
70628
70629
|
for (let i22 = 0; i22 < nodes.length; i22++) {
|
|
70629
70630
|
const node2 = nodes[i22];
|
|
70630
70631
|
if (!node2)
|
|
70631
70632
|
continue;
|
|
70632
|
-
if (
|
|
70633
|
+
if (types52.indexOf(node2) >= 0) {
|
|
70633
70634
|
continue;
|
|
70634
70635
|
}
|
|
70635
70636
|
if ((0, _generated.isTSAnyKeyword)(node2)) {
|
|
@@ -70663,15 +70664,15 @@ var require_removeTypeDuplicates2 = __commonJS2({
|
|
|
70663
70664
|
}
|
|
70664
70665
|
continue;
|
|
70665
70666
|
}
|
|
70666
|
-
|
|
70667
|
+
types52.push(node2);
|
|
70667
70668
|
}
|
|
70668
70669
|
for (const [, baseType] of bases) {
|
|
70669
|
-
|
|
70670
|
+
types52.push(baseType);
|
|
70670
70671
|
}
|
|
70671
70672
|
for (const [, genericName] of generics) {
|
|
70672
|
-
|
|
70673
|
+
types52.push(genericName);
|
|
70673
70674
|
}
|
|
70674
|
-
return
|
|
70675
|
+
return types52;
|
|
70675
70676
|
}
|
|
70676
70677
|
}
|
|
70677
70678
|
});
|
|
@@ -70686,10 +70687,10 @@ var require_createTSUnionType = __commonJS2({
|
|
|
70686
70687
|
var _removeTypeDuplicates = require_removeTypeDuplicates2();
|
|
70687
70688
|
var _index = require_generated();
|
|
70688
70689
|
function createTSUnionType(typeAnnotations) {
|
|
70689
|
-
const
|
|
70690
|
+
const types52 = typeAnnotations.map((type) => {
|
|
70690
70691
|
return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
|
|
70691
70692
|
});
|
|
70692
|
-
const flattened = (0, _removeTypeDuplicates.default)(
|
|
70693
|
+
const flattened = (0, _removeTypeDuplicates.default)(types52);
|
|
70693
70694
|
if (flattened.length === 1) {
|
|
70694
70695
|
return flattened[0];
|
|
70695
70696
|
} else {
|
|
@@ -75032,7 +75033,7 @@ var printDocASTReducer = {
|
|
|
75032
75033
|
leave: ({ name, interfaces, directives, fields }) => join(["interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
|
|
75033
75034
|
},
|
|
75034
75035
|
UnionTypeDefinition: {
|
|
75035
|
-
leave: ({ name, directives, types:
|
|
75036
|
+
leave: ({ name, directives, types: types52 }) => join(["union", name, join(directives, " "), wrap("= ", join(types52, " | "))], " ")
|
|
75036
75037
|
},
|
|
75037
75038
|
EnumTypeDefinition: {
|
|
75038
75039
|
leave: ({ name, directives, values }) => join(["enum", name, join(directives, " "), block(values)], " ")
|
|
@@ -75059,7 +75060,7 @@ var printDocASTReducer = {
|
|
|
75059
75060
|
leave: ({ name, interfaces, directives, fields }) => join(["extend interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
|
|
75060
75061
|
},
|
|
75061
75062
|
UnionTypeExtension: {
|
|
75062
|
-
leave: ({ name, directives, types:
|
|
75063
|
+
leave: ({ name, directives, types: types52 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types52, " | "))], " ")
|
|
75063
75064
|
},
|
|
75064
75065
|
EnumTypeExtension: {
|
|
75065
75066
|
leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
|
|
@@ -75915,8 +75916,8 @@ function healTypes(originalTypeMap, directives) {
|
|
|
75915
75916
|
}
|
|
75916
75917
|
}
|
|
75917
75918
|
function healUnderlyingTypes(type) {
|
|
75918
|
-
const
|
|
75919
|
-
|
|
75919
|
+
const types52 = type.getTypes();
|
|
75920
|
+
types52.push(...types52.splice(0).map((t32) => healType(t32)).filter(Boolean));
|
|
75920
75921
|
}
|
|
75921
75922
|
function healType(type) {
|
|
75922
75923
|
if (isListType5(type)) {
|
|
@@ -76655,11 +76656,11 @@ function mergeEnum(e1, e22, config2) {
|
|
|
76655
76656
|
kind: Kind7.ENUM_TYPE_DEFINITION
|
|
76656
76657
|
} : e1;
|
|
76657
76658
|
}
|
|
76658
|
-
function isStringTypes(
|
|
76659
|
-
return typeof
|
|
76659
|
+
function isStringTypes(types52) {
|
|
76660
|
+
return typeof types52 === "string";
|
|
76660
76661
|
}
|
|
76661
|
-
function isSourceTypes(
|
|
76662
|
-
return
|
|
76662
|
+
function isSourceTypes(types52) {
|
|
76663
|
+
return types52 instanceof Source;
|
|
76663
76664
|
}
|
|
76664
76665
|
function extractType(type) {
|
|
76665
76666
|
let visitedType = type;
|
|
@@ -77297,45 +77298,6 @@ function deepMerge(...objects) {
|
|
|
77297
77298
|
}
|
|
77298
77299
|
return mergedObj;
|
|
77299
77300
|
}
|
|
77300
|
-
async function marshalSelection({
|
|
77301
|
-
selection,
|
|
77302
|
-
data: data2
|
|
77303
|
-
}) {
|
|
77304
|
-
const config2 = getCurrentConfig();
|
|
77305
|
-
if (data2 === null || typeof data2 === "undefined") {
|
|
77306
|
-
return data2;
|
|
77307
|
-
}
|
|
77308
|
-
if (Array.isArray(data2)) {
|
|
77309
|
-
return await Promise.all(data2.map((val) => marshalSelection({ selection, data: val })));
|
|
77310
|
-
}
|
|
77311
|
-
const targetSelection = getFieldsForType(selection, data2["__typename"], false);
|
|
77312
|
-
return Object.fromEntries(
|
|
77313
|
-
await Promise.all(
|
|
77314
|
-
Object.entries(data2).map(async ([fieldName, value2]) => {
|
|
77315
|
-
const { type, selection: selection2 } = targetSelection[fieldName];
|
|
77316
|
-
if (!type) {
|
|
77317
|
-
return [fieldName, value2];
|
|
77318
|
-
}
|
|
77319
|
-
if (selection2) {
|
|
77320
|
-
return [fieldName, await marshalSelection({ selection: selection2, data: value2 })];
|
|
77321
|
-
}
|
|
77322
|
-
if (config2.scalars?.[type]) {
|
|
77323
|
-
const marshalFn = config2.scalars[type].marshal;
|
|
77324
|
-
if (!marshalFn) {
|
|
77325
|
-
throw new Error(
|
|
77326
|
-
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
77327
|
-
);
|
|
77328
|
-
}
|
|
77329
|
-
if (Array.isArray(value2)) {
|
|
77330
|
-
return [fieldName, value2.map(marshalFn)];
|
|
77331
|
-
}
|
|
77332
|
-
return [fieldName, marshalFn(value2)];
|
|
77333
|
-
}
|
|
77334
|
-
return [fieldName, value2];
|
|
77335
|
-
})
|
|
77336
|
-
)
|
|
77337
|
-
);
|
|
77338
|
-
}
|
|
77339
77301
|
var CachePolicy = {
|
|
77340
77302
|
CacheOrNetwork: "CacheOrNetwork",
|
|
77341
77303
|
CacheOnly: "CacheOnly",
|
|
@@ -77357,11 +77319,6 @@ var CompiledFragmentKind = ArtifactKind.Fragment;
|
|
|
77357
77319
|
var CompiledMutationKind = ArtifactKind.Mutation;
|
|
77358
77320
|
var CompiledQueryKind = ArtifactKind.Query;
|
|
77359
77321
|
var CompiledSubscriptionKind = ArtifactKind.Subscription;
|
|
77360
|
-
var DataSource = {
|
|
77361
|
-
Cache: "cache",
|
|
77362
|
-
Network: "network",
|
|
77363
|
-
Ssr: "ssr"
|
|
77364
|
-
};
|
|
77365
77322
|
var fragmentKey = " $fragments";
|
|
77366
77323
|
var PendingValue = Symbol("houdini_loading");
|
|
77367
77324
|
var computeKey = ({ field, args }) => {
|
|
@@ -81146,180 +81103,6 @@ function defaultComponentField({
|
|
|
81146
81103
|
}
|
|
81147
81104
|
var cache_default = new Cache();
|
|
81148
81105
|
var serverSide = typeof globalThis.window === "undefined";
|
|
81149
|
-
var documentPlugin = (kind, source) => {
|
|
81150
|
-
return () => {
|
|
81151
|
-
const sourceHandlers = source();
|
|
81152
|
-
const enterWrapper = (handler) => {
|
|
81153
|
-
return !handler ? void 0 : (ctx, handlers2) => {
|
|
81154
|
-
if (ctx.artifact.kind !== kind) {
|
|
81155
|
-
return handlers2.next(ctx);
|
|
81156
|
-
}
|
|
81157
|
-
return handler(ctx, handlers2);
|
|
81158
|
-
};
|
|
81159
|
-
};
|
|
81160
|
-
const exitWrapper = (handler) => {
|
|
81161
|
-
return !handler ? void 0 : (ctx, handlers2) => {
|
|
81162
|
-
if (ctx.artifact.kind !== kind) {
|
|
81163
|
-
return handlers2.resolve(ctx);
|
|
81164
|
-
}
|
|
81165
|
-
return handler(ctx, handlers2);
|
|
81166
|
-
};
|
|
81167
|
-
};
|
|
81168
|
-
return {
|
|
81169
|
-
start: enterWrapper(sourceHandlers.start),
|
|
81170
|
-
network: enterWrapper(sourceHandlers.network),
|
|
81171
|
-
afterNetwork: exitWrapper(sourceHandlers.afterNetwork),
|
|
81172
|
-
end: exitWrapper(sourceHandlers.end),
|
|
81173
|
-
catch: sourceHandlers.catch ? (ctx, handlers2) => sourceHandlers.catch(ctx, handlers2) : void 0,
|
|
81174
|
-
cleanup: (...args) => sourceHandlers.cleanup?.(...args)
|
|
81175
|
-
};
|
|
81176
|
-
};
|
|
81177
|
-
};
|
|
81178
|
-
var query = documentPlugin(ArtifactKind.Query, function() {
|
|
81179
|
-
let subscriptionSpec = null;
|
|
81180
|
-
let lastVariables = null;
|
|
81181
|
-
return {
|
|
81182
|
-
start(ctx, { next }) {
|
|
81183
|
-
ctx.variables = {
|
|
81184
|
-
...lastVariables,
|
|
81185
|
-
...ctx.variables
|
|
81186
|
-
};
|
|
81187
|
-
next(ctx);
|
|
81188
|
-
},
|
|
81189
|
-
end(ctx, { resolve: resolve22, marshalVariables: marshalVariables2, variablesChanged: variablesChanged2 }) {
|
|
81190
|
-
if (variablesChanged2(ctx) && !ctx.cacheParams?.disableSubscriptions) {
|
|
81191
|
-
if (subscriptionSpec) {
|
|
81192
|
-
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
81193
|
-
}
|
|
81194
|
-
lastVariables = { ...marshalVariables2(ctx) };
|
|
81195
|
-
const variables = lastVariables;
|
|
81196
|
-
subscriptionSpec = {
|
|
81197
|
-
rootType: ctx.artifact.rootType,
|
|
81198
|
-
selection: ctx.artifact.selection,
|
|
81199
|
-
variables: () => variables,
|
|
81200
|
-
set: (newValue) => {
|
|
81201
|
-
resolve22(ctx, {
|
|
81202
|
-
data: newValue,
|
|
81203
|
-
errors: null,
|
|
81204
|
-
fetching: false,
|
|
81205
|
-
partial: false,
|
|
81206
|
-
stale: false,
|
|
81207
|
-
source: DataSource.Cache,
|
|
81208
|
-
variables: ctx.variables ?? {}
|
|
81209
|
-
});
|
|
81210
|
-
}
|
|
81211
|
-
};
|
|
81212
|
-
cache_default.subscribe(subscriptionSpec, lastVariables);
|
|
81213
|
-
}
|
|
81214
|
-
resolve22(ctx);
|
|
81215
|
-
},
|
|
81216
|
-
cleanup() {
|
|
81217
|
-
if (subscriptionSpec) {
|
|
81218
|
-
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
|
|
81219
|
-
lastVariables = null;
|
|
81220
|
-
}
|
|
81221
|
-
}
|
|
81222
|
-
};
|
|
81223
|
-
});
|
|
81224
|
-
var fragment = documentPlugin(ArtifactKind.Fragment, function() {
|
|
81225
|
-
let subscriptionSpec = null;
|
|
81226
|
-
let lastReference = null;
|
|
81227
|
-
return {
|
|
81228
|
-
start(ctx, { next, resolve: resolve22, variablesChanged: variablesChanged2, marshalVariables: marshalVariables2 }) {
|
|
81229
|
-
if (!ctx.stuff.parentID) {
|
|
81230
|
-
return next(ctx);
|
|
81231
|
-
}
|
|
81232
|
-
const currentReference = {
|
|
81233
|
-
parent: ctx.stuff.parentID,
|
|
81234
|
-
variables: marshalVariables2(ctx)
|
|
81235
|
-
};
|
|
81236
|
-
if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged2(ctx))) {
|
|
81237
|
-
if (subscriptionSpec) {
|
|
81238
|
-
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
81239
|
-
}
|
|
81240
|
-
const variables = marshalVariables2(ctx);
|
|
81241
|
-
subscriptionSpec = {
|
|
81242
|
-
rootType: ctx.artifact.rootType,
|
|
81243
|
-
selection: ctx.artifact.selection,
|
|
81244
|
-
variables: () => variables,
|
|
81245
|
-
parentID: ctx.stuff.parentID,
|
|
81246
|
-
set: (newValue) => {
|
|
81247
|
-
resolve22(ctx, {
|
|
81248
|
-
data: newValue,
|
|
81249
|
-
errors: null,
|
|
81250
|
-
fetching: false,
|
|
81251
|
-
partial: false,
|
|
81252
|
-
stale: false,
|
|
81253
|
-
source: DataSource.Cache,
|
|
81254
|
-
variables
|
|
81255
|
-
});
|
|
81256
|
-
}
|
|
81257
|
-
};
|
|
81258
|
-
cache_default.subscribe(subscriptionSpec, variables);
|
|
81259
|
-
lastReference = currentReference;
|
|
81260
|
-
}
|
|
81261
|
-
next(ctx);
|
|
81262
|
-
},
|
|
81263
|
-
cleanup() {
|
|
81264
|
-
if (subscriptionSpec) {
|
|
81265
|
-
cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
|
|
81266
|
-
}
|
|
81267
|
-
}
|
|
81268
|
-
};
|
|
81269
|
-
});
|
|
81270
|
-
var mutation = documentPlugin(ArtifactKind.Mutation, () => {
|
|
81271
|
-
return {
|
|
81272
|
-
async start(ctx, { next, marshalVariables: marshalVariables2 }) {
|
|
81273
|
-
const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
|
|
81274
|
-
const optimisticResponse = ctx.stuff.optimisticResponse;
|
|
81275
|
-
let toNotify = [];
|
|
81276
|
-
if (optimisticResponse) {
|
|
81277
|
-
toNotify = cache_default.write({
|
|
81278
|
-
selection: ctx.artifact.selection,
|
|
81279
|
-
data: await marshalSelection({
|
|
81280
|
-
selection: ctx.artifact.selection,
|
|
81281
|
-
data: optimisticResponse
|
|
81282
|
-
}),
|
|
81283
|
-
variables: marshalVariables2(ctx),
|
|
81284
|
-
layer: layerOptimistic.id
|
|
81285
|
-
});
|
|
81286
|
-
}
|
|
81287
|
-
ctx.cacheParams = {
|
|
81288
|
-
...ctx.cacheParams,
|
|
81289
|
-
layer: layerOptimistic,
|
|
81290
|
-
notifySubscribers: toNotify,
|
|
81291
|
-
forceNotify: true
|
|
81292
|
-
};
|
|
81293
|
-
next(ctx);
|
|
81294
|
-
},
|
|
81295
|
-
afterNetwork(ctx, { resolve: resolve22 }) {
|
|
81296
|
-
if (ctx.cacheParams?.layer) {
|
|
81297
|
-
cache_default.clearLayer(ctx.cacheParams.layer.id);
|
|
81298
|
-
}
|
|
81299
|
-
resolve22(ctx);
|
|
81300
|
-
},
|
|
81301
|
-
end(ctx, { resolve: resolve22, value: value2 }) {
|
|
81302
|
-
const hasErrors = value2.errors && value2.errors.length > 0;
|
|
81303
|
-
if (hasErrors) {
|
|
81304
|
-
if (ctx.cacheParams?.layer) {
|
|
81305
|
-
cache_default.clearLayer(ctx.cacheParams.layer.id);
|
|
81306
|
-
}
|
|
81307
|
-
}
|
|
81308
|
-
if (ctx.cacheParams?.layer) {
|
|
81309
|
-
cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
|
|
81310
|
-
}
|
|
81311
|
-
resolve22(ctx);
|
|
81312
|
-
},
|
|
81313
|
-
catch(ctx, { error: error2 }) {
|
|
81314
|
-
if (ctx.cacheParams?.layer) {
|
|
81315
|
-
const { layer } = ctx.cacheParams;
|
|
81316
|
-
cache_default.clearLayer(layer.id);
|
|
81317
|
-
cache_default._internal_unstable.storage.resolveLayer(layer.id);
|
|
81318
|
-
}
|
|
81319
|
-
throw error2;
|
|
81320
|
-
}
|
|
81321
|
-
};
|
|
81322
|
-
});
|
|
81323
81106
|
var LogLevel = {
|
|
81324
81107
|
Full: "full",
|
|
81325
81108
|
Summary: "summary",
|
|
@@ -81384,7 +81167,7 @@ var Config = class {
|
|
|
81384
81167
|
defaultListTarget = null,
|
|
81385
81168
|
defaultPaginateMode = PaginateMode.Infinite,
|
|
81386
81169
|
defaultKeys,
|
|
81387
|
-
types:
|
|
81170
|
+
types: types52 = {},
|
|
81388
81171
|
logLevel,
|
|
81389
81172
|
defaultFragmentMasking = "enable",
|
|
81390
81173
|
watchSchema,
|
|
@@ -81432,10 +81215,10 @@ var Config = class {
|
|
|
81432
81215
|
if (defaultKeys) {
|
|
81433
81216
|
this.defaultKeys = defaultKeys;
|
|
81434
81217
|
}
|
|
81435
|
-
if (
|
|
81218
|
+
if (types52) {
|
|
81436
81219
|
this.typeConfig = {
|
|
81437
81220
|
...this.typeConfig,
|
|
81438
|
-
...
|
|
81221
|
+
...types52
|
|
81439
81222
|
};
|
|
81440
81223
|
}
|
|
81441
81224
|
}
|
|
@@ -81753,6 +81536,9 @@ var Config = class {
|
|
|
81753
81536
|
get loadingDirective() {
|
|
81754
81537
|
return `loading`;
|
|
81755
81538
|
}
|
|
81539
|
+
get runtimeScalarDirective() {
|
|
81540
|
+
return "__houdini__runtimeScalar";
|
|
81541
|
+
}
|
|
81756
81542
|
get whenDirective() {
|
|
81757
81543
|
return "when";
|
|
81758
81544
|
}
|
|
@@ -81823,7 +81609,7 @@ var Config = class {
|
|
|
81823
81609
|
const internalDirectives = this.#newSchemaInstance?.getDirectives().reduce((list, directive) => {
|
|
81824
81610
|
return list.concat(directive.name);
|
|
81825
81611
|
}, []) ?? [];
|
|
81826
|
-
return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name));
|
|
81612
|
+
return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name) || name === this.runtimeScalarDirective);
|
|
81827
81613
|
}
|
|
81828
81614
|
get componentFieldDirective() {
|
|
81829
81615
|
return "componentField";
|
|
@@ -81865,11 +81651,11 @@ var Config = class {
|
|
|
81865
81651
|
registerFragmentVariablesHash({
|
|
81866
81652
|
hash,
|
|
81867
81653
|
args,
|
|
81868
|
-
fragment:
|
|
81654
|
+
fragment: fragment2
|
|
81869
81655
|
}) {
|
|
81870
81656
|
this.#fragmentVariableMaps[hash] = {
|
|
81871
81657
|
args: this.serializeValueMap(args),
|
|
81872
|
-
fragment:
|
|
81658
|
+
fragment: fragment2
|
|
81873
81659
|
};
|
|
81874
81660
|
}
|
|
81875
81661
|
getFragmentVariablesHash(hash) {
|
|
@@ -82222,7 +82008,7 @@ function formatErrors(e22, afterError) {
|
|
|
82222
82008
|
afterError?.(e22);
|
|
82223
82009
|
}
|
|
82224
82010
|
}
|
|
82225
|
-
function unwrapType(config2, type, wrappers = []) {
|
|
82011
|
+
function unwrapType(config2, type, wrappers = [], convertRuntimeScalars) {
|
|
82226
82012
|
if (type.kind === "NonNullType") {
|
|
82227
82013
|
return unwrapType(config2, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
82228
82014
|
}
|
|
@@ -82238,9 +82024,14 @@ function unwrapType(config2, type, wrappers = []) {
|
|
|
82238
82024
|
if (type instanceof graphql3.GraphQLList) {
|
|
82239
82025
|
return unwrapType(config2, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
82240
82026
|
}
|
|
82027
|
+
if (convertRuntimeScalars && config2.configFile.features?.runtimeScalars?.[type.name.value]) {
|
|
82028
|
+
type = config2.schema.getType(
|
|
82029
|
+
config2.configFile.features?.runtimeScalars?.[type.name.value].type
|
|
82030
|
+
);
|
|
82031
|
+
}
|
|
82241
82032
|
const namedType = config2.schema.getType(type.name.value || type.name);
|
|
82242
82033
|
if (!namedType) {
|
|
82243
|
-
throw new Error("
|
|
82034
|
+
throw new Error("Unknown type: " + type.name.value || type.name);
|
|
82244
82035
|
}
|
|
82245
82036
|
return { type: namedType, wrappers };
|
|
82246
82037
|
}
|
|
@@ -82287,6 +82078,8 @@ async function printJS(script, options) {
|
|
|
82287
82078
|
}
|
|
82288
82079
|
var recast = __toESM2(require_main2(), 1);
|
|
82289
82080
|
var AST = recast.types.builders;
|
|
82081
|
+
var recast2 = __toESM2(require_main2(), 1);
|
|
82082
|
+
var AST2 = recast2.types.builders;
|
|
82290
82083
|
var WalkerBase = class {
|
|
82291
82084
|
constructor() {
|
|
82292
82085
|
this.should_skip = false;
|
|
@@ -82447,7 +82240,7 @@ async function find_graphql(config2, parsedScript, walker) {
|
|
|
82447
82240
|
} else if (!documentString) {
|
|
82448
82241
|
return;
|
|
82449
82242
|
}
|
|
82450
|
-
const parsedTag =
|
|
82243
|
+
const parsedTag = graphql5.parse(documentString);
|
|
82451
82244
|
if (walker.where && !walker.where(parsedTag, { node: node2, parent: parent2 })) {
|
|
82452
82245
|
return;
|
|
82453
82246
|
}
|
|
@@ -82579,7 +82372,7 @@ function extractAnonymousQuery(config2, raw, expr, propName) {
|
|
|
82579
82372
|
};
|
|
82580
82373
|
return defs.concat([
|
|
82581
82374
|
{
|
|
82582
|
-
raw:
|
|
82375
|
+
raw: graphql5.print(parsed),
|
|
82583
82376
|
parsed
|
|
82584
82377
|
}
|
|
82585
82378
|
]);
|
|
@@ -95247,8 +95040,8 @@ function read_tag_name(parser) {
|
|
|
95247
95040
|
let i3 = parser.stack.length;
|
|
95248
95041
|
let legal = false;
|
|
95249
95042
|
while (i3--) {
|
|
95250
|
-
const
|
|
95251
|
-
if (
|
|
95043
|
+
const fragment2 = parser.stack[i3];
|
|
95044
|
+
if (fragment2.type === "IfBlock" || fragment2.type === "EachBlock" || fragment2.type === "InlineComponent") {
|
|
95252
95045
|
legal = true;
|
|
95253
95046
|
break;
|
|
95254
95047
|
}
|
|
@@ -95955,7 +95748,7 @@ function text(parser) {
|
|
|
95955
95748
|
};
|
|
95956
95749
|
parser.current().children.push(node2);
|
|
95957
95750
|
}
|
|
95958
|
-
function
|
|
95751
|
+
function fragment(parser) {
|
|
95959
95752
|
if (parser.match("<")) {
|
|
95960
95753
|
return tag;
|
|
95961
95754
|
}
|
|
@@ -96117,9 +95910,9 @@ var Parser$1 = class {
|
|
|
96117
95910
|
children: []
|
|
96118
95911
|
};
|
|
96119
95912
|
this.stack.push(this.html);
|
|
96120
|
-
let state =
|
|
95913
|
+
let state = fragment;
|
|
96121
95914
|
while (this.index < this.template.length) {
|
|
96122
|
-
state = state(this) ||
|
|
95915
|
+
state = state(this) || fragment;
|
|
96123
95916
|
}
|
|
96124
95917
|
if (this.stack.length > 1) {
|
|
96125
95918
|
const current2 = this.current();
|
|
@@ -96130,7 +95923,7 @@ var Parser$1 = class {
|
|
|
96130
95923
|
message: `${type} was left open`
|
|
96131
95924
|
}, current2.start);
|
|
96132
95925
|
}
|
|
96133
|
-
if (state !==
|
|
95926
|
+
if (state !== fragment) {
|
|
96134
95927
|
this.error({
|
|
96135
95928
|
code: "unexpected-eof",
|
|
96136
95929
|
message: "Unexpected end of input"
|
|
@@ -110455,8 +110248,8 @@ import * as graphql32 from "graphql";
|
|
|
110455
110248
|
import { getNamedType as getNamedType32, isScalarType as isScalarType52 } from "graphql";
|
|
110456
110249
|
import { parse as parse9 } from "graphql";
|
|
110457
110250
|
import { GraphQLError as GraphQLError2 } from "graphql";
|
|
110458
|
-
import { print as print5, Kind as Kind32, isSpecifiedScalarType as isSpecifiedScalarType5, isIntrospectionType as isIntrospectionType2, isSpecifiedDirective as isSpecifiedDirective3, astFromValue as astFromValue2, GraphQLDeprecatedDirective as GraphQLDeprecatedDirective2, isObjectType as isObjectType10, isInterfaceType as isInterfaceType7, isUnionType as isUnionType7, isInputObjectType as isInputObjectType7, isEnumType as
|
|
110459
|
-
import { isNonNullType as
|
|
110251
|
+
import { print as print5, Kind as Kind32, isSpecifiedScalarType as isSpecifiedScalarType5, isIntrospectionType as isIntrospectionType2, isSpecifiedDirective as isSpecifiedDirective3, astFromValue as astFromValue2, GraphQLDeprecatedDirective as GraphQLDeprecatedDirective2, isObjectType as isObjectType10, isInterfaceType as isInterfaceType7, isUnionType as isUnionType7, isInputObjectType as isInputObjectType7, isEnumType as isEnumType7, isScalarType as isScalarType8 } from "graphql";
|
|
110252
|
+
import { isNonNullType as isNonNullType7, Kind as Kind20, isListType as isListType7 } from "graphql";
|
|
110460
110253
|
import { Kind as Kind22 } from "graphql";
|
|
110461
110254
|
import { visit as visit4, TokenKind as TokenKind2 } from "graphql";
|
|
110462
110255
|
import { GraphQLObjectType as GraphQLObjectType32, GraphQLSchema as GraphQLSchema2, isInterfaceType as isInterfaceType32, isEnumType as isEnumType32, isObjectType as isObjectType42, isScalarType as isScalarType32, isUnionType as isUnionType32, isInputObjectType as isInputObjectType42, GraphQLInputObjectType as GraphQLInputObjectType32, GraphQLInterfaceType as GraphQLInterfaceType32, isLeafType as isLeafType22, isListType as isListType42, isNonNullType as isNonNullType32, isNamedType as isNamedType22, GraphQLList as GraphQLList32, GraphQLNonNull as GraphQLNonNull32, GraphQLEnumType as GraphQLEnumType22, Kind as Kind52 } from "graphql";
|
|
@@ -110488,7 +110281,7 @@ import fs3 from "node:fs/promises";
|
|
|
110488
110281
|
import { promisify as promisify3 } from "node:util";
|
|
110489
110282
|
import os2 from "node:os";
|
|
110490
110283
|
import path2 from "node:path";
|
|
110491
|
-
import * as
|
|
110284
|
+
import * as graphql7 from "graphql";
|
|
110492
110285
|
import Stream3, { PassThrough as PassThrough3 } from "node:stream";
|
|
110493
110286
|
import { types as types4, deprecate as deprecate3, promisify as promisify22 } from "node:util";
|
|
110494
110287
|
import { Buffer as Buffer22 } from "node:buffer";
|
|
@@ -110499,29 +110292,28 @@ import { deprecate as deprecate22 } from "node:util";
|
|
|
110499
110292
|
import * as graphql33 from "graphql";
|
|
110500
110293
|
import * as graphql42 from "graphql";
|
|
110501
110294
|
import * as graphql52 from "graphql";
|
|
110502
|
-
import * as graphql16 from "graphql";
|
|
110503
|
-
import * as graphql7 from "graphql";
|
|
110504
110295
|
import * as graphql62 from "graphql";
|
|
110505
|
-
import
|
|
110296
|
+
import * as graphql17 from "graphql";
|
|
110506
110297
|
import * as graphql8 from "graphql";
|
|
110507
|
-
import * as
|
|
110298
|
+
import * as graphql72 from "graphql";
|
|
110299
|
+
import { Kind as GraphqlKinds } from "graphql";
|
|
110508
110300
|
import * as graphql9 from "graphql";
|
|
110509
|
-
import * as graphql15 from "graphql";
|
|
110510
|
-
import * as graphql13 from "graphql";
|
|
110511
110301
|
import * as graphql11 from "graphql";
|
|
110512
|
-
import * as
|
|
110302
|
+
import * as graphql10 from "graphql";
|
|
110303
|
+
import * as graphql16 from "graphql";
|
|
110513
110304
|
import * as graphql14 from "graphql";
|
|
110514
|
-
import * as
|
|
110305
|
+
import * as graphql12 from "graphql";
|
|
110306
|
+
import * as graphql13 from "graphql";
|
|
110307
|
+
import * as graphql15 from "graphql";
|
|
110515
110308
|
import * as graphql18 from "graphql";
|
|
110516
|
-
import * as
|
|
110309
|
+
import * as graphql19 from "graphql";
|
|
110517
110310
|
import * as graphql20 from "graphql";
|
|
110518
110311
|
import * as graphql21 from "graphql";
|
|
110519
|
-
import * as graphql222 from "graphql";
|
|
110520
|
-
import * as graphql24 from "graphql";
|
|
110521
110312
|
import * as graphql23 from "graphql";
|
|
110313
|
+
import * as graphql222 from "graphql";
|
|
110522
110314
|
import { parse as parse92 } from "graphql";
|
|
110523
110315
|
import { GraphQLError as GraphQLError32 } from "graphql";
|
|
110524
|
-
import { GraphQLDeprecatedDirective as GraphQLDeprecatedDirective22, isEnumType as
|
|
110316
|
+
import { GraphQLDeprecatedDirective as GraphQLDeprecatedDirective22, isEnumType as isEnumType122, isInputObjectType as isInputObjectType9, isInterfaceType as isInterfaceType92, isIntrospectionType as isIntrospectionType22, isObjectType as isObjectType132, isScalarType as isScalarType122, isSpecifiedDirective as isSpecifiedDirective32, isSpecifiedScalarType as isSpecifiedScalarType52, isUnionType as isUnionType112, Kind as Kind292, print as print102 } from "graphql";
|
|
110525
110317
|
import { isListType as isListType72, isNonNullType as isNonNullType92, Kind as Kind262 } from "graphql";
|
|
110526
110318
|
import { isEnumType as isEnumType112, isInputObjectType as isInputObjectType82, isLeafType as isLeafType42, isListType as isListType82, isNonNullType as isNonNullType102, Kind as Kind282 } from "graphql";
|
|
110527
110319
|
import { Kind as Kind272 } from "graphql";
|
|
@@ -110538,6 +110330,7 @@ import { Kind as Kind36 } from "graphql";
|
|
|
110538
110330
|
import { Kind as Kind37 } from "graphql";
|
|
110539
110331
|
import { Kind as Kind38 } from "graphql";
|
|
110540
110332
|
import { parse as parse102, Kind as Kind40, isSchema as isSchema32, isDefinitionNode as isDefinitionNode22 } from "graphql";
|
|
110333
|
+
import * as graphql24 from "graphql";
|
|
110541
110334
|
import * as graphql25 from "graphql";
|
|
110542
110335
|
import * as graphql26 from "graphql";
|
|
110543
110336
|
import * as graphql27 from "graphql";
|
|
@@ -142247,7 +142040,7 @@ var require_path_visitor3 = __commonJS3({
|
|
|
142247
142040
|
}
|
|
142248
142041
|
return target;
|
|
142249
142042
|
}
|
|
142250
|
-
PathVisitor.visit = function
|
|
142043
|
+
PathVisitor.visit = function visit202(node2, methods) {
|
|
142251
142044
|
return PathVisitor.fromMethodsObject(methods).visit(node2);
|
|
142252
142045
|
};
|
|
142253
142046
|
var PVp = PathVisitor.prototype;
|
|
@@ -142438,7 +142231,7 @@ var require_path_visitor3 = __commonJS3({
|
|
|
142438
142231
|
this.needToCallTraverse = false;
|
|
142439
142232
|
return visitChildren(path3, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
|
|
142440
142233
|
};
|
|
142441
|
-
sharedContextProtoMethods.visit = function
|
|
142234
|
+
sharedContextProtoMethods.visit = function visit202(path3, newVisitor) {
|
|
142442
142235
|
if (!(this instanceof this.Context)) {
|
|
142443
142236
|
throw new Error("");
|
|
142444
142237
|
}
|
|
@@ -143781,7 +143574,7 @@ var require_main5 = __commonJS3({
|
|
|
143781
143574
|
var someField = _a.someField;
|
|
143782
143575
|
var Type = _a.Type;
|
|
143783
143576
|
var use = _a.use;
|
|
143784
|
-
var
|
|
143577
|
+
var visit202 = _a.visit;
|
|
143785
143578
|
exports.astNodesAreEquivalent = astNodesAreEquivalent;
|
|
143786
143579
|
exports.builders = builders;
|
|
143787
143580
|
exports.builtInTypes = builtInTypes;
|
|
@@ -143798,7 +143591,7 @@ var require_main5 = __commonJS3({
|
|
|
143798
143591
|
exports.someField = someField;
|
|
143799
143592
|
exports.Type = Type;
|
|
143800
143593
|
exports.use = use;
|
|
143801
|
-
exports.visit =
|
|
143594
|
+
exports.visit = visit202;
|
|
143802
143595
|
Object.assign(namedTypes_1.namedTypes, n);
|
|
143803
143596
|
}
|
|
143804
143597
|
});
|
|
@@ -171630,45 +171423,6 @@ function deepMerge3(...objects) {
|
|
|
171630
171423
|
}
|
|
171631
171424
|
return mergedObj;
|
|
171632
171425
|
}
|
|
171633
|
-
async function marshalSelection2({
|
|
171634
|
-
selection,
|
|
171635
|
-
data: data2
|
|
171636
|
-
}) {
|
|
171637
|
-
const config2 = getCurrentConfig2();
|
|
171638
|
-
if (data2 === null || typeof data2 === "undefined") {
|
|
171639
|
-
return data2;
|
|
171640
|
-
}
|
|
171641
|
-
if (Array.isArray(data2)) {
|
|
171642
|
-
return await Promise.all(data2.map((val) => marshalSelection2({ selection, data: val })));
|
|
171643
|
-
}
|
|
171644
|
-
const targetSelection = getFieldsForType2(selection, data2["__typename"], false);
|
|
171645
|
-
return Object.fromEntries(
|
|
171646
|
-
await Promise.all(
|
|
171647
|
-
Object.entries(data2).map(async ([fieldName, value2]) => {
|
|
171648
|
-
const { type, selection: selection2 } = targetSelection[fieldName];
|
|
171649
|
-
if (!type) {
|
|
171650
|
-
return [fieldName, value2];
|
|
171651
|
-
}
|
|
171652
|
-
if (selection2) {
|
|
171653
|
-
return [fieldName, await marshalSelection2({ selection: selection2, data: value2 })];
|
|
171654
|
-
}
|
|
171655
|
-
if (config2.scalars?.[type]) {
|
|
171656
|
-
const marshalFn = config2.scalars[type].marshal;
|
|
171657
|
-
if (!marshalFn) {
|
|
171658
|
-
throw new Error(
|
|
171659
|
-
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
171660
|
-
);
|
|
171661
|
-
}
|
|
171662
|
-
if (Array.isArray(value2)) {
|
|
171663
|
-
return [fieldName, value2.map(marshalFn)];
|
|
171664
|
-
}
|
|
171665
|
-
return [fieldName, marshalFn(value2)];
|
|
171666
|
-
}
|
|
171667
|
-
return [fieldName, value2];
|
|
171668
|
-
})
|
|
171669
|
-
)
|
|
171670
|
-
);
|
|
171671
|
-
}
|
|
171672
171426
|
var ArtifactKind2 = {
|
|
171673
171427
|
Query: "HoudiniQuery",
|
|
171674
171428
|
Subscription: "HoudiniSubscription",
|
|
@@ -171679,11 +171433,6 @@ var CompiledFragmentKind2 = ArtifactKind2.Fragment;
|
|
|
171679
171433
|
var CompiledMutationKind2 = ArtifactKind2.Mutation;
|
|
171680
171434
|
var CompiledQueryKind2 = ArtifactKind2.Query;
|
|
171681
171435
|
var CompiledSubscriptionKind2 = ArtifactKind2.Subscription;
|
|
171682
|
-
var DataSource2 = {
|
|
171683
|
-
Cache: "cache",
|
|
171684
|
-
Network: "network",
|
|
171685
|
-
Ssr: "ssr"
|
|
171686
|
-
};
|
|
171687
171436
|
var fragmentKey2 = " $fragments";
|
|
171688
171437
|
var PendingValue2 = Symbol("houdini_loading");
|
|
171689
171438
|
var computeKey2 = ({ field, args }) => {
|
|
@@ -174759,180 +174508,6 @@ function defaultComponentField2({
|
|
|
174759
174508
|
}
|
|
174760
174509
|
var cache_default2 = new Cache2();
|
|
174761
174510
|
var serverSide2 = typeof globalThis.window === "undefined";
|
|
174762
|
-
var documentPlugin2 = (kind, source) => {
|
|
174763
|
-
return () => {
|
|
174764
|
-
const sourceHandlers = source();
|
|
174765
|
-
const enterWrapper = (handler) => {
|
|
174766
|
-
return !handler ? void 0 : (ctx, handlers2) => {
|
|
174767
|
-
if (ctx.artifact.kind !== kind) {
|
|
174768
|
-
return handlers2.next(ctx);
|
|
174769
|
-
}
|
|
174770
|
-
return handler(ctx, handlers2);
|
|
174771
|
-
};
|
|
174772
|
-
};
|
|
174773
|
-
const exitWrapper = (handler) => {
|
|
174774
|
-
return !handler ? void 0 : (ctx, handlers2) => {
|
|
174775
|
-
if (ctx.artifact.kind !== kind) {
|
|
174776
|
-
return handlers2.resolve(ctx);
|
|
174777
|
-
}
|
|
174778
|
-
return handler(ctx, handlers2);
|
|
174779
|
-
};
|
|
174780
|
-
};
|
|
174781
|
-
return {
|
|
174782
|
-
start: enterWrapper(sourceHandlers.start),
|
|
174783
|
-
network: enterWrapper(sourceHandlers.network),
|
|
174784
|
-
afterNetwork: exitWrapper(sourceHandlers.afterNetwork),
|
|
174785
|
-
end: exitWrapper(sourceHandlers.end),
|
|
174786
|
-
catch: sourceHandlers.catch ? (ctx, handlers2) => sourceHandlers.catch(ctx, handlers2) : void 0,
|
|
174787
|
-
cleanup: (...args) => sourceHandlers.cleanup?.(...args)
|
|
174788
|
-
};
|
|
174789
|
-
};
|
|
174790
|
-
};
|
|
174791
|
-
var query2 = documentPlugin2(ArtifactKind2.Query, function() {
|
|
174792
|
-
let subscriptionSpec = null;
|
|
174793
|
-
let lastVariables = null;
|
|
174794
|
-
return {
|
|
174795
|
-
start(ctx, { next }) {
|
|
174796
|
-
ctx.variables = {
|
|
174797
|
-
...lastVariables,
|
|
174798
|
-
...ctx.variables
|
|
174799
|
-
};
|
|
174800
|
-
next(ctx);
|
|
174801
|
-
},
|
|
174802
|
-
end(ctx, { resolve: resolve22, marshalVariables, variablesChanged }) {
|
|
174803
|
-
if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
|
|
174804
|
-
if (subscriptionSpec) {
|
|
174805
|
-
cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
174806
|
-
}
|
|
174807
|
-
lastVariables = { ...marshalVariables(ctx) };
|
|
174808
|
-
const variables = lastVariables;
|
|
174809
|
-
subscriptionSpec = {
|
|
174810
|
-
rootType: ctx.artifact.rootType,
|
|
174811
|
-
selection: ctx.artifact.selection,
|
|
174812
|
-
variables: () => variables,
|
|
174813
|
-
set: (newValue) => {
|
|
174814
|
-
resolve22(ctx, {
|
|
174815
|
-
data: newValue,
|
|
174816
|
-
errors: null,
|
|
174817
|
-
fetching: false,
|
|
174818
|
-
partial: false,
|
|
174819
|
-
stale: false,
|
|
174820
|
-
source: DataSource2.Cache,
|
|
174821
|
-
variables: ctx.variables ?? {}
|
|
174822
|
-
});
|
|
174823
|
-
}
|
|
174824
|
-
};
|
|
174825
|
-
cache_default2.subscribe(subscriptionSpec, lastVariables);
|
|
174826
|
-
}
|
|
174827
|
-
resolve22(ctx);
|
|
174828
|
-
},
|
|
174829
|
-
cleanup() {
|
|
174830
|
-
if (subscriptionSpec) {
|
|
174831
|
-
cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
|
|
174832
|
-
lastVariables = null;
|
|
174833
|
-
}
|
|
174834
|
-
}
|
|
174835
|
-
};
|
|
174836
|
-
});
|
|
174837
|
-
var fragment3 = documentPlugin2(ArtifactKind2.Fragment, function() {
|
|
174838
|
-
let subscriptionSpec = null;
|
|
174839
|
-
let lastReference = null;
|
|
174840
|
-
return {
|
|
174841
|
-
start(ctx, { next, resolve: resolve22, variablesChanged, marshalVariables }) {
|
|
174842
|
-
if (!ctx.stuff.parentID) {
|
|
174843
|
-
return next(ctx);
|
|
174844
|
-
}
|
|
174845
|
-
const currentReference = {
|
|
174846
|
-
parent: ctx.stuff.parentID,
|
|
174847
|
-
variables: marshalVariables(ctx)
|
|
174848
|
-
};
|
|
174849
|
-
if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals2(lastReference, currentReference) || variablesChanged(ctx))) {
|
|
174850
|
-
if (subscriptionSpec) {
|
|
174851
|
-
cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
|
|
174852
|
-
}
|
|
174853
|
-
const variables = marshalVariables(ctx);
|
|
174854
|
-
subscriptionSpec = {
|
|
174855
|
-
rootType: ctx.artifact.rootType,
|
|
174856
|
-
selection: ctx.artifact.selection,
|
|
174857
|
-
variables: () => variables,
|
|
174858
|
-
parentID: ctx.stuff.parentID,
|
|
174859
|
-
set: (newValue) => {
|
|
174860
|
-
resolve22(ctx, {
|
|
174861
|
-
data: newValue,
|
|
174862
|
-
errors: null,
|
|
174863
|
-
fetching: false,
|
|
174864
|
-
partial: false,
|
|
174865
|
-
stale: false,
|
|
174866
|
-
source: DataSource2.Cache,
|
|
174867
|
-
variables
|
|
174868
|
-
});
|
|
174869
|
-
}
|
|
174870
|
-
};
|
|
174871
|
-
cache_default2.subscribe(subscriptionSpec, variables);
|
|
174872
|
-
lastReference = currentReference;
|
|
174873
|
-
}
|
|
174874
|
-
next(ctx);
|
|
174875
|
-
},
|
|
174876
|
-
cleanup() {
|
|
174877
|
-
if (subscriptionSpec) {
|
|
174878
|
-
cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.());
|
|
174879
|
-
}
|
|
174880
|
-
}
|
|
174881
|
-
};
|
|
174882
|
-
});
|
|
174883
|
-
var mutation2 = documentPlugin2(ArtifactKind2.Mutation, () => {
|
|
174884
|
-
return {
|
|
174885
|
-
async start(ctx, { next, marshalVariables }) {
|
|
174886
|
-
const layerOptimistic = cache_default2._internal_unstable.storage.createLayer(true);
|
|
174887
|
-
const optimisticResponse = ctx.stuff.optimisticResponse;
|
|
174888
|
-
let toNotify = [];
|
|
174889
|
-
if (optimisticResponse) {
|
|
174890
|
-
toNotify = cache_default2.write({
|
|
174891
|
-
selection: ctx.artifact.selection,
|
|
174892
|
-
data: await marshalSelection2({
|
|
174893
|
-
selection: ctx.artifact.selection,
|
|
174894
|
-
data: optimisticResponse
|
|
174895
|
-
}),
|
|
174896
|
-
variables: marshalVariables(ctx),
|
|
174897
|
-
layer: layerOptimistic.id
|
|
174898
|
-
});
|
|
174899
|
-
}
|
|
174900
|
-
ctx.cacheParams = {
|
|
174901
|
-
...ctx.cacheParams,
|
|
174902
|
-
layer: layerOptimistic,
|
|
174903
|
-
notifySubscribers: toNotify,
|
|
174904
|
-
forceNotify: true
|
|
174905
|
-
};
|
|
174906
|
-
next(ctx);
|
|
174907
|
-
},
|
|
174908
|
-
afterNetwork(ctx, { resolve: resolve22 }) {
|
|
174909
|
-
if (ctx.cacheParams?.layer) {
|
|
174910
|
-
cache_default2.clearLayer(ctx.cacheParams.layer.id);
|
|
174911
|
-
}
|
|
174912
|
-
resolve22(ctx);
|
|
174913
|
-
},
|
|
174914
|
-
end(ctx, { resolve: resolve22, value: value2 }) {
|
|
174915
|
-
const hasErrors = value2.errors && value2.errors.length > 0;
|
|
174916
|
-
if (hasErrors) {
|
|
174917
|
-
if (ctx.cacheParams?.layer) {
|
|
174918
|
-
cache_default2.clearLayer(ctx.cacheParams.layer.id);
|
|
174919
|
-
}
|
|
174920
|
-
}
|
|
174921
|
-
if (ctx.cacheParams?.layer) {
|
|
174922
|
-
cache_default2._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
|
|
174923
|
-
}
|
|
174924
|
-
resolve22(ctx);
|
|
174925
|
-
},
|
|
174926
|
-
catch(ctx, { error: error2 }) {
|
|
174927
|
-
if (ctx.cacheParams?.layer) {
|
|
174928
|
-
const { layer } = ctx.cacheParams;
|
|
174929
|
-
cache_default2.clearLayer(layer.id);
|
|
174930
|
-
cache_default2._internal_unstable.storage.resolveLayer(layer.id);
|
|
174931
|
-
}
|
|
174932
|
-
throw error2;
|
|
174933
|
-
}
|
|
174934
|
-
};
|
|
174935
|
-
});
|
|
174936
174511
|
var currentDir2 = dirname2(fileURLToPath2(import.meta.url));
|
|
174937
174512
|
var DEFAULT_CONFIG_PATH2 = join22(process.cwd(), "houdini.config.js");
|
|
174938
174513
|
var emptySchema2 = graphql22.buildSchema("type Query { hello: String }");
|
|
@@ -174940,8 +174515,10 @@ var defaultDirectives2 = emptySchema2.getDirectives().map((dir) => dir.name);
|
|
|
174940
174515
|
var import_parser2 = __toESM3(require_lib32(), 1);
|
|
174941
174516
|
var import_recast2 = __toESM3(require_main22(), 1);
|
|
174942
174517
|
var import_deepmerge2 = __toESM3(require_cjs2(), 1);
|
|
174943
|
-
var
|
|
174944
|
-
var
|
|
174518
|
+
var recast3 = __toESM3(require_main22(), 1);
|
|
174519
|
+
var AST3 = recast3.types.builders;
|
|
174520
|
+
var recast22 = __toESM3(require_main22(), 1);
|
|
174521
|
+
var AST22 = recast22.types.builders;
|
|
174945
174522
|
var conventions_exports2 = {};
|
|
174946
174523
|
__export3(conventions_exports2, {
|
|
174947
174524
|
adapter_config_path: () => adapter_config_path2,
|
|
@@ -175067,43 +174644,43 @@ function serialized_manifest_path2(config2, base = base_dir2(config2)) {
|
|
|
175067
174644
|
return path_exports2.join(base, "manifest.json");
|
|
175068
174645
|
}
|
|
175069
174646
|
var t22 = __toESM3(require_lib62(), 1);
|
|
175070
|
-
var
|
|
175071
|
-
var
|
|
175072
|
-
var
|
|
174647
|
+
var recast5 = __toESM3(require_main22(), 1);
|
|
174648
|
+
var recast32 = __toESM3(require_main22(), 1);
|
|
174649
|
+
var AST32 = recast32.types.builders;
|
|
175073
174650
|
var { toString: toString2 } = {};
|
|
175074
174651
|
var { keys: keys2 } = Object;
|
|
175075
|
-
var
|
|
175076
|
-
var
|
|
174652
|
+
var recast4 = __toESM3(require_main22(), 1);
|
|
174653
|
+
var AST4 = recast4.types.builders;
|
|
175077
174654
|
var pageInfoSelection = [
|
|
175078
174655
|
{
|
|
175079
|
-
kind:
|
|
174656
|
+
kind: graphql13.Kind.FIELD,
|
|
175080
174657
|
name: {
|
|
175081
|
-
kind:
|
|
174658
|
+
kind: graphql13.Kind.NAME,
|
|
175082
174659
|
value: "edges"
|
|
175083
174660
|
},
|
|
175084
174661
|
selectionSet: {
|
|
175085
|
-
kind:
|
|
174662
|
+
kind: graphql13.Kind.SELECTION_SET,
|
|
175086
174663
|
selections: [
|
|
175087
174664
|
{
|
|
175088
|
-
kind:
|
|
174665
|
+
kind: graphql13.Kind.FIELD,
|
|
175089
174666
|
name: {
|
|
175090
|
-
kind:
|
|
174667
|
+
kind: graphql13.Kind.NAME,
|
|
175091
174668
|
value: "cursor"
|
|
175092
174669
|
}
|
|
175093
174670
|
},
|
|
175094
174671
|
{
|
|
175095
|
-
kind:
|
|
174672
|
+
kind: graphql13.Kind.FIELD,
|
|
175096
174673
|
name: {
|
|
175097
|
-
kind:
|
|
174674
|
+
kind: graphql13.Kind.NAME,
|
|
175098
174675
|
value: "node"
|
|
175099
174676
|
},
|
|
175100
174677
|
selectionSet: {
|
|
175101
|
-
kind:
|
|
174678
|
+
kind: graphql13.Kind.SELECTION_SET,
|
|
175102
174679
|
selections: [
|
|
175103
174680
|
{
|
|
175104
|
-
kind:
|
|
174681
|
+
kind: graphql13.Kind.FIELD,
|
|
175105
174682
|
name: {
|
|
175106
|
-
kind:
|
|
174683
|
+
kind: graphql13.Kind.NAME,
|
|
175107
174684
|
value: "__typename"
|
|
175108
174685
|
}
|
|
175109
174686
|
}
|
|
@@ -175114,39 +174691,39 @@ var pageInfoSelection = [
|
|
|
175114
174691
|
}
|
|
175115
174692
|
},
|
|
175116
174693
|
{
|
|
175117
|
-
kind:
|
|
174694
|
+
kind: graphql13.Kind.FIELD,
|
|
175118
174695
|
name: {
|
|
175119
|
-
kind:
|
|
174696
|
+
kind: graphql13.Kind.NAME,
|
|
175120
174697
|
value: "pageInfo"
|
|
175121
174698
|
},
|
|
175122
174699
|
selectionSet: {
|
|
175123
|
-
kind:
|
|
174700
|
+
kind: graphql13.Kind.SELECTION_SET,
|
|
175124
174701
|
selections: [
|
|
175125
174702
|
{
|
|
175126
|
-
kind:
|
|
174703
|
+
kind: graphql13.Kind.FIELD,
|
|
175127
174704
|
name: {
|
|
175128
|
-
kind:
|
|
174705
|
+
kind: graphql13.Kind.NAME,
|
|
175129
174706
|
value: "hasPreviousPage"
|
|
175130
174707
|
}
|
|
175131
174708
|
},
|
|
175132
174709
|
{
|
|
175133
|
-
kind:
|
|
174710
|
+
kind: graphql13.Kind.FIELD,
|
|
175134
174711
|
name: {
|
|
175135
|
-
kind:
|
|
174712
|
+
kind: graphql13.Kind.NAME,
|
|
175136
174713
|
value: "hasNextPage"
|
|
175137
174714
|
}
|
|
175138
174715
|
},
|
|
175139
174716
|
{
|
|
175140
|
-
kind:
|
|
174717
|
+
kind: graphql13.Kind.FIELD,
|
|
175141
174718
|
name: {
|
|
175142
|
-
kind:
|
|
174719
|
+
kind: graphql13.Kind.NAME,
|
|
175143
174720
|
value: "startCursor"
|
|
175144
174721
|
}
|
|
175145
174722
|
},
|
|
175146
174723
|
{
|
|
175147
|
-
kind:
|
|
174724
|
+
kind: graphql13.Kind.FIELD,
|
|
175148
174725
|
name: {
|
|
175149
|
-
kind:
|
|
174726
|
+
kind: graphql13.Kind.NAME,
|
|
175150
174727
|
value: "endCursor"
|
|
175151
174728
|
}
|
|
175152
174729
|
}
|
|
@@ -175154,17 +174731,15 @@ var pageInfoSelection = [
|
|
|
175154
174731
|
}
|
|
175155
174732
|
}
|
|
175156
174733
|
];
|
|
175157
|
-
var AST4 = recast4.types.builders;
|
|
175158
|
-
var recast5 = __toESM3(require_main22(), 1);
|
|
175159
174734
|
var AST5 = recast5.types.builders;
|
|
175160
|
-
var recast11 = __toESM3(require_main22(), 1);
|
|
175161
|
-
var recast8 = __toESM3(require_main22(), 1);
|
|
175162
|
-
var recast7 = __toESM3(require_main22(), 1);
|
|
175163
174735
|
var recast6 = __toESM3(require_main22(), 1);
|
|
175164
174736
|
var AST6 = recast6.types.builders;
|
|
174737
|
+
var recast11 = __toESM3(require_main22(), 1);
|
|
174738
|
+
var recast7 = __toESM3(require_main22(), 1);
|
|
175165
174739
|
var AST7 = recast7.types.builders;
|
|
175166
|
-
var AST8 = recast8.types.builders;
|
|
175167
174740
|
var recast9 = __toESM3(require_main22(), 1);
|
|
174741
|
+
var recast8 = __toESM3(require_main22(), 1);
|
|
174742
|
+
var AST8 = recast8.types.builders;
|
|
175168
174743
|
var AST9 = recast9.types.builders;
|
|
175169
174744
|
var recast10 = __toESM3(require_main22(), 1);
|
|
175170
174745
|
var AST10 = recast10.types.builders;
|
|
@@ -175584,7 +175159,7 @@ async function extract_load_function(config2, filepath, mockArtifacts) {
|
|
|
175584
175159
|
return {
|
|
175585
175160
|
exports,
|
|
175586
175161
|
houdini_load: load.map(
|
|
175587
|
-
(
|
|
175162
|
+
(query) => graphql34.parse(query).definitions[0]
|
|
175588
175163
|
)
|
|
175589
175164
|
};
|
|
175590
175165
|
}
|
|
@@ -175600,14 +175175,14 @@ async function processScript(config2, filepath, program, mockArtifacts) {
|
|
|
175600
175175
|
}
|
|
175601
175176
|
for (const specifier of statement.specifiers ?? []) {
|
|
175602
175177
|
let name = specifier.local?.name || "";
|
|
175603
|
-
let
|
|
175178
|
+
let query = "";
|
|
175604
175179
|
if (name.endsWith(store_suffix(config2))) {
|
|
175605
|
-
|
|
175180
|
+
query = name.substring(0, name.length - store_suffix(config2).length);
|
|
175606
175181
|
} else if (source.startsWith("$houdini/" + stores_directory_name()) && specifier.type === "ImportDefaultSpecifier") {
|
|
175607
|
-
|
|
175182
|
+
query = source.substring(`$houdini/${stores_directory_name()}`.length - 1);
|
|
175608
175183
|
}
|
|
175609
|
-
if (
|
|
175610
|
-
const artifact = mockArtifacts?.[
|
|
175184
|
+
if (query) {
|
|
175185
|
+
const artifact = mockArtifacts?.[query] || (await import(path_exports.importPath(path_exports.join(config2.artifactDirectory, query + ".js")))).default;
|
|
175611
175186
|
globalImports[name] = artifact.raw;
|
|
175612
175187
|
}
|
|
175613
175188
|
}
|
|
@@ -175888,26 +175463,26 @@ async function QueryProcessor(config2, page2) {
|
|
|
175888
175463
|
import: ["isBrowser"],
|
|
175889
175464
|
sourceModule: "$houdini/plugins/houdini-svelte/runtime/adapter"
|
|
175890
175465
|
});
|
|
175891
|
-
for (const
|
|
175466
|
+
for (const query of queries) {
|
|
175892
175467
|
const factory = ensure_imports({
|
|
175893
175468
|
script: page2.script,
|
|
175894
175469
|
config: page2.config,
|
|
175895
|
-
import: [`${
|
|
175896
|
-
sourceModule: store_import_path({ config: config2, name:
|
|
175470
|
+
import: [`${query.name.value}Store`],
|
|
175471
|
+
sourceModule: store_import_path({ config: config2, name: query.name.value })
|
|
175897
175472
|
}).ids[0];
|
|
175898
175473
|
page2.script.body.splice(
|
|
175899
175474
|
find_insert_index(page2.script),
|
|
175900
175475
|
0,
|
|
175901
175476
|
AST15.variableDeclaration("const", [
|
|
175902
|
-
AST15.variableDeclarator(store_id(
|
|
175477
|
+
AST15.variableDeclarator(store_id(query.name.value), AST15.newExpression(factory, []))
|
|
175903
175478
|
])
|
|
175904
175479
|
);
|
|
175905
175480
|
}
|
|
175906
175481
|
page2.script.body.push(
|
|
175907
|
-
...queries.flatMap((
|
|
175908
|
-
const variable_fn = query_variable_fn(
|
|
175482
|
+
...queries.flatMap((query) => {
|
|
175483
|
+
const variable_fn = query_variable_fn(query.name.value);
|
|
175909
175484
|
const has_variables = find_exported_fn(page2.script.body, variable_fn);
|
|
175910
|
-
if (
|
|
175485
|
+
if (query.variableDefinitions && query.variableDefinitions?.length > 0 && has_variables === null) {
|
|
175911
175486
|
formatErrors({
|
|
175912
175487
|
filepath: page2.filepath,
|
|
175913
175488
|
message: `Could not find required variable function: ${yellow3(
|
|
@@ -175924,7 +175499,7 @@ async function QueryProcessor(config2, page2) {
|
|
|
175924
175499
|
AST15.identifier("isBrowser"),
|
|
175925
175500
|
AST15.callExpression(
|
|
175926
175501
|
AST15.memberExpression(
|
|
175927
|
-
store_id(
|
|
175502
|
+
store_id(query.name.value),
|
|
175928
175503
|
AST15.identifier("fetch")
|
|
175929
175504
|
),
|
|
175930
175505
|
[
|
|
@@ -175943,7 +175518,7 @@ async function QueryProcessor(config2, page2) {
|
|
|
175943
175518
|
AST15.objectProperty(
|
|
175944
175519
|
AST15.identifier("artifact"),
|
|
175945
175520
|
AST15.memberExpression(
|
|
175946
|
-
store_id(
|
|
175521
|
+
store_id(query.name.value),
|
|
175947
175522
|
AST15.identifier("artifact")
|
|
175948
175523
|
)
|
|
175949
175524
|
),
|
|
@@ -176245,14 +175820,14 @@ function add_load({
|
|
|
176245
175820
|
return;
|
|
176246
175821
|
}
|
|
176247
175822
|
let invalid = false;
|
|
176248
|
-
for (const
|
|
176249
|
-
if (!
|
|
175823
|
+
for (const query of queries) {
|
|
175824
|
+
if (!query.variableDefinitions || query.variableDefinitions.length === 0) {
|
|
176250
175825
|
continue;
|
|
176251
175826
|
}
|
|
176252
|
-
const variable_fn = query_variable_fn(
|
|
175827
|
+
const variable_fn = query_variable_fn(query.name.value);
|
|
176253
175828
|
try {
|
|
176254
175829
|
page2.script.body.push(
|
|
176255
|
-
variable_function_for_query(page2,
|
|
175830
|
+
variable_function_for_query(page2, query, page_info.exports.includes(variable_fn))
|
|
176256
175831
|
);
|
|
176257
175832
|
} catch (e3) {
|
|
176258
175833
|
formatErrors(e3);
|
|
@@ -176315,16 +175890,16 @@ function add_load({
|
|
|
176315
175890
|
preload_fn.async = true;
|
|
176316
175891
|
page2.script.body.push(AST17.exportNamedDeclaration(preload_fn));
|
|
176317
175892
|
let insert_index = 4;
|
|
176318
|
-
for (const
|
|
175893
|
+
for (const query of queries) {
|
|
176319
175894
|
const { ids } = ensure_imports({
|
|
176320
175895
|
script: page2.script,
|
|
176321
175896
|
config: page2.config,
|
|
176322
|
-
import: [`load_${
|
|
176323
|
-
sourceModule: store_import_path({ config: page2.config, name:
|
|
175897
|
+
import: [`load_${query.name.value}`],
|
|
175898
|
+
sourceModule: store_import_path({ config: page2.config, name: query.name.value })
|
|
176324
175899
|
});
|
|
176325
175900
|
const load_fn = ids[0];
|
|
176326
|
-
const variables = (
|
|
176327
|
-
AST17.callExpression(AST17.identifier(__variable_fn_name(
|
|
175901
|
+
const variables = (query.variableDefinitions?.length ?? 0) > 0 ? AST17.awaitExpression(
|
|
175902
|
+
AST17.callExpression(AST17.identifier(__variable_fn_name(query.name.value)), [
|
|
176328
175903
|
AST17.identifier("houdiniConfig"),
|
|
176329
175904
|
AST17.identifier("context")
|
|
176330
175905
|
])
|
|
@@ -176335,7 +175910,7 @@ function add_load({
|
|
|
176335
175910
|
AST17.expressionStatement(
|
|
176336
175911
|
AST17.assignmentExpression(
|
|
176337
175912
|
"=",
|
|
176338
|
-
AST17.memberExpression(input_obj, AST17.literal(
|
|
175913
|
+
AST17.memberExpression(input_obj, AST17.literal(query.name.value)),
|
|
176339
175914
|
variables
|
|
176340
175915
|
)
|
|
176341
175916
|
)
|
|
@@ -176349,7 +175924,7 @@ function add_load({
|
|
|
176349
175924
|
AST17.objectExpression([
|
|
176350
175925
|
AST17.objectProperty(
|
|
176351
175926
|
AST17.literal("variables"),
|
|
176352
|
-
AST17.memberExpression(input_obj, AST17.literal(
|
|
175927
|
+
AST17.memberExpression(input_obj, AST17.literal(query.name.value))
|
|
176353
175928
|
),
|
|
176354
175929
|
AST17.objectProperty(AST17.literal("event"), AST17.identifier("context")),
|
|
176355
175930
|
AST17.objectProperty(
|
|
@@ -176505,7 +176080,7 @@ function unexported_data_error(filepath) {
|
|
|
176505
176080
|
description: `This is not allowed in a route since it would conflict with Houdini's generated code`
|
|
176506
176081
|
};
|
|
176507
176082
|
}
|
|
176508
|
-
function variable_function_for_query(page2,
|
|
176083
|
+
function variable_function_for_query(page2, query, has_local) {
|
|
176509
176084
|
const params = route_params(page2.filepath).params.reduce(
|
|
176510
176085
|
(acc, param) => ({
|
|
176511
176086
|
...acc,
|
|
@@ -176521,9 +176096,10 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176521
176096
|
});
|
|
176522
176097
|
const missing_args = [];
|
|
176523
176098
|
const has_args = {};
|
|
176524
|
-
for (const definition of
|
|
176099
|
+
for (const definition of query.variableDefinitions ?? []) {
|
|
176525
176100
|
const unwrapped = unwrapType(page2.config, definition.type);
|
|
176526
|
-
|
|
176101
|
+
const runtime_scalar = page2.config.configFile.features?.runtimeScalars?.[unwrapped.type.name];
|
|
176102
|
+
if (unwrapped.wrappers[unwrapped.wrappers.length - 1] === TypeWrapper.NonNull && !definition.defaultValue && !runtime_scalar && (!params[definition.variable.name.value] || params[definition.variable.name.value].optional)) {
|
|
176527
176103
|
missing_args.push(definition.variable.name);
|
|
176528
176104
|
}
|
|
176529
176105
|
if (params[definition.variable.name.value]) {
|
|
@@ -176534,7 +176110,7 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176534
176110
|
throw {
|
|
176535
176111
|
filepath: page2.filepath,
|
|
176536
176112
|
message: `Could not find required variable function: ${yellow3(
|
|
176537
|
-
query_variable_fn(
|
|
176113
|
+
query_variable_fn(query.name.value)
|
|
176538
176114
|
)}. maybe its not exported?`
|
|
176539
176115
|
};
|
|
176540
176116
|
}
|
|
@@ -176543,8 +176119,8 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176543
176119
|
AST17.variableDeclarator(
|
|
176544
176120
|
AST17.identifier("result"),
|
|
176545
176121
|
AST17.objectExpression(
|
|
176546
|
-
Object.entries(has_args).map(
|
|
176547
|
-
|
|
176122
|
+
Object.entries(has_args).map(([arg, type]) => {
|
|
176123
|
+
return AST17.objectProperty(
|
|
176548
176124
|
AST17.identifier(arg),
|
|
176549
176125
|
AST17.callExpression(AST17.identifier("parseScalar"), [
|
|
176550
176126
|
AST17.identifier("config"),
|
|
@@ -176557,8 +176133,8 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176557
176133
|
AST17.identifier(arg)
|
|
176558
176134
|
)
|
|
176559
176135
|
])
|
|
176560
|
-
)
|
|
176561
|
-
)
|
|
176136
|
+
);
|
|
176137
|
+
})
|
|
176562
176138
|
)
|
|
176563
176139
|
)
|
|
176564
176140
|
])
|
|
@@ -176580,7 +176156,7 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176580
176156
|
AST17.identifier("input"),
|
|
176581
176157
|
AST17.awaitExpression(
|
|
176582
176158
|
AST17.callExpression(
|
|
176583
|
-
AST17.identifier(query_variable_fn(
|
|
176159
|
+
AST17.identifier(query_variable_fn(query.name.value)),
|
|
176584
176160
|
[AST17.identifier("event")]
|
|
176585
176161
|
)
|
|
176586
176162
|
)
|
|
@@ -176591,7 +176167,7 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176591
176167
|
config: page2.config,
|
|
176592
176168
|
script: page2.script,
|
|
176593
176169
|
page: page2,
|
|
176594
|
-
artifact: { name:
|
|
176170
|
+
artifact: { name: query.name.value }
|
|
176595
176171
|
}).id
|
|
176596
176172
|
)
|
|
176597
176173
|
])
|
|
@@ -176603,7 +176179,7 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
176603
176179
|
}
|
|
176604
176180
|
fn_body.push(AST17.returnStatement(AST17.identifier("result")));
|
|
176605
176181
|
const declaration = AST17.functionDeclaration(
|
|
176606
|
-
AST17.identifier(__variable_fn_name(
|
|
176182
|
+
AST17.identifier(__variable_fn_name(query.name.value)),
|
|
176607
176183
|
[AST17.identifier("config"), AST17.identifier("event")],
|
|
176608
176184
|
AST17.blockStatement(fn_body)
|
|
176609
176185
|
);
|