houdini-svelte 1.2.5 → 1.2.6-next.0
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 +552 -488
- package/build/plugin-esm/index.js +552 -488
- package/build/preprocess-cjs/index.js +507 -443
- package/build/preprocess-esm/index.js +507 -443
- package/build/test-cjs/index.js +1402 -1254
- package/build/test-esm/index.js +1402 -1254
- package/package.json +2 -2
|
@@ -90480,6 +90480,9 @@ var GarbageCollector = class {
|
|
|
90480
90480
|
constructor(cache) {
|
|
90481
90481
|
this.cache = cache;
|
|
90482
90482
|
}
|
|
90483
|
+
reset() {
|
|
90484
|
+
this.lifetimes.clear();
|
|
90485
|
+
}
|
|
90483
90486
|
resetLifetime(id2, field) {
|
|
90484
90487
|
if (!this.lifetimes.get(id2)) {
|
|
90485
90488
|
this.lifetimes.set(id2, /* @__PURE__ */ new Map());
|
|
@@ -90597,6 +90600,10 @@ var ListManager = class {
|
|
|
90597
90600
|
}
|
|
90598
90601
|
this.listsByField.get(parentID).delete(field);
|
|
90599
90602
|
}
|
|
90603
|
+
reset() {
|
|
90604
|
+
this.lists.clear();
|
|
90605
|
+
this.listsByField.clear();
|
|
90606
|
+
}
|
|
90600
90607
|
};
|
|
90601
90608
|
var List = class {
|
|
90602
90609
|
recordID;
|
|
@@ -90977,6 +90984,9 @@ var StaleManager = class {
|
|
|
90977
90984
|
}
|
|
90978
90985
|
}
|
|
90979
90986
|
}
|
|
90987
|
+
reset() {
|
|
90988
|
+
this.fieldsTime.clear();
|
|
90989
|
+
}
|
|
90980
90990
|
};
|
|
90981
90991
|
var InMemoryStorage = class {
|
|
90982
90992
|
data;
|
|
@@ -91155,6 +91165,9 @@ var InMemoryStorage = class {
|
|
|
91155
91165
|
layer.fields = fields;
|
|
91156
91166
|
layer.links = links;
|
|
91157
91167
|
}
|
|
91168
|
+
reset() {
|
|
91169
|
+
this.data = [];
|
|
91170
|
+
}
|
|
91158
91171
|
};
|
|
91159
91172
|
var Layer = class {
|
|
91160
91173
|
id;
|
|
@@ -91596,6 +91609,18 @@ var InMemorySubscriptions = class {
|
|
|
91596
91609
|
this.remove(linkedRecordID, linkFields, targets, visited);
|
|
91597
91610
|
}
|
|
91598
91611
|
}
|
|
91612
|
+
reset() {
|
|
91613
|
+
const subscribers = Object.entries(this.subscribers).filter(
|
|
91614
|
+
([id2]) => !id2.startsWith(rootID)
|
|
91615
|
+
);
|
|
91616
|
+
for (const [id2, _fields] of subscribers) {
|
|
91617
|
+
delete this.subscribers[id2];
|
|
91618
|
+
}
|
|
91619
|
+
const subscriptionSpecs = subscribers.flatMap(
|
|
91620
|
+
([_id, fields]) => Object.values(fields).flatMap((field) => field.map(([spec]) => spec))
|
|
91621
|
+
);
|
|
91622
|
+
return subscriptionSpecs;
|
|
91623
|
+
}
|
|
91599
91624
|
removeSubscribers(id2, fieldName, specs) {
|
|
91600
91625
|
let targets = [];
|
|
91601
91626
|
for (const spec of specs) {
|
|
@@ -91783,6 +91808,14 @@ var Cache = class {
|
|
|
91783
91808
|
}
|
|
91784
91809
|
this.#notifySubscribers(toNotify);
|
|
91785
91810
|
}
|
|
91811
|
+
reset() {
|
|
91812
|
+
const subSpecs = this._internal_unstable.subscriptions.reset();
|
|
91813
|
+
this._internal_unstable.staleManager.reset();
|
|
91814
|
+
this._internal_unstable.lifetimes.reset();
|
|
91815
|
+
this._internal_unstable.lists.reset();
|
|
91816
|
+
this._internal_unstable.storage.reset();
|
|
91817
|
+
this.#notifySubscribers(subSpecs);
|
|
91818
|
+
}
|
|
91786
91819
|
#notifySubscribers(subs) {
|
|
91787
91820
|
if (subs.length === 0) {
|
|
91788
91821
|
return;
|
|
@@ -91965,7 +91998,7 @@ var CacheInternal = class {
|
|
|
91965
91998
|
forceNotify
|
|
91966
91999
|
});
|
|
91967
92000
|
}
|
|
91968
|
-
} else if (Array.isArray(value2) && (typeof previousValue === "undefined" || Array.isArray(previousValue))) {
|
|
92001
|
+
} else if (Array.isArray(value2) && (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
|
|
91969
92002
|
let oldIDs = [...previousValue || []];
|
|
91970
92003
|
const emptyEdges = !updates ? [] : oldIDs.map((id2) => {
|
|
91971
92004
|
if (!id2) {
|
|
@@ -92038,7 +92071,7 @@ var CacheInternal = class {
|
|
|
92038
92071
|
} else {
|
|
92039
92072
|
linkedIDs = nestedIDs;
|
|
92040
92073
|
}
|
|
92041
|
-
const contentChanged = !deepEquals(linkedIDs, oldIDs);
|
|
92074
|
+
const contentChanged = !deepEquals(linkedIDs, oldIDs) || previousValue === null;
|
|
92042
92075
|
if (contentChanged || forceNotify) {
|
|
92043
92076
|
toNotify.push(...currentSubscribers);
|
|
92044
92077
|
}
|
|
@@ -99123,12 +99156,12 @@ var require_parser4 = __commonJS3({
|
|
|
99123
99156
|
return [];
|
|
99124
99157
|
}
|
|
99125
99158
|
if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {
|
|
99126
|
-
var
|
|
99159
|
+
var types18 = [];
|
|
99127
99160
|
this.expectOptionalToken(_tokenKind.TokenKind.AMP);
|
|
99128
99161
|
do {
|
|
99129
|
-
|
|
99162
|
+
types18.push(this.parseNamedType());
|
|
99130
99163
|
} while (this.expectOptionalToken(_tokenKind.TokenKind.AMP) || this.peek(_tokenKind.TokenKind.NAME));
|
|
99131
|
-
return
|
|
99164
|
+
return types18;
|
|
99132
99165
|
}
|
|
99133
99166
|
return this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType);
|
|
99134
99167
|
};
|
|
@@ -99207,13 +99240,13 @@ var require_parser4 = __commonJS3({
|
|
|
99207
99240
|
this.expectKeyword("union");
|
|
99208
99241
|
var name = this.parseName();
|
|
99209
99242
|
var directives = this.parseDirectives(true);
|
|
99210
|
-
var
|
|
99243
|
+
var types18 = this.parseUnionMemberTypes();
|
|
99211
99244
|
return {
|
|
99212
99245
|
kind: _kinds.Kind.UNION_TYPE_DEFINITION,
|
|
99213
99246
|
description,
|
|
99214
99247
|
name,
|
|
99215
99248
|
directives,
|
|
99216
|
-
types:
|
|
99249
|
+
types: types18,
|
|
99217
99250
|
loc: this.loc(start)
|
|
99218
99251
|
};
|
|
99219
99252
|
};
|
|
@@ -99371,15 +99404,15 @@ var require_parser4 = __commonJS3({
|
|
|
99371
99404
|
this.expectKeyword("union");
|
|
99372
99405
|
var name = this.parseName();
|
|
99373
99406
|
var directives = this.parseDirectives(true);
|
|
99374
|
-
var
|
|
99375
|
-
if (directives.length === 0 &&
|
|
99407
|
+
var types18 = this.parseUnionMemberTypes();
|
|
99408
|
+
if (directives.length === 0 && types18.length === 0) {
|
|
99376
99409
|
throw this.unexpected();
|
|
99377
99410
|
}
|
|
99378
99411
|
return {
|
|
99379
99412
|
kind: _kinds.Kind.UNION_TYPE_EXTENSION,
|
|
99380
99413
|
name,
|
|
99381
99414
|
directives,
|
|
99382
|
-
types:
|
|
99415
|
+
types: types18,
|
|
99383
99416
|
loc: this.loc(start)
|
|
99384
99417
|
};
|
|
99385
99418
|
};
|
|
@@ -100327,8 +100360,8 @@ var require_printer4 = __commonJS3({
|
|
|
100327
100360
|
return join32(["interface", name, wrap22("implements ", join32(interfaces, " & ")), join32(directives, " "), block22(fields)], " ");
|
|
100328
100361
|
}),
|
|
100329
100362
|
UnionTypeDefinition: addDescription22(function(_ref27) {
|
|
100330
|
-
var name = _ref27.name, directives = _ref27.directives,
|
|
100331
|
-
return join32(["union", name, join32(directives, " "),
|
|
100363
|
+
var name = _ref27.name, directives = _ref27.directives, types18 = _ref27.types;
|
|
100364
|
+
return join32(["union", name, join32(directives, " "), types18 && types18.length !== 0 ? "= " + join32(types18, " | ") : ""], " ");
|
|
100332
100365
|
}),
|
|
100333
100366
|
EnumTypeDefinition: addDescription22(function(_ref28) {
|
|
100334
100367
|
var name = _ref28.name, directives = _ref28.directives, values = _ref28.values;
|
|
@@ -100363,8 +100396,8 @@ var require_printer4 = __commonJS3({
|
|
|
100363
100396
|
return join32(["extend interface", name, wrap22("implements ", join32(interfaces, " & ")), join32(directives, " "), block22(fields)], " ");
|
|
100364
100397
|
},
|
|
100365
100398
|
UnionTypeExtension: function UnionTypeExtension(_ref36) {
|
|
100366
|
-
var name = _ref36.name, directives = _ref36.directives,
|
|
100367
|
-
return join32(["extend union", name, join32(directives, " "),
|
|
100399
|
+
var name = _ref36.name, directives = _ref36.directives, types18 = _ref36.types;
|
|
100400
|
+
return join32(["extend union", name, join32(directives, " "), types18 && types18.length !== 0 ? "= " + join32(types18, " | ") : ""], " ");
|
|
100368
100401
|
},
|
|
100369
100402
|
EnumTypeExtension: function EnumTypeExtension(_ref37) {
|
|
100370
100403
|
var name = _ref37.name, directives = _ref37.directives, values = _ref37.values;
|
|
@@ -101031,9 +101064,9 @@ var require_definition3 = __commonJS3({
|
|
|
101031
101064
|
exports.GraphQLUnionType = GraphQLUnionType3;
|
|
101032
101065
|
(0, _defineInspect.default)(GraphQLUnionType3);
|
|
101033
101066
|
function defineTypes(config4) {
|
|
101034
|
-
var
|
|
101035
|
-
Array.isArray(
|
|
101036
|
-
return
|
|
101067
|
+
var types18 = resolveThunk(config4.types);
|
|
101068
|
+
Array.isArray(types18) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config4.name, "."));
|
|
101069
|
+
return types18;
|
|
101037
101070
|
}
|
|
101038
101071
|
var GraphQLEnumType4 = /* @__PURE__ */ function() {
|
|
101039
101072
|
function GraphQLEnumType5(config4) {
|
|
@@ -108516,7 +108549,7 @@ var require_buildClientSchema3 = __commonJS3({
|
|
|
108516
108549
|
return new _definition.GraphQLUnionType({
|
|
108517
108550
|
name: unionIntrospection.name,
|
|
108518
108551
|
description: unionIntrospection.description,
|
|
108519
|
-
types: function
|
|
108552
|
+
types: function types18() {
|
|
108520
108553
|
return unionIntrospection.possibleTypes.map(getObjectType);
|
|
108521
108554
|
}
|
|
108522
108555
|
});
|
|
@@ -108859,7 +108892,7 @@ var require_extendSchema3 = __commonJS3({
|
|
|
108859
108892
|
var config4 = type.toConfig();
|
|
108860
108893
|
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config4.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
108861
108894
|
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config4), {}, {
|
|
108862
|
-
types: function
|
|
108895
|
+
types: function types18() {
|
|
108863
108896
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
108864
108897
|
},
|
|
108865
108898
|
extensionASTNodes: config4.extensionASTNodes.concat(extensions)
|
|
@@ -109007,17 +109040,17 @@ var require_extendSchema3 = __commonJS3({
|
|
|
109007
109040
|
return interfaces;
|
|
109008
109041
|
}
|
|
109009
109042
|
function buildUnionTypes(nodes) {
|
|
109010
|
-
var
|
|
109043
|
+
var types18 = [];
|
|
109011
109044
|
for (var _i32 = 0; _i32 < nodes.length; _i32++) {
|
|
109012
109045
|
var _node$types;
|
|
109013
109046
|
var node2 = nodes[_i32];
|
|
109014
109047
|
var typeNodes = (_node$types = node2.types) !== null && _node$types !== void 0 ? _node$types : [];
|
|
109015
109048
|
for (var _i34 = 0; _i34 < typeNodes.length; _i34++) {
|
|
109016
109049
|
var type = typeNodes[_i34];
|
|
109017
|
-
|
|
109050
|
+
types18.push(getNamedType5(type));
|
|
109018
109051
|
}
|
|
109019
109052
|
}
|
|
109020
|
-
return
|
|
109053
|
+
return types18;
|
|
109021
109054
|
}
|
|
109022
109055
|
function buildType(astNode) {
|
|
109023
109056
|
var _typeExtensionsMap$na;
|
|
@@ -109074,7 +109107,7 @@ var require_extendSchema3 = __commonJS3({
|
|
|
109074
109107
|
return new _definition.GraphQLUnionType({
|
|
109075
109108
|
name: name2,
|
|
109076
109109
|
description,
|
|
109077
|
-
types: function
|
|
109110
|
+
types: function types18() {
|
|
109078
109111
|
return buildUnionTypes(_allNodes3);
|
|
109079
109112
|
},
|
|
109080
109113
|
astNode,
|
|
@@ -109368,7 +109401,7 @@ var require_lexicographicSortSchema3 = __commonJS3({
|
|
|
109368
109401
|
if ((0, _definition.isUnionType)(type)) {
|
|
109369
109402
|
var _config22 = type.toConfig();
|
|
109370
109403
|
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, _config22), {}, {
|
|
109371
|
-
types: function
|
|
109404
|
+
types: function types18() {
|
|
109372
109405
|
return sortTypes(_config22.types);
|
|
109373
109406
|
}
|
|
109374
109407
|
}));
|
|
@@ -109451,10 +109484,10 @@ var require_printSchema3 = __commonJS3({
|
|
|
109451
109484
|
}
|
|
109452
109485
|
function printFilteredSchema(schema, directiveFilter, typeFilter, options) {
|
|
109453
109486
|
var directives = schema.getDirectives().filter(directiveFilter);
|
|
109454
|
-
var
|
|
109487
|
+
var types18 = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter);
|
|
109455
109488
|
return [printSchemaDefinition(schema)].concat(directives.map(function(directive) {
|
|
109456
109489
|
return printDirective(directive, options);
|
|
109457
|
-
}),
|
|
109490
|
+
}), types18.map(function(type) {
|
|
109458
109491
|
return printType(type, options);
|
|
109459
109492
|
})).filter(Boolean).join("\n\n") + "\n";
|
|
109460
109493
|
}
|
|
@@ -109529,8 +109562,8 @@ var require_printSchema3 = __commonJS3({
|
|
|
109529
109562
|
return printDescription(options, type) + "interface ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);
|
|
109530
109563
|
}
|
|
109531
109564
|
function printUnion(type, options) {
|
|
109532
|
-
var
|
|
109533
|
-
var possibleTypes =
|
|
109565
|
+
var types18 = type.getTypes();
|
|
109566
|
+
var possibleTypes = types18.length ? " = " + types18.join(" | ") : "";
|
|
109534
109567
|
return printDescription(options, type) + "union " + type.name + possibleTypes;
|
|
109535
109568
|
}
|
|
109536
109569
|
function printEnum(type, options) {
|
|
@@ -124320,14 +124353,14 @@ var require_lib32 = __commonJS3({
|
|
|
124320
124353
|
this.preserveSpace = !!preserveSpace;
|
|
124321
124354
|
}
|
|
124322
124355
|
};
|
|
124323
|
-
var
|
|
124356
|
+
var types18 = {
|
|
124324
124357
|
brace: new TokContext3("{"),
|
|
124325
124358
|
j_oTag: new TokContext3("<tag"),
|
|
124326
124359
|
j_cTag: new TokContext3("</tag"),
|
|
124327
124360
|
j_expr: new TokContext3("<tag>...</tag>", true)
|
|
124328
124361
|
};
|
|
124329
124362
|
{
|
|
124330
|
-
|
|
124363
|
+
types18.template = new TokContext3("`", true);
|
|
124331
124364
|
}
|
|
124332
124365
|
var beforeExpr2 = true;
|
|
124333
124366
|
var startsExpr2 = true;
|
|
@@ -124859,17 +124892,17 @@ var require_lib32 = __commonJS3({
|
|
|
124859
124892
|
context.pop();
|
|
124860
124893
|
};
|
|
124861
124894
|
tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
|
|
124862
|
-
context.push(
|
|
124895
|
+
context.push(types18.brace);
|
|
124863
124896
|
};
|
|
124864
124897
|
tokenTypes[22].updateContext = (context) => {
|
|
124865
|
-
if (context[context.length - 1] ===
|
|
124898
|
+
if (context[context.length - 1] === types18.template) {
|
|
124866
124899
|
context.pop();
|
|
124867
124900
|
} else {
|
|
124868
|
-
context.push(
|
|
124901
|
+
context.push(types18.template);
|
|
124869
124902
|
}
|
|
124870
124903
|
};
|
|
124871
124904
|
tokenTypes[140].updateContext = (context) => {
|
|
124872
|
-
context.push(
|
|
124905
|
+
context.push(types18.j_expr, types18.j_oTag);
|
|
124873
124906
|
};
|
|
124874
124907
|
}
|
|
124875
124908
|
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";
|
|
@@ -125510,7 +125543,7 @@ var require_lib32 = __commonJS3({
|
|
|
125510
125543
|
this.lastTokEndLoc = null;
|
|
125511
125544
|
this.lastTokStartLoc = null;
|
|
125512
125545
|
this.lastTokStart = 0;
|
|
125513
|
-
this.context = [
|
|
125546
|
+
this.context = [types18.brace];
|
|
125514
125547
|
this.canStartJSXElement = true;
|
|
125515
125548
|
this.containsEsc = false;
|
|
125516
125549
|
this.firstInvalidTemplateEscapePos = null;
|
|
@@ -129434,7 +129467,7 @@ var require_lib32 = __commonJS3({
|
|
|
129434
129467
|
context
|
|
129435
129468
|
} = this.state;
|
|
129436
129469
|
const currentContext = context[context.length - 1];
|
|
129437
|
-
if (currentContext ===
|
|
129470
|
+
if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
|
|
129438
129471
|
context.pop();
|
|
129439
129472
|
}
|
|
129440
129473
|
}
|
|
@@ -130494,9 +130527,9 @@ var require_lib32 = __commonJS3({
|
|
|
130494
130527
|
switch (this.state.type) {
|
|
130495
130528
|
case 5:
|
|
130496
130529
|
node2 = this.startNode();
|
|
130497
|
-
this.setContext(
|
|
130530
|
+
this.setContext(types18.brace);
|
|
130498
130531
|
this.next();
|
|
130499
|
-
node2 = this.jsxParseExpressionContainer(node2,
|
|
130532
|
+
node2 = this.jsxParseExpressionContainer(node2, types18.j_oTag);
|
|
130500
130533
|
if (node2.expression.type === "JSXEmptyExpression") {
|
|
130501
130534
|
this.raise(JsxErrors.AttributeIsEmpty, {
|
|
130502
130535
|
at: node2
|
|
@@ -130519,7 +130552,7 @@ var require_lib32 = __commonJS3({
|
|
|
130519
130552
|
jsxParseSpreadChild(node2) {
|
|
130520
130553
|
this.next();
|
|
130521
130554
|
node2.expression = this.parseExpression();
|
|
130522
|
-
this.setContext(
|
|
130555
|
+
this.setContext(types18.j_expr);
|
|
130523
130556
|
this.state.canStartJSXElement = true;
|
|
130524
130557
|
this.expect(8);
|
|
130525
130558
|
return this.finishNode(node2, "JSXSpreadChild");
|
|
@@ -130539,11 +130572,11 @@ var require_lib32 = __commonJS3({
|
|
|
130539
130572
|
jsxParseAttribute() {
|
|
130540
130573
|
const node2 = this.startNode();
|
|
130541
130574
|
if (this.match(5)) {
|
|
130542
|
-
this.setContext(
|
|
130575
|
+
this.setContext(types18.brace);
|
|
130543
130576
|
this.next();
|
|
130544
130577
|
this.expect(21);
|
|
130545
130578
|
node2.argument = this.parseMaybeAssignAllowIn();
|
|
130546
|
-
this.setContext(
|
|
130579
|
+
this.setContext(types18.j_oTag);
|
|
130547
130580
|
this.state.canStartJSXElement = true;
|
|
130548
130581
|
this.expect(8);
|
|
130549
130582
|
return this.finishNode(node2, "JSXSpreadAttribute");
|
|
@@ -130602,12 +130635,12 @@ var require_lib32 = __commonJS3({
|
|
|
130602
130635
|
break;
|
|
130603
130636
|
case 5: {
|
|
130604
130637
|
const node22 = this.startNode();
|
|
130605
|
-
this.setContext(
|
|
130638
|
+
this.setContext(types18.brace);
|
|
130606
130639
|
this.next();
|
|
130607
130640
|
if (this.match(21)) {
|
|
130608
130641
|
children.push(this.jsxParseSpreadChild(node22));
|
|
130609
130642
|
} else {
|
|
130610
|
-
children.push(this.jsxParseExpressionContainer(node22,
|
|
130643
|
+
children.push(this.jsxParseExpressionContainer(node22, types18.j_expr));
|
|
130611
130644
|
}
|
|
130612
130645
|
break;
|
|
130613
130646
|
}
|
|
@@ -130678,10 +130711,10 @@ var require_lib32 = __commonJS3({
|
|
|
130678
130711
|
}
|
|
130679
130712
|
getTokenFromCode(code) {
|
|
130680
130713
|
const context = this.curContext();
|
|
130681
|
-
if (context ===
|
|
130714
|
+
if (context === types18.j_expr) {
|
|
130682
130715
|
return this.jsxReadToken();
|
|
130683
130716
|
}
|
|
130684
|
-
if (context ===
|
|
130717
|
+
if (context === types18.j_oTag || context === types18.j_cTag) {
|
|
130685
130718
|
if (isIdentifierStart2(code)) {
|
|
130686
130719
|
return this.jsxReadWord();
|
|
130687
130720
|
}
|
|
@@ -130689,7 +130722,7 @@ var require_lib32 = __commonJS3({
|
|
|
130689
130722
|
++this.state.pos;
|
|
130690
130723
|
return this.finishToken(141);
|
|
130691
130724
|
}
|
|
130692
|
-
if ((code === 34 || code === 39) && context ===
|
|
130725
|
+
if ((code === 34 || code === 39) && context === types18.j_oTag) {
|
|
130693
130726
|
return this.jsxReadString(code);
|
|
130694
130727
|
}
|
|
130695
130728
|
}
|
|
@@ -130705,17 +130738,17 @@ var require_lib32 = __commonJS3({
|
|
|
130705
130738
|
type
|
|
130706
130739
|
} = this.state;
|
|
130707
130740
|
if (type === 56 && prevType === 140) {
|
|
130708
|
-
context.splice(-2, 2,
|
|
130741
|
+
context.splice(-2, 2, types18.j_cTag);
|
|
130709
130742
|
this.state.canStartJSXElement = false;
|
|
130710
130743
|
} else if (type === 140) {
|
|
130711
|
-
context.push(
|
|
130744
|
+
context.push(types18.j_oTag);
|
|
130712
130745
|
} else if (type === 141) {
|
|
130713
130746
|
const out = context[context.length - 1];
|
|
130714
|
-
if (out ===
|
|
130747
|
+
if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
|
|
130715
130748
|
context.pop();
|
|
130716
|
-
this.state.canStartJSXElement = context[context.length - 1] ===
|
|
130749
|
+
this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
|
|
130717
130750
|
} else {
|
|
130718
|
-
this.setContext(
|
|
130751
|
+
this.setContext(types18.j_expr);
|
|
130719
130752
|
this.state.canStartJSXElement = true;
|
|
130720
130753
|
}
|
|
130721
130754
|
} else {
|
|
@@ -131723,14 +131756,14 @@ var require_lib32 = __commonJS3({
|
|
|
131723
131756
|
tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
|
|
131724
131757
|
const node2 = this.startNode();
|
|
131725
131758
|
const hasLeadingOperator = this.eat(operator);
|
|
131726
|
-
const
|
|
131759
|
+
const types19 = [];
|
|
131727
131760
|
do {
|
|
131728
|
-
|
|
131761
|
+
types19.push(parseConstituentType());
|
|
131729
131762
|
} while (this.eat(operator));
|
|
131730
|
-
if (
|
|
131731
|
-
return
|
|
131763
|
+
if (types19.length === 1 && !hasLeadingOperator) {
|
|
131764
|
+
return types19[0];
|
|
131732
131765
|
}
|
|
131733
|
-
node2.types =
|
|
131766
|
+
node2.types = types19;
|
|
131734
131767
|
return this.finishNode(node2, kind);
|
|
131735
131768
|
}
|
|
131736
131769
|
tsParseIntersectionTypeOrHigher() {
|
|
@@ -132959,7 +132992,7 @@ var require_lib32 = __commonJS3({
|
|
|
132959
132992
|
context
|
|
132960
132993
|
} = this.state;
|
|
132961
132994
|
const currentContext = context[context.length - 1];
|
|
132962
|
-
if (currentContext ===
|
|
132995
|
+
if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
|
|
132963
132996
|
context.pop();
|
|
132964
132997
|
}
|
|
132965
132998
|
}
|
|
@@ -138594,9 +138627,9 @@ var require_shared2 = __commonJS3({
|
|
|
138594
138627
|
var tslib_1 = require_tslib2();
|
|
138595
138628
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
138596
138629
|
function default_1(fork) {
|
|
138597
|
-
var
|
|
138598
|
-
var Type =
|
|
138599
|
-
var builtin =
|
|
138630
|
+
var types18 = fork.use(types_110.default);
|
|
138631
|
+
var Type = types18.Type;
|
|
138632
|
+
var builtin = types18.builtInTypes;
|
|
138600
138633
|
var isNumber2 = builtin.number;
|
|
138601
138634
|
function geq(than) {
|
|
138602
138635
|
return Type.from(function(value2) {
|
|
@@ -138744,9 +138777,9 @@ var require_types2 = __commonJS3({
|
|
|
138744
138777
|
}(BaseType);
|
|
138745
138778
|
var OrType = function(_super) {
|
|
138746
138779
|
tslib_1.__extends(OrType2, _super);
|
|
138747
|
-
function OrType2(
|
|
138780
|
+
function OrType2(types18) {
|
|
138748
138781
|
var _this = _super.call(this) || this;
|
|
138749
|
-
_this.types =
|
|
138782
|
+
_this.types = types18;
|
|
138750
138783
|
_this.kind = "OrType";
|
|
138751
138784
|
return _this;
|
|
138752
138785
|
}
|
|
@@ -138887,11 +138920,11 @@ var require_types2 = __commonJS3({
|
|
|
138887
138920
|
function typesPlugin(_fork) {
|
|
138888
138921
|
var Type = {
|
|
138889
138922
|
or: function() {
|
|
138890
|
-
var
|
|
138923
|
+
var types18 = [];
|
|
138891
138924
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
138892
|
-
|
|
138925
|
+
types18[_i] = arguments[_i];
|
|
138893
138926
|
}
|
|
138894
|
-
return new OrType(
|
|
138927
|
+
return new OrType(types18.map(function(type) {
|
|
138895
138928
|
return Type.from(type);
|
|
138896
138929
|
}));
|
|
138897
138930
|
},
|
|
@@ -139334,9 +139367,9 @@ var require_path22 = __commonJS3({
|
|
|
139334
139367
|
var Op = Object.prototype;
|
|
139335
139368
|
var hasOwn2 = Op.hasOwnProperty;
|
|
139336
139369
|
function pathPlugin(fork) {
|
|
139337
|
-
var
|
|
139338
|
-
var isArray2 =
|
|
139339
|
-
var isNumber2 =
|
|
139370
|
+
var types18 = fork.use(types_110.default);
|
|
139371
|
+
var isArray2 = types18.builtInTypes.array;
|
|
139372
|
+
var isNumber2 = types18.builtInTypes.number;
|
|
139340
139373
|
var Path = function Path2(value2, parentPath, name) {
|
|
139341
139374
|
if (!(this instanceof Path2)) {
|
|
139342
139375
|
throw new Error("Path constructor cannot be invoked without 'new'");
|
|
@@ -139636,13 +139669,13 @@ var require_scope2 = __commonJS3({
|
|
|
139636
139669
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
139637
139670
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
139638
139671
|
function scopePlugin(fork) {
|
|
139639
|
-
var
|
|
139640
|
-
var Type =
|
|
139641
|
-
var namedTypes =
|
|
139672
|
+
var types18 = fork.use(types_110.default);
|
|
139673
|
+
var Type = types18.Type;
|
|
139674
|
+
var namedTypes = types18.namedTypes;
|
|
139642
139675
|
var Node3 = namedTypes.Node;
|
|
139643
139676
|
var Expression = namedTypes.Expression;
|
|
139644
|
-
var isArray2 =
|
|
139645
|
-
var b =
|
|
139677
|
+
var isArray2 = types18.builtInTypes.array;
|
|
139678
|
+
var b = types18.builders;
|
|
139646
139679
|
var Scope3 = function Scope22(path22, parentScope) {
|
|
139647
139680
|
if (!(this instanceof Scope22)) {
|
|
139648
139681
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
@@ -139705,7 +139738,7 @@ var require_scope2 = __commonJS3({
|
|
|
139705
139738
|
++index;
|
|
139706
139739
|
}
|
|
139707
139740
|
var name = prefix + index;
|
|
139708
|
-
return this.bindings[name] =
|
|
139741
|
+
return this.bindings[name] = types18.builders.identifier(name);
|
|
139709
139742
|
};
|
|
139710
139743
|
Sp.injectTemporary = function(identifier, init) {
|
|
139711
139744
|
identifier || (identifier = this.declareTemporary());
|
|
@@ -139781,7 +139814,7 @@ var require_scope2 = __commonJS3({
|
|
|
139781
139814
|
bindings
|
|
139782
139815
|
);
|
|
139783
139816
|
} else if (Node3.check(node2) && !Expression.check(node2)) {
|
|
139784
|
-
|
|
139817
|
+
types18.eachField(node2, function(name, child) {
|
|
139785
139818
|
var childPath = path22.get(name);
|
|
139786
139819
|
if (!pathHasValue(childPath, child)) {
|
|
139787
139820
|
throw new Error("");
|
|
@@ -139859,24 +139892,24 @@ var require_scope2 = __commonJS3({
|
|
|
139859
139892
|
addPattern(patternPath.get("argument"), bindings);
|
|
139860
139893
|
}
|
|
139861
139894
|
}
|
|
139862
|
-
function addTypePattern(patternPath,
|
|
139895
|
+
function addTypePattern(patternPath, types19) {
|
|
139863
139896
|
var pattern = patternPath.value;
|
|
139864
139897
|
namedTypes.Pattern.assert(pattern);
|
|
139865
139898
|
if (namedTypes.Identifier.check(pattern)) {
|
|
139866
|
-
if (hasOwn2.call(
|
|
139867
|
-
|
|
139899
|
+
if (hasOwn2.call(types19, pattern.name)) {
|
|
139900
|
+
types19[pattern.name].push(patternPath);
|
|
139868
139901
|
} else {
|
|
139869
|
-
|
|
139902
|
+
types19[pattern.name] = [patternPath];
|
|
139870
139903
|
}
|
|
139871
139904
|
}
|
|
139872
139905
|
}
|
|
139873
|
-
function addTypeParameter(parameterPath,
|
|
139906
|
+
function addTypeParameter(parameterPath, types19) {
|
|
139874
139907
|
var parameter = parameterPath.value;
|
|
139875
139908
|
FlowOrTSTypeParameterType.assert(parameter);
|
|
139876
|
-
if (hasOwn2.call(
|
|
139877
|
-
|
|
139909
|
+
if (hasOwn2.call(types19, parameter.name)) {
|
|
139910
|
+
types19[parameter.name].push(parameterPath);
|
|
139878
139911
|
} else {
|
|
139879
|
-
|
|
139912
|
+
types19[parameter.name] = [parameterPath];
|
|
139880
139913
|
}
|
|
139881
139914
|
}
|
|
139882
139915
|
Sp.lookup = function(name) {
|
|
@@ -139915,11 +139948,11 @@ var require_node_path2 = __commonJS3({
|
|
|
139915
139948
|
var scope_1 = tslib_1.__importDefault(require_scope2());
|
|
139916
139949
|
var shared_1 = require_shared2();
|
|
139917
139950
|
function nodePathPlugin(fork) {
|
|
139918
|
-
var
|
|
139919
|
-
var n =
|
|
139920
|
-
var b =
|
|
139921
|
-
var isNumber2 =
|
|
139922
|
-
var isArray2 =
|
|
139951
|
+
var types18 = fork.use(types_110.default);
|
|
139952
|
+
var n = types18.namedTypes;
|
|
139953
|
+
var b = types18.builders;
|
|
139954
|
+
var isNumber2 = types18.builtInTypes.number;
|
|
139955
|
+
var isArray2 = types18.builtInTypes.array;
|
|
139923
139956
|
var Path = fork.use(path_1.default);
|
|
139924
139957
|
var Scope3 = fork.use(scope_1.default);
|
|
139925
139958
|
var NodePath = function NodePath2(value2, parentPath, name) {
|
|
@@ -140010,7 +140043,7 @@ var require_node_path2 = __commonJS3({
|
|
|
140010
140043
|
return scope2 || null;
|
|
140011
140044
|
};
|
|
140012
140045
|
NPp.getValueProperty = function(name) {
|
|
140013
|
-
return
|
|
140046
|
+
return types18.getFieldValue(this.value, name);
|
|
140014
140047
|
};
|
|
140015
140048
|
NPp.needsParens = function(assumeExpressionContext) {
|
|
140016
140049
|
var pp2 = this.parentPath;
|
|
@@ -140152,7 +140185,7 @@ var require_node_path2 = __commonJS3({
|
|
|
140152
140185
|
return node2.some(containsCallExpression);
|
|
140153
140186
|
}
|
|
140154
140187
|
if (n.Node.check(node2)) {
|
|
140155
|
-
return
|
|
140188
|
+
return types18.someField(node2, function(_name, child) {
|
|
140156
140189
|
return containsCallExpression(child);
|
|
140157
140190
|
});
|
|
140158
140191
|
}
|
|
@@ -140271,11 +140304,11 @@ var require_path_visitor2 = __commonJS3({
|
|
|
140271
140304
|
var shared_1 = require_shared2();
|
|
140272
140305
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
140273
140306
|
function pathVisitorPlugin(fork) {
|
|
140274
|
-
var
|
|
140307
|
+
var types18 = fork.use(types_110.default);
|
|
140275
140308
|
var NodePath = fork.use(node_path_1.default);
|
|
140276
|
-
var isArray2 =
|
|
140277
|
-
var isObject2 =
|
|
140278
|
-
var isFunction2 =
|
|
140309
|
+
var isArray2 = types18.builtInTypes.array;
|
|
140310
|
+
var isObject2 = types18.builtInTypes.object;
|
|
140311
|
+
var isFunction2 = types18.builtInTypes.function;
|
|
140279
140312
|
var undefined2;
|
|
140280
140313
|
var PathVisitor = function PathVisitor2() {
|
|
140281
140314
|
if (!(this instanceof PathVisitor2)) {
|
|
@@ -140295,7 +140328,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
140295
140328
|
typeNames[methodName.slice("visit".length)] = true;
|
|
140296
140329
|
}
|
|
140297
140330
|
}
|
|
140298
|
-
var supertypeTable =
|
|
140331
|
+
var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
|
|
140299
140332
|
var methodNameTable = /* @__PURE__ */ Object.create(null);
|
|
140300
140333
|
var typeNameKeys = Object.keys(supertypeTable);
|
|
140301
140334
|
var typeNameCount = typeNameKeys.length;
|
|
@@ -140414,7 +140447,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
140414
140447
|
path22.each(visitor.visitWithoutReset, visitor);
|
|
140415
140448
|
} else if (!isObject2.check(value2)) {
|
|
140416
140449
|
} else {
|
|
140417
|
-
var childNames =
|
|
140450
|
+
var childNames = types18.getFieldNames(value2);
|
|
140418
140451
|
if (visitor._shouldVisitComments && value2.comments && childNames.indexOf("comments") < 0) {
|
|
140419
140452
|
childNames.push("comments");
|
|
140420
140453
|
}
|
|
@@ -140423,7 +140456,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
140423
140456
|
for (var i22 = 0; i22 < childCount; ++i22) {
|
|
140424
140457
|
var childName = childNames[i22];
|
|
140425
140458
|
if (!hasOwn2.call(value2, childName)) {
|
|
140426
|
-
value2[childName] =
|
|
140459
|
+
value2[childName] = types18.getFieldValue(value2, childName);
|
|
140427
140460
|
}
|
|
140428
140461
|
childPaths.push(path22.get(childName));
|
|
140429
140462
|
}
|
|
@@ -140564,13 +140597,13 @@ var require_equiv2 = __commonJS3({
|
|
|
140564
140597
|
var shared_1 = require_shared2();
|
|
140565
140598
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
140566
140599
|
function default_1(fork) {
|
|
140567
|
-
var
|
|
140568
|
-
var getFieldNames =
|
|
140569
|
-
var getFieldValue =
|
|
140570
|
-
var isArray2 =
|
|
140571
|
-
var isObject2 =
|
|
140572
|
-
var isDate2 =
|
|
140573
|
-
var isRegExp2 =
|
|
140600
|
+
var types18 = fork.use(types_110.default);
|
|
140601
|
+
var getFieldNames = types18.getFieldNames;
|
|
140602
|
+
var getFieldValue = types18.getFieldValue;
|
|
140603
|
+
var isArray2 = types18.builtInTypes.array;
|
|
140604
|
+
var isObject2 = types18.builtInTypes.object;
|
|
140605
|
+
var isDate2 = types18.builtInTypes.Date;
|
|
140606
|
+
var isRegExp2 = types18.builtInTypes.RegExp;
|
|
140574
140607
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
140575
140608
|
function astNodesAreEquivalent(a, b, problemPath) {
|
|
140576
140609
|
if (isArray2.check(problemPath)) {
|
|
@@ -140721,24 +140754,24 @@ var require_fork2 = __commonJS3({
|
|
|
140721
140754
|
var shared_1 = require_shared2();
|
|
140722
140755
|
function default_1(plugins) {
|
|
140723
140756
|
var fork = createFork();
|
|
140724
|
-
var
|
|
140757
|
+
var types18 = fork.use(types_110.default);
|
|
140725
140758
|
plugins.forEach(fork.use);
|
|
140726
|
-
|
|
140759
|
+
types18.finalize();
|
|
140727
140760
|
var PathVisitor = fork.use(path_visitor_1.default);
|
|
140728
140761
|
return {
|
|
140729
|
-
Type:
|
|
140730
|
-
builtInTypes:
|
|
140731
|
-
namedTypes:
|
|
140732
|
-
builders:
|
|
140733
|
-
defineMethod:
|
|
140734
|
-
getFieldNames:
|
|
140735
|
-
getFieldValue:
|
|
140736
|
-
eachField:
|
|
140737
|
-
someField:
|
|
140738
|
-
getSupertypeNames:
|
|
140739
|
-
getBuilderName:
|
|
140762
|
+
Type: types18.Type,
|
|
140763
|
+
builtInTypes: types18.builtInTypes,
|
|
140764
|
+
namedTypes: types18.namedTypes,
|
|
140765
|
+
builders: types18.builders,
|
|
140766
|
+
defineMethod: types18.defineMethod,
|
|
140767
|
+
getFieldNames: types18.getFieldNames,
|
|
140768
|
+
getFieldValue: types18.getFieldValue,
|
|
140769
|
+
eachField: types18.eachField,
|
|
140770
|
+
someField: types18.someField,
|
|
140771
|
+
getSupertypeNames: types18.getSupertypeNames,
|
|
140772
|
+
getBuilderName: types18.getBuilderName,
|
|
140740
140773
|
astNodesAreEquivalent: fork.use(equiv_1.default),
|
|
140741
|
-
finalize:
|
|
140774
|
+
finalize: types18.finalize,
|
|
140742
140775
|
Path: fork.use(path_1.default),
|
|
140743
140776
|
NodePath: fork.use(node_path_1.default),
|
|
140744
140777
|
PathVisitor,
|
|
@@ -140898,8 +140931,8 @@ var require_core22 = __commonJS3({
|
|
|
140898
140931
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
140899
140932
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
140900
140933
|
function default_1(fork) {
|
|
140901
|
-
var
|
|
140902
|
-
var Type =
|
|
140934
|
+
var types18 = fork.use(types_110.default);
|
|
140935
|
+
var Type = types18.Type;
|
|
140903
140936
|
var def = Type.def;
|
|
140904
140937
|
var or = Type.or;
|
|
140905
140938
|
var shared = fork.use(shared_1.default);
|
|
@@ -140989,9 +141022,9 @@ var require_es62 = __commonJS3({
|
|
|
140989
141022
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
140990
141023
|
function default_1(fork) {
|
|
140991
141024
|
fork.use(core_1.default);
|
|
140992
|
-
var
|
|
140993
|
-
var def =
|
|
140994
|
-
var or =
|
|
141025
|
+
var types18 = fork.use(types_110.default);
|
|
141026
|
+
var def = types18.Type.def;
|
|
141027
|
+
var or = types18.Type.or;
|
|
140995
141028
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
140996
141029
|
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"]);
|
|
140997
141030
|
def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
|
|
@@ -141077,8 +141110,8 @@ var require_es20172 = __commonJS3({
|
|
|
141077
141110
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141078
141111
|
function default_1(fork) {
|
|
141079
141112
|
fork.use(es2016_1.default);
|
|
141080
|
-
var
|
|
141081
|
-
var def =
|
|
141113
|
+
var types18 = fork.use(types_110.default);
|
|
141114
|
+
var def = types18.Type.def;
|
|
141082
141115
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141083
141116
|
def("Function").field("async", Boolean, defaults2["false"]);
|
|
141084
141117
|
def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
|
|
@@ -141099,9 +141132,9 @@ var require_es20182 = __commonJS3({
|
|
|
141099
141132
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141100
141133
|
function default_1(fork) {
|
|
141101
141134
|
fork.use(es2017_1.default);
|
|
141102
|
-
var
|
|
141103
|
-
var def =
|
|
141104
|
-
var or =
|
|
141135
|
+
var types18 = fork.use(types_110.default);
|
|
141136
|
+
var def = types18.Type.def;
|
|
141137
|
+
var or = types18.Type.or;
|
|
141105
141138
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141106
141139
|
def("ForOfStatement").field("await", Boolean, defaults2["false"]);
|
|
141107
141140
|
def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
@@ -141130,9 +141163,9 @@ var require_es20192 = __commonJS3({
|
|
|
141130
141163
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141131
141164
|
function default_1(fork) {
|
|
141132
141165
|
fork.use(es2018_1.default);
|
|
141133
|
-
var
|
|
141134
|
-
var def =
|
|
141135
|
-
var or =
|
|
141166
|
+
var types18 = fork.use(types_110.default);
|
|
141167
|
+
var def = types18.Type.def;
|
|
141168
|
+
var or = types18.Type.or;
|
|
141136
141169
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141137
141170
|
def("CatchClause").field("param", or(def("Pattern"), null), defaults2["null"]);
|
|
141138
141171
|
}
|
|
@@ -141154,9 +141187,9 @@ var require_es202022 = __commonJS3({
|
|
|
141154
141187
|
function default_1(fork) {
|
|
141155
141188
|
fork.use(es2020_1.default);
|
|
141156
141189
|
fork.use(es2019_1.default);
|
|
141157
|
-
var
|
|
141158
|
-
var def =
|
|
141159
|
-
var or =
|
|
141190
|
+
var types18 = fork.use(types_110.default);
|
|
141191
|
+
var def = types18.Type.def;
|
|
141192
|
+
var or = types18.Type.or;
|
|
141160
141193
|
var shared = fork.use(shared_1.default);
|
|
141161
141194
|
var defaults2 = shared.defaults;
|
|
141162
141195
|
def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
|
|
@@ -141202,8 +141235,8 @@ var require_es20222 = __commonJS3({
|
|
|
141202
141235
|
var shared_1 = require_shared2();
|
|
141203
141236
|
function default_1(fork) {
|
|
141204
141237
|
fork.use(es2021_1.default);
|
|
141205
|
-
var
|
|
141206
|
-
var def =
|
|
141238
|
+
var types18 = fork.use(types_110.default);
|
|
141239
|
+
var def = types18.Type.def;
|
|
141207
141240
|
def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
|
|
141208
141241
|
}
|
|
141209
141242
|
exports.default = default_1;
|
|
@@ -141222,9 +141255,9 @@ var require_es_proposals2 = __commonJS3({
|
|
|
141222
141255
|
var es2022_1 = tslib_1.__importDefault(require_es20222());
|
|
141223
141256
|
function default_1(fork) {
|
|
141224
141257
|
fork.use(es2022_1.default);
|
|
141225
|
-
var
|
|
141226
|
-
var Type =
|
|
141227
|
-
var def =
|
|
141258
|
+
var types18 = fork.use(types_110.default);
|
|
141259
|
+
var Type = types18.Type;
|
|
141260
|
+
var def = types18.Type.def;
|
|
141228
141261
|
var or = Type.or;
|
|
141229
141262
|
var shared = fork.use(shared_1.default);
|
|
141230
141263
|
var defaults2 = shared.defaults;
|
|
@@ -141262,9 +141295,9 @@ var require_jsx2 = __commonJS3({
|
|
|
141262
141295
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141263
141296
|
function default_1(fork) {
|
|
141264
141297
|
fork.use(es_proposals_1.default);
|
|
141265
|
-
var
|
|
141266
|
-
var def =
|
|
141267
|
-
var or =
|
|
141298
|
+
var types18 = fork.use(types_110.default);
|
|
141299
|
+
var def = types18.Type.def;
|
|
141300
|
+
var or = types18.Type.or;
|
|
141268
141301
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141269
141302
|
def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
|
|
141270
141303
|
def("Literal"),
|
|
@@ -141320,9 +141353,9 @@ var require_type_annotations2 = __commonJS3({
|
|
|
141320
141353
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
141321
141354
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141322
141355
|
function default_1(fork) {
|
|
141323
|
-
var
|
|
141324
|
-
var def =
|
|
141325
|
-
var or =
|
|
141356
|
+
var types18 = fork.use(types_110.default);
|
|
141357
|
+
var def = types18.Type.def;
|
|
141358
|
+
var or = types18.Type.or;
|
|
141326
141359
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141327
141360
|
var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
|
|
141328
141361
|
var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
|
|
@@ -141355,9 +141388,9 @@ var require_flow2 = __commonJS3({
|
|
|
141355
141388
|
function default_1(fork) {
|
|
141356
141389
|
fork.use(es_proposals_1.default);
|
|
141357
141390
|
fork.use(type_annotations_1.default);
|
|
141358
|
-
var
|
|
141359
|
-
var def =
|
|
141360
|
-
var or =
|
|
141391
|
+
var types18 = fork.use(types_110.default);
|
|
141392
|
+
var def = types18.Type.def;
|
|
141393
|
+
var or = types18.Type.or;
|
|
141361
141394
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141362
141395
|
def("Flow").bases("Node");
|
|
141363
141396
|
def("FlowType").bases("Flow");
|
|
@@ -141469,10 +141502,10 @@ var require_esprima4 = __commonJS3({
|
|
|
141469
141502
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141470
141503
|
function default_1(fork) {
|
|
141471
141504
|
fork.use(es_proposals_1.default);
|
|
141472
|
-
var
|
|
141505
|
+
var types18 = fork.use(types_110.default);
|
|
141473
141506
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141474
|
-
var def =
|
|
141475
|
-
var or =
|
|
141507
|
+
var def = types18.Type.def;
|
|
141508
|
+
var or = types18.Type.or;
|
|
141476
141509
|
def("VariableDeclaration").field("declarations", [or(
|
|
141477
141510
|
def("VariableDeclarator"),
|
|
141478
141511
|
def("Identifier")
|
|
@@ -141515,11 +141548,11 @@ var require_babel_core2 = __commonJS3({
|
|
|
141515
141548
|
function default_1(fork) {
|
|
141516
141549
|
var _a, _b, _c, _d, _e;
|
|
141517
141550
|
fork.use(es_proposals_1.default);
|
|
141518
|
-
var
|
|
141551
|
+
var types18 = fork.use(types_110.default);
|
|
141519
141552
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141520
|
-
var def =
|
|
141521
|
-
var or =
|
|
141522
|
-
var isUndefined =
|
|
141553
|
+
var def = types18.Type.def;
|
|
141554
|
+
var or = types18.Type.or;
|
|
141555
|
+
var isUndefined = types18.builtInTypes.undefined;
|
|
141523
141556
|
def("Noop").bases("Statement").build();
|
|
141524
141557
|
def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
|
|
141525
141558
|
def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
|
|
@@ -141544,7 +141577,7 @@ var require_babel_core2 = __commonJS3({
|
|
|
141544
141577
|
raw: String
|
|
141545
141578
|
},
|
|
141546
141579
|
function getDefault() {
|
|
141547
|
-
var value2 =
|
|
141580
|
+
var value2 = types18.getFieldValue(this, "value");
|
|
141548
141581
|
return {
|
|
141549
141582
|
rawValue: value2,
|
|
141550
141583
|
raw: toRaw ? toRaw(value2) : String(value2)
|
|
@@ -141645,8 +141678,8 @@ var require_babel2 = __commonJS3({
|
|
|
141645
141678
|
var flow_1 = tslib_1.__importDefault(require_flow2());
|
|
141646
141679
|
var shared_1 = require_shared2();
|
|
141647
141680
|
function default_1(fork) {
|
|
141648
|
-
var
|
|
141649
|
-
var def =
|
|
141681
|
+
var types18 = fork.use(types_110.default);
|
|
141682
|
+
var def = types18.Type.def;
|
|
141650
141683
|
fork.use(babel_core_1.default);
|
|
141651
141684
|
fork.use(flow_1.default);
|
|
141652
141685
|
def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
|
|
@@ -141670,12 +141703,12 @@ var require_typescript2 = __commonJS3({
|
|
|
141670
141703
|
function default_1(fork) {
|
|
141671
141704
|
fork.use(babel_core_1.default);
|
|
141672
141705
|
fork.use(type_annotations_1.default);
|
|
141673
|
-
var
|
|
141674
|
-
var n =
|
|
141675
|
-
var def =
|
|
141676
|
-
var or =
|
|
141706
|
+
var types18 = fork.use(types_110.default);
|
|
141707
|
+
var n = types18.namedTypes;
|
|
141708
|
+
var def = types18.Type.def;
|
|
141709
|
+
var or = types18.Type.or;
|
|
141677
141710
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141678
|
-
var StringLiteral =
|
|
141711
|
+
var StringLiteral = types18.Type.from(function(value2, deep) {
|
|
141679
141712
|
if (n.StringLiteral && n.StringLiteral.check(value2, deep)) {
|
|
141680
141713
|
return true;
|
|
141681
141714
|
}
|
|
@@ -143623,8 +143656,8 @@ var require_util22 = __commonJS3({
|
|
|
143623
143656
|
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;
|
|
143624
143657
|
var tslib_1 = require_tslib2();
|
|
143625
143658
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
143626
|
-
var
|
|
143627
|
-
var n =
|
|
143659
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
143660
|
+
var n = types18.namedTypes;
|
|
143628
143661
|
var source_map_1 = tslib_1.__importDefault(require_source_map2());
|
|
143629
143662
|
var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
|
|
143630
143663
|
var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
|
|
@@ -150930,10 +150963,10 @@ var require_comments2 = __commonJS3({
|
|
|
150930
150963
|
exports.printComments = exports.attach = void 0;
|
|
150931
150964
|
var tslib_1 = require_tslib2();
|
|
150932
150965
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
150933
|
-
var
|
|
150934
|
-
var n =
|
|
150935
|
-
var isArray2 =
|
|
150936
|
-
var isObject2 =
|
|
150966
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
150967
|
+
var n = types18.namedTypes;
|
|
150968
|
+
var isArray2 = types18.builtInTypes.array;
|
|
150969
|
+
var isObject2 = types18.builtInTypes.object;
|
|
150937
150970
|
var lines_1 = require_lines2();
|
|
150938
150971
|
var util_110 = require_util22();
|
|
150939
150972
|
var childNodesCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -150964,7 +150997,7 @@ var require_comments2 = __commonJS3({
|
|
|
150964
150997
|
if (isArray2.check(node2)) {
|
|
150965
150998
|
names = Object.keys(node2);
|
|
150966
150999
|
} else if (isObject2.check(node2)) {
|
|
150967
|
-
names =
|
|
151000
|
+
names = types18.getFieldNames(node2);
|
|
150968
151001
|
} else {
|
|
150969
151002
|
return resultArray;
|
|
150970
151003
|
}
|
|
@@ -151142,7 +151175,7 @@ var require_comments2 = __commonJS3({
|
|
|
151142
151175
|
function printComments(path22, print9) {
|
|
151143
151176
|
var value2 = path22.getValue();
|
|
151144
151177
|
var innerLines = print9(path22);
|
|
151145
|
-
var comments = n.Node.check(value2) &&
|
|
151178
|
+
var comments = n.Node.check(value2) && types18.getFieldValue(value2, "comments");
|
|
151146
151179
|
if (!comments || comments.length === 0) {
|
|
151147
151180
|
return innerLines;
|
|
151148
151181
|
}
|
|
@@ -151150,8 +151183,8 @@ var require_comments2 = __commonJS3({
|
|
|
151150
151183
|
var trailingParts = [innerLines];
|
|
151151
151184
|
path22.each(function(commentPath) {
|
|
151152
151185
|
var comment = commentPath.getValue();
|
|
151153
|
-
var leading =
|
|
151154
|
-
var trailing =
|
|
151186
|
+
var leading = types18.getFieldValue(comment, "leading");
|
|
151187
|
+
var trailing = types18.getFieldValue(comment, "trailing");
|
|
151155
151188
|
if (leading || trailing && !(n.Statement.check(value2) || comment.type === "Block" || comment.type === "CommentBlock")) {
|
|
151156
151189
|
leadingParts.push(printLeadingComment(commentPath, print9));
|
|
151157
151190
|
} else if (trailing) {
|
|
@@ -151171,10 +151204,10 @@ var require_parser22 = __commonJS3({
|
|
|
151171
151204
|
exports.parse = void 0;
|
|
151172
151205
|
var tslib_1 = require_tslib2();
|
|
151173
151206
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
151174
|
-
var
|
|
151175
|
-
var b =
|
|
151176
|
-
var isObject2 =
|
|
151177
|
-
var isArray2 =
|
|
151207
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
151208
|
+
var b = types18.builders;
|
|
151209
|
+
var isObject2 = types18.builtInTypes.object;
|
|
151210
|
+
var isArray2 = types18.builtInTypes.array;
|
|
151178
151211
|
var options_1 = require_options2();
|
|
151179
151212
|
var lines_1 = require_lines2();
|
|
151180
151213
|
var comments_1 = require_comments2();
|
|
@@ -151358,11 +151391,11 @@ var require_fast_path2 = __commonJS3({
|
|
|
151358
151391
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
151359
151392
|
var tslib_1 = require_tslib2();
|
|
151360
151393
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
151361
|
-
var
|
|
151394
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
151362
151395
|
var util2 = tslib_1.__importStar(require_util22());
|
|
151363
|
-
var n =
|
|
151364
|
-
var isArray2 =
|
|
151365
|
-
var isNumber2 =
|
|
151396
|
+
var n = types18.namedTypes;
|
|
151397
|
+
var isArray2 = types18.builtInTypes.array;
|
|
151398
|
+
var isNumber2 = types18.builtInTypes.number;
|
|
151366
151399
|
var PRECEDENCE = {};
|
|
151367
151400
|
[
|
|
151368
151401
|
["??"],
|
|
@@ -151391,7 +151424,7 @@ var require_fast_path2 = __commonJS3({
|
|
|
151391
151424
|
if (obj instanceof FastPath) {
|
|
151392
151425
|
return obj.copy();
|
|
151393
151426
|
}
|
|
151394
|
-
if (obj instanceof
|
|
151427
|
+
if (obj instanceof types18.NodePath) {
|
|
151395
151428
|
var copy = Object.create(FastPath.prototype);
|
|
151396
151429
|
var stack = [obj.value];
|
|
151397
151430
|
for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
|
|
@@ -151702,7 +151735,7 @@ var require_fast_path2 = __commonJS3({
|
|
|
151702
151735
|
return node2.some(containsCallExpression);
|
|
151703
151736
|
}
|
|
151704
151737
|
if (n.Node.check(node2)) {
|
|
151705
|
-
return
|
|
151738
|
+
return types18.someField(node2, function(_name, child) {
|
|
151706
151739
|
return containsCallExpression(child);
|
|
151707
151740
|
});
|
|
151708
151741
|
}
|
|
@@ -151790,16 +151823,16 @@ var require_patcher2 = __commonJS3({
|
|
|
151790
151823
|
var tslib_1 = require_tslib2();
|
|
151791
151824
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
151792
151825
|
var linesModule = tslib_1.__importStar(require_lines2());
|
|
151793
|
-
var
|
|
151794
|
-
var Printable =
|
|
151795
|
-
var Expression =
|
|
151796
|
-
var ReturnStatement =
|
|
151797
|
-
var SourceLocation3 =
|
|
151826
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
151827
|
+
var Printable = types18.namedTypes.Printable;
|
|
151828
|
+
var Expression = types18.namedTypes.Expression;
|
|
151829
|
+
var ReturnStatement = types18.namedTypes.ReturnStatement;
|
|
151830
|
+
var SourceLocation3 = types18.namedTypes.SourceLocation;
|
|
151798
151831
|
var util_110 = require_util22();
|
|
151799
151832
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path2());
|
|
151800
|
-
var isObject2 =
|
|
151801
|
-
var isArray2 =
|
|
151802
|
-
var isString3 =
|
|
151833
|
+
var isObject2 = types18.builtInTypes.object;
|
|
151834
|
+
var isArray2 = types18.builtInTypes.array;
|
|
151835
|
+
var isString3 = types18.builtInTypes.string;
|
|
151803
151836
|
var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
|
|
151804
151837
|
var Patcher = function Patcher2(lines) {
|
|
151805
151838
|
assert_1.default.ok(this instanceof Patcher2);
|
|
@@ -152069,8 +152102,8 @@ var require_patcher2 = __commonJS3({
|
|
|
152069
152102
|
if (k.charAt(0) === "_") {
|
|
152070
152103
|
continue;
|
|
152071
152104
|
}
|
|
152072
|
-
newPath.stack.push(k,
|
|
152073
|
-
oldPath.stack.push(k,
|
|
152105
|
+
newPath.stack.push(k, types18.getFieldValue(newNode, k));
|
|
152106
|
+
oldPath.stack.push(k, types18.getFieldValue(oldNode, k));
|
|
152074
152107
|
var canReprint = findAnyReprints(newPath, oldPath, reprints);
|
|
152075
152108
|
newPath.stack.length -= 2;
|
|
152076
152109
|
oldPath.stack.length -= 2;
|
|
@@ -152092,16 +152125,16 @@ var require_printer22 = __commonJS3({
|
|
|
152092
152125
|
exports.Printer = void 0;
|
|
152093
152126
|
var tslib_1 = require_tslib2();
|
|
152094
152127
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
152095
|
-
var
|
|
152128
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
152096
152129
|
var comments_1 = require_comments2();
|
|
152097
152130
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path2());
|
|
152098
152131
|
var lines_1 = require_lines2();
|
|
152099
152132
|
var options_1 = require_options2();
|
|
152100
152133
|
var patcher_1 = require_patcher2();
|
|
152101
152134
|
var util2 = tslib_1.__importStar(require_util22());
|
|
152102
|
-
var namedTypes =
|
|
152103
|
-
var isString3 =
|
|
152104
|
-
var isObject2 =
|
|
152135
|
+
var namedTypes = types18.namedTypes;
|
|
152136
|
+
var isString3 = types18.builtInTypes.string;
|
|
152137
|
+
var isObject2 = types18.builtInTypes.object;
|
|
152105
152138
|
var PrintResult = function PrintResult2(code, sourceMap) {
|
|
152106
152139
|
assert_1.default.ok(this instanceof PrintResult2);
|
|
152107
152140
|
isString3.assert(code);
|
|
@@ -152263,7 +152296,7 @@ var require_printer22 = __commonJS3({
|
|
|
152263
152296
|
case "OptionalMemberExpression": {
|
|
152264
152297
|
parts.push(path22.call(print9, "object"));
|
|
152265
152298
|
var property = path22.call(print9, "property");
|
|
152266
|
-
var optional =
|
|
152299
|
+
var optional = types18.getFieldValue(n, "optional");
|
|
152267
152300
|
if (n.computed) {
|
|
152268
152301
|
parts.push(optional ? "?.[" : "[", property, "]");
|
|
152269
152302
|
} else {
|
|
@@ -152534,7 +152567,7 @@ var require_printer22 = __commonJS3({
|
|
|
152534
152567
|
if (n.typeArguments) {
|
|
152535
152568
|
parts.push(path22.call(print9, "typeArguments"));
|
|
152536
152569
|
}
|
|
152537
|
-
if (
|
|
152570
|
+
if (types18.getFieldValue(n, "optional")) {
|
|
152538
152571
|
parts.push("?.");
|
|
152539
152572
|
}
|
|
152540
152573
|
parts.push(printArgumentsList(path22, options, print9));
|
|
@@ -154213,8 +154246,8 @@ var require_printer22 = __commonJS3({
|
|
|
154213
154246
|
});
|
|
154214
154247
|
}
|
|
154215
154248
|
function getPossibleRaw(node2) {
|
|
154216
|
-
var value2 =
|
|
154217
|
-
var extra =
|
|
154249
|
+
var value2 = types18.getFieldValue(node2, "value");
|
|
154250
|
+
var extra = types18.getFieldValue(node2, "extra");
|
|
154218
154251
|
if (extra && typeof extra.raw === "string" && value2 == extra.rawValue) {
|
|
154219
154252
|
return extra.raw;
|
|
154220
154253
|
}
|
|
@@ -154260,8 +154293,8 @@ var require_main22 = __commonJS3({
|
|
|
154260
154293
|
exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
|
|
154261
154294
|
var tslib_1 = require_tslib2();
|
|
154262
154295
|
var fs_1 = tslib_1.__importDefault(__require2("fs"));
|
|
154263
|
-
var
|
|
154264
|
-
exports.types =
|
|
154296
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
154297
|
+
exports.types = types18;
|
|
154265
154298
|
var parser_1 = require_parser22();
|
|
154266
154299
|
Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
|
|
154267
154300
|
return parser_1.parse;
|
|
@@ -154719,7 +154752,7 @@ var printDocASTReducer2 = {
|
|
|
154719
154752
|
leave: ({ name, interfaces, directives, fields }) => join3(["interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ")
|
|
154720
154753
|
},
|
|
154721
154754
|
UnionTypeDefinition: {
|
|
154722
|
-
leave: ({ name, directives, types:
|
|
154755
|
+
leave: ({ name, directives, types: types18 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
|
|
154723
154756
|
},
|
|
154724
154757
|
EnumTypeDefinition: {
|
|
154725
154758
|
leave: ({ name, directives, values }) => join3(["enum", name, join3(directives, " "), block2(values)], " ")
|
|
@@ -154746,7 +154779,7 @@ var printDocASTReducer2 = {
|
|
|
154746
154779
|
leave: ({ name, interfaces, directives, fields }) => join3(["extend interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ")
|
|
154747
154780
|
},
|
|
154748
154781
|
UnionTypeExtension: {
|
|
154749
|
-
leave: ({ name, directives, types:
|
|
154782
|
+
leave: ({ name, directives, types: types18 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
|
|
154750
154783
|
},
|
|
154751
154784
|
EnumTypeExtension: {
|
|
154752
154785
|
leave: ({ name, directives, values }) => join3(["extend enum", name, join3(directives, " "), block2(values)], " ")
|
|
@@ -155938,6 +155971,9 @@ var GarbageCollector2 = class {
|
|
|
155938
155971
|
constructor(cache) {
|
|
155939
155972
|
this.cache = cache;
|
|
155940
155973
|
}
|
|
155974
|
+
reset() {
|
|
155975
|
+
this.lifetimes.clear();
|
|
155976
|
+
}
|
|
155941
155977
|
resetLifetime(id2, field) {
|
|
155942
155978
|
if (!this.lifetimes.get(id2)) {
|
|
155943
155979
|
this.lifetimes.set(id2, /* @__PURE__ */ new Map());
|
|
@@ -156055,6 +156091,10 @@ var ListManager2 = class {
|
|
|
156055
156091
|
}
|
|
156056
156092
|
this.listsByField.get(parentID).delete(field);
|
|
156057
156093
|
}
|
|
156094
|
+
reset() {
|
|
156095
|
+
this.lists.clear();
|
|
156096
|
+
this.listsByField.clear();
|
|
156097
|
+
}
|
|
156058
156098
|
};
|
|
156059
156099
|
var List2 = class {
|
|
156060
156100
|
recordID;
|
|
@@ -156435,6 +156475,9 @@ var StaleManager2 = class {
|
|
|
156435
156475
|
}
|
|
156436
156476
|
}
|
|
156437
156477
|
}
|
|
156478
|
+
reset() {
|
|
156479
|
+
this.fieldsTime.clear();
|
|
156480
|
+
}
|
|
156438
156481
|
};
|
|
156439
156482
|
var InMemoryStorage2 = class {
|
|
156440
156483
|
data;
|
|
@@ -156613,6 +156656,9 @@ var InMemoryStorage2 = class {
|
|
|
156613
156656
|
layer.fields = fields;
|
|
156614
156657
|
layer.links = links;
|
|
156615
156658
|
}
|
|
156659
|
+
reset() {
|
|
156660
|
+
this.data = [];
|
|
156661
|
+
}
|
|
156616
156662
|
};
|
|
156617
156663
|
var Layer2 = class {
|
|
156618
156664
|
id;
|
|
@@ -157054,6 +157100,18 @@ var InMemorySubscriptions2 = class {
|
|
|
157054
157100
|
this.remove(linkedRecordID, linkFields, targets, visited);
|
|
157055
157101
|
}
|
|
157056
157102
|
}
|
|
157103
|
+
reset() {
|
|
157104
|
+
const subscribers = Object.entries(this.subscribers).filter(
|
|
157105
|
+
([id2]) => !id2.startsWith(rootID2)
|
|
157106
|
+
);
|
|
157107
|
+
for (const [id2, _fields] of subscribers) {
|
|
157108
|
+
delete this.subscribers[id2];
|
|
157109
|
+
}
|
|
157110
|
+
const subscriptionSpecs = subscribers.flatMap(
|
|
157111
|
+
([_id, fields]) => Object.values(fields).flatMap((field) => field.map(([spec]) => spec))
|
|
157112
|
+
);
|
|
157113
|
+
return subscriptionSpecs;
|
|
157114
|
+
}
|
|
157057
157115
|
removeSubscribers(id2, fieldName, specs) {
|
|
157058
157116
|
let targets = [];
|
|
157059
157117
|
for (const spec of specs) {
|
|
@@ -157241,6 +157299,14 @@ var Cache2 = class {
|
|
|
157241
157299
|
}
|
|
157242
157300
|
this.#notifySubscribers(toNotify);
|
|
157243
157301
|
}
|
|
157302
|
+
reset() {
|
|
157303
|
+
const subSpecs = this._internal_unstable.subscriptions.reset();
|
|
157304
|
+
this._internal_unstable.staleManager.reset();
|
|
157305
|
+
this._internal_unstable.lifetimes.reset();
|
|
157306
|
+
this._internal_unstable.lists.reset();
|
|
157307
|
+
this._internal_unstable.storage.reset();
|
|
157308
|
+
this.#notifySubscribers(subSpecs);
|
|
157309
|
+
}
|
|
157244
157310
|
#notifySubscribers(subs) {
|
|
157245
157311
|
if (subs.length === 0) {
|
|
157246
157312
|
return;
|
|
@@ -157423,7 +157489,7 @@ var CacheInternal2 = class {
|
|
|
157423
157489
|
forceNotify
|
|
157424
157490
|
});
|
|
157425
157491
|
}
|
|
157426
|
-
} else if (Array.isArray(value2) && (typeof previousValue === "undefined" || Array.isArray(previousValue))) {
|
|
157492
|
+
} else if (Array.isArray(value2) && (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
|
|
157427
157493
|
let oldIDs = [...previousValue || []];
|
|
157428
157494
|
const emptyEdges = !updates ? [] : oldIDs.map((id2) => {
|
|
157429
157495
|
if (!id2) {
|
|
@@ -157496,7 +157562,7 @@ var CacheInternal2 = class {
|
|
|
157496
157562
|
} else {
|
|
157497
157563
|
linkedIDs = nestedIDs;
|
|
157498
157564
|
}
|
|
157499
|
-
const contentChanged = !deepEquals2(linkedIDs, oldIDs);
|
|
157565
|
+
const contentChanged = !deepEquals2(linkedIDs, oldIDs) || previousValue === null;
|
|
157500
157566
|
if (contentChanged || forceNotify) {
|
|
157501
157567
|
toNotify.push(...currentSubscribers);
|
|
157502
157568
|
}
|
|
@@ -158150,7 +158216,7 @@ var recast2 = __toESM3(require_main22(), 1);
|
|
|
158150
158216
|
var AST2 = recast2.types.builders;
|
|
158151
158217
|
var graphql42 = __toESM3(require_graphql22(), 1);
|
|
158152
158218
|
var graphql14 = __toESM3(require_graphql22(), 1);
|
|
158153
|
-
var
|
|
158219
|
+
var recast5 = __toESM3(require_main22(), 1);
|
|
158154
158220
|
var recast22 = __toESM3(require_main22(), 1);
|
|
158155
158221
|
var AST22 = recast22.types.builders;
|
|
158156
158222
|
var { toString } = {};
|
|
@@ -158166,7 +158232,6 @@ var graphql7 = __toESM3(require_graphql22(), 1);
|
|
|
158166
158232
|
var recast4 = __toESM3(require_main22(), 1);
|
|
158167
158233
|
var AST4 = recast4.types.builders;
|
|
158168
158234
|
var graphql13 = __toESM3(require_graphql22(), 1);
|
|
158169
|
-
var recast5 = __toESM3(require_main22(), 1);
|
|
158170
158235
|
var graphql11 = __toESM3(require_graphql22(), 1);
|
|
158171
158236
|
var graphql9 = __toESM3(require_graphql22(), 1);
|
|
158172
158237
|
var graphql10 = __toESM3(require_graphql22(), 1);
|
|
@@ -158252,32 +158317,31 @@ var pageInfoSelection = [
|
|
|
158252
158317
|
];
|
|
158253
158318
|
var graphql12 = __toESM3(require_graphql22(), 1);
|
|
158254
158319
|
var AST5 = recast5.types.builders;
|
|
158320
|
+
var recast6 = __toESM3(require_main22(), 1);
|
|
158255
158321
|
var AST6 = recast6.types.builders;
|
|
158256
|
-
var
|
|
158257
|
-
var AST7 = recast7.types.builders;
|
|
158258
|
-
var recast13 = __toESM3(require_main22(), 1);
|
|
158322
|
+
var recast12 = __toESM3(require_main22(), 1);
|
|
158259
158323
|
var graphql17 = __toESM3(require_graphql22(), 1);
|
|
158260
|
-
var recast10 = __toESM3(require_main22(), 1);
|
|
158261
|
-
var graphql16 = __toESM3(require_graphql22(), 1);
|
|
158262
158324
|
var recast9 = __toESM3(require_main22(), 1);
|
|
158263
|
-
var
|
|
158325
|
+
var graphql16 = __toESM3(require_graphql22(), 1);
|
|
158264
158326
|
var recast8 = __toESM3(require_main22(), 1);
|
|
158327
|
+
var graphql15 = __toESM3(require_graphql22(), 1);
|
|
158328
|
+
var recast7 = __toESM3(require_main22(), 1);
|
|
158329
|
+
var AST7 = recast7.types.builders;
|
|
158265
158330
|
var AST8 = recast8.types.builders;
|
|
158266
158331
|
var AST9 = recast9.types.builders;
|
|
158267
|
-
var AST10 = recast10.types.builders;
|
|
158268
158332
|
var graphql18 = __toESM3(require_graphql22(), 1);
|
|
158333
|
+
var recast10 = __toESM3(require_main22(), 1);
|
|
158334
|
+
var AST10 = recast10.types.builders;
|
|
158269
158335
|
var recast11 = __toESM3(require_main22(), 1);
|
|
158270
158336
|
var AST11 = recast11.types.builders;
|
|
158271
|
-
var recast12 = __toESM3(require_main22(), 1);
|
|
158272
158337
|
var AST12 = recast12.types.builders;
|
|
158273
|
-
var AST13 = recast13.types.builders;
|
|
158274
158338
|
var graphql19 = __toESM3(require_graphql22(), 1);
|
|
158275
|
-
var
|
|
158276
|
-
var
|
|
158339
|
+
var recast13 = __toESM3(require_main22(), 1);
|
|
158340
|
+
var AST13 = recast13.types.builders;
|
|
158277
158341
|
var graphql20 = __toESM3(require_graphql22(), 1);
|
|
158278
158342
|
var graphql21 = __toESM3(require_graphql22(), 1);
|
|
158279
|
-
var
|
|
158280
|
-
var
|
|
158343
|
+
var recast14 = __toESM3(require_main22(), 1);
|
|
158344
|
+
var AST14 = recast14.types.builders;
|
|
158281
158345
|
var graphql222 = __toESM3(require_graphql22(), 1);
|
|
158282
158346
|
var graphql23 = __toESM3(require_graphql22(), 1);
|
|
158283
158347
|
var graphql24 = __toESM3(require_graphql22(), 1);
|
|
@@ -158347,8 +158411,8 @@ function find_exported_fn(body, name) {
|
|
|
158347
158411
|
}
|
|
158348
158412
|
return exported2.declaration;
|
|
158349
158413
|
}
|
|
158350
|
-
var
|
|
158351
|
-
var
|
|
158414
|
+
var recast15 = __toESM3(require_main22(), 1);
|
|
158415
|
+
var AST15 = recast15.types.builders;
|
|
158352
158416
|
function ensure_imports({
|
|
158353
158417
|
config: config4,
|
|
158354
158418
|
script,
|
|
@@ -158364,13 +158428,13 @@ function ensure_imports({
|
|
|
158364
158428
|
if (!has_import) {
|
|
158365
158429
|
script.body.unshift({
|
|
158366
158430
|
type: "ImportDeclaration",
|
|
158367
|
-
source:
|
|
158431
|
+
source: AST15.stringLiteral(sourceModule),
|
|
158368
158432
|
importKind
|
|
158369
158433
|
});
|
|
158370
158434
|
}
|
|
158371
158435
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
158372
158436
|
}
|
|
158373
|
-
const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) =>
|
|
158437
|
+
const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST15.identifier(id2));
|
|
158374
158438
|
const toImport = idList.filter(
|
|
158375
158439
|
(identifier) => !script.body.find(
|
|
158376
158440
|
(statement) => statement.type === "ImportDeclaration" && statement.specifiers?.find(
|
|
@@ -158381,16 +158445,16 @@ function ensure_imports({
|
|
|
158381
158445
|
if (toImport.length > 0) {
|
|
158382
158446
|
script.body.unshift({
|
|
158383
158447
|
type: "ImportDeclaration",
|
|
158384
|
-
source:
|
|
158448
|
+
source: AST15.stringLiteral(sourceModule),
|
|
158385
158449
|
specifiers: toImport.map(
|
|
158386
|
-
(identifier, i22) => !Array.isArray(importID) ?
|
|
158450
|
+
(identifier, i22) => !Array.isArray(importID) ? AST15.importDefaultSpecifier(identifier) : AST15.importSpecifier(identifier, as?.[i22] ? AST15.identifier(as[i22]) : identifier)
|
|
158387
158451
|
),
|
|
158388
158452
|
importKind
|
|
158389
158453
|
});
|
|
158390
158454
|
}
|
|
158391
158455
|
for (const [i22, target] of (as ?? []).entries()) {
|
|
158392
158456
|
if (target) {
|
|
158393
|
-
idList[i22] =
|
|
158457
|
+
idList[i22] = AST15.identifier(target);
|
|
158394
158458
|
}
|
|
158395
158459
|
}
|
|
158396
158460
|
return {
|
|
@@ -186592,8 +186656,8 @@ export type ${config4.variableFunctionName(
|
|
|
186592
186656
|
}
|
|
186593
186657
|
|
|
186594
186658
|
// src/plugin/codegen/fragmentTypedefs/index.ts
|
|
186595
|
-
var
|
|
186596
|
-
var
|
|
186659
|
+
var recast16 = __toESM(require_main5(), 1);
|
|
186660
|
+
var AST16 = recast16.types.builders;
|
|
186597
186661
|
async function fragmentTypedefs(input) {
|
|
186598
186662
|
let fragments = {};
|
|
186599
186663
|
for (const doc of input.documents) {
|
|
@@ -186639,43 +186703,43 @@ async function fragmentTypedefs(input) {
|
|
|
186639
186703
|
}
|
|
186640
186704
|
const store = store_name({ config: input.config, name: doc.name });
|
|
186641
186705
|
const import_path = path_exports.join("..", stores_directory_name(), doc.name);
|
|
186642
|
-
const fragment_map =
|
|
186643
|
-
|
|
186644
|
-
|
|
186645
|
-
|
|
186646
|
-
|
|
186647
|
-
|
|
186648
|
-
|
|
186649
|
-
|
|
186706
|
+
const fragment_map = AST16.tsTypeLiteral([
|
|
186707
|
+
AST16.tsPropertySignature(
|
|
186708
|
+
AST16.stringLiteral(fragmentKey),
|
|
186709
|
+
AST16.tsTypeAnnotation(
|
|
186710
|
+
AST16.tsTypeLiteral([
|
|
186711
|
+
AST16.tsPropertySignature(
|
|
186712
|
+
AST16.identifier(doc.name),
|
|
186713
|
+
AST16.tsTypeAnnotation(AST16.tsAnyKeyword())
|
|
186650
186714
|
)
|
|
186651
186715
|
])
|
|
186652
186716
|
)
|
|
186653
186717
|
)
|
|
186654
186718
|
]);
|
|
186655
|
-
const non_exhaustive =
|
|
186656
|
-
|
|
186657
|
-
|
|
186658
|
-
|
|
186659
|
-
|
|
186719
|
+
const non_exhaustive = AST16.tsTypeLiteral([
|
|
186720
|
+
AST16.tsPropertySignature(
|
|
186721
|
+
AST16.literal("__typename"),
|
|
186722
|
+
AST16.tsTypeAnnotation(
|
|
186723
|
+
AST16.tsLiteralType(AST16.stringLiteral("non-exhaustive; don't match this"))
|
|
186660
186724
|
)
|
|
186661
186725
|
)
|
|
186662
186726
|
]);
|
|
186663
|
-
const initial_value_input =
|
|
186664
|
-
initial_value_input.typeAnnotation =
|
|
186665
|
-
|
|
186727
|
+
const initial_value_input = AST16.identifier("initialValue");
|
|
186728
|
+
initial_value_input.typeAnnotation = AST16.tsTypeAnnotation(
|
|
186729
|
+
AST16.tsUnionType([fragment_map, non_exhaustive])
|
|
186666
186730
|
);
|
|
186667
|
-
const initial_value_or_null_input =
|
|
186668
|
-
initial_value_or_null_input.typeAnnotation =
|
|
186669
|
-
|
|
186731
|
+
const initial_value_or_null_input = AST16.identifier("initialValue");
|
|
186732
|
+
initial_value_or_null_input.typeAnnotation = AST16.tsTypeAnnotation(
|
|
186733
|
+
AST16.tsUnionType([
|
|
186670
186734
|
fragment_map,
|
|
186671
|
-
|
|
186672
|
-
|
|
186735
|
+
AST16.tsNullKeyword(),
|
|
186736
|
+
AST16.tsUndefinedKeyword(),
|
|
186673
186737
|
non_exhaustive
|
|
186674
186738
|
])
|
|
186675
186739
|
);
|
|
186676
|
-
const document_input =
|
|
186677
|
-
document_input.typeAnnotation =
|
|
186678
|
-
|
|
186740
|
+
const document_input = AST16.identifier("document");
|
|
186741
|
+
document_input.typeAnnotation = AST16.tsTypeAnnotation(
|
|
186742
|
+
AST16.tsTypeReference(AST16.identifier(store))
|
|
186679
186743
|
);
|
|
186680
186744
|
let store_type = "FragmentStoreInstance";
|
|
186681
186745
|
if (doc.refetch?.paginated) {
|
|
@@ -186706,37 +186770,37 @@ async function fragmentTypedefs(input) {
|
|
|
186706
186770
|
sourceModule: "../../../artifacts/" + doc.name,
|
|
186707
186771
|
import: [inputID, shapeID]
|
|
186708
186772
|
});
|
|
186709
|
-
const typeParams = [
|
|
186710
|
-
const return_value =
|
|
186711
|
-
|
|
186712
|
-
|
|
186713
|
-
|
|
186773
|
+
const typeParams = [AST16.tsTypeReference(AST16.identifier(inputID))];
|
|
186774
|
+
const return_value = AST16.tsTypeReference(
|
|
186775
|
+
AST16.identifier(store_type),
|
|
186776
|
+
AST16.tsTypeParameterInstantiation([
|
|
186777
|
+
AST16.tsTypeReference(AST16.identifier(shapeID)),
|
|
186714
186778
|
...typeParams
|
|
186715
186779
|
])
|
|
186716
186780
|
);
|
|
186717
|
-
const null_return_value =
|
|
186718
|
-
|
|
186719
|
-
|
|
186720
|
-
|
|
186721
|
-
|
|
186722
|
-
|
|
186781
|
+
const null_return_value = AST16.tsTypeReference(
|
|
186782
|
+
AST16.identifier(store_type),
|
|
186783
|
+
AST16.tsTypeParameterInstantiation([
|
|
186784
|
+
AST16.tsUnionType([
|
|
186785
|
+
AST16.tsTypeReference(AST16.identifier(shapeID)),
|
|
186786
|
+
AST16.tsNullKeyword()
|
|
186723
186787
|
]),
|
|
186724
186788
|
...typeParams
|
|
186725
186789
|
])
|
|
186726
186790
|
);
|
|
186727
186791
|
return [
|
|
186728
|
-
|
|
186729
|
-
|
|
186730
|
-
|
|
186792
|
+
AST16.exportNamedDeclaration(
|
|
186793
|
+
AST16.tsDeclareFunction(
|
|
186794
|
+
AST16.identifier(which),
|
|
186731
186795
|
[initial_value_input, document_input],
|
|
186732
|
-
|
|
186796
|
+
AST16.tsTypeAnnotation(return_value)
|
|
186733
186797
|
)
|
|
186734
186798
|
),
|
|
186735
|
-
|
|
186736
|
-
|
|
186737
|
-
|
|
186799
|
+
AST16.exportNamedDeclaration(
|
|
186800
|
+
AST16.tsDeclareFunction(
|
|
186801
|
+
AST16.identifier(which),
|
|
186738
186802
|
[initial_value_or_null_input, document_input],
|
|
186739
|
-
|
|
186803
|
+
AST16.tsTypeAnnotation(null_return_value)
|
|
186740
186804
|
)
|
|
186741
186805
|
)
|
|
186742
186806
|
];
|
|
@@ -187519,17 +187583,17 @@ function is_root_route(filepath) {
|
|
|
187519
187583
|
var empty_layout = "<slot />";
|
|
187520
187584
|
|
|
187521
187585
|
// src/plugin/transforms/index.ts
|
|
187522
|
-
var
|
|
187586
|
+
var recast23 = __toESM(require_main5(), 1);
|
|
187523
187587
|
|
|
187524
187588
|
// src/plugin/transforms/componentQuery.ts
|
|
187525
|
-
var
|
|
187526
|
-
var
|
|
187589
|
+
var recast17 = __toESM(require_main5(), 1);
|
|
187590
|
+
var AST17 = recast17.types.builders;
|
|
187527
187591
|
async function QueryProcessor(config4, page2) {
|
|
187528
187592
|
if (!is_component(config4, page2.framework, page2.filepath)) {
|
|
187529
187593
|
return;
|
|
187530
187594
|
}
|
|
187531
187595
|
const store_id = (name) => {
|
|
187532
|
-
return
|
|
187596
|
+
return AST17.identifier(`_houdini_` + name);
|
|
187533
187597
|
};
|
|
187534
187598
|
const queries = await find_inline_queries(page2, page2.script, store_id);
|
|
187535
187599
|
if (queries.length === 0) {
|
|
@@ -187579,8 +187643,8 @@ async function QueryProcessor(config4, page2) {
|
|
|
187579
187643
|
page2.script.body.splice(
|
|
187580
187644
|
find_insert_index(page2.script),
|
|
187581
187645
|
0,
|
|
187582
|
-
|
|
187583
|
-
|
|
187646
|
+
AST17.variableDeclaration("const", [
|
|
187647
|
+
AST17.variableDeclarator(store_id(query3.name.value), AST17.newExpression(factory, []))
|
|
187584
187648
|
])
|
|
187585
187649
|
);
|
|
187586
187650
|
}
|
|
@@ -187597,63 +187661,63 @@ async function QueryProcessor(config4, page2) {
|
|
|
187597
187661
|
});
|
|
187598
187662
|
}
|
|
187599
187663
|
return [
|
|
187600
|
-
|
|
187601
|
-
|
|
187602
|
-
|
|
187603
|
-
|
|
187664
|
+
AST17.labeledStatement(
|
|
187665
|
+
AST17.identifier("$"),
|
|
187666
|
+
AST17.expressionStatement(
|
|
187667
|
+
AST17.logicalExpression(
|
|
187604
187668
|
"&&",
|
|
187605
|
-
|
|
187606
|
-
|
|
187607
|
-
|
|
187669
|
+
AST17.identifier("isBrowser"),
|
|
187670
|
+
AST17.callExpression(
|
|
187671
|
+
AST17.memberExpression(
|
|
187608
187672
|
store_id(query3.name.value),
|
|
187609
|
-
|
|
187673
|
+
AST17.identifier("fetch")
|
|
187610
187674
|
),
|
|
187611
187675
|
[
|
|
187612
|
-
|
|
187613
|
-
|
|
187614
|
-
|
|
187615
|
-
|
|
187616
|
-
|
|
187617
|
-
|
|
187618
|
-
|
|
187619
|
-
|
|
187620
|
-
|
|
187676
|
+
AST17.objectExpression([
|
|
187677
|
+
AST17.objectProperty(
|
|
187678
|
+
AST17.identifier("variables"),
|
|
187679
|
+
AST17.callExpression(AST17.identifier("marshalInputs"), [
|
|
187680
|
+
AST17.objectExpression([
|
|
187681
|
+
AST17.objectProperty(
|
|
187682
|
+
AST17.identifier("config"),
|
|
187683
|
+
AST17.callExpression(
|
|
187684
|
+
AST17.identifier("getCurrentConfig"),
|
|
187621
187685
|
[]
|
|
187622
187686
|
)
|
|
187623
187687
|
),
|
|
187624
|
-
|
|
187625
|
-
|
|
187626
|
-
|
|
187688
|
+
AST17.objectProperty(
|
|
187689
|
+
AST17.identifier("artifact"),
|
|
187690
|
+
AST17.memberExpression(
|
|
187627
187691
|
store_id(query3.name.value),
|
|
187628
|
-
|
|
187692
|
+
AST17.identifier("artifact")
|
|
187629
187693
|
)
|
|
187630
187694
|
),
|
|
187631
|
-
|
|
187632
|
-
|
|
187633
|
-
has_variables ?
|
|
187634
|
-
|
|
187635
|
-
|
|
187636
|
-
|
|
187695
|
+
AST17.objectProperty(
|
|
187696
|
+
AST17.identifier("input"),
|
|
187697
|
+
has_variables ? AST17.callExpression(
|
|
187698
|
+
AST17.memberExpression(
|
|
187699
|
+
AST17.identifier(variable_fn),
|
|
187700
|
+
AST17.identifier("call")
|
|
187637
187701
|
),
|
|
187638
187702
|
[
|
|
187639
|
-
|
|
187640
|
-
|
|
187703
|
+
AST17.newExpression(
|
|
187704
|
+
AST17.identifier(
|
|
187641
187705
|
"RequestContext"
|
|
187642
187706
|
),
|
|
187643
187707
|
[]
|
|
187644
187708
|
),
|
|
187645
|
-
|
|
187646
|
-
|
|
187647
|
-
|
|
187709
|
+
AST17.objectExpression([
|
|
187710
|
+
AST17.objectProperty(
|
|
187711
|
+
AST17.identifier(
|
|
187648
187712
|
"props"
|
|
187649
187713
|
),
|
|
187650
|
-
|
|
187714
|
+
AST17.objectExpression(
|
|
187651
187715
|
props.map(
|
|
187652
|
-
(prop) =>
|
|
187653
|
-
|
|
187716
|
+
(prop) => AST17.objectProperty(
|
|
187717
|
+
AST17.identifier(
|
|
187654
187718
|
prop
|
|
187655
187719
|
),
|
|
187656
|
-
|
|
187720
|
+
AST17.identifier(
|
|
187657
187721
|
prop
|
|
187658
187722
|
)
|
|
187659
187723
|
)
|
|
@@ -187662,7 +187726,7 @@ async function QueryProcessor(config4, page2) {
|
|
|
187662
187726
|
)
|
|
187663
187727
|
])
|
|
187664
187728
|
]
|
|
187665
|
-
) :
|
|
187729
|
+
) : AST17.objectExpression([])
|
|
187666
187730
|
)
|
|
187667
187731
|
])
|
|
187668
187732
|
])
|
|
@@ -187708,8 +187772,8 @@ async function find_inline_queries(page2, parsed, store_id) {
|
|
|
187708
187772
|
}
|
|
187709
187773
|
|
|
187710
187774
|
// src/plugin/transforms/kit/init.ts
|
|
187711
|
-
var
|
|
187712
|
-
var
|
|
187775
|
+
var recast18 = __toESM(require_main5(), 1);
|
|
187776
|
+
var AST18 = recast18.types.builders;
|
|
187713
187777
|
async function kit_init(page2) {
|
|
187714
187778
|
if (!is_root_layout(page2.config, page2.filepath)) {
|
|
187715
187779
|
return;
|
|
@@ -187733,9 +187797,9 @@ async function kit_init(page2) {
|
|
|
187733
187797
|
import: ["extractSession", "setClientSession"]
|
|
187734
187798
|
}).ids;
|
|
187735
187799
|
page2.script.body.push(
|
|
187736
|
-
|
|
187737
|
-
|
|
187738
|
-
|
|
187800
|
+
AST18.expressionStatement(
|
|
187801
|
+
AST18.callExpression(on_mount, [
|
|
187802
|
+
AST18.arrowFunctionExpression([], AST18.callExpression(set_client_started, []))
|
|
187739
187803
|
])
|
|
187740
187804
|
)
|
|
187741
187805
|
);
|
|
@@ -187746,17 +187810,17 @@ async function kit_init(page2) {
|
|
|
187746
187810
|
import: ["page"]
|
|
187747
187811
|
}).ids[0];
|
|
187748
187812
|
page2.script.body.push(
|
|
187749
|
-
|
|
187750
|
-
|
|
187751
|
-
|
|
187752
|
-
[
|
|
187753
|
-
|
|
187754
|
-
|
|
187755
|
-
|
|
187756
|
-
|
|
187757
|
-
|
|
187758
|
-
|
|
187759
|
-
|
|
187813
|
+
AST18.expressionStatement(
|
|
187814
|
+
AST18.callExpression(AST18.memberExpression(store_id, AST18.identifier("subscribe")), [
|
|
187815
|
+
AST18.arrowFunctionExpression(
|
|
187816
|
+
[AST18.identifier("val")],
|
|
187817
|
+
AST18.blockStatement([
|
|
187818
|
+
AST18.expressionStatement(
|
|
187819
|
+
AST18.callExpression(set_session, [
|
|
187820
|
+
AST18.callExpression(extract_session, [
|
|
187821
|
+
AST18.memberExpression(
|
|
187822
|
+
AST18.identifier("val"),
|
|
187823
|
+
AST18.identifier("data")
|
|
187760
187824
|
)
|
|
187761
187825
|
])
|
|
187762
187826
|
])
|
|
@@ -187770,15 +187834,15 @@ async function kit_init(page2) {
|
|
|
187770
187834
|
|
|
187771
187835
|
// src/plugin/transforms/kit/load.ts
|
|
187772
187836
|
var graphql30 = __toESM(require_graphql4(), 1);
|
|
187773
|
-
var
|
|
187774
|
-
var
|
|
187837
|
+
var recast19 = __toESM(require_main5(), 1);
|
|
187838
|
+
var AST19 = recast19.types.builders;
|
|
187775
187839
|
async function kit_load_generator(page2) {
|
|
187776
187840
|
const route = is_route(page2.config, page2.framework, page2.filepath);
|
|
187777
187841
|
const script = is_route_script(page2.framework, page2.filepath);
|
|
187778
187842
|
if (!route && !script) {
|
|
187779
187843
|
return;
|
|
187780
187844
|
}
|
|
187781
|
-
const inline_query_store = (name) => route ?
|
|
187845
|
+
const inline_query_store = (name) => route ? AST19.memberExpression(AST19.identifier("data"), AST19.identifier(name)) : artifact_import({
|
|
187782
187846
|
config: page2.config,
|
|
187783
187847
|
script: page2.script,
|
|
187784
187848
|
page: page2,
|
|
@@ -187829,8 +187893,8 @@ async function kit_load_generator(page2) {
|
|
|
187829
187893
|
find_insert_index(page2.script),
|
|
187830
187894
|
0,
|
|
187831
187895
|
...!has_data ? [
|
|
187832
|
-
|
|
187833
|
-
|
|
187896
|
+
AST19.exportNamedDeclaration(
|
|
187897
|
+
AST19.variableDeclaration("let", [AST19.identifier("data")])
|
|
187834
187898
|
)
|
|
187835
187899
|
] : []
|
|
187836
187900
|
);
|
|
@@ -187877,43 +187941,43 @@ function add_load({
|
|
|
187877
187941
|
let before_load = page_info.exports.includes(houdini_before_load_fn);
|
|
187878
187942
|
let afterLoad = page_info.exports.includes(houdini_afterLoad_fn);
|
|
187879
187943
|
let on_error = page_info.exports.includes(houdini_on_error_fn);
|
|
187880
|
-
const request_context =
|
|
187881
|
-
const promise_list =
|
|
187882
|
-
const return_value =
|
|
187883
|
-
const result_obj =
|
|
187884
|
-
const input_obj =
|
|
187885
|
-
const preload_fn =
|
|
187886
|
-
|
|
187887
|
-
[
|
|
187888
|
-
|
|
187889
|
-
|
|
187890
|
-
|
|
187944
|
+
const request_context = AST19.identifier("houdini_context");
|
|
187945
|
+
const promise_list = AST19.identifier("promises");
|
|
187946
|
+
const return_value = AST19.memberExpression(request_context, AST19.identifier("returnValue"));
|
|
187947
|
+
const result_obj = AST19.identifier("result");
|
|
187948
|
+
const input_obj = AST19.identifier("inputs");
|
|
187949
|
+
const preload_fn = AST19.functionDeclaration(
|
|
187950
|
+
AST19.identifier("load"),
|
|
187951
|
+
[AST19.identifier("context")],
|
|
187952
|
+
AST19.blockStatement([
|
|
187953
|
+
AST19.variableDeclaration("const", [
|
|
187954
|
+
AST19.variableDeclarator(
|
|
187891
187955
|
request_context,
|
|
187892
|
-
|
|
187956
|
+
AST19.newExpression(AST19.identifier("RequestContext"), [AST19.identifier("context")])
|
|
187893
187957
|
)
|
|
187894
187958
|
]),
|
|
187895
|
-
|
|
187896
|
-
|
|
187897
|
-
|
|
187898
|
-
|
|
187959
|
+
AST19.variableDeclaration("const", [
|
|
187960
|
+
AST19.variableDeclarator(
|
|
187961
|
+
AST19.identifier("houdiniConfig"),
|
|
187962
|
+
AST19.callExpression(AST19.identifier("getCurrentConfig"), [])
|
|
187899
187963
|
)
|
|
187900
187964
|
]),
|
|
187901
|
-
|
|
187902
|
-
|
|
187965
|
+
AST19.variableDeclaration("const", [
|
|
187966
|
+
AST19.variableDeclarator(promise_list, AST19.arrayExpression([]))
|
|
187903
187967
|
]),
|
|
187904
|
-
|
|
187905
|
-
|
|
187968
|
+
AST19.variableDeclaration("const", [
|
|
187969
|
+
AST19.variableDeclarator(input_obj, AST19.objectExpression([]))
|
|
187906
187970
|
]),
|
|
187907
|
-
|
|
187908
|
-
|
|
187909
|
-
|
|
187910
|
-
|
|
187971
|
+
AST19.returnStatement(
|
|
187972
|
+
AST19.objectExpression([
|
|
187973
|
+
AST19.spreadElement(return_value),
|
|
187974
|
+
AST19.spreadElement(result_obj)
|
|
187911
187975
|
])
|
|
187912
187976
|
)
|
|
187913
187977
|
])
|
|
187914
187978
|
);
|
|
187915
187979
|
preload_fn.async = true;
|
|
187916
|
-
page2.script.body.push(
|
|
187980
|
+
page2.script.body.push(AST19.exportNamedDeclaration(preload_fn));
|
|
187917
187981
|
let insert_index = 4;
|
|
187918
187982
|
for (const query3 of queries) {
|
|
187919
187983
|
const { ids } = ensure_imports({
|
|
@@ -187923,19 +187987,19 @@ function add_load({
|
|
|
187923
187987
|
sourceModule: store_import_path({ config: page2.config, name: query3.name.value })
|
|
187924
187988
|
});
|
|
187925
187989
|
const load_fn = ids[0];
|
|
187926
|
-
const variables = (query3.variableDefinitions?.length ?? 0) > 0 ?
|
|
187927
|
-
|
|
187928
|
-
|
|
187929
|
-
|
|
187990
|
+
const variables = (query3.variableDefinitions?.length ?? 0) > 0 ? AST19.awaitExpression(
|
|
187991
|
+
AST19.callExpression(AST19.identifier(__variable_fn_name(query3.name.value)), [
|
|
187992
|
+
AST19.identifier("houdiniConfig"),
|
|
187993
|
+
AST19.identifier("context")
|
|
187930
187994
|
])
|
|
187931
|
-
) :
|
|
187995
|
+
) : AST19.objectExpression([]);
|
|
187932
187996
|
preload_fn.body.body.splice(
|
|
187933
187997
|
insert_index++,
|
|
187934
187998
|
0,
|
|
187935
|
-
|
|
187936
|
-
|
|
187999
|
+
AST19.expressionStatement(
|
|
188000
|
+
AST19.assignmentExpression(
|
|
187937
188001
|
"=",
|
|
187938
|
-
|
|
188002
|
+
AST19.memberExpression(input_obj, AST19.literal(query3.name.value)),
|
|
187939
188003
|
variables
|
|
187940
188004
|
)
|
|
187941
188005
|
)
|
|
@@ -187943,18 +188007,18 @@ function add_load({
|
|
|
187943
188007
|
preload_fn.body.body.splice(
|
|
187944
188008
|
insert_index++,
|
|
187945
188009
|
0,
|
|
187946
|
-
|
|
187947
|
-
|
|
187948
|
-
|
|
187949
|
-
|
|
187950
|
-
|
|
187951
|
-
|
|
187952
|
-
|
|
188010
|
+
AST19.expressionStatement(
|
|
188011
|
+
AST19.callExpression(AST19.memberExpression(promise_list, AST19.identifier("push")), [
|
|
188012
|
+
AST19.callExpression(load_fn, [
|
|
188013
|
+
AST19.objectExpression([
|
|
188014
|
+
AST19.objectProperty(
|
|
188015
|
+
AST19.literal("variables"),
|
|
188016
|
+
AST19.memberExpression(input_obj, AST19.literal(query3.name.value))
|
|
187953
188017
|
),
|
|
187954
|
-
|
|
187955
|
-
|
|
187956
|
-
|
|
187957
|
-
afterLoad || on_error ?
|
|
188018
|
+
AST19.objectProperty(AST19.literal("event"), AST19.identifier("context")),
|
|
188019
|
+
AST19.objectProperty(
|
|
188020
|
+
AST19.literal("blocking"),
|
|
188021
|
+
afterLoad || on_error ? AST19.booleanLiteral(true) : AST19.identifier("undefined")
|
|
187958
188022
|
)
|
|
187959
188023
|
])
|
|
187960
188024
|
])
|
|
@@ -187966,28 +188030,28 @@ function add_load({
|
|
|
187966
188030
|
preload_fn.body.body.splice(
|
|
187967
188031
|
insert_index++,
|
|
187968
188032
|
0,
|
|
187969
|
-
|
|
187970
|
-
|
|
188033
|
+
AST19.variableDeclaration("let", [
|
|
188034
|
+
AST19.variableDeclarator(result_obj, AST19.objectExpression([]))
|
|
187971
188035
|
]),
|
|
187972
|
-
|
|
187973
|
-
|
|
187974
|
-
|
|
187975
|
-
|
|
188036
|
+
AST19.tryStatement(
|
|
188037
|
+
AST19.blockStatement([
|
|
188038
|
+
AST19.expressionStatement(
|
|
188039
|
+
AST19.assignmentExpression(
|
|
187976
188040
|
"=",
|
|
187977
188041
|
result_obj,
|
|
187978
|
-
|
|
187979
|
-
|
|
187980
|
-
|
|
187981
|
-
|
|
188042
|
+
AST19.callExpression(
|
|
188043
|
+
AST19.memberExpression(
|
|
188044
|
+
AST19.identifier("Object"),
|
|
188045
|
+
AST19.identifier("assign")
|
|
187982
188046
|
),
|
|
187983
188047
|
[
|
|
187984
|
-
|
|
187985
|
-
|
|
187986
|
-
|
|
187987
|
-
|
|
187988
|
-
|
|
187989
|
-
|
|
187990
|
-
|
|
188048
|
+
AST19.objectExpression([]),
|
|
188049
|
+
AST19.spreadElement(
|
|
188050
|
+
AST19.awaitExpression(
|
|
188051
|
+
AST19.callExpression(
|
|
188052
|
+
AST19.memberExpression(
|
|
188053
|
+
AST19.identifier("Promise"),
|
|
188054
|
+
AST19.identifier("all")
|
|
187991
188055
|
),
|
|
187992
188056
|
[promise_list]
|
|
187993
188057
|
)
|
|
@@ -187998,37 +188062,37 @@ function add_load({
|
|
|
187998
188062
|
)
|
|
187999
188063
|
)
|
|
188000
188064
|
]),
|
|
188001
|
-
|
|
188002
|
-
|
|
188065
|
+
AST19.catchClause(
|
|
188066
|
+
AST19.identifier("err"),
|
|
188003
188067
|
null,
|
|
188004
|
-
|
|
188005
|
-
on_error ?
|
|
188006
|
-
|
|
188007
|
-
|
|
188008
|
-
|
|
188068
|
+
AST19.blockStatement([
|
|
188069
|
+
on_error ? AST19.expressionStatement(
|
|
188070
|
+
AST19.awaitExpression(
|
|
188071
|
+
AST19.callExpression(
|
|
188072
|
+
AST19.memberExpression(
|
|
188009
188073
|
request_context,
|
|
188010
|
-
|
|
188074
|
+
AST19.identifier("invokeLoadHook")
|
|
188011
188075
|
),
|
|
188012
188076
|
[
|
|
188013
|
-
|
|
188014
|
-
|
|
188015
|
-
|
|
188016
|
-
|
|
188077
|
+
AST19.objectExpression([
|
|
188078
|
+
AST19.objectProperty(
|
|
188079
|
+
AST19.literal("variant"),
|
|
188080
|
+
AST19.stringLiteral("error")
|
|
188017
188081
|
),
|
|
188018
|
-
|
|
188019
|
-
|
|
188020
|
-
|
|
188082
|
+
AST19.objectProperty(
|
|
188083
|
+
AST19.literal("hookFn"),
|
|
188084
|
+
AST19.identifier(houdini_on_error_fn)
|
|
188021
188085
|
),
|
|
188022
|
-
|
|
188023
|
-
|
|
188024
|
-
|
|
188086
|
+
AST19.objectProperty(
|
|
188087
|
+
AST19.literal("error"),
|
|
188088
|
+
AST19.identifier("err")
|
|
188025
188089
|
),
|
|
188026
|
-
|
|
188090
|
+
AST19.objectProperty(AST19.literal("input"), input_obj)
|
|
188027
188091
|
])
|
|
188028
188092
|
]
|
|
188029
188093
|
)
|
|
188030
188094
|
)
|
|
188031
|
-
) :
|
|
188095
|
+
) : AST19.throwStatement(AST19.identifier("err"))
|
|
188032
188096
|
])
|
|
188033
188097
|
)
|
|
188034
188098
|
)
|
|
@@ -188063,22 +188127,22 @@ async function find_special_query(type, page2) {
|
|
|
188063
188127
|
return definition;
|
|
188064
188128
|
}
|
|
188065
188129
|
function load_hook_statements(name, request_context, input_id, result_id) {
|
|
188066
|
-
return
|
|
188067
|
-
|
|
188068
|
-
|
|
188069
|
-
|
|
188130
|
+
return AST19.expressionStatement(
|
|
188131
|
+
AST19.awaitExpression(
|
|
188132
|
+
AST19.callExpression(
|
|
188133
|
+
AST19.memberExpression(request_context, AST19.identifier("invokeLoadHook")),
|
|
188070
188134
|
[
|
|
188071
|
-
|
|
188072
|
-
|
|
188073
|
-
|
|
188074
|
-
|
|
188075
|
-
|
|
188135
|
+
AST19.objectExpression([
|
|
188136
|
+
AST19.objectProperty(AST19.literal("variant"), AST19.stringLiteral(name)),
|
|
188137
|
+
AST19.objectProperty(
|
|
188138
|
+
AST19.literal("hookFn"),
|
|
188139
|
+
AST19.identifier(
|
|
188076
188140
|
name === "before" ? houdini_before_load_fn : houdini_afterLoad_fn
|
|
188077
188141
|
)
|
|
188078
188142
|
),
|
|
188079
188143
|
...name === "after" ? [
|
|
188080
|
-
|
|
188081
|
-
|
|
188144
|
+
AST19.objectProperty(AST19.literal("input"), input_id),
|
|
188145
|
+
AST19.objectProperty(AST19.literal("data"), result_id)
|
|
188082
188146
|
] : []
|
|
188083
188147
|
])
|
|
188084
188148
|
]
|
|
@@ -188139,22 +188203,22 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
188139
188203
|
};
|
|
188140
188204
|
}
|
|
188141
188205
|
const fn_body = [
|
|
188142
|
-
|
|
188143
|
-
|
|
188144
|
-
|
|
188145
|
-
|
|
188206
|
+
AST19.variableDeclaration("const", [
|
|
188207
|
+
AST19.variableDeclarator(
|
|
188208
|
+
AST19.identifier("result"),
|
|
188209
|
+
AST19.objectExpression(
|
|
188146
188210
|
Object.entries(has_args).map(
|
|
188147
|
-
([arg, type]) =>
|
|
188148
|
-
|
|
188149
|
-
|
|
188150
|
-
|
|
188151
|
-
|
|
188152
|
-
|
|
188153
|
-
|
|
188154
|
-
|
|
188155
|
-
|
|
188211
|
+
([arg, type]) => AST19.objectProperty(
|
|
188212
|
+
AST19.identifier(arg),
|
|
188213
|
+
AST19.callExpression(AST19.identifier("parseScalar"), [
|
|
188214
|
+
AST19.identifier("config"),
|
|
188215
|
+
AST19.stringLiteral(type),
|
|
188216
|
+
AST19.memberExpression(
|
|
188217
|
+
AST19.memberExpression(
|
|
188218
|
+
AST19.identifier("event"),
|
|
188219
|
+
AST19.identifier("params")
|
|
188156
188220
|
),
|
|
188157
|
-
|
|
188221
|
+
AST19.identifier(arg)
|
|
188158
188222
|
)
|
|
188159
188223
|
])
|
|
188160
188224
|
)
|
|
@@ -188165,28 +188229,28 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
188165
188229
|
];
|
|
188166
188230
|
if (has_local) {
|
|
188167
188231
|
fn_body.push(
|
|
188168
|
-
|
|
188169
|
-
|
|
188170
|
-
|
|
188232
|
+
AST19.expressionStatement(
|
|
188233
|
+
AST19.callExpression(
|
|
188234
|
+
AST19.memberExpression(AST19.identifier("Object"), AST19.identifier("assign")),
|
|
188171
188235
|
[
|
|
188172
|
-
|
|
188173
|
-
|
|
188174
|
-
|
|
188175
|
-
|
|
188176
|
-
|
|
188177
|
-
|
|
188236
|
+
AST19.identifier("result"),
|
|
188237
|
+
AST19.callExpression(AST19.identifier("marshalInputs"), [
|
|
188238
|
+
AST19.objectExpression([
|
|
188239
|
+
AST19.objectProperty(
|
|
188240
|
+
AST19.identifier("config"),
|
|
188241
|
+
AST19.identifier("config")
|
|
188178
188242
|
),
|
|
188179
|
-
|
|
188180
|
-
|
|
188181
|
-
|
|
188182
|
-
|
|
188183
|
-
|
|
188184
|
-
[
|
|
188243
|
+
AST19.objectProperty(
|
|
188244
|
+
AST19.identifier("input"),
|
|
188245
|
+
AST19.awaitExpression(
|
|
188246
|
+
AST19.callExpression(
|
|
188247
|
+
AST19.identifier(query_variable_fn(query3.name.value)),
|
|
188248
|
+
[AST19.identifier("event")]
|
|
188185
188249
|
)
|
|
188186
188250
|
)
|
|
188187
188251
|
),
|
|
188188
|
-
|
|
188189
|
-
|
|
188252
|
+
AST19.objectProperty(
|
|
188253
|
+
AST19.identifier("artifact"),
|
|
188190
188254
|
artifact_import({
|
|
188191
188255
|
config: page2.config,
|
|
188192
188256
|
script: page2.script,
|
|
@@ -188201,11 +188265,11 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
188201
188265
|
)
|
|
188202
188266
|
);
|
|
188203
188267
|
}
|
|
188204
|
-
fn_body.push(
|
|
188205
|
-
const declaration =
|
|
188206
|
-
|
|
188207
|
-
[
|
|
188208
|
-
|
|
188268
|
+
fn_body.push(AST19.returnStatement(AST19.identifier("result")));
|
|
188269
|
+
const declaration = AST19.functionDeclaration(
|
|
188270
|
+
AST19.identifier(__variable_fn_name(query3.name.value)),
|
|
188271
|
+
[AST19.identifier("config"), AST19.identifier("event")],
|
|
188272
|
+
AST19.blockStatement(fn_body)
|
|
188209
188273
|
);
|
|
188210
188274
|
declaration.async = true;
|
|
188211
188275
|
return declaration;
|
|
@@ -188215,8 +188279,8 @@ function __variable_fn_name(name) {
|
|
|
188215
188279
|
}
|
|
188216
188280
|
|
|
188217
188281
|
// src/plugin/transforms/kit/session.ts
|
|
188218
|
-
var
|
|
188219
|
-
var
|
|
188282
|
+
var recast20 = __toESM(require_main5(), 1);
|
|
188283
|
+
var AST20 = recast20.types.builders;
|
|
188220
188284
|
function session_default(page2) {
|
|
188221
188285
|
if (is_root_layout_server(page2.config, page2.filepath)) {
|
|
188222
188286
|
process_root_layout_server(page2);
|
|
@@ -188232,12 +188296,12 @@ function process_root_layout_server(page2) {
|
|
|
188232
188296
|
sourceModule: "$houdini/plugins/houdini-svelte/runtime/session"
|
|
188233
188297
|
}).ids[0];
|
|
188234
188298
|
add_load_return(page2, (event_id) => [
|
|
188235
|
-
|
|
188299
|
+
AST20.spreadElement(AST20.callExpression(build_session_object, [event_id]))
|
|
188236
188300
|
]);
|
|
188237
188301
|
}
|
|
188238
188302
|
function process_root_layout_script(page2) {
|
|
188239
188303
|
add_load_return(page2, (event_id) => [
|
|
188240
|
-
|
|
188304
|
+
AST20.spreadElement(AST20.memberExpression(event_id, AST20.identifier("data")))
|
|
188241
188305
|
]);
|
|
188242
188306
|
}
|
|
188243
188307
|
function add_load_return(page2, properties) {
|
|
@@ -188249,48 +188313,48 @@ function add_load_return(page2, properties) {
|
|
|
188249
188313
|
if (return_statement_index !== -1) {
|
|
188250
188314
|
return_statement = body.body[return_statement_index];
|
|
188251
188315
|
} else {
|
|
188252
|
-
return_statement =
|
|
188316
|
+
return_statement = AST20.returnStatement(AST20.objectExpression([]));
|
|
188253
188317
|
body.body.push(return_statement);
|
|
188254
188318
|
return_statement_index = body.body.length - 1;
|
|
188255
188319
|
}
|
|
188256
|
-
const local_return_var =
|
|
188257
|
-
body.body[return_statement_index] =
|
|
188258
|
-
|
|
188320
|
+
const local_return_var = AST20.identifier("__houdini__vite__plugin__return__value__");
|
|
188321
|
+
body.body[return_statement_index] = AST20.variableDeclaration("const", [
|
|
188322
|
+
AST20.variableDeclarator(local_return_var, return_statement.argument)
|
|
188259
188323
|
]);
|
|
188260
188324
|
body.body.splice(
|
|
188261
188325
|
return_statement_index + 1,
|
|
188262
188326
|
0,
|
|
188263
|
-
|
|
188264
|
-
|
|
188327
|
+
AST20.returnStatement(
|
|
188328
|
+
AST20.objectExpression([...properties(event_id), AST20.spreadElement(local_return_var)])
|
|
188265
188329
|
)
|
|
188266
188330
|
);
|
|
188267
188331
|
});
|
|
188268
188332
|
}
|
|
188269
188333
|
function modify_load(page2, cb) {
|
|
188270
188334
|
let load_fn = find_exported_fn(page2.script.body, "load");
|
|
188271
|
-
let event_id =
|
|
188272
|
-
let body =
|
|
188335
|
+
let event_id = AST20.identifier("event");
|
|
188336
|
+
let body = AST20.blockStatement([]);
|
|
188273
188337
|
if (load_fn?.type === "ArrowFunctionExpression") {
|
|
188274
188338
|
if (load_fn.body.type === "BlockStatement") {
|
|
188275
188339
|
body = load_fn.body;
|
|
188276
188340
|
} else {
|
|
188277
|
-
body =
|
|
188341
|
+
body = AST20.blockStatement([AST20.returnStatement(load_fn.body)]);
|
|
188278
188342
|
load_fn.body = body;
|
|
188279
188343
|
}
|
|
188280
188344
|
} else if (load_fn) {
|
|
188281
188345
|
body = load_fn.body;
|
|
188282
188346
|
}
|
|
188283
188347
|
if (!load_fn) {
|
|
188284
|
-
load_fn =
|
|
188285
|
-
|
|
188348
|
+
load_fn = AST20.functionDeclaration(
|
|
188349
|
+
AST20.identifier("load"),
|
|
188286
188350
|
[event_id],
|
|
188287
|
-
|
|
188351
|
+
AST20.blockStatement([])
|
|
188288
188352
|
);
|
|
188289
188353
|
load_fn.async = true;
|
|
188290
188354
|
page2.script.body.splice(
|
|
188291
188355
|
find_insert_index(page2.script),
|
|
188292
188356
|
0,
|
|
188293
|
-
|
|
188357
|
+
AST20.exportNamedDeclaration(load_fn)
|
|
188294
188358
|
);
|
|
188295
188359
|
body = load_fn.body;
|
|
188296
188360
|
} else {
|
|
@@ -188302,7 +188366,7 @@ function modify_load(page2, cb) {
|
|
|
188302
188366
|
const pattern = load_fn.params[0];
|
|
188303
188367
|
load_fn.params[0] = event_id;
|
|
188304
188368
|
body.body.unshift(
|
|
188305
|
-
|
|
188369
|
+
AST20.variableDeclaration("let", [AST20.variableDeclarator(pattern, event_id)])
|
|
188306
188370
|
);
|
|
188307
188371
|
} else {
|
|
188308
188372
|
throw new Error(
|
|
@@ -188323,8 +188387,8 @@ async function SvelteKitProcessor(config4, page2) {
|
|
|
188323
188387
|
}
|
|
188324
188388
|
|
|
188325
188389
|
// src/plugin/transforms/tags.ts
|
|
188326
|
-
var
|
|
188327
|
-
var
|
|
188390
|
+
var recast21 = __toESM(require_main5(), 1);
|
|
188391
|
+
var AST21 = recast21.types.builders;
|
|
188328
188392
|
async function GraphQLTagProcessor(config4, page2) {
|
|
188329
188393
|
await find_graphql(config4, page2.script, {
|
|
188330
188394
|
dependency: page2.watch_file,
|
|
@@ -188332,7 +188396,7 @@ async function GraphQLTagProcessor(config4, page2) {
|
|
|
188332
188396
|
const { node: node2, parsedDocument } = tag2;
|
|
188333
188397
|
const operation = config4.extractDefinition(parsedDocument);
|
|
188334
188398
|
const { id: id2 } = store_import({ page: page2, artifact: { name: operation.name.value } });
|
|
188335
|
-
node2.replaceWith(
|
|
188399
|
+
node2.replaceWith(AST21.newExpression(id2, []));
|
|
188336
188400
|
}
|
|
188337
188401
|
});
|
|
188338
188402
|
}
|
|
@@ -188349,7 +188413,7 @@ async function apply_transforms(framework2, page2) {
|
|
|
188349
188413
|
script = res.script;
|
|
188350
188414
|
position = res.position;
|
|
188351
188415
|
} else {
|
|
188352
|
-
script =
|
|
188416
|
+
script = recast23.types.builders.program([]);
|
|
188353
188417
|
position = { start: 0, end: 0 };
|
|
188354
188418
|
}
|
|
188355
188419
|
} else {
|