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