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
|
@@ -90471,6 +90471,9 @@ var GarbageCollector = class {
|
|
|
90471
90471
|
constructor(cache) {
|
|
90472
90472
|
this.cache = cache;
|
|
90473
90473
|
}
|
|
90474
|
+
reset() {
|
|
90475
|
+
this.lifetimes.clear();
|
|
90476
|
+
}
|
|
90474
90477
|
resetLifetime(id2, field) {
|
|
90475
90478
|
if (!this.lifetimes.get(id2)) {
|
|
90476
90479
|
this.lifetimes.set(id2, /* @__PURE__ */ new Map());
|
|
@@ -90588,6 +90591,10 @@ var ListManager = class {
|
|
|
90588
90591
|
}
|
|
90589
90592
|
this.listsByField.get(parentID).delete(field);
|
|
90590
90593
|
}
|
|
90594
|
+
reset() {
|
|
90595
|
+
this.lists.clear();
|
|
90596
|
+
this.listsByField.clear();
|
|
90597
|
+
}
|
|
90591
90598
|
};
|
|
90592
90599
|
var List = class {
|
|
90593
90600
|
recordID;
|
|
@@ -90968,6 +90975,9 @@ var StaleManager = class {
|
|
|
90968
90975
|
}
|
|
90969
90976
|
}
|
|
90970
90977
|
}
|
|
90978
|
+
reset() {
|
|
90979
|
+
this.fieldsTime.clear();
|
|
90980
|
+
}
|
|
90971
90981
|
};
|
|
90972
90982
|
var InMemoryStorage = class {
|
|
90973
90983
|
data;
|
|
@@ -91146,6 +91156,9 @@ var InMemoryStorage = class {
|
|
|
91146
91156
|
layer.fields = fields;
|
|
91147
91157
|
layer.links = links;
|
|
91148
91158
|
}
|
|
91159
|
+
reset() {
|
|
91160
|
+
this.data = [];
|
|
91161
|
+
}
|
|
91149
91162
|
};
|
|
91150
91163
|
var Layer = class {
|
|
91151
91164
|
id;
|
|
@@ -91587,6 +91600,18 @@ var InMemorySubscriptions = class {
|
|
|
91587
91600
|
this.remove(linkedRecordID, linkFields, targets, visited);
|
|
91588
91601
|
}
|
|
91589
91602
|
}
|
|
91603
|
+
reset() {
|
|
91604
|
+
const subscribers = Object.entries(this.subscribers).filter(
|
|
91605
|
+
([id2]) => !id2.startsWith(rootID)
|
|
91606
|
+
);
|
|
91607
|
+
for (const [id2, _fields] of subscribers) {
|
|
91608
|
+
delete this.subscribers[id2];
|
|
91609
|
+
}
|
|
91610
|
+
const subscriptionSpecs = subscribers.flatMap(
|
|
91611
|
+
([_id, fields]) => Object.values(fields).flatMap((field) => field.map(([spec]) => spec))
|
|
91612
|
+
);
|
|
91613
|
+
return subscriptionSpecs;
|
|
91614
|
+
}
|
|
91590
91615
|
removeSubscribers(id2, fieldName, specs) {
|
|
91591
91616
|
let targets = [];
|
|
91592
91617
|
for (const spec of specs) {
|
|
@@ -91774,6 +91799,14 @@ var Cache = class {
|
|
|
91774
91799
|
}
|
|
91775
91800
|
this.#notifySubscribers(toNotify);
|
|
91776
91801
|
}
|
|
91802
|
+
reset() {
|
|
91803
|
+
const subSpecs = this._internal_unstable.subscriptions.reset();
|
|
91804
|
+
this._internal_unstable.staleManager.reset();
|
|
91805
|
+
this._internal_unstable.lifetimes.reset();
|
|
91806
|
+
this._internal_unstable.lists.reset();
|
|
91807
|
+
this._internal_unstable.storage.reset();
|
|
91808
|
+
this.#notifySubscribers(subSpecs);
|
|
91809
|
+
}
|
|
91777
91810
|
#notifySubscribers(subs) {
|
|
91778
91811
|
if (subs.length === 0) {
|
|
91779
91812
|
return;
|
|
@@ -91923,12 +91956,9 @@ var CacheInternal = class {
|
|
|
91923
91956
|
);
|
|
91924
91957
|
}
|
|
91925
91958
|
}
|
|
91926
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
91927
|
-
(field2) => typeof value2[field2] === "undefined"
|
|
91928
|
-
).length > 0;
|
|
91929
91959
|
let linkedID = null;
|
|
91930
91960
|
if (value2 !== null) {
|
|
91931
|
-
linkedID = !
|
|
91961
|
+
linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
|
|
91932
91962
|
}
|
|
91933
91963
|
let linkChange = linkedID !== previousValue;
|
|
91934
91964
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -91956,7 +91986,7 @@ var CacheInternal = class {
|
|
|
91956
91986
|
forceNotify
|
|
91957
91987
|
});
|
|
91958
91988
|
}
|
|
91959
|
-
} else if (Array.isArray(value2) && (typeof previousValue === "undefined" || Array.isArray(previousValue))) {
|
|
91989
|
+
} else if (Array.isArray(value2) && (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
|
|
91960
91990
|
let oldIDs = [...previousValue || []];
|
|
91961
91991
|
const emptyEdges = !updates ? [] : oldIDs.map((id2) => {
|
|
91962
91992
|
if (!id2) {
|
|
@@ -92029,7 +92059,7 @@ var CacheInternal = class {
|
|
|
92029
92059
|
} else {
|
|
92030
92060
|
linkedIDs = nestedIDs;
|
|
92031
92061
|
}
|
|
92032
|
-
const contentChanged = !deepEquals(linkedIDs, oldIDs);
|
|
92062
|
+
const contentChanged = !deepEquals(linkedIDs, oldIDs) || previousValue === null;
|
|
92033
92063
|
if (contentChanged || forceNotify) {
|
|
92034
92064
|
toNotify.push(...currentSubscribers);
|
|
92035
92065
|
}
|
|
@@ -92300,6 +92330,10 @@ var CacheInternal = class {
|
|
|
92300
92330
|
computeID(type, data2) {
|
|
92301
92331
|
return computeID(this.config, type, data2);
|
|
92302
92332
|
}
|
|
92333
|
+
isEmbedded(linkedType, value2) {
|
|
92334
|
+
const idFields = this.idFields(linkedType);
|
|
92335
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
|
|
92336
|
+
}
|
|
92303
92337
|
hydrateNestedList({
|
|
92304
92338
|
fields,
|
|
92305
92339
|
variables,
|
|
@@ -92407,9 +92441,6 @@ var CacheInternal = class {
|
|
|
92407
92441
|
}
|
|
92408
92442
|
const entryObj = entry;
|
|
92409
92443
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
92410
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
92411
|
-
(field) => typeof entry[field] === "undefined"
|
|
92412
|
-
).length > 0;
|
|
92413
92444
|
let innerType = linkedType;
|
|
92414
92445
|
const typename = entryObj.__typename;
|
|
92415
92446
|
if (typename) {
|
|
@@ -92417,7 +92448,7 @@ var CacheInternal = class {
|
|
|
92417
92448
|
} else if (abstract) {
|
|
92418
92449
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
92419
92450
|
}
|
|
92420
|
-
if (!
|
|
92451
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
92421
92452
|
const id2 = this.id(innerType, entry);
|
|
92422
92453
|
if (id2) {
|
|
92423
92454
|
linkedID = id2;
|
|
@@ -99113,12 +99144,12 @@ var require_parser4 = __commonJS3({
|
|
|
99113
99144
|
return [];
|
|
99114
99145
|
}
|
|
99115
99146
|
if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {
|
|
99116
|
-
var
|
|
99147
|
+
var types18 = [];
|
|
99117
99148
|
this.expectOptionalToken(_tokenKind.TokenKind.AMP);
|
|
99118
99149
|
do {
|
|
99119
|
-
|
|
99150
|
+
types18.push(this.parseNamedType());
|
|
99120
99151
|
} while (this.expectOptionalToken(_tokenKind.TokenKind.AMP) || this.peek(_tokenKind.TokenKind.NAME));
|
|
99121
|
-
return
|
|
99152
|
+
return types18;
|
|
99122
99153
|
}
|
|
99123
99154
|
return this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType);
|
|
99124
99155
|
};
|
|
@@ -99197,13 +99228,13 @@ var require_parser4 = __commonJS3({
|
|
|
99197
99228
|
this.expectKeyword("union");
|
|
99198
99229
|
var name = this.parseName();
|
|
99199
99230
|
var directives = this.parseDirectives(true);
|
|
99200
|
-
var
|
|
99231
|
+
var types18 = this.parseUnionMemberTypes();
|
|
99201
99232
|
return {
|
|
99202
99233
|
kind: _kinds.Kind.UNION_TYPE_DEFINITION,
|
|
99203
99234
|
description,
|
|
99204
99235
|
name,
|
|
99205
99236
|
directives,
|
|
99206
|
-
types:
|
|
99237
|
+
types: types18,
|
|
99207
99238
|
loc: this.loc(start)
|
|
99208
99239
|
};
|
|
99209
99240
|
};
|
|
@@ -99361,15 +99392,15 @@ var require_parser4 = __commonJS3({
|
|
|
99361
99392
|
this.expectKeyword("union");
|
|
99362
99393
|
var name = this.parseName();
|
|
99363
99394
|
var directives = this.parseDirectives(true);
|
|
99364
|
-
var
|
|
99365
|
-
if (directives.length === 0 &&
|
|
99395
|
+
var types18 = this.parseUnionMemberTypes();
|
|
99396
|
+
if (directives.length === 0 && types18.length === 0) {
|
|
99366
99397
|
throw this.unexpected();
|
|
99367
99398
|
}
|
|
99368
99399
|
return {
|
|
99369
99400
|
kind: _kinds.Kind.UNION_TYPE_EXTENSION,
|
|
99370
99401
|
name,
|
|
99371
99402
|
directives,
|
|
99372
|
-
types:
|
|
99403
|
+
types: types18,
|
|
99373
99404
|
loc: this.loc(start)
|
|
99374
99405
|
};
|
|
99375
99406
|
};
|
|
@@ -100317,8 +100348,8 @@ var require_printer4 = __commonJS3({
|
|
|
100317
100348
|
return join32(["interface", name, wrap22("implements ", join32(interfaces, " & ")), join32(directives, " "), block22(fields)], " ");
|
|
100318
100349
|
}),
|
|
100319
100350
|
UnionTypeDefinition: addDescription22(function(_ref27) {
|
|
100320
|
-
var name = _ref27.name, directives = _ref27.directives,
|
|
100321
|
-
return join32(["union", name, join32(directives, " "),
|
|
100351
|
+
var name = _ref27.name, directives = _ref27.directives, types18 = _ref27.types;
|
|
100352
|
+
return join32(["union", name, join32(directives, " "), types18 && types18.length !== 0 ? "= " + join32(types18, " | ") : ""], " ");
|
|
100322
100353
|
}),
|
|
100323
100354
|
EnumTypeDefinition: addDescription22(function(_ref28) {
|
|
100324
100355
|
var name = _ref28.name, directives = _ref28.directives, values = _ref28.values;
|
|
@@ -100353,8 +100384,8 @@ var require_printer4 = __commonJS3({
|
|
|
100353
100384
|
return join32(["extend interface", name, wrap22("implements ", join32(interfaces, " & ")), join32(directives, " "), block22(fields)], " ");
|
|
100354
100385
|
},
|
|
100355
100386
|
UnionTypeExtension: function UnionTypeExtension(_ref36) {
|
|
100356
|
-
var name = _ref36.name, directives = _ref36.directives,
|
|
100357
|
-
return join32(["extend union", name, join32(directives, " "),
|
|
100387
|
+
var name = _ref36.name, directives = _ref36.directives, types18 = _ref36.types;
|
|
100388
|
+
return join32(["extend union", name, join32(directives, " "), types18 && types18.length !== 0 ? "= " + join32(types18, " | ") : ""], " ");
|
|
100358
100389
|
},
|
|
100359
100390
|
EnumTypeExtension: function EnumTypeExtension(_ref37) {
|
|
100360
100391
|
var name = _ref37.name, directives = _ref37.directives, values = _ref37.values;
|
|
@@ -101021,9 +101052,9 @@ var require_definition3 = __commonJS3({
|
|
|
101021
101052
|
exports.GraphQLUnionType = GraphQLUnionType3;
|
|
101022
101053
|
(0, _defineInspect.default)(GraphQLUnionType3);
|
|
101023
101054
|
function defineTypes(config4) {
|
|
101024
|
-
var
|
|
101025
|
-
Array.isArray(
|
|
101026
|
-
return
|
|
101055
|
+
var types18 = resolveThunk(config4.types);
|
|
101056
|
+
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, "."));
|
|
101057
|
+
return types18;
|
|
101027
101058
|
}
|
|
101028
101059
|
var GraphQLEnumType4 = /* @__PURE__ */ function() {
|
|
101029
101060
|
function GraphQLEnumType5(config4) {
|
|
@@ -108506,7 +108537,7 @@ var require_buildClientSchema3 = __commonJS3({
|
|
|
108506
108537
|
return new _definition.GraphQLUnionType({
|
|
108507
108538
|
name: unionIntrospection.name,
|
|
108508
108539
|
description: unionIntrospection.description,
|
|
108509
|
-
types: function
|
|
108540
|
+
types: function types18() {
|
|
108510
108541
|
return unionIntrospection.possibleTypes.map(getObjectType);
|
|
108511
108542
|
}
|
|
108512
108543
|
});
|
|
@@ -108849,7 +108880,7 @@ var require_extendSchema3 = __commonJS3({
|
|
|
108849
108880
|
var config4 = type.toConfig();
|
|
108850
108881
|
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config4.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
108851
108882
|
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config4), {}, {
|
|
108852
|
-
types: function
|
|
108883
|
+
types: function types18() {
|
|
108853
108884
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
108854
108885
|
},
|
|
108855
108886
|
extensionASTNodes: config4.extensionASTNodes.concat(extensions)
|
|
@@ -108997,17 +109028,17 @@ var require_extendSchema3 = __commonJS3({
|
|
|
108997
109028
|
return interfaces;
|
|
108998
109029
|
}
|
|
108999
109030
|
function buildUnionTypes(nodes) {
|
|
109000
|
-
var
|
|
109031
|
+
var types18 = [];
|
|
109001
109032
|
for (var _i32 = 0; _i32 < nodes.length; _i32++) {
|
|
109002
109033
|
var _node$types;
|
|
109003
109034
|
var node2 = nodes[_i32];
|
|
109004
109035
|
var typeNodes = (_node$types = node2.types) !== null && _node$types !== void 0 ? _node$types : [];
|
|
109005
109036
|
for (var _i34 = 0; _i34 < typeNodes.length; _i34++) {
|
|
109006
109037
|
var type = typeNodes[_i34];
|
|
109007
|
-
|
|
109038
|
+
types18.push(getNamedType5(type));
|
|
109008
109039
|
}
|
|
109009
109040
|
}
|
|
109010
|
-
return
|
|
109041
|
+
return types18;
|
|
109011
109042
|
}
|
|
109012
109043
|
function buildType(astNode) {
|
|
109013
109044
|
var _typeExtensionsMap$na;
|
|
@@ -109064,7 +109095,7 @@ var require_extendSchema3 = __commonJS3({
|
|
|
109064
109095
|
return new _definition.GraphQLUnionType({
|
|
109065
109096
|
name: name2,
|
|
109066
109097
|
description,
|
|
109067
|
-
types: function
|
|
109098
|
+
types: function types18() {
|
|
109068
109099
|
return buildUnionTypes(_allNodes3);
|
|
109069
109100
|
},
|
|
109070
109101
|
astNode,
|
|
@@ -109358,7 +109389,7 @@ var require_lexicographicSortSchema3 = __commonJS3({
|
|
|
109358
109389
|
if ((0, _definition.isUnionType)(type)) {
|
|
109359
109390
|
var _config22 = type.toConfig();
|
|
109360
109391
|
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, _config22), {}, {
|
|
109361
|
-
types: function
|
|
109392
|
+
types: function types18() {
|
|
109362
109393
|
return sortTypes(_config22.types);
|
|
109363
109394
|
}
|
|
109364
109395
|
}));
|
|
@@ -109441,10 +109472,10 @@ var require_printSchema3 = __commonJS3({
|
|
|
109441
109472
|
}
|
|
109442
109473
|
function printFilteredSchema(schema, directiveFilter, typeFilter, options) {
|
|
109443
109474
|
var directives = schema.getDirectives().filter(directiveFilter);
|
|
109444
|
-
var
|
|
109475
|
+
var types18 = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter);
|
|
109445
109476
|
return [printSchemaDefinition(schema)].concat(directives.map(function(directive) {
|
|
109446
109477
|
return printDirective(directive, options);
|
|
109447
|
-
}),
|
|
109478
|
+
}), types18.map(function(type) {
|
|
109448
109479
|
return printType(type, options);
|
|
109449
109480
|
})).filter(Boolean).join("\n\n") + "\n";
|
|
109450
109481
|
}
|
|
@@ -109519,8 +109550,8 @@ var require_printSchema3 = __commonJS3({
|
|
|
109519
109550
|
return printDescription(options, type) + "interface ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);
|
|
109520
109551
|
}
|
|
109521
109552
|
function printUnion(type, options) {
|
|
109522
|
-
var
|
|
109523
|
-
var possibleTypes =
|
|
109553
|
+
var types18 = type.getTypes();
|
|
109554
|
+
var possibleTypes = types18.length ? " = " + types18.join(" | ") : "";
|
|
109524
109555
|
return printDescription(options, type) + "union " + type.name + possibleTypes;
|
|
109525
109556
|
}
|
|
109526
109557
|
function printEnum(type, options) {
|
|
@@ -124310,14 +124341,14 @@ var require_lib32 = __commonJS3({
|
|
|
124310
124341
|
this.preserveSpace = !!preserveSpace;
|
|
124311
124342
|
}
|
|
124312
124343
|
};
|
|
124313
|
-
var
|
|
124344
|
+
var types18 = {
|
|
124314
124345
|
brace: new TokContext3("{"),
|
|
124315
124346
|
j_oTag: new TokContext3("<tag"),
|
|
124316
124347
|
j_cTag: new TokContext3("</tag"),
|
|
124317
124348
|
j_expr: new TokContext3("<tag>...</tag>", true)
|
|
124318
124349
|
};
|
|
124319
124350
|
{
|
|
124320
|
-
|
|
124351
|
+
types18.template = new TokContext3("`", true);
|
|
124321
124352
|
}
|
|
124322
124353
|
var beforeExpr2 = true;
|
|
124323
124354
|
var startsExpr2 = true;
|
|
@@ -124849,17 +124880,17 @@ var require_lib32 = __commonJS3({
|
|
|
124849
124880
|
context.pop();
|
|
124850
124881
|
};
|
|
124851
124882
|
tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
|
|
124852
|
-
context.push(
|
|
124883
|
+
context.push(types18.brace);
|
|
124853
124884
|
};
|
|
124854
124885
|
tokenTypes[22].updateContext = (context) => {
|
|
124855
|
-
if (context[context.length - 1] ===
|
|
124886
|
+
if (context[context.length - 1] === types18.template) {
|
|
124856
124887
|
context.pop();
|
|
124857
124888
|
} else {
|
|
124858
|
-
context.push(
|
|
124889
|
+
context.push(types18.template);
|
|
124859
124890
|
}
|
|
124860
124891
|
};
|
|
124861
124892
|
tokenTypes[140].updateContext = (context) => {
|
|
124862
|
-
context.push(
|
|
124893
|
+
context.push(types18.j_expr, types18.j_oTag);
|
|
124863
124894
|
};
|
|
124864
124895
|
}
|
|
124865
124896
|
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";
|
|
@@ -125500,7 +125531,7 @@ var require_lib32 = __commonJS3({
|
|
|
125500
125531
|
this.lastTokEndLoc = null;
|
|
125501
125532
|
this.lastTokStartLoc = null;
|
|
125502
125533
|
this.lastTokStart = 0;
|
|
125503
|
-
this.context = [
|
|
125534
|
+
this.context = [types18.brace];
|
|
125504
125535
|
this.canStartJSXElement = true;
|
|
125505
125536
|
this.containsEsc = false;
|
|
125506
125537
|
this.firstInvalidTemplateEscapePos = null;
|
|
@@ -129424,7 +129455,7 @@ var require_lib32 = __commonJS3({
|
|
|
129424
129455
|
context
|
|
129425
129456
|
} = this.state;
|
|
129426
129457
|
const currentContext = context[context.length - 1];
|
|
129427
|
-
if (currentContext ===
|
|
129458
|
+
if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
|
|
129428
129459
|
context.pop();
|
|
129429
129460
|
}
|
|
129430
129461
|
}
|
|
@@ -130484,9 +130515,9 @@ var require_lib32 = __commonJS3({
|
|
|
130484
130515
|
switch (this.state.type) {
|
|
130485
130516
|
case 5:
|
|
130486
130517
|
node2 = this.startNode();
|
|
130487
|
-
this.setContext(
|
|
130518
|
+
this.setContext(types18.brace);
|
|
130488
130519
|
this.next();
|
|
130489
|
-
node2 = this.jsxParseExpressionContainer(node2,
|
|
130520
|
+
node2 = this.jsxParseExpressionContainer(node2, types18.j_oTag);
|
|
130490
130521
|
if (node2.expression.type === "JSXEmptyExpression") {
|
|
130491
130522
|
this.raise(JsxErrors.AttributeIsEmpty, {
|
|
130492
130523
|
at: node2
|
|
@@ -130509,7 +130540,7 @@ var require_lib32 = __commonJS3({
|
|
|
130509
130540
|
jsxParseSpreadChild(node2) {
|
|
130510
130541
|
this.next();
|
|
130511
130542
|
node2.expression = this.parseExpression();
|
|
130512
|
-
this.setContext(
|
|
130543
|
+
this.setContext(types18.j_expr);
|
|
130513
130544
|
this.state.canStartJSXElement = true;
|
|
130514
130545
|
this.expect(8);
|
|
130515
130546
|
return this.finishNode(node2, "JSXSpreadChild");
|
|
@@ -130529,11 +130560,11 @@ var require_lib32 = __commonJS3({
|
|
|
130529
130560
|
jsxParseAttribute() {
|
|
130530
130561
|
const node2 = this.startNode();
|
|
130531
130562
|
if (this.match(5)) {
|
|
130532
|
-
this.setContext(
|
|
130563
|
+
this.setContext(types18.brace);
|
|
130533
130564
|
this.next();
|
|
130534
130565
|
this.expect(21);
|
|
130535
130566
|
node2.argument = this.parseMaybeAssignAllowIn();
|
|
130536
|
-
this.setContext(
|
|
130567
|
+
this.setContext(types18.j_oTag);
|
|
130537
130568
|
this.state.canStartJSXElement = true;
|
|
130538
130569
|
this.expect(8);
|
|
130539
130570
|
return this.finishNode(node2, "JSXSpreadAttribute");
|
|
@@ -130592,12 +130623,12 @@ var require_lib32 = __commonJS3({
|
|
|
130592
130623
|
break;
|
|
130593
130624
|
case 5: {
|
|
130594
130625
|
const node22 = this.startNode();
|
|
130595
|
-
this.setContext(
|
|
130626
|
+
this.setContext(types18.brace);
|
|
130596
130627
|
this.next();
|
|
130597
130628
|
if (this.match(21)) {
|
|
130598
130629
|
children.push(this.jsxParseSpreadChild(node22));
|
|
130599
130630
|
} else {
|
|
130600
|
-
children.push(this.jsxParseExpressionContainer(node22,
|
|
130631
|
+
children.push(this.jsxParseExpressionContainer(node22, types18.j_expr));
|
|
130601
130632
|
}
|
|
130602
130633
|
break;
|
|
130603
130634
|
}
|
|
@@ -130668,10 +130699,10 @@ var require_lib32 = __commonJS3({
|
|
|
130668
130699
|
}
|
|
130669
130700
|
getTokenFromCode(code) {
|
|
130670
130701
|
const context = this.curContext();
|
|
130671
|
-
if (context ===
|
|
130702
|
+
if (context === types18.j_expr) {
|
|
130672
130703
|
return this.jsxReadToken();
|
|
130673
130704
|
}
|
|
130674
|
-
if (context ===
|
|
130705
|
+
if (context === types18.j_oTag || context === types18.j_cTag) {
|
|
130675
130706
|
if (isIdentifierStart2(code)) {
|
|
130676
130707
|
return this.jsxReadWord();
|
|
130677
130708
|
}
|
|
@@ -130679,7 +130710,7 @@ var require_lib32 = __commonJS3({
|
|
|
130679
130710
|
++this.state.pos;
|
|
130680
130711
|
return this.finishToken(141);
|
|
130681
130712
|
}
|
|
130682
|
-
if ((code === 34 || code === 39) && context ===
|
|
130713
|
+
if ((code === 34 || code === 39) && context === types18.j_oTag) {
|
|
130683
130714
|
return this.jsxReadString(code);
|
|
130684
130715
|
}
|
|
130685
130716
|
}
|
|
@@ -130695,17 +130726,17 @@ var require_lib32 = __commonJS3({
|
|
|
130695
130726
|
type
|
|
130696
130727
|
} = this.state;
|
|
130697
130728
|
if (type === 56 && prevType === 140) {
|
|
130698
|
-
context.splice(-2, 2,
|
|
130729
|
+
context.splice(-2, 2, types18.j_cTag);
|
|
130699
130730
|
this.state.canStartJSXElement = false;
|
|
130700
130731
|
} else if (type === 140) {
|
|
130701
|
-
context.push(
|
|
130732
|
+
context.push(types18.j_oTag);
|
|
130702
130733
|
} else if (type === 141) {
|
|
130703
130734
|
const out = context[context.length - 1];
|
|
130704
|
-
if (out ===
|
|
130735
|
+
if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
|
|
130705
130736
|
context.pop();
|
|
130706
|
-
this.state.canStartJSXElement = context[context.length - 1] ===
|
|
130737
|
+
this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
|
|
130707
130738
|
} else {
|
|
130708
|
-
this.setContext(
|
|
130739
|
+
this.setContext(types18.j_expr);
|
|
130709
130740
|
this.state.canStartJSXElement = true;
|
|
130710
130741
|
}
|
|
130711
130742
|
} else {
|
|
@@ -131713,14 +131744,14 @@ var require_lib32 = __commonJS3({
|
|
|
131713
131744
|
tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
|
|
131714
131745
|
const node2 = this.startNode();
|
|
131715
131746
|
const hasLeadingOperator = this.eat(operator);
|
|
131716
|
-
const
|
|
131747
|
+
const types19 = [];
|
|
131717
131748
|
do {
|
|
131718
|
-
|
|
131749
|
+
types19.push(parseConstituentType());
|
|
131719
131750
|
} while (this.eat(operator));
|
|
131720
|
-
if (
|
|
131721
|
-
return
|
|
131751
|
+
if (types19.length === 1 && !hasLeadingOperator) {
|
|
131752
|
+
return types19[0];
|
|
131722
131753
|
}
|
|
131723
|
-
node2.types =
|
|
131754
|
+
node2.types = types19;
|
|
131724
131755
|
return this.finishNode(node2, kind);
|
|
131725
131756
|
}
|
|
131726
131757
|
tsParseIntersectionTypeOrHigher() {
|
|
@@ -132949,7 +132980,7 @@ var require_lib32 = __commonJS3({
|
|
|
132949
132980
|
context
|
|
132950
132981
|
} = this.state;
|
|
132951
132982
|
const currentContext = context[context.length - 1];
|
|
132952
|
-
if (currentContext ===
|
|
132983
|
+
if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
|
|
132953
132984
|
context.pop();
|
|
132954
132985
|
}
|
|
132955
132986
|
}
|
|
@@ -138584,9 +138615,9 @@ var require_shared2 = __commonJS3({
|
|
|
138584
138615
|
var tslib_1 = require_tslib2();
|
|
138585
138616
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
138586
138617
|
function default_1(fork) {
|
|
138587
|
-
var
|
|
138588
|
-
var Type =
|
|
138589
|
-
var builtin =
|
|
138618
|
+
var types18 = fork.use(types_110.default);
|
|
138619
|
+
var Type = types18.Type;
|
|
138620
|
+
var builtin = types18.builtInTypes;
|
|
138590
138621
|
var isNumber2 = builtin.number;
|
|
138591
138622
|
function geq(than) {
|
|
138592
138623
|
return Type.from(function(value2) {
|
|
@@ -138734,9 +138765,9 @@ var require_types2 = __commonJS3({
|
|
|
138734
138765
|
}(BaseType);
|
|
138735
138766
|
var OrType = function(_super) {
|
|
138736
138767
|
tslib_1.__extends(OrType2, _super);
|
|
138737
|
-
function OrType2(
|
|
138768
|
+
function OrType2(types18) {
|
|
138738
138769
|
var _this = _super.call(this) || this;
|
|
138739
|
-
_this.types =
|
|
138770
|
+
_this.types = types18;
|
|
138740
138771
|
_this.kind = "OrType";
|
|
138741
138772
|
return _this;
|
|
138742
138773
|
}
|
|
@@ -138877,11 +138908,11 @@ var require_types2 = __commonJS3({
|
|
|
138877
138908
|
function typesPlugin(_fork) {
|
|
138878
138909
|
var Type = {
|
|
138879
138910
|
or: function() {
|
|
138880
|
-
var
|
|
138911
|
+
var types18 = [];
|
|
138881
138912
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
138882
|
-
|
|
138913
|
+
types18[_i] = arguments[_i];
|
|
138883
138914
|
}
|
|
138884
|
-
return new OrType(
|
|
138915
|
+
return new OrType(types18.map(function(type) {
|
|
138885
138916
|
return Type.from(type);
|
|
138886
138917
|
}));
|
|
138887
138918
|
},
|
|
@@ -139324,9 +139355,9 @@ var require_path22 = __commonJS3({
|
|
|
139324
139355
|
var Op = Object.prototype;
|
|
139325
139356
|
var hasOwn2 = Op.hasOwnProperty;
|
|
139326
139357
|
function pathPlugin(fork) {
|
|
139327
|
-
var
|
|
139328
|
-
var isArray2 =
|
|
139329
|
-
var isNumber2 =
|
|
139358
|
+
var types18 = fork.use(types_110.default);
|
|
139359
|
+
var isArray2 = types18.builtInTypes.array;
|
|
139360
|
+
var isNumber2 = types18.builtInTypes.number;
|
|
139330
139361
|
var Path = function Path2(value2, parentPath, name) {
|
|
139331
139362
|
if (!(this instanceof Path2)) {
|
|
139332
139363
|
throw new Error("Path constructor cannot be invoked without 'new'");
|
|
@@ -139626,13 +139657,13 @@ var require_scope2 = __commonJS3({
|
|
|
139626
139657
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
139627
139658
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
139628
139659
|
function scopePlugin(fork) {
|
|
139629
|
-
var
|
|
139630
|
-
var Type =
|
|
139631
|
-
var namedTypes =
|
|
139660
|
+
var types18 = fork.use(types_110.default);
|
|
139661
|
+
var Type = types18.Type;
|
|
139662
|
+
var namedTypes = types18.namedTypes;
|
|
139632
139663
|
var Node3 = namedTypes.Node;
|
|
139633
139664
|
var Expression = namedTypes.Expression;
|
|
139634
|
-
var isArray2 =
|
|
139635
|
-
var b =
|
|
139665
|
+
var isArray2 = types18.builtInTypes.array;
|
|
139666
|
+
var b = types18.builders;
|
|
139636
139667
|
var Scope3 = function Scope22(path22, parentScope) {
|
|
139637
139668
|
if (!(this instanceof Scope22)) {
|
|
139638
139669
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
@@ -139695,7 +139726,7 @@ var require_scope2 = __commonJS3({
|
|
|
139695
139726
|
++index;
|
|
139696
139727
|
}
|
|
139697
139728
|
var name = prefix + index;
|
|
139698
|
-
return this.bindings[name] =
|
|
139729
|
+
return this.bindings[name] = types18.builders.identifier(name);
|
|
139699
139730
|
};
|
|
139700
139731
|
Sp.injectTemporary = function(identifier, init) {
|
|
139701
139732
|
identifier || (identifier = this.declareTemporary());
|
|
@@ -139771,7 +139802,7 @@ var require_scope2 = __commonJS3({
|
|
|
139771
139802
|
bindings
|
|
139772
139803
|
);
|
|
139773
139804
|
} else if (Node3.check(node2) && !Expression.check(node2)) {
|
|
139774
|
-
|
|
139805
|
+
types18.eachField(node2, function(name, child) {
|
|
139775
139806
|
var childPath = path22.get(name);
|
|
139776
139807
|
if (!pathHasValue(childPath, child)) {
|
|
139777
139808
|
throw new Error("");
|
|
@@ -139849,24 +139880,24 @@ var require_scope2 = __commonJS3({
|
|
|
139849
139880
|
addPattern(patternPath.get("argument"), bindings);
|
|
139850
139881
|
}
|
|
139851
139882
|
}
|
|
139852
|
-
function addTypePattern(patternPath,
|
|
139883
|
+
function addTypePattern(patternPath, types19) {
|
|
139853
139884
|
var pattern = patternPath.value;
|
|
139854
139885
|
namedTypes.Pattern.assert(pattern);
|
|
139855
139886
|
if (namedTypes.Identifier.check(pattern)) {
|
|
139856
|
-
if (hasOwn2.call(
|
|
139857
|
-
|
|
139887
|
+
if (hasOwn2.call(types19, pattern.name)) {
|
|
139888
|
+
types19[pattern.name].push(patternPath);
|
|
139858
139889
|
} else {
|
|
139859
|
-
|
|
139890
|
+
types19[pattern.name] = [patternPath];
|
|
139860
139891
|
}
|
|
139861
139892
|
}
|
|
139862
139893
|
}
|
|
139863
|
-
function addTypeParameter(parameterPath,
|
|
139894
|
+
function addTypeParameter(parameterPath, types19) {
|
|
139864
139895
|
var parameter = parameterPath.value;
|
|
139865
139896
|
FlowOrTSTypeParameterType.assert(parameter);
|
|
139866
|
-
if (hasOwn2.call(
|
|
139867
|
-
|
|
139897
|
+
if (hasOwn2.call(types19, parameter.name)) {
|
|
139898
|
+
types19[parameter.name].push(parameterPath);
|
|
139868
139899
|
} else {
|
|
139869
|
-
|
|
139900
|
+
types19[parameter.name] = [parameterPath];
|
|
139870
139901
|
}
|
|
139871
139902
|
}
|
|
139872
139903
|
Sp.lookup = function(name) {
|
|
@@ -139905,11 +139936,11 @@ var require_node_path2 = __commonJS3({
|
|
|
139905
139936
|
var scope_1 = tslib_1.__importDefault(require_scope2());
|
|
139906
139937
|
var shared_1 = require_shared2();
|
|
139907
139938
|
function nodePathPlugin(fork) {
|
|
139908
|
-
var
|
|
139909
|
-
var n =
|
|
139910
|
-
var b =
|
|
139911
|
-
var isNumber2 =
|
|
139912
|
-
var isArray2 =
|
|
139939
|
+
var types18 = fork.use(types_110.default);
|
|
139940
|
+
var n = types18.namedTypes;
|
|
139941
|
+
var b = types18.builders;
|
|
139942
|
+
var isNumber2 = types18.builtInTypes.number;
|
|
139943
|
+
var isArray2 = types18.builtInTypes.array;
|
|
139913
139944
|
var Path = fork.use(path_1.default);
|
|
139914
139945
|
var Scope3 = fork.use(scope_1.default);
|
|
139915
139946
|
var NodePath = function NodePath2(value2, parentPath, name) {
|
|
@@ -140000,7 +140031,7 @@ var require_node_path2 = __commonJS3({
|
|
|
140000
140031
|
return scope2 || null;
|
|
140001
140032
|
};
|
|
140002
140033
|
NPp.getValueProperty = function(name) {
|
|
140003
|
-
return
|
|
140034
|
+
return types18.getFieldValue(this.value, name);
|
|
140004
140035
|
};
|
|
140005
140036
|
NPp.needsParens = function(assumeExpressionContext) {
|
|
140006
140037
|
var pp2 = this.parentPath;
|
|
@@ -140142,7 +140173,7 @@ var require_node_path2 = __commonJS3({
|
|
|
140142
140173
|
return node2.some(containsCallExpression);
|
|
140143
140174
|
}
|
|
140144
140175
|
if (n.Node.check(node2)) {
|
|
140145
|
-
return
|
|
140176
|
+
return types18.someField(node2, function(_name, child) {
|
|
140146
140177
|
return containsCallExpression(child);
|
|
140147
140178
|
});
|
|
140148
140179
|
}
|
|
@@ -140261,11 +140292,11 @@ var require_path_visitor2 = __commonJS3({
|
|
|
140261
140292
|
var shared_1 = require_shared2();
|
|
140262
140293
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
140263
140294
|
function pathVisitorPlugin(fork) {
|
|
140264
|
-
var
|
|
140295
|
+
var types18 = fork.use(types_110.default);
|
|
140265
140296
|
var NodePath = fork.use(node_path_1.default);
|
|
140266
|
-
var isArray2 =
|
|
140267
|
-
var isObject2 =
|
|
140268
|
-
var isFunction2 =
|
|
140297
|
+
var isArray2 = types18.builtInTypes.array;
|
|
140298
|
+
var isObject2 = types18.builtInTypes.object;
|
|
140299
|
+
var isFunction2 = types18.builtInTypes.function;
|
|
140269
140300
|
var undefined2;
|
|
140270
140301
|
var PathVisitor = function PathVisitor2() {
|
|
140271
140302
|
if (!(this instanceof PathVisitor2)) {
|
|
@@ -140285,7 +140316,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
140285
140316
|
typeNames[methodName.slice("visit".length)] = true;
|
|
140286
140317
|
}
|
|
140287
140318
|
}
|
|
140288
|
-
var supertypeTable =
|
|
140319
|
+
var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
|
|
140289
140320
|
var methodNameTable = /* @__PURE__ */ Object.create(null);
|
|
140290
140321
|
var typeNameKeys = Object.keys(supertypeTable);
|
|
140291
140322
|
var typeNameCount = typeNameKeys.length;
|
|
@@ -140404,7 +140435,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
140404
140435
|
path22.each(visitor.visitWithoutReset, visitor);
|
|
140405
140436
|
} else if (!isObject2.check(value2)) {
|
|
140406
140437
|
} else {
|
|
140407
|
-
var childNames =
|
|
140438
|
+
var childNames = types18.getFieldNames(value2);
|
|
140408
140439
|
if (visitor._shouldVisitComments && value2.comments && childNames.indexOf("comments") < 0) {
|
|
140409
140440
|
childNames.push("comments");
|
|
140410
140441
|
}
|
|
@@ -140413,7 +140444,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
140413
140444
|
for (var i22 = 0; i22 < childCount; ++i22) {
|
|
140414
140445
|
var childName = childNames[i22];
|
|
140415
140446
|
if (!hasOwn2.call(value2, childName)) {
|
|
140416
|
-
value2[childName] =
|
|
140447
|
+
value2[childName] = types18.getFieldValue(value2, childName);
|
|
140417
140448
|
}
|
|
140418
140449
|
childPaths.push(path22.get(childName));
|
|
140419
140450
|
}
|
|
@@ -140554,13 +140585,13 @@ var require_equiv2 = __commonJS3({
|
|
|
140554
140585
|
var shared_1 = require_shared2();
|
|
140555
140586
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
140556
140587
|
function default_1(fork) {
|
|
140557
|
-
var
|
|
140558
|
-
var getFieldNames =
|
|
140559
|
-
var getFieldValue =
|
|
140560
|
-
var isArray2 =
|
|
140561
|
-
var isObject2 =
|
|
140562
|
-
var isDate2 =
|
|
140563
|
-
var isRegExp2 =
|
|
140588
|
+
var types18 = fork.use(types_110.default);
|
|
140589
|
+
var getFieldNames = types18.getFieldNames;
|
|
140590
|
+
var getFieldValue = types18.getFieldValue;
|
|
140591
|
+
var isArray2 = types18.builtInTypes.array;
|
|
140592
|
+
var isObject2 = types18.builtInTypes.object;
|
|
140593
|
+
var isDate2 = types18.builtInTypes.Date;
|
|
140594
|
+
var isRegExp2 = types18.builtInTypes.RegExp;
|
|
140564
140595
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
140565
140596
|
function astNodesAreEquivalent(a, b, problemPath) {
|
|
140566
140597
|
if (isArray2.check(problemPath)) {
|
|
@@ -140711,24 +140742,24 @@ var require_fork2 = __commonJS3({
|
|
|
140711
140742
|
var shared_1 = require_shared2();
|
|
140712
140743
|
function default_1(plugins) {
|
|
140713
140744
|
var fork = createFork();
|
|
140714
|
-
var
|
|
140745
|
+
var types18 = fork.use(types_110.default);
|
|
140715
140746
|
plugins.forEach(fork.use);
|
|
140716
|
-
|
|
140747
|
+
types18.finalize();
|
|
140717
140748
|
var PathVisitor = fork.use(path_visitor_1.default);
|
|
140718
140749
|
return {
|
|
140719
|
-
Type:
|
|
140720
|
-
builtInTypes:
|
|
140721
|
-
namedTypes:
|
|
140722
|
-
builders:
|
|
140723
|
-
defineMethod:
|
|
140724
|
-
getFieldNames:
|
|
140725
|
-
getFieldValue:
|
|
140726
|
-
eachField:
|
|
140727
|
-
someField:
|
|
140728
|
-
getSupertypeNames:
|
|
140729
|
-
getBuilderName:
|
|
140750
|
+
Type: types18.Type,
|
|
140751
|
+
builtInTypes: types18.builtInTypes,
|
|
140752
|
+
namedTypes: types18.namedTypes,
|
|
140753
|
+
builders: types18.builders,
|
|
140754
|
+
defineMethod: types18.defineMethod,
|
|
140755
|
+
getFieldNames: types18.getFieldNames,
|
|
140756
|
+
getFieldValue: types18.getFieldValue,
|
|
140757
|
+
eachField: types18.eachField,
|
|
140758
|
+
someField: types18.someField,
|
|
140759
|
+
getSupertypeNames: types18.getSupertypeNames,
|
|
140760
|
+
getBuilderName: types18.getBuilderName,
|
|
140730
140761
|
astNodesAreEquivalent: fork.use(equiv_1.default),
|
|
140731
|
-
finalize:
|
|
140762
|
+
finalize: types18.finalize,
|
|
140732
140763
|
Path: fork.use(path_1.default),
|
|
140733
140764
|
NodePath: fork.use(node_path_1.default),
|
|
140734
140765
|
PathVisitor,
|
|
@@ -140888,8 +140919,8 @@ var require_core22 = __commonJS3({
|
|
|
140888
140919
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
140889
140920
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
140890
140921
|
function default_1(fork) {
|
|
140891
|
-
var
|
|
140892
|
-
var Type =
|
|
140922
|
+
var types18 = fork.use(types_110.default);
|
|
140923
|
+
var Type = types18.Type;
|
|
140893
140924
|
var def = Type.def;
|
|
140894
140925
|
var or = Type.or;
|
|
140895
140926
|
var shared = fork.use(shared_1.default);
|
|
@@ -140979,9 +141010,9 @@ var require_es62 = __commonJS3({
|
|
|
140979
141010
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
140980
141011
|
function default_1(fork) {
|
|
140981
141012
|
fork.use(core_1.default);
|
|
140982
|
-
var
|
|
140983
|
-
var def =
|
|
140984
|
-
var or =
|
|
141013
|
+
var types18 = fork.use(types_110.default);
|
|
141014
|
+
var def = types18.Type.def;
|
|
141015
|
+
var or = types18.Type.or;
|
|
140985
141016
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
140986
141017
|
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"]);
|
|
140987
141018
|
def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
|
|
@@ -141067,8 +141098,8 @@ var require_es20172 = __commonJS3({
|
|
|
141067
141098
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141068
141099
|
function default_1(fork) {
|
|
141069
141100
|
fork.use(es2016_1.default);
|
|
141070
|
-
var
|
|
141071
|
-
var def =
|
|
141101
|
+
var types18 = fork.use(types_110.default);
|
|
141102
|
+
var def = types18.Type.def;
|
|
141072
141103
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141073
141104
|
def("Function").field("async", Boolean, defaults2["false"]);
|
|
141074
141105
|
def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
|
|
@@ -141089,9 +141120,9 @@ var require_es20182 = __commonJS3({
|
|
|
141089
141120
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141090
141121
|
function default_1(fork) {
|
|
141091
141122
|
fork.use(es2017_1.default);
|
|
141092
|
-
var
|
|
141093
|
-
var def =
|
|
141094
|
-
var or =
|
|
141123
|
+
var types18 = fork.use(types_110.default);
|
|
141124
|
+
var def = types18.Type.def;
|
|
141125
|
+
var or = types18.Type.or;
|
|
141095
141126
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141096
141127
|
def("ForOfStatement").field("await", Boolean, defaults2["false"]);
|
|
141097
141128
|
def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
@@ -141120,9 +141151,9 @@ var require_es20192 = __commonJS3({
|
|
|
141120
141151
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141121
141152
|
function default_1(fork) {
|
|
141122
141153
|
fork.use(es2018_1.default);
|
|
141123
|
-
var
|
|
141124
|
-
var def =
|
|
141125
|
-
var or =
|
|
141154
|
+
var types18 = fork.use(types_110.default);
|
|
141155
|
+
var def = types18.Type.def;
|
|
141156
|
+
var or = types18.Type.or;
|
|
141126
141157
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141127
141158
|
def("CatchClause").field("param", or(def("Pattern"), null), defaults2["null"]);
|
|
141128
141159
|
}
|
|
@@ -141144,9 +141175,9 @@ var require_es202022 = __commonJS3({
|
|
|
141144
141175
|
function default_1(fork) {
|
|
141145
141176
|
fork.use(es2020_1.default);
|
|
141146
141177
|
fork.use(es2019_1.default);
|
|
141147
|
-
var
|
|
141148
|
-
var def =
|
|
141149
|
-
var or =
|
|
141178
|
+
var types18 = fork.use(types_110.default);
|
|
141179
|
+
var def = types18.Type.def;
|
|
141180
|
+
var or = types18.Type.or;
|
|
141150
141181
|
var shared = fork.use(shared_1.default);
|
|
141151
141182
|
var defaults2 = shared.defaults;
|
|
141152
141183
|
def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
|
|
@@ -141192,8 +141223,8 @@ var require_es20222 = __commonJS3({
|
|
|
141192
141223
|
var shared_1 = require_shared2();
|
|
141193
141224
|
function default_1(fork) {
|
|
141194
141225
|
fork.use(es2021_1.default);
|
|
141195
|
-
var
|
|
141196
|
-
var def =
|
|
141226
|
+
var types18 = fork.use(types_110.default);
|
|
141227
|
+
var def = types18.Type.def;
|
|
141197
141228
|
def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
|
|
141198
141229
|
}
|
|
141199
141230
|
exports.default = default_1;
|
|
@@ -141212,9 +141243,9 @@ var require_es_proposals2 = __commonJS3({
|
|
|
141212
141243
|
var es2022_1 = tslib_1.__importDefault(require_es20222());
|
|
141213
141244
|
function default_1(fork) {
|
|
141214
141245
|
fork.use(es2022_1.default);
|
|
141215
|
-
var
|
|
141216
|
-
var Type =
|
|
141217
|
-
var def =
|
|
141246
|
+
var types18 = fork.use(types_110.default);
|
|
141247
|
+
var Type = types18.Type;
|
|
141248
|
+
var def = types18.Type.def;
|
|
141218
141249
|
var or = Type.or;
|
|
141219
141250
|
var shared = fork.use(shared_1.default);
|
|
141220
141251
|
var defaults2 = shared.defaults;
|
|
@@ -141252,9 +141283,9 @@ var require_jsx2 = __commonJS3({
|
|
|
141252
141283
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141253
141284
|
function default_1(fork) {
|
|
141254
141285
|
fork.use(es_proposals_1.default);
|
|
141255
|
-
var
|
|
141256
|
-
var def =
|
|
141257
|
-
var or =
|
|
141286
|
+
var types18 = fork.use(types_110.default);
|
|
141287
|
+
var def = types18.Type.def;
|
|
141288
|
+
var or = types18.Type.or;
|
|
141258
141289
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141259
141290
|
def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
|
|
141260
141291
|
def("Literal"),
|
|
@@ -141310,9 +141341,9 @@ var require_type_annotations2 = __commonJS3({
|
|
|
141310
141341
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
141311
141342
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141312
141343
|
function default_1(fork) {
|
|
141313
|
-
var
|
|
141314
|
-
var def =
|
|
141315
|
-
var or =
|
|
141344
|
+
var types18 = fork.use(types_110.default);
|
|
141345
|
+
var def = types18.Type.def;
|
|
141346
|
+
var or = types18.Type.or;
|
|
141316
141347
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141317
141348
|
var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
|
|
141318
141349
|
var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
|
|
@@ -141345,9 +141376,9 @@ var require_flow2 = __commonJS3({
|
|
|
141345
141376
|
function default_1(fork) {
|
|
141346
141377
|
fork.use(es_proposals_1.default);
|
|
141347
141378
|
fork.use(type_annotations_1.default);
|
|
141348
|
-
var
|
|
141349
|
-
var def =
|
|
141350
|
-
var or =
|
|
141379
|
+
var types18 = fork.use(types_110.default);
|
|
141380
|
+
var def = types18.Type.def;
|
|
141381
|
+
var or = types18.Type.or;
|
|
141351
141382
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141352
141383
|
def("Flow").bases("Node");
|
|
141353
141384
|
def("FlowType").bases("Flow");
|
|
@@ -141459,10 +141490,10 @@ var require_esprima4 = __commonJS3({
|
|
|
141459
141490
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
141460
141491
|
function default_1(fork) {
|
|
141461
141492
|
fork.use(es_proposals_1.default);
|
|
141462
|
-
var
|
|
141493
|
+
var types18 = fork.use(types_110.default);
|
|
141463
141494
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141464
|
-
var def =
|
|
141465
|
-
var or =
|
|
141495
|
+
var def = types18.Type.def;
|
|
141496
|
+
var or = types18.Type.or;
|
|
141466
141497
|
def("VariableDeclaration").field("declarations", [or(
|
|
141467
141498
|
def("VariableDeclarator"),
|
|
141468
141499
|
def("Identifier")
|
|
@@ -141505,11 +141536,11 @@ var require_babel_core2 = __commonJS3({
|
|
|
141505
141536
|
function default_1(fork) {
|
|
141506
141537
|
var _a, _b, _c, _d, _e;
|
|
141507
141538
|
fork.use(es_proposals_1.default);
|
|
141508
|
-
var
|
|
141539
|
+
var types18 = fork.use(types_110.default);
|
|
141509
141540
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141510
|
-
var def =
|
|
141511
|
-
var or =
|
|
141512
|
-
var isUndefined =
|
|
141541
|
+
var def = types18.Type.def;
|
|
141542
|
+
var or = types18.Type.or;
|
|
141543
|
+
var isUndefined = types18.builtInTypes.undefined;
|
|
141513
141544
|
def("Noop").bases("Statement").build();
|
|
141514
141545
|
def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
|
|
141515
141546
|
def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
|
|
@@ -141534,7 +141565,7 @@ var require_babel_core2 = __commonJS3({
|
|
|
141534
141565
|
raw: String
|
|
141535
141566
|
},
|
|
141536
141567
|
function getDefault() {
|
|
141537
|
-
var value2 =
|
|
141568
|
+
var value2 = types18.getFieldValue(this, "value");
|
|
141538
141569
|
return {
|
|
141539
141570
|
rawValue: value2,
|
|
141540
141571
|
raw: toRaw ? toRaw(value2) : String(value2)
|
|
@@ -141635,8 +141666,8 @@ var require_babel2 = __commonJS3({
|
|
|
141635
141666
|
var flow_1 = tslib_1.__importDefault(require_flow2());
|
|
141636
141667
|
var shared_1 = require_shared2();
|
|
141637
141668
|
function default_1(fork) {
|
|
141638
|
-
var
|
|
141639
|
-
var def =
|
|
141669
|
+
var types18 = fork.use(types_110.default);
|
|
141670
|
+
var def = types18.Type.def;
|
|
141640
141671
|
fork.use(babel_core_1.default);
|
|
141641
141672
|
fork.use(flow_1.default);
|
|
141642
141673
|
def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
|
|
@@ -141660,12 +141691,12 @@ var require_typescript2 = __commonJS3({
|
|
|
141660
141691
|
function default_1(fork) {
|
|
141661
141692
|
fork.use(babel_core_1.default);
|
|
141662
141693
|
fork.use(type_annotations_1.default);
|
|
141663
|
-
var
|
|
141664
|
-
var n =
|
|
141665
|
-
var def =
|
|
141666
|
-
var or =
|
|
141694
|
+
var types18 = fork.use(types_110.default);
|
|
141695
|
+
var n = types18.namedTypes;
|
|
141696
|
+
var def = types18.Type.def;
|
|
141697
|
+
var or = types18.Type.or;
|
|
141667
141698
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
141668
|
-
var StringLiteral =
|
|
141699
|
+
var StringLiteral = types18.Type.from(function(value2, deep) {
|
|
141669
141700
|
if (n.StringLiteral && n.StringLiteral.check(value2, deep)) {
|
|
141670
141701
|
return true;
|
|
141671
141702
|
}
|
|
@@ -143613,8 +143644,8 @@ var require_util22 = __commonJS3({
|
|
|
143613
143644
|
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;
|
|
143614
143645
|
var tslib_1 = require_tslib2();
|
|
143615
143646
|
var assert_1 = tslib_1.__importDefault(__require3("assert"));
|
|
143616
|
-
var
|
|
143617
|
-
var n =
|
|
143647
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
143648
|
+
var n = types18.namedTypes;
|
|
143618
143649
|
var source_map_1 = tslib_1.__importDefault(require_source_map2());
|
|
143619
143650
|
var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
|
|
143620
143651
|
var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
|
|
@@ -150920,10 +150951,10 @@ var require_comments2 = __commonJS3({
|
|
|
150920
150951
|
exports.printComments = exports.attach = void 0;
|
|
150921
150952
|
var tslib_1 = require_tslib2();
|
|
150922
150953
|
var assert_1 = tslib_1.__importDefault(__require3("assert"));
|
|
150923
|
-
var
|
|
150924
|
-
var n =
|
|
150925
|
-
var isArray2 =
|
|
150926
|
-
var isObject2 =
|
|
150954
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
150955
|
+
var n = types18.namedTypes;
|
|
150956
|
+
var isArray2 = types18.builtInTypes.array;
|
|
150957
|
+
var isObject2 = types18.builtInTypes.object;
|
|
150927
150958
|
var lines_1 = require_lines2();
|
|
150928
150959
|
var util_110 = require_util22();
|
|
150929
150960
|
var childNodesCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -150954,7 +150985,7 @@ var require_comments2 = __commonJS3({
|
|
|
150954
150985
|
if (isArray2.check(node2)) {
|
|
150955
150986
|
names = Object.keys(node2);
|
|
150956
150987
|
} else if (isObject2.check(node2)) {
|
|
150957
|
-
names =
|
|
150988
|
+
names = types18.getFieldNames(node2);
|
|
150958
150989
|
} else {
|
|
150959
150990
|
return resultArray;
|
|
150960
150991
|
}
|
|
@@ -151132,7 +151163,7 @@ var require_comments2 = __commonJS3({
|
|
|
151132
151163
|
function printComments(path22, print9) {
|
|
151133
151164
|
var value2 = path22.getValue();
|
|
151134
151165
|
var innerLines = print9(path22);
|
|
151135
|
-
var comments = n.Node.check(value2) &&
|
|
151166
|
+
var comments = n.Node.check(value2) && types18.getFieldValue(value2, "comments");
|
|
151136
151167
|
if (!comments || comments.length === 0) {
|
|
151137
151168
|
return innerLines;
|
|
151138
151169
|
}
|
|
@@ -151140,8 +151171,8 @@ var require_comments2 = __commonJS3({
|
|
|
151140
151171
|
var trailingParts = [innerLines];
|
|
151141
151172
|
path22.each(function(commentPath) {
|
|
151142
151173
|
var comment = commentPath.getValue();
|
|
151143
|
-
var leading =
|
|
151144
|
-
var trailing =
|
|
151174
|
+
var leading = types18.getFieldValue(comment, "leading");
|
|
151175
|
+
var trailing = types18.getFieldValue(comment, "trailing");
|
|
151145
151176
|
if (leading || trailing && !(n.Statement.check(value2) || comment.type === "Block" || comment.type === "CommentBlock")) {
|
|
151146
151177
|
leadingParts.push(printLeadingComment(commentPath, print9));
|
|
151147
151178
|
} else if (trailing) {
|
|
@@ -151161,10 +151192,10 @@ var require_parser22 = __commonJS3({
|
|
|
151161
151192
|
exports.parse = void 0;
|
|
151162
151193
|
var tslib_1 = require_tslib2();
|
|
151163
151194
|
var assert_1 = tslib_1.__importDefault(__require3("assert"));
|
|
151164
|
-
var
|
|
151165
|
-
var b =
|
|
151166
|
-
var isObject2 =
|
|
151167
|
-
var isArray2 =
|
|
151195
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
151196
|
+
var b = types18.builders;
|
|
151197
|
+
var isObject2 = types18.builtInTypes.object;
|
|
151198
|
+
var isArray2 = types18.builtInTypes.array;
|
|
151168
151199
|
var options_1 = require_options2();
|
|
151169
151200
|
var lines_1 = require_lines2();
|
|
151170
151201
|
var comments_1 = require_comments2();
|
|
@@ -151348,11 +151379,11 @@ var require_fast_path2 = __commonJS3({
|
|
|
151348
151379
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
151349
151380
|
var tslib_1 = require_tslib2();
|
|
151350
151381
|
var assert_1 = tslib_1.__importDefault(__require3("assert"));
|
|
151351
|
-
var
|
|
151382
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
151352
151383
|
var util2 = tslib_1.__importStar(require_util22());
|
|
151353
|
-
var n =
|
|
151354
|
-
var isArray2 =
|
|
151355
|
-
var isNumber2 =
|
|
151384
|
+
var n = types18.namedTypes;
|
|
151385
|
+
var isArray2 = types18.builtInTypes.array;
|
|
151386
|
+
var isNumber2 = types18.builtInTypes.number;
|
|
151356
151387
|
var PRECEDENCE = {};
|
|
151357
151388
|
[
|
|
151358
151389
|
["??"],
|
|
@@ -151381,7 +151412,7 @@ var require_fast_path2 = __commonJS3({
|
|
|
151381
151412
|
if (obj instanceof FastPath) {
|
|
151382
151413
|
return obj.copy();
|
|
151383
151414
|
}
|
|
151384
|
-
if (obj instanceof
|
|
151415
|
+
if (obj instanceof types18.NodePath) {
|
|
151385
151416
|
var copy = Object.create(FastPath.prototype);
|
|
151386
151417
|
var stack = [obj.value];
|
|
151387
151418
|
for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
|
|
@@ -151692,7 +151723,7 @@ var require_fast_path2 = __commonJS3({
|
|
|
151692
151723
|
return node2.some(containsCallExpression);
|
|
151693
151724
|
}
|
|
151694
151725
|
if (n.Node.check(node2)) {
|
|
151695
|
-
return
|
|
151726
|
+
return types18.someField(node2, function(_name, child) {
|
|
151696
151727
|
return containsCallExpression(child);
|
|
151697
151728
|
});
|
|
151698
151729
|
}
|
|
@@ -151780,16 +151811,16 @@ var require_patcher2 = __commonJS3({
|
|
|
151780
151811
|
var tslib_1 = require_tslib2();
|
|
151781
151812
|
var assert_1 = tslib_1.__importDefault(__require3("assert"));
|
|
151782
151813
|
var linesModule = tslib_1.__importStar(require_lines2());
|
|
151783
|
-
var
|
|
151784
|
-
var Printable =
|
|
151785
|
-
var Expression =
|
|
151786
|
-
var ReturnStatement =
|
|
151787
|
-
var SourceLocation3 =
|
|
151814
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
151815
|
+
var Printable = types18.namedTypes.Printable;
|
|
151816
|
+
var Expression = types18.namedTypes.Expression;
|
|
151817
|
+
var ReturnStatement = types18.namedTypes.ReturnStatement;
|
|
151818
|
+
var SourceLocation3 = types18.namedTypes.SourceLocation;
|
|
151788
151819
|
var util_110 = require_util22();
|
|
151789
151820
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path2());
|
|
151790
|
-
var isObject2 =
|
|
151791
|
-
var isArray2 =
|
|
151792
|
-
var isString3 =
|
|
151821
|
+
var isObject2 = types18.builtInTypes.object;
|
|
151822
|
+
var isArray2 = types18.builtInTypes.array;
|
|
151823
|
+
var isString3 = types18.builtInTypes.string;
|
|
151793
151824
|
var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
|
|
151794
151825
|
var Patcher = function Patcher2(lines) {
|
|
151795
151826
|
assert_1.default.ok(this instanceof Patcher2);
|
|
@@ -152059,8 +152090,8 @@ var require_patcher2 = __commonJS3({
|
|
|
152059
152090
|
if (k.charAt(0) === "_") {
|
|
152060
152091
|
continue;
|
|
152061
152092
|
}
|
|
152062
|
-
newPath.stack.push(k,
|
|
152063
|
-
oldPath.stack.push(k,
|
|
152093
|
+
newPath.stack.push(k, types18.getFieldValue(newNode, k));
|
|
152094
|
+
oldPath.stack.push(k, types18.getFieldValue(oldNode, k));
|
|
152064
152095
|
var canReprint = findAnyReprints(newPath, oldPath, reprints);
|
|
152065
152096
|
newPath.stack.length -= 2;
|
|
152066
152097
|
oldPath.stack.length -= 2;
|
|
@@ -152082,16 +152113,16 @@ var require_printer22 = __commonJS3({
|
|
|
152082
152113
|
exports.Printer = void 0;
|
|
152083
152114
|
var tslib_1 = require_tslib2();
|
|
152084
152115
|
var assert_1 = tslib_1.__importDefault(__require3("assert"));
|
|
152085
|
-
var
|
|
152116
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
152086
152117
|
var comments_1 = require_comments2();
|
|
152087
152118
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path2());
|
|
152088
152119
|
var lines_1 = require_lines2();
|
|
152089
152120
|
var options_1 = require_options2();
|
|
152090
152121
|
var patcher_1 = require_patcher2();
|
|
152091
152122
|
var util2 = tslib_1.__importStar(require_util22());
|
|
152092
|
-
var namedTypes =
|
|
152093
|
-
var isString3 =
|
|
152094
|
-
var isObject2 =
|
|
152123
|
+
var namedTypes = types18.namedTypes;
|
|
152124
|
+
var isString3 = types18.builtInTypes.string;
|
|
152125
|
+
var isObject2 = types18.builtInTypes.object;
|
|
152095
152126
|
var PrintResult = function PrintResult2(code, sourceMap) {
|
|
152096
152127
|
assert_1.default.ok(this instanceof PrintResult2);
|
|
152097
152128
|
isString3.assert(code);
|
|
@@ -152253,7 +152284,7 @@ var require_printer22 = __commonJS3({
|
|
|
152253
152284
|
case "OptionalMemberExpression": {
|
|
152254
152285
|
parts.push(path22.call(print9, "object"));
|
|
152255
152286
|
var property = path22.call(print9, "property");
|
|
152256
|
-
var optional =
|
|
152287
|
+
var optional = types18.getFieldValue(n, "optional");
|
|
152257
152288
|
if (n.computed) {
|
|
152258
152289
|
parts.push(optional ? "?.[" : "[", property, "]");
|
|
152259
152290
|
} else {
|
|
@@ -152524,7 +152555,7 @@ var require_printer22 = __commonJS3({
|
|
|
152524
152555
|
if (n.typeArguments) {
|
|
152525
152556
|
parts.push(path22.call(print9, "typeArguments"));
|
|
152526
152557
|
}
|
|
152527
|
-
if (
|
|
152558
|
+
if (types18.getFieldValue(n, "optional")) {
|
|
152528
152559
|
parts.push("?.");
|
|
152529
152560
|
}
|
|
152530
152561
|
parts.push(printArgumentsList(path22, options, print9));
|
|
@@ -154203,8 +154234,8 @@ var require_printer22 = __commonJS3({
|
|
|
154203
154234
|
});
|
|
154204
154235
|
}
|
|
154205
154236
|
function getPossibleRaw(node2) {
|
|
154206
|
-
var value2 =
|
|
154207
|
-
var extra =
|
|
154237
|
+
var value2 = types18.getFieldValue(node2, "value");
|
|
154238
|
+
var extra = types18.getFieldValue(node2, "extra");
|
|
154208
154239
|
if (extra && typeof extra.raw === "string" && value2 == extra.rawValue) {
|
|
154209
154240
|
return extra.raw;
|
|
154210
154241
|
}
|
|
@@ -154250,8 +154281,8 @@ var require_main22 = __commonJS3({
|
|
|
154250
154281
|
exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
|
|
154251
154282
|
var tslib_1 = require_tslib2();
|
|
154252
154283
|
var fs_1 = tslib_1.__importDefault(__require3("fs"));
|
|
154253
|
-
var
|
|
154254
|
-
exports.types =
|
|
154284
|
+
var types18 = tslib_1.__importStar(require_main3());
|
|
154285
|
+
exports.types = types18;
|
|
154255
154286
|
var parser_1 = require_parser22();
|
|
154256
154287
|
Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
|
|
154257
154288
|
return parser_1.parse;
|
|
@@ -154709,7 +154740,7 @@ var printDocASTReducer2 = {
|
|
|
154709
154740
|
leave: ({ name, interfaces, directives, fields }) => join3(["interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ")
|
|
154710
154741
|
},
|
|
154711
154742
|
UnionTypeDefinition: {
|
|
154712
|
-
leave: ({ name, directives, types:
|
|
154743
|
+
leave: ({ name, directives, types: types18 }) => join3(["union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
|
|
154713
154744
|
},
|
|
154714
154745
|
EnumTypeDefinition: {
|
|
154715
154746
|
leave: ({ name, directives, values }) => join3(["enum", name, join3(directives, " "), block2(values)], " ")
|
|
@@ -154736,7 +154767,7 @@ var printDocASTReducer2 = {
|
|
|
154736
154767
|
leave: ({ name, interfaces, directives, fields }) => join3(["extend interface", name, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ")
|
|
154737
154768
|
},
|
|
154738
154769
|
UnionTypeExtension: {
|
|
154739
|
-
leave: ({ name, directives, types:
|
|
154770
|
+
leave: ({ name, directives, types: types18 }) => join3(["extend union", name, join3(directives, " "), wrap2("= ", join3(types18, " | "))], " ")
|
|
154740
154771
|
},
|
|
154741
154772
|
EnumTypeExtension: {
|
|
154742
154773
|
leave: ({ name, directives, values }) => join3(["extend enum", name, join3(directives, " "), block2(values)], " ")
|
|
@@ -155928,6 +155959,9 @@ var GarbageCollector2 = class {
|
|
|
155928
155959
|
constructor(cache) {
|
|
155929
155960
|
this.cache = cache;
|
|
155930
155961
|
}
|
|
155962
|
+
reset() {
|
|
155963
|
+
this.lifetimes.clear();
|
|
155964
|
+
}
|
|
155931
155965
|
resetLifetime(id2, field) {
|
|
155932
155966
|
if (!this.lifetimes.get(id2)) {
|
|
155933
155967
|
this.lifetimes.set(id2, /* @__PURE__ */ new Map());
|
|
@@ -156045,6 +156079,10 @@ var ListManager2 = class {
|
|
|
156045
156079
|
}
|
|
156046
156080
|
this.listsByField.get(parentID).delete(field);
|
|
156047
156081
|
}
|
|
156082
|
+
reset() {
|
|
156083
|
+
this.lists.clear();
|
|
156084
|
+
this.listsByField.clear();
|
|
156085
|
+
}
|
|
156048
156086
|
};
|
|
156049
156087
|
var List2 = class {
|
|
156050
156088
|
recordID;
|
|
@@ -156425,6 +156463,9 @@ var StaleManager2 = class {
|
|
|
156425
156463
|
}
|
|
156426
156464
|
}
|
|
156427
156465
|
}
|
|
156466
|
+
reset() {
|
|
156467
|
+
this.fieldsTime.clear();
|
|
156468
|
+
}
|
|
156428
156469
|
};
|
|
156429
156470
|
var InMemoryStorage2 = class {
|
|
156430
156471
|
data;
|
|
@@ -156603,6 +156644,9 @@ var InMemoryStorage2 = class {
|
|
|
156603
156644
|
layer.fields = fields;
|
|
156604
156645
|
layer.links = links;
|
|
156605
156646
|
}
|
|
156647
|
+
reset() {
|
|
156648
|
+
this.data = [];
|
|
156649
|
+
}
|
|
156606
156650
|
};
|
|
156607
156651
|
var Layer2 = class {
|
|
156608
156652
|
id;
|
|
@@ -157044,6 +157088,18 @@ var InMemorySubscriptions2 = class {
|
|
|
157044
157088
|
this.remove(linkedRecordID, linkFields, targets, visited);
|
|
157045
157089
|
}
|
|
157046
157090
|
}
|
|
157091
|
+
reset() {
|
|
157092
|
+
const subscribers = Object.entries(this.subscribers).filter(
|
|
157093
|
+
([id2]) => !id2.startsWith(rootID2)
|
|
157094
|
+
);
|
|
157095
|
+
for (const [id2, _fields] of subscribers) {
|
|
157096
|
+
delete this.subscribers[id2];
|
|
157097
|
+
}
|
|
157098
|
+
const subscriptionSpecs = subscribers.flatMap(
|
|
157099
|
+
([_id, fields]) => Object.values(fields).flatMap((field) => field.map(([spec]) => spec))
|
|
157100
|
+
);
|
|
157101
|
+
return subscriptionSpecs;
|
|
157102
|
+
}
|
|
157047
157103
|
removeSubscribers(id2, fieldName, specs) {
|
|
157048
157104
|
let targets = [];
|
|
157049
157105
|
for (const spec of specs) {
|
|
@@ -157231,6 +157287,14 @@ var Cache2 = class {
|
|
|
157231
157287
|
}
|
|
157232
157288
|
this.#notifySubscribers(toNotify);
|
|
157233
157289
|
}
|
|
157290
|
+
reset() {
|
|
157291
|
+
const subSpecs = this._internal_unstable.subscriptions.reset();
|
|
157292
|
+
this._internal_unstable.staleManager.reset();
|
|
157293
|
+
this._internal_unstable.lifetimes.reset();
|
|
157294
|
+
this._internal_unstable.lists.reset();
|
|
157295
|
+
this._internal_unstable.storage.reset();
|
|
157296
|
+
this.#notifySubscribers(subSpecs);
|
|
157297
|
+
}
|
|
157234
157298
|
#notifySubscribers(subs) {
|
|
157235
157299
|
if (subs.length === 0) {
|
|
157236
157300
|
return;
|
|
@@ -157380,12 +157444,9 @@ var CacheInternal2 = class {
|
|
|
157380
157444
|
);
|
|
157381
157445
|
}
|
|
157382
157446
|
}
|
|
157383
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
157384
|
-
(field2) => typeof value2[field2] === "undefined"
|
|
157385
|
-
).length > 0;
|
|
157386
157447
|
let linkedID = null;
|
|
157387
157448
|
if (value2 !== null) {
|
|
157388
|
-
linkedID = !
|
|
157449
|
+
linkedID = !this.isEmbedded(linkedType, value2) ? this.id(linkedType, value2) : `${parent2}.${key}`;
|
|
157389
157450
|
}
|
|
157390
157451
|
let linkChange = linkedID !== previousValue;
|
|
157391
157452
|
layer.writeLink(parent2, key, linkedID);
|
|
@@ -157413,7 +157474,7 @@ var CacheInternal2 = class {
|
|
|
157413
157474
|
forceNotify
|
|
157414
157475
|
});
|
|
157415
157476
|
}
|
|
157416
|
-
} else if (Array.isArray(value2) && (typeof previousValue === "undefined" || Array.isArray(previousValue))) {
|
|
157477
|
+
} else if (Array.isArray(value2) && (typeof previousValue === "undefined" || previousValue === null || Array.isArray(previousValue))) {
|
|
157417
157478
|
let oldIDs = [...previousValue || []];
|
|
157418
157479
|
const emptyEdges = !updates ? [] : oldIDs.map((id2) => {
|
|
157419
157480
|
if (!id2) {
|
|
@@ -157486,7 +157547,7 @@ var CacheInternal2 = class {
|
|
|
157486
157547
|
} else {
|
|
157487
157548
|
linkedIDs = nestedIDs;
|
|
157488
157549
|
}
|
|
157489
|
-
const contentChanged = !deepEquals2(linkedIDs, oldIDs);
|
|
157550
|
+
const contentChanged = !deepEquals2(linkedIDs, oldIDs) || previousValue === null;
|
|
157490
157551
|
if (contentChanged || forceNotify) {
|
|
157491
157552
|
toNotify.push(...currentSubscribers);
|
|
157492
157553
|
}
|
|
@@ -157757,6 +157818,10 @@ var CacheInternal2 = class {
|
|
|
157757
157818
|
computeID(type, data2) {
|
|
157758
157819
|
return computeID2(this.config, type, data2);
|
|
157759
157820
|
}
|
|
157821
|
+
isEmbedded(linkedType, value2) {
|
|
157822
|
+
const idFields = this.idFields(linkedType);
|
|
157823
|
+
return idFields.length === 0 || idFields.filter((field) => typeof value2[field] === "undefined").length > 0;
|
|
157824
|
+
}
|
|
157760
157825
|
hydrateNestedList({
|
|
157761
157826
|
fields,
|
|
157762
157827
|
variables,
|
|
@@ -157864,9 +157929,6 @@ var CacheInternal2 = class {
|
|
|
157864
157929
|
}
|
|
157865
157930
|
const entryObj = entry;
|
|
157866
157931
|
let linkedID = `${recordID}.${key}[${this.storage.nextRank}]`;
|
|
157867
|
-
const embedded = this.idFields(linkedType)?.filter(
|
|
157868
|
-
(field) => typeof entry[field] === "undefined"
|
|
157869
|
-
).length > 0;
|
|
157870
157932
|
let innerType = linkedType;
|
|
157871
157933
|
const typename = entryObj.__typename;
|
|
157872
157934
|
if (typename) {
|
|
@@ -157874,7 +157936,7 @@ var CacheInternal2 = class {
|
|
|
157874
157936
|
} else if (abstract) {
|
|
157875
157937
|
throw new Error("Encountered interface type without __typename in the payload");
|
|
157876
157938
|
}
|
|
157877
|
-
if (!
|
|
157939
|
+
if (!this.isEmbedded(linkedType, entry)) {
|
|
157878
157940
|
const id2 = this.id(innerType, entry);
|
|
157879
157941
|
if (id2) {
|
|
157880
157942
|
linkedID = id2;
|
|
@@ -158140,7 +158202,7 @@ var recast2 = __toESM3(require_main22(), 1);
|
|
|
158140
158202
|
var AST2 = recast2.types.builders;
|
|
158141
158203
|
var graphql42 = __toESM3(require_graphql22(), 1);
|
|
158142
158204
|
var graphql14 = __toESM3(require_graphql22(), 1);
|
|
158143
|
-
var
|
|
158205
|
+
var recast5 = __toESM3(require_main22(), 1);
|
|
158144
158206
|
var recast22 = __toESM3(require_main22(), 1);
|
|
158145
158207
|
var AST22 = recast22.types.builders;
|
|
158146
158208
|
var { toString } = {};
|
|
@@ -158156,7 +158218,6 @@ var graphql7 = __toESM3(require_graphql22(), 1);
|
|
|
158156
158218
|
var recast4 = __toESM3(require_main22(), 1);
|
|
158157
158219
|
var AST4 = recast4.types.builders;
|
|
158158
158220
|
var graphql13 = __toESM3(require_graphql22(), 1);
|
|
158159
|
-
var recast5 = __toESM3(require_main22(), 1);
|
|
158160
158221
|
var graphql11 = __toESM3(require_graphql22(), 1);
|
|
158161
158222
|
var graphql9 = __toESM3(require_graphql22(), 1);
|
|
158162
158223
|
var graphql10 = __toESM3(require_graphql22(), 1);
|
|
@@ -158242,32 +158303,31 @@ var pageInfoSelection = [
|
|
|
158242
158303
|
];
|
|
158243
158304
|
var graphql12 = __toESM3(require_graphql22(), 1);
|
|
158244
158305
|
var AST5 = recast5.types.builders;
|
|
158306
|
+
var recast6 = __toESM3(require_main22(), 1);
|
|
158245
158307
|
var AST6 = recast6.types.builders;
|
|
158246
|
-
var
|
|
158247
|
-
var AST7 = recast7.types.builders;
|
|
158248
|
-
var recast13 = __toESM3(require_main22(), 1);
|
|
158308
|
+
var recast12 = __toESM3(require_main22(), 1);
|
|
158249
158309
|
var graphql17 = __toESM3(require_graphql22(), 1);
|
|
158250
|
-
var recast10 = __toESM3(require_main22(), 1);
|
|
158251
|
-
var graphql16 = __toESM3(require_graphql22(), 1);
|
|
158252
158310
|
var recast9 = __toESM3(require_main22(), 1);
|
|
158253
|
-
var
|
|
158311
|
+
var graphql16 = __toESM3(require_graphql22(), 1);
|
|
158254
158312
|
var recast8 = __toESM3(require_main22(), 1);
|
|
158313
|
+
var graphql15 = __toESM3(require_graphql22(), 1);
|
|
158314
|
+
var recast7 = __toESM3(require_main22(), 1);
|
|
158315
|
+
var AST7 = recast7.types.builders;
|
|
158255
158316
|
var AST8 = recast8.types.builders;
|
|
158256
158317
|
var AST9 = recast9.types.builders;
|
|
158257
|
-
var AST10 = recast10.types.builders;
|
|
158258
158318
|
var graphql18 = __toESM3(require_graphql22(), 1);
|
|
158319
|
+
var recast10 = __toESM3(require_main22(), 1);
|
|
158320
|
+
var AST10 = recast10.types.builders;
|
|
158259
158321
|
var recast11 = __toESM3(require_main22(), 1);
|
|
158260
158322
|
var AST11 = recast11.types.builders;
|
|
158261
|
-
var recast12 = __toESM3(require_main22(), 1);
|
|
158262
158323
|
var AST12 = recast12.types.builders;
|
|
158263
|
-
var AST13 = recast13.types.builders;
|
|
158264
158324
|
var graphql19 = __toESM3(require_graphql22(), 1);
|
|
158265
|
-
var
|
|
158266
|
-
var
|
|
158325
|
+
var recast13 = __toESM3(require_main22(), 1);
|
|
158326
|
+
var AST13 = recast13.types.builders;
|
|
158267
158327
|
var graphql20 = __toESM3(require_graphql22(), 1);
|
|
158268
158328
|
var graphql21 = __toESM3(require_graphql22(), 1);
|
|
158269
|
-
var
|
|
158270
|
-
var
|
|
158329
|
+
var recast14 = __toESM3(require_main22(), 1);
|
|
158330
|
+
var AST14 = recast14.types.builders;
|
|
158271
158331
|
var graphql222 = __toESM3(require_graphql22(), 1);
|
|
158272
158332
|
var graphql23 = __toESM3(require_graphql22(), 1);
|
|
158273
158333
|
var graphql24 = __toESM3(require_graphql22(), 1);
|
|
@@ -158337,8 +158397,8 @@ function find_exported_fn(body, name) {
|
|
|
158337
158397
|
}
|
|
158338
158398
|
return exported2.declaration;
|
|
158339
158399
|
}
|
|
158340
|
-
var
|
|
158341
|
-
var
|
|
158400
|
+
var recast15 = __toESM3(require_main22(), 1);
|
|
158401
|
+
var AST15 = recast15.types.builders;
|
|
158342
158402
|
function ensure_imports({
|
|
158343
158403
|
config: config4,
|
|
158344
158404
|
script,
|
|
@@ -158354,13 +158414,13 @@ function ensure_imports({
|
|
|
158354
158414
|
if (!has_import) {
|
|
158355
158415
|
script.body.unshift({
|
|
158356
158416
|
type: "ImportDeclaration",
|
|
158357
|
-
source:
|
|
158417
|
+
source: AST15.stringLiteral(sourceModule),
|
|
158358
158418
|
importKind
|
|
158359
158419
|
});
|
|
158360
158420
|
}
|
|
158361
158421
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
158362
158422
|
}
|
|
158363
|
-
const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) =>
|
|
158423
|
+
const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST15.identifier(id2));
|
|
158364
158424
|
const toImport = idList.filter(
|
|
158365
158425
|
(identifier) => !script.body.find(
|
|
158366
158426
|
(statement) => statement.type === "ImportDeclaration" && statement.specifiers?.find(
|
|
@@ -158371,16 +158431,16 @@ function ensure_imports({
|
|
|
158371
158431
|
if (toImport.length > 0) {
|
|
158372
158432
|
script.body.unshift({
|
|
158373
158433
|
type: "ImportDeclaration",
|
|
158374
|
-
source:
|
|
158434
|
+
source: AST15.stringLiteral(sourceModule),
|
|
158375
158435
|
specifiers: toImport.map(
|
|
158376
|
-
(identifier, i22) => !Array.isArray(importID) ?
|
|
158436
|
+
(identifier, i22) => !Array.isArray(importID) ? AST15.importDefaultSpecifier(identifier) : AST15.importSpecifier(identifier, as?.[i22] ? AST15.identifier(as[i22]) : identifier)
|
|
158377
158437
|
),
|
|
158378
158438
|
importKind
|
|
158379
158439
|
});
|
|
158380
158440
|
}
|
|
158381
158441
|
for (const [i22, target] of (as ?? []).entries()) {
|
|
158382
158442
|
if (target) {
|
|
158383
|
-
idList[i22] =
|
|
158443
|
+
idList[i22] = AST15.identifier(target);
|
|
158384
158444
|
}
|
|
158385
158445
|
}
|
|
158386
158446
|
return {
|
|
@@ -186582,8 +186642,8 @@ export type ${config4.variableFunctionName(
|
|
|
186582
186642
|
}
|
|
186583
186643
|
|
|
186584
186644
|
// src/plugin/codegen/fragmentTypedefs/index.ts
|
|
186585
|
-
var
|
|
186586
|
-
var
|
|
186645
|
+
var recast16 = __toESM(require_main5(), 1);
|
|
186646
|
+
var AST16 = recast16.types.builders;
|
|
186587
186647
|
async function fragmentTypedefs(input) {
|
|
186588
186648
|
let fragments = {};
|
|
186589
186649
|
for (const doc of input.documents) {
|
|
@@ -186629,43 +186689,43 @@ async function fragmentTypedefs(input) {
|
|
|
186629
186689
|
}
|
|
186630
186690
|
const store = store_name({ config: input.config, name: doc.name });
|
|
186631
186691
|
const import_path = path_exports.join("..", stores_directory_name(), doc.name);
|
|
186632
|
-
const fragment_map =
|
|
186633
|
-
|
|
186634
|
-
|
|
186635
|
-
|
|
186636
|
-
|
|
186637
|
-
|
|
186638
|
-
|
|
186639
|
-
|
|
186692
|
+
const fragment_map = AST16.tsTypeLiteral([
|
|
186693
|
+
AST16.tsPropertySignature(
|
|
186694
|
+
AST16.stringLiteral(fragmentKey),
|
|
186695
|
+
AST16.tsTypeAnnotation(
|
|
186696
|
+
AST16.tsTypeLiteral([
|
|
186697
|
+
AST16.tsPropertySignature(
|
|
186698
|
+
AST16.identifier(doc.name),
|
|
186699
|
+
AST16.tsTypeAnnotation(AST16.tsAnyKeyword())
|
|
186640
186700
|
)
|
|
186641
186701
|
])
|
|
186642
186702
|
)
|
|
186643
186703
|
)
|
|
186644
186704
|
]);
|
|
186645
|
-
const non_exhaustive =
|
|
186646
|
-
|
|
186647
|
-
|
|
186648
|
-
|
|
186649
|
-
|
|
186705
|
+
const non_exhaustive = AST16.tsTypeLiteral([
|
|
186706
|
+
AST16.tsPropertySignature(
|
|
186707
|
+
AST16.literal("__typename"),
|
|
186708
|
+
AST16.tsTypeAnnotation(
|
|
186709
|
+
AST16.tsLiteralType(AST16.stringLiteral("non-exhaustive; don't match this"))
|
|
186650
186710
|
)
|
|
186651
186711
|
)
|
|
186652
186712
|
]);
|
|
186653
|
-
const initial_value_input =
|
|
186654
|
-
initial_value_input.typeAnnotation =
|
|
186655
|
-
|
|
186713
|
+
const initial_value_input = AST16.identifier("initialValue");
|
|
186714
|
+
initial_value_input.typeAnnotation = AST16.tsTypeAnnotation(
|
|
186715
|
+
AST16.tsUnionType([fragment_map, non_exhaustive])
|
|
186656
186716
|
);
|
|
186657
|
-
const initial_value_or_null_input =
|
|
186658
|
-
initial_value_or_null_input.typeAnnotation =
|
|
186659
|
-
|
|
186717
|
+
const initial_value_or_null_input = AST16.identifier("initialValue");
|
|
186718
|
+
initial_value_or_null_input.typeAnnotation = AST16.tsTypeAnnotation(
|
|
186719
|
+
AST16.tsUnionType([
|
|
186660
186720
|
fragment_map,
|
|
186661
|
-
|
|
186662
|
-
|
|
186721
|
+
AST16.tsNullKeyword(),
|
|
186722
|
+
AST16.tsUndefinedKeyword(),
|
|
186663
186723
|
non_exhaustive
|
|
186664
186724
|
])
|
|
186665
186725
|
);
|
|
186666
|
-
const document_input =
|
|
186667
|
-
document_input.typeAnnotation =
|
|
186668
|
-
|
|
186726
|
+
const document_input = AST16.identifier("document");
|
|
186727
|
+
document_input.typeAnnotation = AST16.tsTypeAnnotation(
|
|
186728
|
+
AST16.tsTypeReference(AST16.identifier(store))
|
|
186669
186729
|
);
|
|
186670
186730
|
let store_type = "FragmentStoreInstance";
|
|
186671
186731
|
if (doc.refetch?.paginated) {
|
|
@@ -186696,37 +186756,37 @@ async function fragmentTypedefs(input) {
|
|
|
186696
186756
|
sourceModule: "../../../artifacts/" + doc.name,
|
|
186697
186757
|
import: [inputID, shapeID]
|
|
186698
186758
|
});
|
|
186699
|
-
const typeParams = [
|
|
186700
|
-
const return_value =
|
|
186701
|
-
|
|
186702
|
-
|
|
186703
|
-
|
|
186759
|
+
const typeParams = [AST16.tsTypeReference(AST16.identifier(inputID))];
|
|
186760
|
+
const return_value = AST16.tsTypeReference(
|
|
186761
|
+
AST16.identifier(store_type),
|
|
186762
|
+
AST16.tsTypeParameterInstantiation([
|
|
186763
|
+
AST16.tsTypeReference(AST16.identifier(shapeID)),
|
|
186704
186764
|
...typeParams
|
|
186705
186765
|
])
|
|
186706
186766
|
);
|
|
186707
|
-
const null_return_value =
|
|
186708
|
-
|
|
186709
|
-
|
|
186710
|
-
|
|
186711
|
-
|
|
186712
|
-
|
|
186767
|
+
const null_return_value = AST16.tsTypeReference(
|
|
186768
|
+
AST16.identifier(store_type),
|
|
186769
|
+
AST16.tsTypeParameterInstantiation([
|
|
186770
|
+
AST16.tsUnionType([
|
|
186771
|
+
AST16.tsTypeReference(AST16.identifier(shapeID)),
|
|
186772
|
+
AST16.tsNullKeyword()
|
|
186713
186773
|
]),
|
|
186714
186774
|
...typeParams
|
|
186715
186775
|
])
|
|
186716
186776
|
);
|
|
186717
186777
|
return [
|
|
186718
|
-
|
|
186719
|
-
|
|
186720
|
-
|
|
186778
|
+
AST16.exportNamedDeclaration(
|
|
186779
|
+
AST16.tsDeclareFunction(
|
|
186780
|
+
AST16.identifier(which),
|
|
186721
186781
|
[initial_value_input, document_input],
|
|
186722
|
-
|
|
186782
|
+
AST16.tsTypeAnnotation(return_value)
|
|
186723
186783
|
)
|
|
186724
186784
|
),
|
|
186725
|
-
|
|
186726
|
-
|
|
186727
|
-
|
|
186785
|
+
AST16.exportNamedDeclaration(
|
|
186786
|
+
AST16.tsDeclareFunction(
|
|
186787
|
+
AST16.identifier(which),
|
|
186728
186788
|
[initial_value_or_null_input, document_input],
|
|
186729
|
-
|
|
186789
|
+
AST16.tsTypeAnnotation(null_return_value)
|
|
186730
186790
|
)
|
|
186731
186791
|
)
|
|
186732
186792
|
];
|
|
@@ -187509,17 +187569,17 @@ function is_root_route(filepath) {
|
|
|
187509
187569
|
var empty_layout = "<slot />";
|
|
187510
187570
|
|
|
187511
187571
|
// src/plugin/transforms/index.ts
|
|
187512
|
-
var
|
|
187572
|
+
var recast23 = __toESM(require_main5(), 1);
|
|
187513
187573
|
|
|
187514
187574
|
// src/plugin/transforms/componentQuery.ts
|
|
187515
|
-
var
|
|
187516
|
-
var
|
|
187575
|
+
var recast17 = __toESM(require_main5(), 1);
|
|
187576
|
+
var AST17 = recast17.types.builders;
|
|
187517
187577
|
async function QueryProcessor(config4, page2) {
|
|
187518
187578
|
if (!is_component(config4, page2.framework, page2.filepath)) {
|
|
187519
187579
|
return;
|
|
187520
187580
|
}
|
|
187521
187581
|
const store_id = (name) => {
|
|
187522
|
-
return
|
|
187582
|
+
return AST17.identifier(`_houdini_` + name);
|
|
187523
187583
|
};
|
|
187524
187584
|
const queries = await find_inline_queries(page2, page2.script, store_id);
|
|
187525
187585
|
if (queries.length === 0) {
|
|
@@ -187569,8 +187629,8 @@ async function QueryProcessor(config4, page2) {
|
|
|
187569
187629
|
page2.script.body.splice(
|
|
187570
187630
|
find_insert_index(page2.script),
|
|
187571
187631
|
0,
|
|
187572
|
-
|
|
187573
|
-
|
|
187632
|
+
AST17.variableDeclaration("const", [
|
|
187633
|
+
AST17.variableDeclarator(store_id(query3.name.value), AST17.newExpression(factory, []))
|
|
187574
187634
|
])
|
|
187575
187635
|
);
|
|
187576
187636
|
}
|
|
@@ -187587,63 +187647,63 @@ async function QueryProcessor(config4, page2) {
|
|
|
187587
187647
|
});
|
|
187588
187648
|
}
|
|
187589
187649
|
return [
|
|
187590
|
-
|
|
187591
|
-
|
|
187592
|
-
|
|
187593
|
-
|
|
187650
|
+
AST17.labeledStatement(
|
|
187651
|
+
AST17.identifier("$"),
|
|
187652
|
+
AST17.expressionStatement(
|
|
187653
|
+
AST17.logicalExpression(
|
|
187594
187654
|
"&&",
|
|
187595
|
-
|
|
187596
|
-
|
|
187597
|
-
|
|
187655
|
+
AST17.identifier("isBrowser"),
|
|
187656
|
+
AST17.callExpression(
|
|
187657
|
+
AST17.memberExpression(
|
|
187598
187658
|
store_id(query3.name.value),
|
|
187599
|
-
|
|
187659
|
+
AST17.identifier("fetch")
|
|
187600
187660
|
),
|
|
187601
187661
|
[
|
|
187602
|
-
|
|
187603
|
-
|
|
187604
|
-
|
|
187605
|
-
|
|
187606
|
-
|
|
187607
|
-
|
|
187608
|
-
|
|
187609
|
-
|
|
187610
|
-
|
|
187662
|
+
AST17.objectExpression([
|
|
187663
|
+
AST17.objectProperty(
|
|
187664
|
+
AST17.identifier("variables"),
|
|
187665
|
+
AST17.callExpression(AST17.identifier("marshalInputs"), [
|
|
187666
|
+
AST17.objectExpression([
|
|
187667
|
+
AST17.objectProperty(
|
|
187668
|
+
AST17.identifier("config"),
|
|
187669
|
+
AST17.callExpression(
|
|
187670
|
+
AST17.identifier("getCurrentConfig"),
|
|
187611
187671
|
[]
|
|
187612
187672
|
)
|
|
187613
187673
|
),
|
|
187614
|
-
|
|
187615
|
-
|
|
187616
|
-
|
|
187674
|
+
AST17.objectProperty(
|
|
187675
|
+
AST17.identifier("artifact"),
|
|
187676
|
+
AST17.memberExpression(
|
|
187617
187677
|
store_id(query3.name.value),
|
|
187618
|
-
|
|
187678
|
+
AST17.identifier("artifact")
|
|
187619
187679
|
)
|
|
187620
187680
|
),
|
|
187621
|
-
|
|
187622
|
-
|
|
187623
|
-
has_variables ?
|
|
187624
|
-
|
|
187625
|
-
|
|
187626
|
-
|
|
187681
|
+
AST17.objectProperty(
|
|
187682
|
+
AST17.identifier("input"),
|
|
187683
|
+
has_variables ? AST17.callExpression(
|
|
187684
|
+
AST17.memberExpression(
|
|
187685
|
+
AST17.identifier(variable_fn),
|
|
187686
|
+
AST17.identifier("call")
|
|
187627
187687
|
),
|
|
187628
187688
|
[
|
|
187629
|
-
|
|
187630
|
-
|
|
187689
|
+
AST17.newExpression(
|
|
187690
|
+
AST17.identifier(
|
|
187631
187691
|
"RequestContext"
|
|
187632
187692
|
),
|
|
187633
187693
|
[]
|
|
187634
187694
|
),
|
|
187635
|
-
|
|
187636
|
-
|
|
187637
|
-
|
|
187695
|
+
AST17.objectExpression([
|
|
187696
|
+
AST17.objectProperty(
|
|
187697
|
+
AST17.identifier(
|
|
187638
187698
|
"props"
|
|
187639
187699
|
),
|
|
187640
|
-
|
|
187700
|
+
AST17.objectExpression(
|
|
187641
187701
|
props.map(
|
|
187642
|
-
(prop) =>
|
|
187643
|
-
|
|
187702
|
+
(prop) => AST17.objectProperty(
|
|
187703
|
+
AST17.identifier(
|
|
187644
187704
|
prop
|
|
187645
187705
|
),
|
|
187646
|
-
|
|
187706
|
+
AST17.identifier(
|
|
187647
187707
|
prop
|
|
187648
187708
|
)
|
|
187649
187709
|
)
|
|
@@ -187652,7 +187712,7 @@ async function QueryProcessor(config4, page2) {
|
|
|
187652
187712
|
)
|
|
187653
187713
|
])
|
|
187654
187714
|
]
|
|
187655
|
-
) :
|
|
187715
|
+
) : AST17.objectExpression([])
|
|
187656
187716
|
)
|
|
187657
187717
|
])
|
|
187658
187718
|
])
|
|
@@ -187698,8 +187758,8 @@ async function find_inline_queries(page2, parsed, store_id) {
|
|
|
187698
187758
|
}
|
|
187699
187759
|
|
|
187700
187760
|
// src/plugin/transforms/kit/init.ts
|
|
187701
|
-
var
|
|
187702
|
-
var
|
|
187761
|
+
var recast18 = __toESM(require_main5(), 1);
|
|
187762
|
+
var AST18 = recast18.types.builders;
|
|
187703
187763
|
async function kit_init(page2) {
|
|
187704
187764
|
if (!is_root_layout(page2.config, page2.filepath)) {
|
|
187705
187765
|
return;
|
|
@@ -187723,9 +187783,9 @@ async function kit_init(page2) {
|
|
|
187723
187783
|
import: ["extractSession", "setClientSession"]
|
|
187724
187784
|
}).ids;
|
|
187725
187785
|
page2.script.body.push(
|
|
187726
|
-
|
|
187727
|
-
|
|
187728
|
-
|
|
187786
|
+
AST18.expressionStatement(
|
|
187787
|
+
AST18.callExpression(on_mount, [
|
|
187788
|
+
AST18.arrowFunctionExpression([], AST18.callExpression(set_client_started, []))
|
|
187729
187789
|
])
|
|
187730
187790
|
)
|
|
187731
187791
|
);
|
|
@@ -187736,17 +187796,17 @@ async function kit_init(page2) {
|
|
|
187736
187796
|
import: ["page"]
|
|
187737
187797
|
}).ids[0];
|
|
187738
187798
|
page2.script.body.push(
|
|
187739
|
-
|
|
187740
|
-
|
|
187741
|
-
|
|
187742
|
-
[
|
|
187743
|
-
|
|
187744
|
-
|
|
187745
|
-
|
|
187746
|
-
|
|
187747
|
-
|
|
187748
|
-
|
|
187749
|
-
|
|
187799
|
+
AST18.expressionStatement(
|
|
187800
|
+
AST18.callExpression(AST18.memberExpression(store_id, AST18.identifier("subscribe")), [
|
|
187801
|
+
AST18.arrowFunctionExpression(
|
|
187802
|
+
[AST18.identifier("val")],
|
|
187803
|
+
AST18.blockStatement([
|
|
187804
|
+
AST18.expressionStatement(
|
|
187805
|
+
AST18.callExpression(set_session, [
|
|
187806
|
+
AST18.callExpression(extract_session, [
|
|
187807
|
+
AST18.memberExpression(
|
|
187808
|
+
AST18.identifier("val"),
|
|
187809
|
+
AST18.identifier("data")
|
|
187750
187810
|
)
|
|
187751
187811
|
])
|
|
187752
187812
|
])
|
|
@@ -187760,15 +187820,15 @@ async function kit_init(page2) {
|
|
|
187760
187820
|
|
|
187761
187821
|
// src/plugin/transforms/kit/load.ts
|
|
187762
187822
|
var graphql30 = __toESM(require_graphql4(), 1);
|
|
187763
|
-
var
|
|
187764
|
-
var
|
|
187823
|
+
var recast19 = __toESM(require_main5(), 1);
|
|
187824
|
+
var AST19 = recast19.types.builders;
|
|
187765
187825
|
async function kit_load_generator(page2) {
|
|
187766
187826
|
const route = is_route(page2.config, page2.framework, page2.filepath);
|
|
187767
187827
|
const script = is_route_script(page2.framework, page2.filepath);
|
|
187768
187828
|
if (!route && !script) {
|
|
187769
187829
|
return;
|
|
187770
187830
|
}
|
|
187771
|
-
const inline_query_store = (name) => route ?
|
|
187831
|
+
const inline_query_store = (name) => route ? AST19.memberExpression(AST19.identifier("data"), AST19.identifier(name)) : artifact_import({
|
|
187772
187832
|
config: page2.config,
|
|
187773
187833
|
script: page2.script,
|
|
187774
187834
|
page: page2,
|
|
@@ -187819,8 +187879,8 @@ async function kit_load_generator(page2) {
|
|
|
187819
187879
|
find_insert_index(page2.script),
|
|
187820
187880
|
0,
|
|
187821
187881
|
...!has_data ? [
|
|
187822
|
-
|
|
187823
|
-
|
|
187882
|
+
AST19.exportNamedDeclaration(
|
|
187883
|
+
AST19.variableDeclaration("let", [AST19.identifier("data")])
|
|
187824
187884
|
)
|
|
187825
187885
|
] : []
|
|
187826
187886
|
);
|
|
@@ -187867,43 +187927,43 @@ function add_load({
|
|
|
187867
187927
|
let before_load = page_info.exports.includes(houdini_before_load_fn);
|
|
187868
187928
|
let afterLoad = page_info.exports.includes(houdini_afterLoad_fn);
|
|
187869
187929
|
let on_error = page_info.exports.includes(houdini_on_error_fn);
|
|
187870
|
-
const request_context =
|
|
187871
|
-
const promise_list =
|
|
187872
|
-
const return_value =
|
|
187873
|
-
const result_obj =
|
|
187874
|
-
const input_obj =
|
|
187875
|
-
const preload_fn =
|
|
187876
|
-
|
|
187877
|
-
[
|
|
187878
|
-
|
|
187879
|
-
|
|
187880
|
-
|
|
187930
|
+
const request_context = AST19.identifier("houdini_context");
|
|
187931
|
+
const promise_list = AST19.identifier("promises");
|
|
187932
|
+
const return_value = AST19.memberExpression(request_context, AST19.identifier("returnValue"));
|
|
187933
|
+
const result_obj = AST19.identifier("result");
|
|
187934
|
+
const input_obj = AST19.identifier("inputs");
|
|
187935
|
+
const preload_fn = AST19.functionDeclaration(
|
|
187936
|
+
AST19.identifier("load"),
|
|
187937
|
+
[AST19.identifier("context")],
|
|
187938
|
+
AST19.blockStatement([
|
|
187939
|
+
AST19.variableDeclaration("const", [
|
|
187940
|
+
AST19.variableDeclarator(
|
|
187881
187941
|
request_context,
|
|
187882
|
-
|
|
187942
|
+
AST19.newExpression(AST19.identifier("RequestContext"), [AST19.identifier("context")])
|
|
187883
187943
|
)
|
|
187884
187944
|
]),
|
|
187885
|
-
|
|
187886
|
-
|
|
187887
|
-
|
|
187888
|
-
|
|
187945
|
+
AST19.variableDeclaration("const", [
|
|
187946
|
+
AST19.variableDeclarator(
|
|
187947
|
+
AST19.identifier("houdiniConfig"),
|
|
187948
|
+
AST19.callExpression(AST19.identifier("getCurrentConfig"), [])
|
|
187889
187949
|
)
|
|
187890
187950
|
]),
|
|
187891
|
-
|
|
187892
|
-
|
|
187951
|
+
AST19.variableDeclaration("const", [
|
|
187952
|
+
AST19.variableDeclarator(promise_list, AST19.arrayExpression([]))
|
|
187893
187953
|
]),
|
|
187894
|
-
|
|
187895
|
-
|
|
187954
|
+
AST19.variableDeclaration("const", [
|
|
187955
|
+
AST19.variableDeclarator(input_obj, AST19.objectExpression([]))
|
|
187896
187956
|
]),
|
|
187897
|
-
|
|
187898
|
-
|
|
187899
|
-
|
|
187900
|
-
|
|
187957
|
+
AST19.returnStatement(
|
|
187958
|
+
AST19.objectExpression([
|
|
187959
|
+
AST19.spreadElement(return_value),
|
|
187960
|
+
AST19.spreadElement(result_obj)
|
|
187901
187961
|
])
|
|
187902
187962
|
)
|
|
187903
187963
|
])
|
|
187904
187964
|
);
|
|
187905
187965
|
preload_fn.async = true;
|
|
187906
|
-
page2.script.body.push(
|
|
187966
|
+
page2.script.body.push(AST19.exportNamedDeclaration(preload_fn));
|
|
187907
187967
|
let insert_index = 4;
|
|
187908
187968
|
for (const query3 of queries) {
|
|
187909
187969
|
const { ids } = ensure_imports({
|
|
@@ -187913,19 +187973,19 @@ function add_load({
|
|
|
187913
187973
|
sourceModule: store_import_path({ config: page2.config, name: query3.name.value })
|
|
187914
187974
|
});
|
|
187915
187975
|
const load_fn = ids[0];
|
|
187916
|
-
const variables = (query3.variableDefinitions?.length ?? 0) > 0 ?
|
|
187917
|
-
|
|
187918
|
-
|
|
187919
|
-
|
|
187976
|
+
const variables = (query3.variableDefinitions?.length ?? 0) > 0 ? AST19.awaitExpression(
|
|
187977
|
+
AST19.callExpression(AST19.identifier(__variable_fn_name(query3.name.value)), [
|
|
187978
|
+
AST19.identifier("houdiniConfig"),
|
|
187979
|
+
AST19.identifier("context")
|
|
187920
187980
|
])
|
|
187921
|
-
) :
|
|
187981
|
+
) : AST19.objectExpression([]);
|
|
187922
187982
|
preload_fn.body.body.splice(
|
|
187923
187983
|
insert_index++,
|
|
187924
187984
|
0,
|
|
187925
|
-
|
|
187926
|
-
|
|
187985
|
+
AST19.expressionStatement(
|
|
187986
|
+
AST19.assignmentExpression(
|
|
187927
187987
|
"=",
|
|
187928
|
-
|
|
187988
|
+
AST19.memberExpression(input_obj, AST19.literal(query3.name.value)),
|
|
187929
187989
|
variables
|
|
187930
187990
|
)
|
|
187931
187991
|
)
|
|
@@ -187933,18 +187993,18 @@ function add_load({
|
|
|
187933
187993
|
preload_fn.body.body.splice(
|
|
187934
187994
|
insert_index++,
|
|
187935
187995
|
0,
|
|
187936
|
-
|
|
187937
|
-
|
|
187938
|
-
|
|
187939
|
-
|
|
187940
|
-
|
|
187941
|
-
|
|
187942
|
-
|
|
187996
|
+
AST19.expressionStatement(
|
|
187997
|
+
AST19.callExpression(AST19.memberExpression(promise_list, AST19.identifier("push")), [
|
|
187998
|
+
AST19.callExpression(load_fn, [
|
|
187999
|
+
AST19.objectExpression([
|
|
188000
|
+
AST19.objectProperty(
|
|
188001
|
+
AST19.literal("variables"),
|
|
188002
|
+
AST19.memberExpression(input_obj, AST19.literal(query3.name.value))
|
|
187943
188003
|
),
|
|
187944
|
-
|
|
187945
|
-
|
|
187946
|
-
|
|
187947
|
-
afterLoad || on_error ?
|
|
188004
|
+
AST19.objectProperty(AST19.literal("event"), AST19.identifier("context")),
|
|
188005
|
+
AST19.objectProperty(
|
|
188006
|
+
AST19.literal("blocking"),
|
|
188007
|
+
afterLoad || on_error ? AST19.booleanLiteral(true) : AST19.identifier("undefined")
|
|
187948
188008
|
)
|
|
187949
188009
|
])
|
|
187950
188010
|
])
|
|
@@ -187956,28 +188016,28 @@ function add_load({
|
|
|
187956
188016
|
preload_fn.body.body.splice(
|
|
187957
188017
|
insert_index++,
|
|
187958
188018
|
0,
|
|
187959
|
-
|
|
187960
|
-
|
|
188019
|
+
AST19.variableDeclaration("let", [
|
|
188020
|
+
AST19.variableDeclarator(result_obj, AST19.objectExpression([]))
|
|
187961
188021
|
]),
|
|
187962
|
-
|
|
187963
|
-
|
|
187964
|
-
|
|
187965
|
-
|
|
188022
|
+
AST19.tryStatement(
|
|
188023
|
+
AST19.blockStatement([
|
|
188024
|
+
AST19.expressionStatement(
|
|
188025
|
+
AST19.assignmentExpression(
|
|
187966
188026
|
"=",
|
|
187967
188027
|
result_obj,
|
|
187968
|
-
|
|
187969
|
-
|
|
187970
|
-
|
|
187971
|
-
|
|
188028
|
+
AST19.callExpression(
|
|
188029
|
+
AST19.memberExpression(
|
|
188030
|
+
AST19.identifier("Object"),
|
|
188031
|
+
AST19.identifier("assign")
|
|
187972
188032
|
),
|
|
187973
188033
|
[
|
|
187974
|
-
|
|
187975
|
-
|
|
187976
|
-
|
|
187977
|
-
|
|
187978
|
-
|
|
187979
|
-
|
|
187980
|
-
|
|
188034
|
+
AST19.objectExpression([]),
|
|
188035
|
+
AST19.spreadElement(
|
|
188036
|
+
AST19.awaitExpression(
|
|
188037
|
+
AST19.callExpression(
|
|
188038
|
+
AST19.memberExpression(
|
|
188039
|
+
AST19.identifier("Promise"),
|
|
188040
|
+
AST19.identifier("all")
|
|
187981
188041
|
),
|
|
187982
188042
|
[promise_list]
|
|
187983
188043
|
)
|
|
@@ -187988,37 +188048,37 @@ function add_load({
|
|
|
187988
188048
|
)
|
|
187989
188049
|
)
|
|
187990
188050
|
]),
|
|
187991
|
-
|
|
187992
|
-
|
|
188051
|
+
AST19.catchClause(
|
|
188052
|
+
AST19.identifier("err"),
|
|
187993
188053
|
null,
|
|
187994
|
-
|
|
187995
|
-
on_error ?
|
|
187996
|
-
|
|
187997
|
-
|
|
187998
|
-
|
|
188054
|
+
AST19.blockStatement([
|
|
188055
|
+
on_error ? AST19.expressionStatement(
|
|
188056
|
+
AST19.awaitExpression(
|
|
188057
|
+
AST19.callExpression(
|
|
188058
|
+
AST19.memberExpression(
|
|
187999
188059
|
request_context,
|
|
188000
|
-
|
|
188060
|
+
AST19.identifier("invokeLoadHook")
|
|
188001
188061
|
),
|
|
188002
188062
|
[
|
|
188003
|
-
|
|
188004
|
-
|
|
188005
|
-
|
|
188006
|
-
|
|
188063
|
+
AST19.objectExpression([
|
|
188064
|
+
AST19.objectProperty(
|
|
188065
|
+
AST19.literal("variant"),
|
|
188066
|
+
AST19.stringLiteral("error")
|
|
188007
188067
|
),
|
|
188008
|
-
|
|
188009
|
-
|
|
188010
|
-
|
|
188068
|
+
AST19.objectProperty(
|
|
188069
|
+
AST19.literal("hookFn"),
|
|
188070
|
+
AST19.identifier(houdini_on_error_fn)
|
|
188011
188071
|
),
|
|
188012
|
-
|
|
188013
|
-
|
|
188014
|
-
|
|
188072
|
+
AST19.objectProperty(
|
|
188073
|
+
AST19.literal("error"),
|
|
188074
|
+
AST19.identifier("err")
|
|
188015
188075
|
),
|
|
188016
|
-
|
|
188076
|
+
AST19.objectProperty(AST19.literal("input"), input_obj)
|
|
188017
188077
|
])
|
|
188018
188078
|
]
|
|
188019
188079
|
)
|
|
188020
188080
|
)
|
|
188021
|
-
) :
|
|
188081
|
+
) : AST19.throwStatement(AST19.identifier("err"))
|
|
188022
188082
|
])
|
|
188023
188083
|
)
|
|
188024
188084
|
)
|
|
@@ -188053,22 +188113,22 @@ async function find_special_query(type, page2) {
|
|
|
188053
188113
|
return definition;
|
|
188054
188114
|
}
|
|
188055
188115
|
function load_hook_statements(name, request_context, input_id, result_id) {
|
|
188056
|
-
return
|
|
188057
|
-
|
|
188058
|
-
|
|
188059
|
-
|
|
188116
|
+
return AST19.expressionStatement(
|
|
188117
|
+
AST19.awaitExpression(
|
|
188118
|
+
AST19.callExpression(
|
|
188119
|
+
AST19.memberExpression(request_context, AST19.identifier("invokeLoadHook")),
|
|
188060
188120
|
[
|
|
188061
|
-
|
|
188062
|
-
|
|
188063
|
-
|
|
188064
|
-
|
|
188065
|
-
|
|
188121
|
+
AST19.objectExpression([
|
|
188122
|
+
AST19.objectProperty(AST19.literal("variant"), AST19.stringLiteral(name)),
|
|
188123
|
+
AST19.objectProperty(
|
|
188124
|
+
AST19.literal("hookFn"),
|
|
188125
|
+
AST19.identifier(
|
|
188066
188126
|
name === "before" ? houdini_before_load_fn : houdini_afterLoad_fn
|
|
188067
188127
|
)
|
|
188068
188128
|
),
|
|
188069
188129
|
...name === "after" ? [
|
|
188070
|
-
|
|
188071
|
-
|
|
188130
|
+
AST19.objectProperty(AST19.literal("input"), input_id),
|
|
188131
|
+
AST19.objectProperty(AST19.literal("data"), result_id)
|
|
188072
188132
|
] : []
|
|
188073
188133
|
])
|
|
188074
188134
|
]
|
|
@@ -188129,22 +188189,22 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
188129
188189
|
};
|
|
188130
188190
|
}
|
|
188131
188191
|
const fn_body = [
|
|
188132
|
-
|
|
188133
|
-
|
|
188134
|
-
|
|
188135
|
-
|
|
188192
|
+
AST19.variableDeclaration("const", [
|
|
188193
|
+
AST19.variableDeclarator(
|
|
188194
|
+
AST19.identifier("result"),
|
|
188195
|
+
AST19.objectExpression(
|
|
188136
188196
|
Object.entries(has_args).map(
|
|
188137
|
-
([arg, type]) =>
|
|
188138
|
-
|
|
188139
|
-
|
|
188140
|
-
|
|
188141
|
-
|
|
188142
|
-
|
|
188143
|
-
|
|
188144
|
-
|
|
188145
|
-
|
|
188197
|
+
([arg, type]) => AST19.objectProperty(
|
|
188198
|
+
AST19.identifier(arg),
|
|
188199
|
+
AST19.callExpression(AST19.identifier("parseScalar"), [
|
|
188200
|
+
AST19.identifier("config"),
|
|
188201
|
+
AST19.stringLiteral(type),
|
|
188202
|
+
AST19.memberExpression(
|
|
188203
|
+
AST19.memberExpression(
|
|
188204
|
+
AST19.identifier("event"),
|
|
188205
|
+
AST19.identifier("params")
|
|
188146
188206
|
),
|
|
188147
|
-
|
|
188207
|
+
AST19.identifier(arg)
|
|
188148
188208
|
)
|
|
188149
188209
|
])
|
|
188150
188210
|
)
|
|
@@ -188155,28 +188215,28 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
188155
188215
|
];
|
|
188156
188216
|
if (has_local) {
|
|
188157
188217
|
fn_body.push(
|
|
188158
|
-
|
|
188159
|
-
|
|
188160
|
-
|
|
188218
|
+
AST19.expressionStatement(
|
|
188219
|
+
AST19.callExpression(
|
|
188220
|
+
AST19.memberExpression(AST19.identifier("Object"), AST19.identifier("assign")),
|
|
188161
188221
|
[
|
|
188162
|
-
|
|
188163
|
-
|
|
188164
|
-
|
|
188165
|
-
|
|
188166
|
-
|
|
188167
|
-
|
|
188222
|
+
AST19.identifier("result"),
|
|
188223
|
+
AST19.callExpression(AST19.identifier("marshalInputs"), [
|
|
188224
|
+
AST19.objectExpression([
|
|
188225
|
+
AST19.objectProperty(
|
|
188226
|
+
AST19.identifier("config"),
|
|
188227
|
+
AST19.identifier("config")
|
|
188168
188228
|
),
|
|
188169
|
-
|
|
188170
|
-
|
|
188171
|
-
|
|
188172
|
-
|
|
188173
|
-
|
|
188174
|
-
[
|
|
188229
|
+
AST19.objectProperty(
|
|
188230
|
+
AST19.identifier("input"),
|
|
188231
|
+
AST19.awaitExpression(
|
|
188232
|
+
AST19.callExpression(
|
|
188233
|
+
AST19.identifier(query_variable_fn(query3.name.value)),
|
|
188234
|
+
[AST19.identifier("event")]
|
|
188175
188235
|
)
|
|
188176
188236
|
)
|
|
188177
188237
|
),
|
|
188178
|
-
|
|
188179
|
-
|
|
188238
|
+
AST19.objectProperty(
|
|
188239
|
+
AST19.identifier("artifact"),
|
|
188180
188240
|
artifact_import({
|
|
188181
188241
|
config: page2.config,
|
|
188182
188242
|
script: page2.script,
|
|
@@ -188191,11 +188251,11 @@ function variable_function_for_query(page2, query3, has_local) {
|
|
|
188191
188251
|
)
|
|
188192
188252
|
);
|
|
188193
188253
|
}
|
|
188194
|
-
fn_body.push(
|
|
188195
|
-
const declaration =
|
|
188196
|
-
|
|
188197
|
-
[
|
|
188198
|
-
|
|
188254
|
+
fn_body.push(AST19.returnStatement(AST19.identifier("result")));
|
|
188255
|
+
const declaration = AST19.functionDeclaration(
|
|
188256
|
+
AST19.identifier(__variable_fn_name(query3.name.value)),
|
|
188257
|
+
[AST19.identifier("config"), AST19.identifier("event")],
|
|
188258
|
+
AST19.blockStatement(fn_body)
|
|
188199
188259
|
);
|
|
188200
188260
|
declaration.async = true;
|
|
188201
188261
|
return declaration;
|
|
@@ -188205,8 +188265,8 @@ function __variable_fn_name(name) {
|
|
|
188205
188265
|
}
|
|
188206
188266
|
|
|
188207
188267
|
// src/plugin/transforms/kit/session.ts
|
|
188208
|
-
var
|
|
188209
|
-
var
|
|
188268
|
+
var recast20 = __toESM(require_main5(), 1);
|
|
188269
|
+
var AST20 = recast20.types.builders;
|
|
188210
188270
|
function session_default(page2) {
|
|
188211
188271
|
if (is_root_layout_server(page2.config, page2.filepath)) {
|
|
188212
188272
|
process_root_layout_server(page2);
|
|
@@ -188222,12 +188282,12 @@ function process_root_layout_server(page2) {
|
|
|
188222
188282
|
sourceModule: "$houdini/plugins/houdini-svelte/runtime/session"
|
|
188223
188283
|
}).ids[0];
|
|
188224
188284
|
add_load_return(page2, (event_id) => [
|
|
188225
|
-
|
|
188285
|
+
AST20.spreadElement(AST20.callExpression(build_session_object, [event_id]))
|
|
188226
188286
|
]);
|
|
188227
188287
|
}
|
|
188228
188288
|
function process_root_layout_script(page2) {
|
|
188229
188289
|
add_load_return(page2, (event_id) => [
|
|
188230
|
-
|
|
188290
|
+
AST20.spreadElement(AST20.memberExpression(event_id, AST20.identifier("data")))
|
|
188231
188291
|
]);
|
|
188232
188292
|
}
|
|
188233
188293
|
function add_load_return(page2, properties) {
|
|
@@ -188239,48 +188299,48 @@ function add_load_return(page2, properties) {
|
|
|
188239
188299
|
if (return_statement_index !== -1) {
|
|
188240
188300
|
return_statement = body.body[return_statement_index];
|
|
188241
188301
|
} else {
|
|
188242
|
-
return_statement =
|
|
188302
|
+
return_statement = AST20.returnStatement(AST20.objectExpression([]));
|
|
188243
188303
|
body.body.push(return_statement);
|
|
188244
188304
|
return_statement_index = body.body.length - 1;
|
|
188245
188305
|
}
|
|
188246
|
-
const local_return_var =
|
|
188247
|
-
body.body[return_statement_index] =
|
|
188248
|
-
|
|
188306
|
+
const local_return_var = AST20.identifier("__houdini__vite__plugin__return__value__");
|
|
188307
|
+
body.body[return_statement_index] = AST20.variableDeclaration("const", [
|
|
188308
|
+
AST20.variableDeclarator(local_return_var, return_statement.argument)
|
|
188249
188309
|
]);
|
|
188250
188310
|
body.body.splice(
|
|
188251
188311
|
return_statement_index + 1,
|
|
188252
188312
|
0,
|
|
188253
|
-
|
|
188254
|
-
|
|
188313
|
+
AST20.returnStatement(
|
|
188314
|
+
AST20.objectExpression([...properties(event_id), AST20.spreadElement(local_return_var)])
|
|
188255
188315
|
)
|
|
188256
188316
|
);
|
|
188257
188317
|
});
|
|
188258
188318
|
}
|
|
188259
188319
|
function modify_load(page2, cb) {
|
|
188260
188320
|
let load_fn = find_exported_fn(page2.script.body, "load");
|
|
188261
|
-
let event_id =
|
|
188262
|
-
let body =
|
|
188321
|
+
let event_id = AST20.identifier("event");
|
|
188322
|
+
let body = AST20.blockStatement([]);
|
|
188263
188323
|
if (load_fn?.type === "ArrowFunctionExpression") {
|
|
188264
188324
|
if (load_fn.body.type === "BlockStatement") {
|
|
188265
188325
|
body = load_fn.body;
|
|
188266
188326
|
} else {
|
|
188267
|
-
body =
|
|
188327
|
+
body = AST20.blockStatement([AST20.returnStatement(load_fn.body)]);
|
|
188268
188328
|
load_fn.body = body;
|
|
188269
188329
|
}
|
|
188270
188330
|
} else if (load_fn) {
|
|
188271
188331
|
body = load_fn.body;
|
|
188272
188332
|
}
|
|
188273
188333
|
if (!load_fn) {
|
|
188274
|
-
load_fn =
|
|
188275
|
-
|
|
188334
|
+
load_fn = AST20.functionDeclaration(
|
|
188335
|
+
AST20.identifier("load"),
|
|
188276
188336
|
[event_id],
|
|
188277
|
-
|
|
188337
|
+
AST20.blockStatement([])
|
|
188278
188338
|
);
|
|
188279
188339
|
load_fn.async = true;
|
|
188280
188340
|
page2.script.body.splice(
|
|
188281
188341
|
find_insert_index(page2.script),
|
|
188282
188342
|
0,
|
|
188283
|
-
|
|
188343
|
+
AST20.exportNamedDeclaration(load_fn)
|
|
188284
188344
|
);
|
|
188285
188345
|
body = load_fn.body;
|
|
188286
188346
|
} else {
|
|
@@ -188292,7 +188352,7 @@ function modify_load(page2, cb) {
|
|
|
188292
188352
|
const pattern = load_fn.params[0];
|
|
188293
188353
|
load_fn.params[0] = event_id;
|
|
188294
188354
|
body.body.unshift(
|
|
188295
|
-
|
|
188355
|
+
AST20.variableDeclaration("let", [AST20.variableDeclarator(pattern, event_id)])
|
|
188296
188356
|
);
|
|
188297
188357
|
} else {
|
|
188298
188358
|
throw new Error(
|
|
@@ -188313,8 +188373,8 @@ async function SvelteKitProcessor(config4, page2) {
|
|
|
188313
188373
|
}
|
|
188314
188374
|
|
|
188315
188375
|
// src/plugin/transforms/tags.ts
|
|
188316
|
-
var
|
|
188317
|
-
var
|
|
188376
|
+
var recast21 = __toESM(require_main5(), 1);
|
|
188377
|
+
var AST21 = recast21.types.builders;
|
|
188318
188378
|
async function GraphQLTagProcessor(config4, page2) {
|
|
188319
188379
|
await find_graphql(config4, page2.script, {
|
|
188320
188380
|
dependency: page2.watch_file,
|
|
@@ -188322,7 +188382,7 @@ async function GraphQLTagProcessor(config4, page2) {
|
|
|
188322
188382
|
const { node: node2, parsedDocument } = tag2;
|
|
188323
188383
|
const operation = config4.extractDefinition(parsedDocument);
|
|
188324
188384
|
const { id: id2 } = store_import({ page: page2, artifact: { name: operation.name.value } });
|
|
188325
|
-
node2.replaceWith(
|
|
188385
|
+
node2.replaceWith(AST21.newExpression(id2, []));
|
|
188326
188386
|
}
|
|
188327
188387
|
});
|
|
188328
188388
|
}
|
|
@@ -188339,7 +188399,7 @@ async function apply_transforms(framework2, page2) {
|
|
|
188339
188399
|
script = res.script;
|
|
188340
188400
|
position = res.position;
|
|
188341
188401
|
} else {
|
|
188342
|
-
script =
|
|
188402
|
+
script = recast23.types.builders.program([]);
|
|
188343
188403
|
position = { start: 0, end: 0 };
|
|
188344
188404
|
}
|
|
188345
188405
|
} else {
|