houdini 1.4.0 → 1.4.1
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/cmd-cjs/index.js +88 -8
- package/build/cmd-esm/index.js +88 -8
- package/build/codegen-cjs/index.js +86 -6
- package/build/codegen-esm/index.js +86 -6
- package/build/lib-cjs/index.js +48 -8
- package/build/lib-esm/index.js +48 -8
- package/build/runtime/cache/cache.d.ts +1 -1
- package/build/runtime/cache/lists.d.ts +3 -1
- package/build/runtime-cjs/cache/cache.d.ts +1 -1
- package/build/runtime-cjs/cache/cache.js +31 -5
- package/build/runtime-cjs/cache/lists.d.ts +3 -1
- package/build/runtime-cjs/cache/lists.js +15 -1
- package/build/runtime-cjs/client/plugins/fetch.js +1 -1
- package/build/runtime-cjs/router/match.js +1 -1
- package/build/runtime-esm/cache/cache.d.ts +1 -1
- package/build/runtime-esm/cache/cache.js +31 -5
- package/build/runtime-esm/cache/lists.d.ts +3 -1
- package/build/runtime-esm/cache/lists.js +15 -1
- package/build/runtime-esm/client/plugins/fetch.js +1 -1
- package/build/runtime-esm/router/match.js +1 -1
- package/build/test-cjs/index.js +86 -6
- package/build/test-esm/index.js +86 -6
- package/build/vite/ast.d.ts +8 -2
- package/build/vite-cjs/index.js +331 -246
- package/build/vite-esm/index.js +331 -246
- package/package.json +1 -1
package/build/vite-esm/index.js
CHANGED
|
@@ -19751,30 +19751,30 @@ var require_utils5 = __commonJS({
|
|
|
19751
19751
|
validate3.oneOf = values;
|
|
19752
19752
|
return validate3;
|
|
19753
19753
|
}
|
|
19754
|
-
function assertNodeType(...
|
|
19754
|
+
function assertNodeType(...types18) {
|
|
19755
19755
|
function validate3(node, key, val) {
|
|
19756
|
-
for (const type of
|
|
19756
|
+
for (const type of types18) {
|
|
19757
19757
|
if ((0, _is.default)(type, val)) {
|
|
19758
19758
|
(0, _validate.validateChild)(node, key, val);
|
|
19759
19759
|
return;
|
|
19760
19760
|
}
|
|
19761
19761
|
}
|
|
19762
|
-
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(
|
|
19762
|
+
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types18)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
|
|
19763
19763
|
}
|
|
19764
|
-
validate3.oneOfNodeTypes =
|
|
19764
|
+
validate3.oneOfNodeTypes = types18;
|
|
19765
19765
|
return validate3;
|
|
19766
19766
|
}
|
|
19767
|
-
function assertNodeOrValueType(...
|
|
19767
|
+
function assertNodeOrValueType(...types18) {
|
|
19768
19768
|
function validate3(node, key, val) {
|
|
19769
|
-
for (const type of
|
|
19769
|
+
for (const type of types18) {
|
|
19770
19770
|
if (getType(val) === type || (0, _is.default)(type, val)) {
|
|
19771
19771
|
(0, _validate.validateChild)(node, key, val);
|
|
19772
19772
|
return;
|
|
19773
19773
|
}
|
|
19774
19774
|
}
|
|
19775
|
-
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(
|
|
19775
|
+
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types18)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
|
|
19776
19776
|
}
|
|
19777
|
-
validate3.oneOfNodeOrValueTypes =
|
|
19777
|
+
validate3.oneOfNodeOrValueTypes = types18;
|
|
19778
19778
|
return validate3;
|
|
19779
19779
|
}
|
|
19780
19780
|
function assertValueType(type) {
|
|
@@ -24202,10 +24202,10 @@ var require_generated2 = __commonJS({
|
|
|
24202
24202
|
body
|
|
24203
24203
|
});
|
|
24204
24204
|
}
|
|
24205
|
-
function intersectionTypeAnnotation(
|
|
24205
|
+
function intersectionTypeAnnotation(types18) {
|
|
24206
24206
|
return (0, _validateNode.default)({
|
|
24207
24207
|
type: "IntersectionTypeAnnotation",
|
|
24208
|
-
types:
|
|
24208
|
+
types: types18
|
|
24209
24209
|
});
|
|
24210
24210
|
}
|
|
24211
24211
|
function mixedTypeAnnotation() {
|
|
@@ -24328,10 +24328,10 @@ var require_generated2 = __commonJS({
|
|
|
24328
24328
|
type: "ThisTypeAnnotation"
|
|
24329
24329
|
};
|
|
24330
24330
|
}
|
|
24331
|
-
function tupleTypeAnnotation(
|
|
24331
|
+
function tupleTypeAnnotation(types18) {
|
|
24332
24332
|
return (0, _validateNode.default)({
|
|
24333
24333
|
type: "TupleTypeAnnotation",
|
|
24334
|
-
types:
|
|
24334
|
+
types: types18
|
|
24335
24335
|
});
|
|
24336
24336
|
}
|
|
24337
24337
|
function typeofTypeAnnotation(argument) {
|
|
@@ -24382,10 +24382,10 @@ var require_generated2 = __commonJS({
|
|
|
24382
24382
|
params
|
|
24383
24383
|
});
|
|
24384
24384
|
}
|
|
24385
|
-
function unionTypeAnnotation(
|
|
24385
|
+
function unionTypeAnnotation(types18) {
|
|
24386
24386
|
return (0, _validateNode.default)({
|
|
24387
24387
|
type: "UnionTypeAnnotation",
|
|
24388
|
-
types:
|
|
24388
|
+
types: types18
|
|
24389
24389
|
});
|
|
24390
24390
|
}
|
|
24391
24391
|
function variance(kind) {
|
|
@@ -24898,16 +24898,16 @@ var require_generated2 = __commonJS({
|
|
|
24898
24898
|
optional
|
|
24899
24899
|
});
|
|
24900
24900
|
}
|
|
24901
|
-
function tsUnionType(
|
|
24901
|
+
function tsUnionType(types18) {
|
|
24902
24902
|
return (0, _validateNode.default)({
|
|
24903
24903
|
type: "TSUnionType",
|
|
24904
|
-
types:
|
|
24904
|
+
types: types18
|
|
24905
24905
|
});
|
|
24906
24906
|
}
|
|
24907
|
-
function tsIntersectionType(
|
|
24907
|
+
function tsIntersectionType(types18) {
|
|
24908
24908
|
return (0, _validateNode.default)({
|
|
24909
24909
|
type: "TSIntersectionType",
|
|
24910
|
-
types:
|
|
24910
|
+
types: types18
|
|
24911
24911
|
});
|
|
24912
24912
|
}
|
|
24913
24913
|
function tsConditionalType(checkType, extendsType, trueType, falseType) {
|
|
@@ -26522,12 +26522,12 @@ var require_removeTypeDuplicates = __commonJS({
|
|
|
26522
26522
|
const generics = /* @__PURE__ */ new Map();
|
|
26523
26523
|
const bases = /* @__PURE__ */ new Map();
|
|
26524
26524
|
const typeGroups = /* @__PURE__ */ new Set();
|
|
26525
|
-
const
|
|
26525
|
+
const types18 = [];
|
|
26526
26526
|
for (let i2 = 0; i2 < nodes.length; i2++) {
|
|
26527
26527
|
const node = nodes[i2];
|
|
26528
26528
|
if (!node)
|
|
26529
26529
|
continue;
|
|
26530
|
-
if (
|
|
26530
|
+
if (types18.indexOf(node) >= 0) {
|
|
26531
26531
|
continue;
|
|
26532
26532
|
}
|
|
26533
26533
|
if ((0, _generated.isAnyTypeAnnotation)(node)) {
|
|
@@ -26561,15 +26561,15 @@ var require_removeTypeDuplicates = __commonJS({
|
|
|
26561
26561
|
}
|
|
26562
26562
|
continue;
|
|
26563
26563
|
}
|
|
26564
|
-
|
|
26564
|
+
types18.push(node);
|
|
26565
26565
|
}
|
|
26566
26566
|
for (const [, baseType] of bases) {
|
|
26567
|
-
|
|
26567
|
+
types18.push(baseType);
|
|
26568
26568
|
}
|
|
26569
26569
|
for (const [, genericName] of generics) {
|
|
26570
|
-
|
|
26570
|
+
types18.push(genericName);
|
|
26571
26571
|
}
|
|
26572
|
-
return
|
|
26572
|
+
return types18;
|
|
26573
26573
|
}
|
|
26574
26574
|
}
|
|
26575
26575
|
});
|
|
@@ -26584,8 +26584,8 @@ var require_createFlowUnionType = __commonJS({
|
|
|
26584
26584
|
exports.default = createFlowUnionType;
|
|
26585
26585
|
var _generated = require_generated2();
|
|
26586
26586
|
var _removeTypeDuplicates = require_removeTypeDuplicates();
|
|
26587
|
-
function createFlowUnionType(
|
|
26588
|
-
const flattened = (0, _removeTypeDuplicates.default)(
|
|
26587
|
+
function createFlowUnionType(types18) {
|
|
26588
|
+
const flattened = (0, _removeTypeDuplicates.default)(types18);
|
|
26589
26589
|
if (flattened.length === 1) {
|
|
26590
26590
|
return flattened[0];
|
|
26591
26591
|
} else {
|
|
@@ -26612,12 +26612,12 @@ var require_removeTypeDuplicates2 = __commonJS({
|
|
|
26612
26612
|
const generics = /* @__PURE__ */ new Map();
|
|
26613
26613
|
const bases = /* @__PURE__ */ new Map();
|
|
26614
26614
|
const typeGroups = /* @__PURE__ */ new Set();
|
|
26615
|
-
const
|
|
26615
|
+
const types18 = [];
|
|
26616
26616
|
for (let i2 = 0; i2 < nodes.length; i2++) {
|
|
26617
26617
|
const node = nodes[i2];
|
|
26618
26618
|
if (!node)
|
|
26619
26619
|
continue;
|
|
26620
|
-
if (
|
|
26620
|
+
if (types18.indexOf(node) >= 0) {
|
|
26621
26621
|
continue;
|
|
26622
26622
|
}
|
|
26623
26623
|
if ((0, _generated.isTSAnyKeyword)(node)) {
|
|
@@ -26651,15 +26651,15 @@ var require_removeTypeDuplicates2 = __commonJS({
|
|
|
26651
26651
|
}
|
|
26652
26652
|
continue;
|
|
26653
26653
|
}
|
|
26654
|
-
|
|
26654
|
+
types18.push(node);
|
|
26655
26655
|
}
|
|
26656
26656
|
for (const [, baseType] of bases) {
|
|
26657
|
-
|
|
26657
|
+
types18.push(baseType);
|
|
26658
26658
|
}
|
|
26659
26659
|
for (const [, genericName] of generics) {
|
|
26660
|
-
|
|
26660
|
+
types18.push(genericName);
|
|
26661
26661
|
}
|
|
26662
|
-
return
|
|
26662
|
+
return types18;
|
|
26663
26663
|
}
|
|
26664
26664
|
}
|
|
26665
26665
|
});
|
|
@@ -26676,10 +26676,10 @@ var require_createTSUnionType = __commonJS({
|
|
|
26676
26676
|
var _removeTypeDuplicates = require_removeTypeDuplicates2();
|
|
26677
26677
|
var _index = require_generated();
|
|
26678
26678
|
function createTSUnionType(typeAnnotations) {
|
|
26679
|
-
const
|
|
26679
|
+
const types18 = typeAnnotations.map((type) => {
|
|
26680
26680
|
return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
|
|
26681
26681
|
});
|
|
26682
|
-
const flattened = (0, _removeTypeDuplicates.default)(
|
|
26682
|
+
const flattened = (0, _removeTypeDuplicates.default)(types18);
|
|
26683
26683
|
if (flattened.length === 1) {
|
|
26684
26684
|
return flattened[0];
|
|
26685
26685
|
} else {
|
|
@@ -31037,14 +31037,14 @@ var require_lib6 = __commonJS({
|
|
|
31037
31037
|
this.preserveSpace = !!preserveSpace;
|
|
31038
31038
|
}
|
|
31039
31039
|
};
|
|
31040
|
-
var
|
|
31040
|
+
var types18 = {
|
|
31041
31041
|
brace: new TokContext("{"),
|
|
31042
31042
|
j_oTag: new TokContext("<tag"),
|
|
31043
31043
|
j_cTag: new TokContext("</tag"),
|
|
31044
31044
|
j_expr: new TokContext("<tag>...</tag>", true)
|
|
31045
31045
|
};
|
|
31046
31046
|
{
|
|
31047
|
-
|
|
31047
|
+
types18.template = new TokContext("`", true);
|
|
31048
31048
|
}
|
|
31049
31049
|
var beforeExpr = true;
|
|
31050
31050
|
var startsExpr = true;
|
|
@@ -31582,17 +31582,17 @@ var require_lib6 = __commonJS({
|
|
|
31582
31582
|
context.pop();
|
|
31583
31583
|
};
|
|
31584
31584
|
tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
|
|
31585
|
-
context.push(
|
|
31585
|
+
context.push(types18.brace);
|
|
31586
31586
|
};
|
|
31587
31587
|
tokenTypes[22].updateContext = (context) => {
|
|
31588
|
-
if (context[context.length - 1] ===
|
|
31588
|
+
if (context[context.length - 1] === types18.template) {
|
|
31589
31589
|
context.pop();
|
|
31590
31590
|
} else {
|
|
31591
|
-
context.push(
|
|
31591
|
+
context.push(types18.template);
|
|
31592
31592
|
}
|
|
31593
31593
|
};
|
|
31594
31594
|
tokenTypes[142].updateContext = (context) => {
|
|
31595
|
-
context.push(
|
|
31595
|
+
context.push(types18.j_expr, types18.j_oTag);
|
|
31596
31596
|
};
|
|
31597
31597
|
}
|
|
31598
31598
|
var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
@@ -32152,7 +32152,7 @@ var require_lib6 = __commonJS({
|
|
|
32152
32152
|
this.end = 0;
|
|
32153
32153
|
this.lastTokEndLoc = null;
|
|
32154
32154
|
this.lastTokStartLoc = null;
|
|
32155
|
-
this.context = [
|
|
32155
|
+
this.context = [types18.brace];
|
|
32156
32156
|
this.firstInvalidTemplateEscapePos = null;
|
|
32157
32157
|
this.strictErrors = /* @__PURE__ */ new Map();
|
|
32158
32158
|
this.tokensLength = 0;
|
|
@@ -35979,7 +35979,7 @@ var require_lib6 = __commonJS({
|
|
|
35979
35979
|
context
|
|
35980
35980
|
} = this.state;
|
|
35981
35981
|
const currentContext = context[context.length - 1];
|
|
35982
|
-
if (currentContext ===
|
|
35982
|
+
if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
|
|
35983
35983
|
context.pop();
|
|
35984
35984
|
}
|
|
35985
35985
|
}
|
|
@@ -37001,9 +37001,9 @@ var require_lib6 = __commonJS({
|
|
|
37001
37001
|
switch (this.state.type) {
|
|
37002
37002
|
case 5:
|
|
37003
37003
|
node = this.startNode();
|
|
37004
|
-
this.setContext(
|
|
37004
|
+
this.setContext(types18.brace);
|
|
37005
37005
|
this.next();
|
|
37006
|
-
node = this.jsxParseExpressionContainer(node,
|
|
37006
|
+
node = this.jsxParseExpressionContainer(node, types18.j_oTag);
|
|
37007
37007
|
if (node.expression.type === "JSXEmptyExpression") {
|
|
37008
37008
|
this.raise(JsxErrors.AttributeIsEmpty, node);
|
|
37009
37009
|
}
|
|
@@ -37022,7 +37022,7 @@ var require_lib6 = __commonJS({
|
|
|
37022
37022
|
jsxParseSpreadChild(node) {
|
|
37023
37023
|
this.next();
|
|
37024
37024
|
node.expression = this.parseExpression();
|
|
37025
|
-
this.setContext(
|
|
37025
|
+
this.setContext(types18.j_expr);
|
|
37026
37026
|
this.state.canStartJSXElement = true;
|
|
37027
37027
|
this.expect(8);
|
|
37028
37028
|
return this.finishNode(node, "JSXSpreadChild");
|
|
@@ -37042,11 +37042,11 @@ var require_lib6 = __commonJS({
|
|
|
37042
37042
|
jsxParseAttribute() {
|
|
37043
37043
|
const node = this.startNode();
|
|
37044
37044
|
if (this.match(5)) {
|
|
37045
|
-
this.setContext(
|
|
37045
|
+
this.setContext(types18.brace);
|
|
37046
37046
|
this.next();
|
|
37047
37047
|
this.expect(21);
|
|
37048
37048
|
node.argument = this.parseMaybeAssignAllowIn();
|
|
37049
|
-
this.setContext(
|
|
37049
|
+
this.setContext(types18.j_oTag);
|
|
37050
37050
|
this.state.canStartJSXElement = true;
|
|
37051
37051
|
this.expect(8);
|
|
37052
37052
|
return this.finishNode(node, "JSXSpreadAttribute");
|
|
@@ -37105,12 +37105,12 @@ var require_lib6 = __commonJS({
|
|
|
37105
37105
|
break;
|
|
37106
37106
|
case 5: {
|
|
37107
37107
|
const node2 = this.startNode();
|
|
37108
|
-
this.setContext(
|
|
37108
|
+
this.setContext(types18.brace);
|
|
37109
37109
|
this.next();
|
|
37110
37110
|
if (this.match(21)) {
|
|
37111
37111
|
children.push(this.jsxParseSpreadChild(node2));
|
|
37112
37112
|
} else {
|
|
37113
|
-
children.push(this.jsxParseExpressionContainer(node2,
|
|
37113
|
+
children.push(this.jsxParseExpressionContainer(node2, types18.j_expr));
|
|
37114
37114
|
}
|
|
37115
37115
|
break;
|
|
37116
37116
|
}
|
|
@@ -37175,11 +37175,11 @@ var require_lib6 = __commonJS({
|
|
|
37175
37175
|
}
|
|
37176
37176
|
getTokenFromCode(code2) {
|
|
37177
37177
|
const context = this.curContext();
|
|
37178
|
-
if (context ===
|
|
37178
|
+
if (context === types18.j_expr) {
|
|
37179
37179
|
this.jsxReadToken();
|
|
37180
37180
|
return;
|
|
37181
37181
|
}
|
|
37182
|
-
if (context ===
|
|
37182
|
+
if (context === types18.j_oTag || context === types18.j_cTag) {
|
|
37183
37183
|
if (isIdentifierStart(code2)) {
|
|
37184
37184
|
this.jsxReadWord();
|
|
37185
37185
|
return;
|
|
@@ -37189,7 +37189,7 @@ var require_lib6 = __commonJS({
|
|
|
37189
37189
|
this.finishToken(143);
|
|
37190
37190
|
return;
|
|
37191
37191
|
}
|
|
37192
|
-
if ((code2 === 34 || code2 === 39) && context ===
|
|
37192
|
+
if ((code2 === 34 || code2 === 39) && context === types18.j_oTag) {
|
|
37193
37193
|
this.jsxReadString(code2);
|
|
37194
37194
|
return;
|
|
37195
37195
|
}
|
|
@@ -37207,17 +37207,17 @@ var require_lib6 = __commonJS({
|
|
|
37207
37207
|
type
|
|
37208
37208
|
} = this.state;
|
|
37209
37209
|
if (type === 56 && prevType === 142) {
|
|
37210
|
-
context.splice(-2, 2,
|
|
37210
|
+
context.splice(-2, 2, types18.j_cTag);
|
|
37211
37211
|
this.state.canStartJSXElement = false;
|
|
37212
37212
|
} else if (type === 142) {
|
|
37213
|
-
context.push(
|
|
37213
|
+
context.push(types18.j_oTag);
|
|
37214
37214
|
} else if (type === 143) {
|
|
37215
37215
|
const out = context[context.length - 1];
|
|
37216
|
-
if (out ===
|
|
37216
|
+
if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
|
|
37217
37217
|
context.pop();
|
|
37218
|
-
this.state.canStartJSXElement = context[context.length - 1] ===
|
|
37218
|
+
this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
|
|
37219
37219
|
} else {
|
|
37220
|
-
this.setContext(
|
|
37220
|
+
this.setContext(types18.j_expr);
|
|
37221
37221
|
this.state.canStartJSXElement = true;
|
|
37222
37222
|
}
|
|
37223
37223
|
} else {
|
|
@@ -38592,14 +38592,14 @@ var require_lib6 = __commonJS({
|
|
|
38592
38592
|
tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
|
|
38593
38593
|
const node = this.startNode();
|
|
38594
38594
|
const hasLeadingOperator = this.eat(operator);
|
|
38595
|
-
const
|
|
38595
|
+
const types19 = [];
|
|
38596
38596
|
do {
|
|
38597
|
-
|
|
38597
|
+
types19.push(parseConstituentType());
|
|
38598
38598
|
} while (this.eat(operator));
|
|
38599
|
-
if (
|
|
38600
|
-
return
|
|
38599
|
+
if (types19.length === 1 && !hasLeadingOperator) {
|
|
38600
|
+
return types19[0];
|
|
38601
38601
|
}
|
|
38602
|
-
node.types =
|
|
38602
|
+
node.types = types19;
|
|
38603
38603
|
return this.finishNode(node, kind);
|
|
38604
38604
|
}
|
|
38605
38605
|
tsParseIntersectionTypeOrHigher() {
|
|
@@ -39163,7 +39163,7 @@ var require_lib6 = __commonJS({
|
|
|
39163
39163
|
}));
|
|
39164
39164
|
if (node.params.length === 0) {
|
|
39165
39165
|
this.raise(TSErrors.EmptyTypeArguments, node);
|
|
39166
|
-
} else if (!this.state.inType && this.curContext() ===
|
|
39166
|
+
} else if (!this.state.inType && this.curContext() === types18.brace) {
|
|
39167
39167
|
this.reScan_lt_gt();
|
|
39168
39168
|
}
|
|
39169
39169
|
this.expect(48);
|
|
@@ -39789,7 +39789,7 @@ var require_lib6 = __commonJS({
|
|
|
39789
39789
|
context
|
|
39790
39790
|
} = this.state;
|
|
39791
39791
|
const currentContext = context[context.length - 1];
|
|
39792
|
-
if (currentContext ===
|
|
39792
|
+
if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
|
|
39793
39793
|
context.pop();
|
|
39794
39794
|
}
|
|
39795
39795
|
}
|
|
@@ -44921,9 +44921,9 @@ var require_shared = __commonJS({
|
|
|
44921
44921
|
var tslib_1 = require_tslib();
|
|
44922
44922
|
var types_1 = tslib_1.__importDefault(require_types());
|
|
44923
44923
|
function default_1(fork) {
|
|
44924
|
-
var
|
|
44925
|
-
var Type =
|
|
44926
|
-
var builtin =
|
|
44924
|
+
var types18 = fork.use(types_1.default);
|
|
44925
|
+
var Type = types18.Type;
|
|
44926
|
+
var builtin = types18.builtInTypes;
|
|
44927
44927
|
var isNumber = builtin.number;
|
|
44928
44928
|
function geq(than) {
|
|
44929
44929
|
return Type.from(function(value) {
|
|
@@ -45073,9 +45073,9 @@ var require_types = __commonJS({
|
|
|
45073
45073
|
}(BaseType);
|
|
45074
45074
|
var OrType = function(_super) {
|
|
45075
45075
|
tslib_1.__extends(OrType2, _super);
|
|
45076
|
-
function OrType2(
|
|
45076
|
+
function OrType2(types18) {
|
|
45077
45077
|
var _this = _super.call(this) || this;
|
|
45078
|
-
_this.types =
|
|
45078
|
+
_this.types = types18;
|
|
45079
45079
|
_this.kind = "OrType";
|
|
45080
45080
|
return _this;
|
|
45081
45081
|
}
|
|
@@ -45216,11 +45216,11 @@ var require_types = __commonJS({
|
|
|
45216
45216
|
function typesPlugin(_fork) {
|
|
45217
45217
|
var Type = {
|
|
45218
45218
|
or: function() {
|
|
45219
|
-
var
|
|
45219
|
+
var types18 = [];
|
|
45220
45220
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
45221
|
-
|
|
45221
|
+
types18[_i] = arguments[_i];
|
|
45222
45222
|
}
|
|
45223
|
-
return new OrType(
|
|
45223
|
+
return new OrType(types18.map(function(type) {
|
|
45224
45224
|
return Type.from(type);
|
|
45225
45225
|
}));
|
|
45226
45226
|
},
|
|
@@ -45665,9 +45665,9 @@ var require_path2 = __commonJS({
|
|
|
45665
45665
|
var Op = Object.prototype;
|
|
45666
45666
|
var hasOwn = Op.hasOwnProperty;
|
|
45667
45667
|
function pathPlugin(fork) {
|
|
45668
|
-
var
|
|
45669
|
-
var isArray =
|
|
45670
|
-
var isNumber =
|
|
45668
|
+
var types18 = fork.use(types_1.default);
|
|
45669
|
+
var isArray = types18.builtInTypes.array;
|
|
45670
|
+
var isNumber = types18.builtInTypes.number;
|
|
45671
45671
|
var Path = function Path2(value, parentPath, name) {
|
|
45672
45672
|
if (!(this instanceof Path2)) {
|
|
45673
45673
|
throw new Error("Path constructor cannot be invoked without 'new'");
|
|
@@ -45969,13 +45969,13 @@ var require_scope = __commonJS({
|
|
|
45969
45969
|
var types_1 = tslib_1.__importDefault(require_types());
|
|
45970
45970
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
45971
45971
|
function scopePlugin(fork) {
|
|
45972
|
-
var
|
|
45973
|
-
var Type =
|
|
45974
|
-
var namedTypes =
|
|
45972
|
+
var types18 = fork.use(types_1.default);
|
|
45973
|
+
var Type = types18.Type;
|
|
45974
|
+
var namedTypes = types18.namedTypes;
|
|
45975
45975
|
var Node = namedTypes.Node;
|
|
45976
45976
|
var Expression = namedTypes.Expression;
|
|
45977
|
-
var isArray =
|
|
45978
|
-
var b =
|
|
45977
|
+
var isArray = types18.builtInTypes.array;
|
|
45978
|
+
var b = types18.builders;
|
|
45979
45979
|
var Scope = function Scope2(path3, parentScope) {
|
|
45980
45980
|
if (!(this instanceof Scope2)) {
|
|
45981
45981
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
@@ -46038,7 +46038,7 @@ var require_scope = __commonJS({
|
|
|
46038
46038
|
++index;
|
|
46039
46039
|
}
|
|
46040
46040
|
var name = prefix + index;
|
|
46041
|
-
return this.bindings[name] =
|
|
46041
|
+
return this.bindings[name] = types18.builders.identifier(name);
|
|
46042
46042
|
};
|
|
46043
46043
|
Sp.injectTemporary = function(identifier, init) {
|
|
46044
46044
|
identifier || (identifier = this.declareTemporary());
|
|
@@ -46114,7 +46114,7 @@ var require_scope = __commonJS({
|
|
|
46114
46114
|
bindings
|
|
46115
46115
|
);
|
|
46116
46116
|
} else if (Node.check(node) && !Expression.check(node)) {
|
|
46117
|
-
|
|
46117
|
+
types18.eachField(node, function(name, child) {
|
|
46118
46118
|
var childPath = path3.get(name);
|
|
46119
46119
|
if (!pathHasValue(childPath, child)) {
|
|
46120
46120
|
throw new Error("");
|
|
@@ -46192,24 +46192,24 @@ var require_scope = __commonJS({
|
|
|
46192
46192
|
addPattern(patternPath.get("argument"), bindings);
|
|
46193
46193
|
}
|
|
46194
46194
|
}
|
|
46195
|
-
function addTypePattern(patternPath,
|
|
46195
|
+
function addTypePattern(patternPath, types19) {
|
|
46196
46196
|
var pattern = patternPath.value;
|
|
46197
46197
|
namedTypes.Pattern.assert(pattern);
|
|
46198
46198
|
if (namedTypes.Identifier.check(pattern)) {
|
|
46199
|
-
if (hasOwn.call(
|
|
46200
|
-
|
|
46199
|
+
if (hasOwn.call(types19, pattern.name)) {
|
|
46200
|
+
types19[pattern.name].push(patternPath);
|
|
46201
46201
|
} else {
|
|
46202
|
-
|
|
46202
|
+
types19[pattern.name] = [patternPath];
|
|
46203
46203
|
}
|
|
46204
46204
|
}
|
|
46205
46205
|
}
|
|
46206
|
-
function addTypeParameter(parameterPath,
|
|
46206
|
+
function addTypeParameter(parameterPath, types19) {
|
|
46207
46207
|
var parameter = parameterPath.value;
|
|
46208
46208
|
FlowOrTSTypeParameterType.assert(parameter);
|
|
46209
|
-
if (hasOwn.call(
|
|
46210
|
-
|
|
46209
|
+
if (hasOwn.call(types19, parameter.name)) {
|
|
46210
|
+
types19[parameter.name].push(parameterPath);
|
|
46211
46211
|
} else {
|
|
46212
|
-
|
|
46212
|
+
types19[parameter.name] = [parameterPath];
|
|
46213
46213
|
}
|
|
46214
46214
|
}
|
|
46215
46215
|
Sp.lookup = function(name) {
|
|
@@ -46250,11 +46250,11 @@ var require_node_path = __commonJS({
|
|
|
46250
46250
|
var scope_1 = tslib_1.__importDefault(require_scope());
|
|
46251
46251
|
var shared_1 = require_shared();
|
|
46252
46252
|
function nodePathPlugin(fork) {
|
|
46253
|
-
var
|
|
46254
|
-
var n =
|
|
46255
|
-
var b =
|
|
46256
|
-
var isNumber =
|
|
46257
|
-
var isArray =
|
|
46253
|
+
var types18 = fork.use(types_1.default);
|
|
46254
|
+
var n = types18.namedTypes;
|
|
46255
|
+
var b = types18.builders;
|
|
46256
|
+
var isNumber = types18.builtInTypes.number;
|
|
46257
|
+
var isArray = types18.builtInTypes.array;
|
|
46258
46258
|
var Path = fork.use(path_1.default);
|
|
46259
46259
|
var Scope = fork.use(scope_1.default);
|
|
46260
46260
|
var NodePath = function NodePath2(value, parentPath, name) {
|
|
@@ -46345,7 +46345,7 @@ var require_node_path = __commonJS({
|
|
|
46345
46345
|
return scope || null;
|
|
46346
46346
|
};
|
|
46347
46347
|
NPp.getValueProperty = function(name) {
|
|
46348
|
-
return
|
|
46348
|
+
return types18.getFieldValue(this.value, name);
|
|
46349
46349
|
};
|
|
46350
46350
|
NPp.needsParens = function(assumeExpressionContext) {
|
|
46351
46351
|
var pp = this.parentPath;
|
|
@@ -46487,7 +46487,7 @@ var require_node_path = __commonJS({
|
|
|
46487
46487
|
return node.some(containsCallExpression);
|
|
46488
46488
|
}
|
|
46489
46489
|
if (n.Node.check(node)) {
|
|
46490
|
-
return
|
|
46490
|
+
return types18.someField(node, function(_name, child) {
|
|
46491
46491
|
return containsCallExpression(child);
|
|
46492
46492
|
});
|
|
46493
46493
|
}
|
|
@@ -46608,11 +46608,11 @@ var require_path_visitor = __commonJS({
|
|
|
46608
46608
|
var shared_1 = require_shared();
|
|
46609
46609
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
46610
46610
|
function pathVisitorPlugin(fork) {
|
|
46611
|
-
var
|
|
46611
|
+
var types18 = fork.use(types_1.default);
|
|
46612
46612
|
var NodePath = fork.use(node_path_1.default);
|
|
46613
|
-
var isArray =
|
|
46614
|
-
var isObject2 =
|
|
46615
|
-
var isFunction =
|
|
46613
|
+
var isArray = types18.builtInTypes.array;
|
|
46614
|
+
var isObject2 = types18.builtInTypes.object;
|
|
46615
|
+
var isFunction = types18.builtInTypes.function;
|
|
46616
46616
|
var undefined2;
|
|
46617
46617
|
var PathVisitor = function PathVisitor2() {
|
|
46618
46618
|
if (!(this instanceof PathVisitor2)) {
|
|
@@ -46632,7 +46632,7 @@ var require_path_visitor = __commonJS({
|
|
|
46632
46632
|
typeNames[methodName.slice("visit".length)] = true;
|
|
46633
46633
|
}
|
|
46634
46634
|
}
|
|
46635
|
-
var supertypeTable =
|
|
46635
|
+
var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
|
|
46636
46636
|
var methodNameTable = /* @__PURE__ */ Object.create(null);
|
|
46637
46637
|
var typeNameKeys = Object.keys(supertypeTable);
|
|
46638
46638
|
var typeNameCount = typeNameKeys.length;
|
|
@@ -46751,7 +46751,7 @@ var require_path_visitor = __commonJS({
|
|
|
46751
46751
|
path3.each(visitor.visitWithoutReset, visitor);
|
|
46752
46752
|
} else if (!isObject2.check(value)) {
|
|
46753
46753
|
} else {
|
|
46754
|
-
var childNames =
|
|
46754
|
+
var childNames = types18.getFieldNames(value);
|
|
46755
46755
|
if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
|
|
46756
46756
|
childNames.push("comments");
|
|
46757
46757
|
}
|
|
@@ -46760,7 +46760,7 @@ var require_path_visitor = __commonJS({
|
|
|
46760
46760
|
for (var i2 = 0; i2 < childCount; ++i2) {
|
|
46761
46761
|
var childName = childNames[i2];
|
|
46762
46762
|
if (!hasOwn.call(value, childName)) {
|
|
46763
|
-
value[childName] =
|
|
46763
|
+
value[childName] = types18.getFieldValue(value, childName);
|
|
46764
46764
|
}
|
|
46765
46765
|
childPaths.push(path3.get(childName));
|
|
46766
46766
|
}
|
|
@@ -46903,13 +46903,13 @@ var require_equiv = __commonJS({
|
|
|
46903
46903
|
var shared_1 = require_shared();
|
|
46904
46904
|
var types_1 = tslib_1.__importDefault(require_types());
|
|
46905
46905
|
function default_1(fork) {
|
|
46906
|
-
var
|
|
46907
|
-
var getFieldNames =
|
|
46908
|
-
var getFieldValue =
|
|
46909
|
-
var isArray =
|
|
46910
|
-
var isObject2 =
|
|
46911
|
-
var isDate =
|
|
46912
|
-
var isRegExp =
|
|
46906
|
+
var types18 = fork.use(types_1.default);
|
|
46907
|
+
var getFieldNames = types18.getFieldNames;
|
|
46908
|
+
var getFieldValue = types18.getFieldValue;
|
|
46909
|
+
var isArray = types18.builtInTypes.array;
|
|
46910
|
+
var isObject2 = types18.builtInTypes.object;
|
|
46911
|
+
var isDate = types18.builtInTypes.Date;
|
|
46912
|
+
var isRegExp = types18.builtInTypes.RegExp;
|
|
46913
46913
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
46914
46914
|
function astNodesAreEquivalent(a, b, problemPath) {
|
|
46915
46915
|
if (isArray.check(problemPath)) {
|
|
@@ -47062,24 +47062,24 @@ var require_fork = __commonJS({
|
|
|
47062
47062
|
var shared_1 = require_shared();
|
|
47063
47063
|
function default_1(plugins) {
|
|
47064
47064
|
var fork = createFork();
|
|
47065
|
-
var
|
|
47065
|
+
var types18 = fork.use(types_1.default);
|
|
47066
47066
|
plugins.forEach(fork.use);
|
|
47067
|
-
|
|
47067
|
+
types18.finalize();
|
|
47068
47068
|
var PathVisitor = fork.use(path_visitor_1.default);
|
|
47069
47069
|
return {
|
|
47070
|
-
Type:
|
|
47071
|
-
builtInTypes:
|
|
47072
|
-
namedTypes:
|
|
47073
|
-
builders:
|
|
47074
|
-
defineMethod:
|
|
47075
|
-
getFieldNames:
|
|
47076
|
-
getFieldValue:
|
|
47077
|
-
eachField:
|
|
47078
|
-
someField:
|
|
47079
|
-
getSupertypeNames:
|
|
47080
|
-
getBuilderName:
|
|
47070
|
+
Type: types18.Type,
|
|
47071
|
+
builtInTypes: types18.builtInTypes,
|
|
47072
|
+
namedTypes: types18.namedTypes,
|
|
47073
|
+
builders: types18.builders,
|
|
47074
|
+
defineMethod: types18.defineMethod,
|
|
47075
|
+
getFieldNames: types18.getFieldNames,
|
|
47076
|
+
getFieldValue: types18.getFieldValue,
|
|
47077
|
+
eachField: types18.eachField,
|
|
47078
|
+
someField: types18.someField,
|
|
47079
|
+
getSupertypeNames: types18.getSupertypeNames,
|
|
47080
|
+
getBuilderName: types18.getBuilderName,
|
|
47081
47081
|
astNodesAreEquivalent: fork.use(equiv_1.default),
|
|
47082
|
-
finalize:
|
|
47082
|
+
finalize: types18.finalize,
|
|
47083
47083
|
Path: fork.use(path_1.default),
|
|
47084
47084
|
NodePath: fork.use(node_path_1.default),
|
|
47085
47085
|
PathVisitor,
|
|
@@ -47249,8 +47249,8 @@ var require_core3 = __commonJS({
|
|
|
47249
47249
|
var types_1 = tslib_1.__importDefault(require_types());
|
|
47250
47250
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
47251
47251
|
function default_1(fork) {
|
|
47252
|
-
var
|
|
47253
|
-
var Type =
|
|
47252
|
+
var types18 = fork.use(types_1.default);
|
|
47253
|
+
var Type = types18.Type;
|
|
47254
47254
|
var def = Type.def;
|
|
47255
47255
|
var or = Type.or;
|
|
47256
47256
|
var shared = fork.use(shared_1.default);
|
|
@@ -47342,9 +47342,9 @@ var require_es6 = __commonJS({
|
|
|
47342
47342
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
47343
47343
|
function default_1(fork) {
|
|
47344
47344
|
fork.use(core_1.default);
|
|
47345
|
-
var
|
|
47346
|
-
var def =
|
|
47347
|
-
var or =
|
|
47345
|
+
var types18 = fork.use(types_1.default);
|
|
47346
|
+
var def = types18.Type.def;
|
|
47347
|
+
var or = types18.Type.or;
|
|
47348
47348
|
var defaults = fork.use(shared_1.default).defaults;
|
|
47349
47349
|
def("Function").field("generator", Boolean, defaults["false"]).field("expression", Boolean, defaults["false"]).field("defaults", [or(def("Expression"), null)], defaults.emptyArray).field("rest", or(def("Identifier"), null), defaults["null"]);
|
|
47350
47350
|
def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
|
|
@@ -47434,8 +47434,8 @@ var require_es2017 = __commonJS({
|
|
|
47434
47434
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
47435
47435
|
function default_1(fork) {
|
|
47436
47436
|
fork.use(es2016_1.default);
|
|
47437
|
-
var
|
|
47438
|
-
var def =
|
|
47437
|
+
var types18 = fork.use(types_1.default);
|
|
47438
|
+
var def = types18.Type.def;
|
|
47439
47439
|
var defaults = fork.use(shared_1.default).defaults;
|
|
47440
47440
|
def("Function").field("async", Boolean, defaults["false"]);
|
|
47441
47441
|
def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
|
|
@@ -47458,9 +47458,9 @@ var require_es2018 = __commonJS({
|
|
|
47458
47458
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
47459
47459
|
function default_1(fork) {
|
|
47460
47460
|
fork.use(es2017_1.default);
|
|
47461
|
-
var
|
|
47462
|
-
var def =
|
|
47463
|
-
var or =
|
|
47461
|
+
var types18 = fork.use(types_1.default);
|
|
47462
|
+
var def = types18.Type.def;
|
|
47463
|
+
var or = types18.Type.or;
|
|
47464
47464
|
var defaults = fork.use(shared_1.default).defaults;
|
|
47465
47465
|
def("ForOfStatement").field("await", Boolean, defaults["false"]);
|
|
47466
47466
|
def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
@@ -47491,9 +47491,9 @@ var require_es2019 = __commonJS({
|
|
|
47491
47491
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
47492
47492
|
function default_1(fork) {
|
|
47493
47493
|
fork.use(es2018_1.default);
|
|
47494
|
-
var
|
|
47495
|
-
var def =
|
|
47496
|
-
var or =
|
|
47494
|
+
var types18 = fork.use(types_1.default);
|
|
47495
|
+
var def = types18.Type.def;
|
|
47496
|
+
var or = types18.Type.or;
|
|
47497
47497
|
var defaults = fork.use(shared_1.default).defaults;
|
|
47498
47498
|
def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
|
|
47499
47499
|
}
|
|
@@ -47517,9 +47517,9 @@ var require_es20202 = __commonJS({
|
|
|
47517
47517
|
function default_1(fork) {
|
|
47518
47518
|
fork.use(es2020_1.default);
|
|
47519
47519
|
fork.use(es2019_1.default);
|
|
47520
|
-
var
|
|
47521
|
-
var def =
|
|
47522
|
-
var or =
|
|
47520
|
+
var types18 = fork.use(types_1.default);
|
|
47521
|
+
var def = types18.Type.def;
|
|
47522
|
+
var or = types18.Type.or;
|
|
47523
47523
|
var shared = fork.use(shared_1.default);
|
|
47524
47524
|
var defaults = shared.defaults;
|
|
47525
47525
|
def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
|
|
@@ -47569,8 +47569,8 @@ var require_es2022 = __commonJS({
|
|
|
47569
47569
|
var shared_1 = require_shared();
|
|
47570
47570
|
function default_1(fork) {
|
|
47571
47571
|
fork.use(es2021_1.default);
|
|
47572
|
-
var
|
|
47573
|
-
var def =
|
|
47572
|
+
var types18 = fork.use(types_1.default);
|
|
47573
|
+
var def = types18.Type.def;
|
|
47574
47574
|
def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
|
|
47575
47575
|
}
|
|
47576
47576
|
exports.default = default_1;
|
|
@@ -47591,9 +47591,9 @@ var require_es_proposals = __commonJS({
|
|
|
47591
47591
|
var es2022_1 = tslib_1.__importDefault(require_es2022());
|
|
47592
47592
|
function default_1(fork) {
|
|
47593
47593
|
fork.use(es2022_1.default);
|
|
47594
|
-
var
|
|
47595
|
-
var Type =
|
|
47596
|
-
var def =
|
|
47594
|
+
var types18 = fork.use(types_1.default);
|
|
47595
|
+
var Type = types18.Type;
|
|
47596
|
+
var def = types18.Type.def;
|
|
47597
47597
|
var or = Type.or;
|
|
47598
47598
|
var shared = fork.use(shared_1.default);
|
|
47599
47599
|
var defaults = shared.defaults;
|
|
@@ -47633,9 +47633,9 @@ var require_jsx2 = __commonJS({
|
|
|
47633
47633
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
47634
47634
|
function default_1(fork) {
|
|
47635
47635
|
fork.use(es_proposals_1.default);
|
|
47636
|
-
var
|
|
47637
|
-
var def =
|
|
47638
|
-
var or =
|
|
47636
|
+
var types18 = fork.use(types_1.default);
|
|
47637
|
+
var def = types18.Type.def;
|
|
47638
|
+
var or = types18.Type.or;
|
|
47639
47639
|
var defaults = fork.use(shared_1.default).defaults;
|
|
47640
47640
|
def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
|
|
47641
47641
|
def("Literal"),
|
|
@@ -47693,9 +47693,9 @@ var require_type_annotations = __commonJS({
|
|
|
47693
47693
|
var types_1 = tslib_1.__importDefault(require_types());
|
|
47694
47694
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
47695
47695
|
function default_1(fork) {
|
|
47696
|
-
var
|
|
47697
|
-
var def =
|
|
47698
|
-
var or =
|
|
47696
|
+
var types18 = fork.use(types_1.default);
|
|
47697
|
+
var def = types18.Type.def;
|
|
47698
|
+
var or = types18.Type.or;
|
|
47699
47699
|
var defaults = fork.use(shared_1.default).defaults;
|
|
47700
47700
|
var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
|
|
47701
47701
|
var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
|
|
@@ -47730,9 +47730,9 @@ var require_flow2 = __commonJS({
|
|
|
47730
47730
|
function default_1(fork) {
|
|
47731
47731
|
fork.use(es_proposals_1.default);
|
|
47732
47732
|
fork.use(type_annotations_1.default);
|
|
47733
|
-
var
|
|
47734
|
-
var def =
|
|
47735
|
-
var or =
|
|
47733
|
+
var types18 = fork.use(types_1.default);
|
|
47734
|
+
var def = types18.Type.def;
|
|
47735
|
+
var or = types18.Type.or;
|
|
47736
47736
|
var defaults = fork.use(shared_1.default).defaults;
|
|
47737
47737
|
def("Flow").bases("Node");
|
|
47738
47738
|
def("FlowType").bases("Flow");
|
|
@@ -47846,10 +47846,10 @@ var require_esprima = __commonJS({
|
|
|
47846
47846
|
var shared_1 = tslib_1.__importStar(require_shared());
|
|
47847
47847
|
function default_1(fork) {
|
|
47848
47848
|
fork.use(es_proposals_1.default);
|
|
47849
|
-
var
|
|
47849
|
+
var types18 = fork.use(types_1.default);
|
|
47850
47850
|
var defaults = fork.use(shared_1.default).defaults;
|
|
47851
|
-
var def =
|
|
47852
|
-
var or =
|
|
47851
|
+
var def = types18.Type.def;
|
|
47852
|
+
var or = types18.Type.or;
|
|
47853
47853
|
def("VariableDeclaration").field("declarations", [or(
|
|
47854
47854
|
def("VariableDeclarator"),
|
|
47855
47855
|
def("Identifier")
|
|
@@ -47894,11 +47894,11 @@ var require_babel_core = __commonJS({
|
|
|
47894
47894
|
function default_1(fork) {
|
|
47895
47895
|
var _a, _b, _c, _d, _e;
|
|
47896
47896
|
fork.use(es_proposals_1.default);
|
|
47897
|
-
var
|
|
47897
|
+
var types18 = fork.use(types_1.default);
|
|
47898
47898
|
var defaults = fork.use(shared_1.default).defaults;
|
|
47899
|
-
var def =
|
|
47900
|
-
var or =
|
|
47901
|
-
var isUndefined =
|
|
47899
|
+
var def = types18.Type.def;
|
|
47900
|
+
var or = types18.Type.or;
|
|
47901
|
+
var isUndefined = types18.builtInTypes.undefined;
|
|
47902
47902
|
def("Noop").bases("Statement").build();
|
|
47903
47903
|
def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
|
|
47904
47904
|
def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
|
|
@@ -47923,7 +47923,7 @@ var require_babel_core = __commonJS({
|
|
|
47923
47923
|
raw: String
|
|
47924
47924
|
},
|
|
47925
47925
|
function getDefault() {
|
|
47926
|
-
var value =
|
|
47926
|
+
var value = types18.getFieldValue(this, "value");
|
|
47927
47927
|
return {
|
|
47928
47928
|
rawValue: value,
|
|
47929
47929
|
raw: toRaw ? toRaw(value) : String(value)
|
|
@@ -48026,8 +48026,8 @@ var require_babel = __commonJS({
|
|
|
48026
48026
|
var flow_1 = tslib_1.__importDefault(require_flow2());
|
|
48027
48027
|
var shared_1 = require_shared();
|
|
48028
48028
|
function default_1(fork) {
|
|
48029
|
-
var
|
|
48030
|
-
var def =
|
|
48029
|
+
var types18 = fork.use(types_1.default);
|
|
48030
|
+
var def = types18.Type.def;
|
|
48031
48031
|
fork.use(babel_core_1.default);
|
|
48032
48032
|
fork.use(flow_1.default);
|
|
48033
48033
|
def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
|
|
@@ -48053,12 +48053,12 @@ var require_typescript2 = __commonJS({
|
|
|
48053
48053
|
function default_1(fork) {
|
|
48054
48054
|
fork.use(babel_core_1.default);
|
|
48055
48055
|
fork.use(type_annotations_1.default);
|
|
48056
|
-
var
|
|
48057
|
-
var n =
|
|
48058
|
-
var def =
|
|
48059
|
-
var or =
|
|
48056
|
+
var types18 = fork.use(types_1.default);
|
|
48057
|
+
var n = types18.namedTypes;
|
|
48058
|
+
var def = types18.Type.def;
|
|
48059
|
+
var or = types18.Type.or;
|
|
48060
48060
|
var defaults = fork.use(shared_1.default).defaults;
|
|
48061
|
-
var StringLiteral =
|
|
48061
|
+
var StringLiteral = types18.Type.from(function(value, deep) {
|
|
48062
48062
|
if (n.StringLiteral && n.StringLiteral.check(value, deep)) {
|
|
48063
48063
|
return true;
|
|
48064
48064
|
}
|
|
@@ -50034,8 +50034,8 @@ var require_util2 = __commonJS({
|
|
|
50034
50034
|
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;
|
|
50035
50035
|
var tslib_1 = require_tslib();
|
|
50036
50036
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
50037
|
-
var
|
|
50038
|
-
var n =
|
|
50037
|
+
var types18 = tslib_1.__importStar(require_main());
|
|
50038
|
+
var n = types18.namedTypes;
|
|
50039
50039
|
var source_map_1 = tslib_1.__importDefault(require_source_map());
|
|
50040
50040
|
var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
|
|
50041
50041
|
var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
|
|
@@ -57353,10 +57353,10 @@ var require_comments = __commonJS({
|
|
|
57353
57353
|
exports.printComments = exports.attach = void 0;
|
|
57354
57354
|
var tslib_1 = require_tslib();
|
|
57355
57355
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
57356
|
-
var
|
|
57357
|
-
var n =
|
|
57358
|
-
var isArray =
|
|
57359
|
-
var isObject2 =
|
|
57356
|
+
var types18 = tslib_1.__importStar(require_main());
|
|
57357
|
+
var n = types18.namedTypes;
|
|
57358
|
+
var isArray = types18.builtInTypes.array;
|
|
57359
|
+
var isObject2 = types18.builtInTypes.object;
|
|
57360
57360
|
var lines_1 = require_lines();
|
|
57361
57361
|
var util_1 = require_util2();
|
|
57362
57362
|
var childNodesCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -57387,7 +57387,7 @@ var require_comments = __commonJS({
|
|
|
57387
57387
|
if (isArray.check(node)) {
|
|
57388
57388
|
names = Object.keys(node);
|
|
57389
57389
|
} else if (isObject2.check(node)) {
|
|
57390
|
-
names =
|
|
57390
|
+
names = types18.getFieldNames(node);
|
|
57391
57391
|
} else {
|
|
57392
57392
|
return resultArray;
|
|
57393
57393
|
}
|
|
@@ -57565,7 +57565,7 @@ var require_comments = __commonJS({
|
|
|
57565
57565
|
function printComments(path3, print13) {
|
|
57566
57566
|
var value = path3.getValue();
|
|
57567
57567
|
var innerLines = print13(path3);
|
|
57568
|
-
var comments = n.Node.check(value) &&
|
|
57568
|
+
var comments = n.Node.check(value) && types18.getFieldValue(value, "comments");
|
|
57569
57569
|
if (!comments || comments.length === 0) {
|
|
57570
57570
|
return innerLines;
|
|
57571
57571
|
}
|
|
@@ -57573,8 +57573,8 @@ var require_comments = __commonJS({
|
|
|
57573
57573
|
var trailingParts = [innerLines];
|
|
57574
57574
|
path3.each(function(commentPath) {
|
|
57575
57575
|
var comment = commentPath.getValue();
|
|
57576
|
-
var leading =
|
|
57577
|
-
var trailing =
|
|
57576
|
+
var leading = types18.getFieldValue(comment, "leading");
|
|
57577
|
+
var trailing = types18.getFieldValue(comment, "trailing");
|
|
57578
57578
|
if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
|
|
57579
57579
|
leadingParts.push(printLeadingComment(commentPath, print13));
|
|
57580
57580
|
} else if (trailing) {
|
|
@@ -57596,10 +57596,10 @@ var require_parser = __commonJS({
|
|
|
57596
57596
|
exports.parse = void 0;
|
|
57597
57597
|
var tslib_1 = require_tslib();
|
|
57598
57598
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
57599
|
-
var
|
|
57600
|
-
var b =
|
|
57601
|
-
var isObject2 =
|
|
57602
|
-
var isArray =
|
|
57599
|
+
var types18 = tslib_1.__importStar(require_main());
|
|
57600
|
+
var b = types18.builders;
|
|
57601
|
+
var isObject2 = types18.builtInTypes.object;
|
|
57602
|
+
var isArray = types18.builtInTypes.array;
|
|
57603
57603
|
var options_1 = require_options();
|
|
57604
57604
|
var lines_1 = require_lines();
|
|
57605
57605
|
var comments_1 = require_comments();
|
|
@@ -57785,11 +57785,11 @@ var require_fast_path = __commonJS({
|
|
|
57785
57785
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57786
57786
|
var tslib_1 = require_tslib();
|
|
57787
57787
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
57788
|
-
var
|
|
57788
|
+
var types18 = tslib_1.__importStar(require_main());
|
|
57789
57789
|
var util = tslib_1.__importStar(require_util2());
|
|
57790
|
-
var n =
|
|
57791
|
-
var isArray =
|
|
57792
|
-
var isNumber =
|
|
57790
|
+
var n = types18.namedTypes;
|
|
57791
|
+
var isArray = types18.builtInTypes.array;
|
|
57792
|
+
var isNumber = types18.builtInTypes.number;
|
|
57793
57793
|
var PRECEDENCE = {};
|
|
57794
57794
|
[
|
|
57795
57795
|
["??"],
|
|
@@ -57818,7 +57818,7 @@ var require_fast_path = __commonJS({
|
|
|
57818
57818
|
if (obj instanceof FastPath) {
|
|
57819
57819
|
return obj.copy();
|
|
57820
57820
|
}
|
|
57821
|
-
if (obj instanceof
|
|
57821
|
+
if (obj instanceof types18.NodePath) {
|
|
57822
57822
|
var copy = Object.create(FastPath.prototype);
|
|
57823
57823
|
var stack = [obj.value];
|
|
57824
57824
|
for (var pp = void 0; pp = obj.parentPath; obj = pp)
|
|
@@ -58129,7 +58129,7 @@ var require_fast_path = __commonJS({
|
|
|
58129
58129
|
return node.some(containsCallExpression);
|
|
58130
58130
|
}
|
|
58131
58131
|
if (n.Node.check(node)) {
|
|
58132
|
-
return
|
|
58132
|
+
return types18.someField(node, function(_name, child) {
|
|
58133
58133
|
return containsCallExpression(child);
|
|
58134
58134
|
});
|
|
58135
58135
|
}
|
|
@@ -58219,16 +58219,16 @@ var require_patcher = __commonJS({
|
|
|
58219
58219
|
var tslib_1 = require_tslib();
|
|
58220
58220
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
58221
58221
|
var linesModule = tslib_1.__importStar(require_lines());
|
|
58222
|
-
var
|
|
58223
|
-
var Printable =
|
|
58224
|
-
var Expression =
|
|
58225
|
-
var ReturnStatement =
|
|
58226
|
-
var SourceLocation =
|
|
58222
|
+
var types18 = tslib_1.__importStar(require_main());
|
|
58223
|
+
var Printable = types18.namedTypes.Printable;
|
|
58224
|
+
var Expression = types18.namedTypes.Expression;
|
|
58225
|
+
var ReturnStatement = types18.namedTypes.ReturnStatement;
|
|
58226
|
+
var SourceLocation = types18.namedTypes.SourceLocation;
|
|
58227
58227
|
var util_1 = require_util2();
|
|
58228
58228
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path());
|
|
58229
|
-
var isObject2 =
|
|
58230
|
-
var isArray =
|
|
58231
|
-
var isString =
|
|
58229
|
+
var isObject2 = types18.builtInTypes.object;
|
|
58230
|
+
var isArray = types18.builtInTypes.array;
|
|
58231
|
+
var isString = types18.builtInTypes.string;
|
|
58232
58232
|
var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
|
|
58233
58233
|
var Patcher = function Patcher2(lines) {
|
|
58234
58234
|
assert_1.default.ok(this instanceof Patcher2);
|
|
@@ -58498,8 +58498,8 @@ var require_patcher = __commonJS({
|
|
|
58498
58498
|
if (k.charAt(0) === "_") {
|
|
58499
58499
|
continue;
|
|
58500
58500
|
}
|
|
58501
|
-
newPath.stack.push(k,
|
|
58502
|
-
oldPath.stack.push(k,
|
|
58501
|
+
newPath.stack.push(k, types18.getFieldValue(newNode, k));
|
|
58502
|
+
oldPath.stack.push(k, types18.getFieldValue(oldNode, k));
|
|
58503
58503
|
var canReprint = findAnyReprints(newPath, oldPath, reprints);
|
|
58504
58504
|
newPath.stack.length -= 2;
|
|
58505
58505
|
oldPath.stack.length -= 2;
|
|
@@ -58523,16 +58523,16 @@ var require_printer = __commonJS({
|
|
|
58523
58523
|
exports.Printer = void 0;
|
|
58524
58524
|
var tslib_1 = require_tslib();
|
|
58525
58525
|
var assert_1 = tslib_1.__importDefault(__require("assert"));
|
|
58526
|
-
var
|
|
58526
|
+
var types18 = tslib_1.__importStar(require_main());
|
|
58527
58527
|
var comments_1 = require_comments();
|
|
58528
58528
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path());
|
|
58529
58529
|
var lines_1 = require_lines();
|
|
58530
58530
|
var options_1 = require_options();
|
|
58531
58531
|
var patcher_1 = require_patcher();
|
|
58532
58532
|
var util = tslib_1.__importStar(require_util2());
|
|
58533
|
-
var namedTypes =
|
|
58534
|
-
var isString =
|
|
58535
|
-
var isObject2 =
|
|
58533
|
+
var namedTypes = types18.namedTypes;
|
|
58534
|
+
var isString = types18.builtInTypes.string;
|
|
58535
|
+
var isObject2 = types18.builtInTypes.object;
|
|
58536
58536
|
var PrintResult = function PrintResult2(code, sourceMap) {
|
|
58537
58537
|
assert_1.default.ok(this instanceof PrintResult2);
|
|
58538
58538
|
isString.assert(code);
|
|
@@ -58694,7 +58694,7 @@ var require_printer = __commonJS({
|
|
|
58694
58694
|
case "OptionalMemberExpression": {
|
|
58695
58695
|
parts.push(path3.call(print13, "object"));
|
|
58696
58696
|
var property = path3.call(print13, "property");
|
|
58697
|
-
var optional =
|
|
58697
|
+
var optional = types18.getFieldValue(n, "optional");
|
|
58698
58698
|
if (n.computed) {
|
|
58699
58699
|
parts.push(optional ? "?.[" : "[", property, "]");
|
|
58700
58700
|
} else {
|
|
@@ -58965,7 +58965,7 @@ var require_printer = __commonJS({
|
|
|
58965
58965
|
if (n.typeArguments) {
|
|
58966
58966
|
parts.push(path3.call(print13, "typeArguments"));
|
|
58967
58967
|
}
|
|
58968
|
-
if (
|
|
58968
|
+
if (types18.getFieldValue(n, "optional")) {
|
|
58969
58969
|
parts.push("?.");
|
|
58970
58970
|
}
|
|
58971
58971
|
parts.push(printArgumentsList(path3, options, print13));
|
|
@@ -60644,8 +60644,8 @@ var require_printer = __commonJS({
|
|
|
60644
60644
|
});
|
|
60645
60645
|
}
|
|
60646
60646
|
function getPossibleRaw(node) {
|
|
60647
|
-
var value =
|
|
60648
|
-
var extra =
|
|
60647
|
+
var value = types18.getFieldValue(node, "value");
|
|
60648
|
+
var extra = types18.getFieldValue(node, "extra");
|
|
60649
60649
|
if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
|
|
60650
60650
|
return extra.raw;
|
|
60651
60651
|
}
|
|
@@ -60693,8 +60693,8 @@ var require_main2 = __commonJS({
|
|
|
60693
60693
|
exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
|
|
60694
60694
|
var tslib_1 = require_tslib();
|
|
60695
60695
|
var fs_1 = tslib_1.__importDefault(__require("fs"));
|
|
60696
|
-
var
|
|
60697
|
-
exports.types =
|
|
60696
|
+
var types18 = tslib_1.__importStar(require_main());
|
|
60697
|
+
exports.types = types18;
|
|
60698
60698
|
var parser_1 = require_parser();
|
|
60699
60699
|
Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
|
|
60700
60700
|
return parser_1.parse;
|
|
@@ -62224,7 +62224,7 @@ var printDocASTReducer = {
|
|
|
62224
62224
|
leave: ({ name, interfaces, directives, fields }) => join(["interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
|
|
62225
62225
|
},
|
|
62226
62226
|
UnionTypeDefinition: {
|
|
62227
|
-
leave: ({ name, directives, types:
|
|
62227
|
+
leave: ({ name, directives, types: types18 }) => join(["union", name, join(directives, " "), wrap("= ", join(types18, " | "))], " ")
|
|
62228
62228
|
},
|
|
62229
62229
|
EnumTypeDefinition: {
|
|
62230
62230
|
leave: ({ name, directives, values }) => join(["enum", name, join(directives, " "), block(values)], " ")
|
|
@@ -62251,7 +62251,7 @@ var printDocASTReducer = {
|
|
|
62251
62251
|
leave: ({ name, interfaces, directives, fields }) => join(["extend interface", name, wrap("implements ", join(interfaces, " & ")), join(directives, " "), block(fields)], " ")
|
|
62252
62252
|
},
|
|
62253
62253
|
UnionTypeExtension: {
|
|
62254
|
-
leave: ({ name, directives, types:
|
|
62254
|
+
leave: ({ name, directives, types: types18 }) => join(["extend union", name, join(directives, " "), wrap("= ", join(types18, " | "))], " ")
|
|
62255
62255
|
},
|
|
62256
62256
|
EnumTypeExtension: {
|
|
62257
62257
|
leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
|
|
@@ -63131,8 +63131,8 @@ function healTypes(originalTypeMap, directives) {
|
|
|
63131
63131
|
}
|
|
63132
63132
|
}
|
|
63133
63133
|
function healUnderlyingTypes(type) {
|
|
63134
|
-
const
|
|
63135
|
-
|
|
63134
|
+
const types18 = type.getTypes();
|
|
63135
|
+
types18.push(...types18.splice(0).map((t3) => healType(t3)).filter(Boolean));
|
|
63136
63136
|
}
|
|
63137
63137
|
function healType(type) {
|
|
63138
63138
|
if (isListType5(type)) {
|
|
@@ -63916,11 +63916,11 @@ function mergeEnum(e1, e2, config2) {
|
|
|
63916
63916
|
|
|
63917
63917
|
// ../../node_modules/.pnpm/@graphql-tools+merge@8.3.14_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
|
|
63918
63918
|
import { Source, Kind as Kind8 } from "graphql";
|
|
63919
|
-
function isStringTypes(
|
|
63920
|
-
return typeof
|
|
63919
|
+
function isStringTypes(types18) {
|
|
63920
|
+
return typeof types18 === "string";
|
|
63921
63921
|
}
|
|
63922
|
-
function isSourceTypes(
|
|
63923
|
-
return
|
|
63922
|
+
function isSourceTypes(types18) {
|
|
63923
|
+
return types18 instanceof Source;
|
|
63924
63924
|
}
|
|
63925
63925
|
function extractType(type) {
|
|
63926
63926
|
let visitedType = type;
|
|
@@ -66881,7 +66881,18 @@ var ListManager = class {
|
|
|
66881
66881
|
}
|
|
66882
66882
|
lists = /* @__PURE__ */ new Map();
|
|
66883
66883
|
listsByField = /* @__PURE__ */ new Map();
|
|
66884
|
-
get(listName, id, allLists) {
|
|
66884
|
+
get(listName, id, allLists, skipMatches) {
|
|
66885
|
+
const lists = this.getLists(listName, id, allLists);
|
|
66886
|
+
if (!lists) {
|
|
66887
|
+
return null;
|
|
66888
|
+
}
|
|
66889
|
+
if (skipMatches) {
|
|
66890
|
+
return new ListCollection(lists.lists.filter((list) => !skipMatches.has(list.fieldRef)));
|
|
66891
|
+
} else {
|
|
66892
|
+
return lists;
|
|
66893
|
+
}
|
|
66894
|
+
}
|
|
66895
|
+
getLists(listName, id, allLists) {
|
|
66885
66896
|
const matches = this.lists.get(listName);
|
|
66886
66897
|
if (!matches || matches.size === 0) {
|
|
66887
66898
|
return null;
|
|
@@ -67003,6 +67014,9 @@ var List = class {
|
|
|
67003
67014
|
this.manager = manager;
|
|
67004
67015
|
this.abstract = abstract;
|
|
67005
67016
|
}
|
|
67017
|
+
get fieldRef() {
|
|
67018
|
+
return `${this.recordID}.${this.key}`;
|
|
67019
|
+
}
|
|
67006
67020
|
when(when) {
|
|
67007
67021
|
return this.manager.lists.get(this.name).get(this.recordID).when(when);
|
|
67008
67022
|
}
|
|
@@ -68155,8 +68169,8 @@ var Cache = class {
|
|
|
68155
68169
|
variables
|
|
68156
68170
|
);
|
|
68157
68171
|
}
|
|
68158
|
-
list(name, parentID, allLists) {
|
|
68159
|
-
const handler = this._internal_unstable.lists.get(name, parentID, allLists);
|
|
68172
|
+
list(name, parentID, allLists, skipMatches) {
|
|
68173
|
+
const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
|
|
68160
68174
|
if (!handler) {
|
|
68161
68175
|
throw new Error(
|
|
68162
68176
|
`Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
|
|
@@ -68571,6 +68585,7 @@ var CacheInternal = class {
|
|
|
68571
68585
|
});
|
|
68572
68586
|
}
|
|
68573
68587
|
}
|
|
68588
|
+
const processedOperations = /* @__PURE__ */ new Set();
|
|
68574
68589
|
for (const operation of operations || []) {
|
|
68575
68590
|
let parentID;
|
|
68576
68591
|
if (operation.parentID) {
|
|
@@ -68590,7 +68605,12 @@ var CacheInternal = class {
|
|
|
68590
68605
|
const targets = Array.isArray(value) ? value : [value];
|
|
68591
68606
|
for (const target of targets) {
|
|
68592
68607
|
if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
|
|
68593
|
-
this.cache.list(
|
|
68608
|
+
this.cache.list(
|
|
68609
|
+
operation.list,
|
|
68610
|
+
parentID,
|
|
68611
|
+
operation.target === "all",
|
|
68612
|
+
processedOperations
|
|
68613
|
+
).when(operation.when).addToList(
|
|
68594
68614
|
fieldSelection,
|
|
68595
68615
|
target,
|
|
68596
68616
|
variables,
|
|
@@ -68598,7 +68618,12 @@ var CacheInternal = class {
|
|
|
68598
68618
|
layer
|
|
68599
68619
|
);
|
|
68600
68620
|
} else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
|
|
68601
|
-
this.cache.list(
|
|
68621
|
+
this.cache.list(
|
|
68622
|
+
operation.list,
|
|
68623
|
+
parentID,
|
|
68624
|
+
operation.target === "all",
|
|
68625
|
+
processedOperations
|
|
68626
|
+
).when(operation.when).toggleElement({
|
|
68602
68627
|
selection: fieldSelection,
|
|
68603
68628
|
data: target,
|
|
68604
68629
|
variables,
|
|
@@ -68606,7 +68631,12 @@ var CacheInternal = class {
|
|
|
68606
68631
|
layer
|
|
68607
68632
|
});
|
|
68608
68633
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
68609
|
-
this.cache.list(
|
|
68634
|
+
this.cache.list(
|
|
68635
|
+
operation.list,
|
|
68636
|
+
parentID,
|
|
68637
|
+
operation.target === "all",
|
|
68638
|
+
processedOperations
|
|
68639
|
+
).when(operation.when).remove(target, variables, layer);
|
|
68610
68640
|
} else if (operation.action === "delete" && operation.type && target) {
|
|
68611
68641
|
const targetID = this.id(operation.type, target);
|
|
68612
68642
|
if (!targetID) {
|
|
@@ -68618,6 +68648,16 @@ var CacheInternal = class {
|
|
|
68618
68648
|
this.cache.delete(targetID, layer);
|
|
68619
68649
|
}
|
|
68620
68650
|
}
|
|
68651
|
+
if (operation.list) {
|
|
68652
|
+
const matchingLists = this.cache.list(
|
|
68653
|
+
operation.list,
|
|
68654
|
+
parentID,
|
|
68655
|
+
operation.target === "all"
|
|
68656
|
+
);
|
|
68657
|
+
for (const list of matchingLists.lists) {
|
|
68658
|
+
processedOperations.add(list.fieldRef);
|
|
68659
|
+
}
|
|
68660
|
+
}
|
|
68621
68661
|
}
|
|
68622
68662
|
}
|
|
68623
68663
|
return toNotify;
|
|
@@ -69191,7 +69231,7 @@ var Config = class {
|
|
|
69191
69231
|
defaultListTarget = null,
|
|
69192
69232
|
defaultPaginateMode = PaginateMode.Infinite,
|
|
69193
69233
|
defaultKeys,
|
|
69194
|
-
types:
|
|
69234
|
+
types: types18 = {},
|
|
69195
69235
|
logLevel,
|
|
69196
69236
|
defaultFragmentMasking = "enable",
|
|
69197
69237
|
watchSchema,
|
|
@@ -69239,10 +69279,10 @@ var Config = class {
|
|
|
69239
69279
|
if (defaultKeys) {
|
|
69240
69280
|
this.defaultKeys = defaultKeys;
|
|
69241
69281
|
}
|
|
69242
|
-
if (
|
|
69282
|
+
if (types18) {
|
|
69243
69283
|
this.typeConfig = {
|
|
69244
69284
|
...this.typeConfig,
|
|
69245
|
-
...
|
|
69285
|
+
...types18
|
|
69246
69286
|
};
|
|
69247
69287
|
}
|
|
69248
69288
|
}
|
|
@@ -72669,6 +72709,46 @@ function objectNode([type, defaultValue]) {
|
|
|
72669
72709
|
return node;
|
|
72670
72710
|
}
|
|
72671
72711
|
var pageInfoSelection = [
|
|
72712
|
+
{
|
|
72713
|
+
kind: graphql13.Kind.FIELD,
|
|
72714
|
+
name: {
|
|
72715
|
+
kind: graphql13.Kind.NAME,
|
|
72716
|
+
value: "pageInfo"
|
|
72717
|
+
},
|
|
72718
|
+
selectionSet: {
|
|
72719
|
+
kind: graphql13.Kind.SELECTION_SET,
|
|
72720
|
+
selections: [
|
|
72721
|
+
{
|
|
72722
|
+
kind: graphql13.Kind.FIELD,
|
|
72723
|
+
name: {
|
|
72724
|
+
kind: graphql13.Kind.NAME,
|
|
72725
|
+
value: "hasPreviousPage"
|
|
72726
|
+
}
|
|
72727
|
+
},
|
|
72728
|
+
{
|
|
72729
|
+
kind: graphql13.Kind.FIELD,
|
|
72730
|
+
name: {
|
|
72731
|
+
kind: graphql13.Kind.NAME,
|
|
72732
|
+
value: "hasNextPage"
|
|
72733
|
+
}
|
|
72734
|
+
},
|
|
72735
|
+
{
|
|
72736
|
+
kind: graphql13.Kind.FIELD,
|
|
72737
|
+
name: {
|
|
72738
|
+
kind: graphql13.Kind.NAME,
|
|
72739
|
+
value: "startCursor"
|
|
72740
|
+
}
|
|
72741
|
+
},
|
|
72742
|
+
{
|
|
72743
|
+
kind: graphql13.Kind.FIELD,
|
|
72744
|
+
name: {
|
|
72745
|
+
kind: graphql13.Kind.NAME,
|
|
72746
|
+
value: "endCursor"
|
|
72747
|
+
}
|
|
72748
|
+
}
|
|
72749
|
+
]
|
|
72750
|
+
}
|
|
72751
|
+
},
|
|
72672
72752
|
{
|
|
72673
72753
|
kind: graphql13.Kind.FIELD,
|
|
72674
72754
|
name: {
|
|
@@ -75125,18 +75205,18 @@ async function imperativeCacheTypef(config2, docs) {
|
|
|
75125
75205
|
function typeDefinitions(config2, filepath, body, docs, returnType) {
|
|
75126
75206
|
const operationTypes = [config2.schema.getMutationType(), config2.schema.getSubscriptionType()].filter(Boolean).map((type) => type?.name);
|
|
75127
75207
|
const visitedTypes = /* @__PURE__ */ new Set();
|
|
75128
|
-
const
|
|
75208
|
+
const types18 = Object.values(config2.schema.getTypeMap()).filter(
|
|
75129
75209
|
(type) => !graphql20.isAbstractType(type) && !graphql20.isScalarType(type) && !graphql20.isEnumType(type) && !graphql20.isInputObjectType(type) && !type.name.startsWith("__") && !operationTypes.includes(type.name)
|
|
75130
75210
|
);
|
|
75131
75211
|
const fragmentMap = fragmentListMap(
|
|
75132
75212
|
config2,
|
|
75133
|
-
|
|
75213
|
+
types18.map((type) => type.name),
|
|
75134
75214
|
body,
|
|
75135
75215
|
docs,
|
|
75136
75216
|
returnType
|
|
75137
75217
|
);
|
|
75138
75218
|
return AST12.tsTypeLiteral(
|
|
75139
|
-
|
|
75219
|
+
types18.map((type) => {
|
|
75140
75220
|
let typeName = type.name;
|
|
75141
75221
|
if (config2.schema.getQueryType() && config2.schema.getQueryType()?.name === type.name) {
|
|
75142
75222
|
typeName = "__ROOT__";
|
|
@@ -76544,7 +76624,7 @@ var printDocASTReducer2 = {
|
|
|
76544
76624
|
], " ")
|
|
76545
76625
|
},
|
|
76546
76626
|
UnionTypeDefinition: {
|
|
76547
|
-
leave: ({ name, directives, types:
|
|
76627
|
+
leave: ({ name, directives, types: types18 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
|
|
76548
76628
|
},
|
|
76549
76629
|
EnumTypeDefinition: {
|
|
76550
76630
|
leave: ({ name, directives, values }) => join3(["enum", name, join3(directives, " "), block2(values)], " ")
|
|
@@ -76583,7 +76663,7 @@ var printDocASTReducer2 = {
|
|
|
76583
76663
|
], " ")
|
|
76584
76664
|
},
|
|
76585
76665
|
UnionTypeExtension: {
|
|
76586
|
-
leave: ({ name, directives, types:
|
|
76666
|
+
leave: ({ name, directives, types: types18 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
|
|
76587
76667
|
},
|
|
76588
76668
|
EnumTypeExtension: {
|
|
76589
76669
|
leave: ({ name, directives, values }) => join3(["extend enum", name, join3(directives, " "), block2(values)], " ")
|
|
@@ -76847,11 +76927,11 @@ function mergeEnum2(e1, e2, config2, directives) {
|
|
|
76847
76927
|
|
|
76848
76928
|
// ../../node_modules/.pnpm/@graphql-tools+merge@9.0.0_graphql@15.5.0/node_modules/@graphql-tools/merge/esm/typedefs-mergers/utils.js
|
|
76849
76929
|
import { Source as Source3, Kind as Kind32 } from "graphql";
|
|
76850
|
-
function isStringTypes2(
|
|
76851
|
-
return typeof
|
|
76930
|
+
function isStringTypes2(types18) {
|
|
76931
|
+
return typeof types18 === "string";
|
|
76852
76932
|
}
|
|
76853
|
-
function isSourceTypes2(
|
|
76854
|
-
return
|
|
76933
|
+
function isSourceTypes2(types18) {
|
|
76934
|
+
return types18 instanceof Source3;
|
|
76855
76935
|
}
|
|
76856
76936
|
function extractType2(type) {
|
|
76857
76937
|
let visitedType = type;
|
|
@@ -79353,6 +79433,8 @@ function watch_local_schema(ref) {
|
|
|
79353
79433
|
}
|
|
79354
79434
|
|
|
79355
79435
|
// src/vite/ast.ts
|
|
79436
|
+
var recast14 = __toESM(require_main2(), 1);
|
|
79437
|
+
var AST14 = recast14.types.builders;
|
|
79356
79438
|
function find_insert_index(script) {
|
|
79357
79439
|
let insert_index = script.body.findIndex((statement) => {
|
|
79358
79440
|
return statement.type !== "ImportDeclaration";
|
|
@@ -79371,7 +79453,7 @@ function find_exported_fn(body, name) {
|
|
|
79371
79453
|
if (exportDeclaration.declaration?.type === "FunctionDeclaration") {
|
|
79372
79454
|
const value = exportDeclaration.declaration;
|
|
79373
79455
|
if (value.id?.name === name) {
|
|
79374
|
-
return exportDeclaration.declaration;
|
|
79456
|
+
return { declaration: exportDeclaration.declaration, export: exportDeclaration };
|
|
79375
79457
|
}
|
|
79376
79458
|
} else if (exportDeclaration.declaration?.type === "VariableDeclaration") {
|
|
79377
79459
|
const value = exportDeclaration.declaration;
|
|
@@ -79390,7 +79472,10 @@ function find_exported_fn(body, name) {
|
|
|
79390
79472
|
init = init.arguments[0];
|
|
79391
79473
|
}
|
|
79392
79474
|
if (init.type === "FunctionExpression" || init.type === "ArrowFunctionExpression") {
|
|
79393
|
-
return init;
|
|
79475
|
+
return { declaration: init, export: exportDeclaration };
|
|
79476
|
+
}
|
|
79477
|
+
if (init.type === "Identifier" || init.type === "CallExpression") {
|
|
79478
|
+
return { declaration: init, export: exportDeclaration };
|
|
79394
79479
|
}
|
|
79395
79480
|
} else {
|
|
79396
79481
|
continue;
|
|
@@ -79402,7 +79487,7 @@ function find_exported_fn(body, name) {
|
|
|
79402
79487
|
if (!exported) {
|
|
79403
79488
|
return null;
|
|
79404
79489
|
}
|
|
79405
|
-
return exported.declaration;
|
|
79490
|
+
return { declaration: exported.declaration, export: exported };
|
|
79406
79491
|
}
|
|
79407
79492
|
function find_exported_id(program, name) {
|
|
79408
79493
|
return program.body.find(
|
|
@@ -79411,8 +79496,8 @@ function find_exported_id(program, name) {
|
|
|
79411
79496
|
}
|
|
79412
79497
|
|
|
79413
79498
|
// src/vite/imports.ts
|
|
79414
|
-
var
|
|
79415
|
-
var
|
|
79499
|
+
var recast15 = __toESM(require_main2(), 1);
|
|
79500
|
+
var AST15 = recast15.types.builders;
|
|
79416
79501
|
function ensure_imports({
|
|
79417
79502
|
config: config2,
|
|
79418
79503
|
script,
|
|
@@ -79428,13 +79513,13 @@ function ensure_imports({
|
|
|
79428
79513
|
if (!has_import) {
|
|
79429
79514
|
script.body.unshift({
|
|
79430
79515
|
type: "ImportDeclaration",
|
|
79431
|
-
source:
|
|
79516
|
+
source: AST15.stringLiteral(sourceModule),
|
|
79432
79517
|
importKind
|
|
79433
79518
|
});
|
|
79434
79519
|
}
|
|
79435
79520
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
79436
79521
|
}
|
|
79437
|
-
const idList = (Array.isArray(importID) ? importID : [importID]).map((id) =>
|
|
79522
|
+
const idList = (Array.isArray(importID) ? importID : [importID]).map((id) => AST15.identifier(id));
|
|
79438
79523
|
const toImport = idList.filter(
|
|
79439
79524
|
(identifier) => !script.body.find(
|
|
79440
79525
|
(statement) => statement.type === "ImportDeclaration" && statement.specifiers?.find(
|
|
@@ -79445,16 +79530,16 @@ function ensure_imports({
|
|
|
79445
79530
|
if (toImport.length > 0) {
|
|
79446
79531
|
script.body.unshift({
|
|
79447
79532
|
type: "ImportDeclaration",
|
|
79448
|
-
source:
|
|
79533
|
+
source: AST15.stringLiteral(sourceModule),
|
|
79449
79534
|
specifiers: toImport.map(
|
|
79450
|
-
(identifier, i2) => !Array.isArray(importID) ?
|
|
79535
|
+
(identifier, i2) => !Array.isArray(importID) ? AST15.importDefaultSpecifier(identifier) : AST15.importSpecifier(identifier, as?.[i2] ? AST15.identifier(as[i2]) : identifier)
|
|
79451
79536
|
),
|
|
79452
79537
|
importKind
|
|
79453
79538
|
});
|
|
79454
79539
|
}
|
|
79455
79540
|
for (const [i2, target] of (as ?? []).entries()) {
|
|
79456
79541
|
if (target) {
|
|
79457
|
-
idList[i2] =
|
|
79542
|
+
idList[i2] = AST15.identifier(target);
|
|
79458
79543
|
}
|
|
79459
79544
|
}
|
|
79460
79545
|
return {
|