houdini-svelte 2.0.1 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/plugin/fsPatch.d.ts +13 -1
- package/build/plugin-cjs/index.js +661 -508
- package/build/plugin-esm/index.js +661 -508
- package/build/preprocess-cjs/index.js +621 -467
- package/build/preprocess-esm/index.js +621 -467
- package/build/test-cjs/index.js +620 -273
- package/build/test-esm/index.js +620 -273
- package/package.json +5 -5
package/build/test-esm/index.js
CHANGED
|
@@ -86460,7 +86460,18 @@ var ListManager = class {
|
|
|
86460
86460
|
}
|
|
86461
86461
|
lists = /* @__PURE__ */ new Map();
|
|
86462
86462
|
listsByField = /* @__PURE__ */ new Map();
|
|
86463
|
-
get(listName, id2, allLists) {
|
|
86463
|
+
get(listName, id2, allLists, skipMatches) {
|
|
86464
|
+
const lists = this.getLists(listName, id2, allLists);
|
|
86465
|
+
if (!lists) {
|
|
86466
|
+
return null;
|
|
86467
|
+
}
|
|
86468
|
+
if (skipMatches) {
|
|
86469
|
+
return new ListCollection(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
|
|
86470
|
+
} else {
|
|
86471
|
+
return lists;
|
|
86472
|
+
}
|
|
86473
|
+
}
|
|
86474
|
+
getLists(listName, id2, allLists) {
|
|
86464
86475
|
const matches = this.lists.get(listName);
|
|
86465
86476
|
if (!matches || matches.size === 0) {
|
|
86466
86477
|
return null;
|
|
@@ -86582,6 +86593,9 @@ var List = class {
|
|
|
86582
86593
|
this.manager = manager;
|
|
86583
86594
|
this.abstract = abstract;
|
|
86584
86595
|
}
|
|
86596
|
+
get fieldRef() {
|
|
86597
|
+
return `${this.recordID}.${this.key}`;
|
|
86598
|
+
}
|
|
86585
86599
|
when(when) {
|
|
86586
86600
|
return this.manager.lists.get(this.name).get(this.recordID).when(when);
|
|
86587
86601
|
}
|
|
@@ -87726,8 +87740,8 @@ var Cache = class {
|
|
|
87726
87740
|
variables
|
|
87727
87741
|
);
|
|
87728
87742
|
}
|
|
87729
|
-
list(name, parentID, allLists) {
|
|
87730
|
-
const handler = this._internal_unstable.lists.get(name, parentID, allLists);
|
|
87743
|
+
list(name, parentID, allLists, skipMatches) {
|
|
87744
|
+
const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
|
|
87731
87745
|
if (!handler) {
|
|
87732
87746
|
throw new Error(
|
|
87733
87747
|
`Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
|
|
@@ -88142,6 +88156,7 @@ var CacheInternal = class {
|
|
|
88142
88156
|
});
|
|
88143
88157
|
}
|
|
88144
88158
|
}
|
|
88159
|
+
const processedOperations = /* @__PURE__ */ new Set();
|
|
88145
88160
|
for (const operation of operations || []) {
|
|
88146
88161
|
let parentID;
|
|
88147
88162
|
if (operation.parentID) {
|
|
@@ -88161,7 +88176,12 @@ var CacheInternal = class {
|
|
|
88161
88176
|
const targets = Array.isArray(value) ? value : [value];
|
|
88162
88177
|
for (const target of targets) {
|
|
88163
88178
|
if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
|
|
88164
|
-
this.cache.list(
|
|
88179
|
+
this.cache.list(
|
|
88180
|
+
operation.list,
|
|
88181
|
+
parentID,
|
|
88182
|
+
operation.target === "all",
|
|
88183
|
+
processedOperations
|
|
88184
|
+
).when(operation.when).addToList(
|
|
88165
88185
|
fieldSelection,
|
|
88166
88186
|
target,
|
|
88167
88187
|
variables,
|
|
@@ -88169,7 +88189,12 @@ var CacheInternal = class {
|
|
|
88169
88189
|
layer
|
|
88170
88190
|
);
|
|
88171
88191
|
} else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
|
|
88172
|
-
this.cache.list(
|
|
88192
|
+
this.cache.list(
|
|
88193
|
+
operation.list,
|
|
88194
|
+
parentID,
|
|
88195
|
+
operation.target === "all",
|
|
88196
|
+
processedOperations
|
|
88197
|
+
).when(operation.when).toggleElement({
|
|
88173
88198
|
selection: fieldSelection,
|
|
88174
88199
|
data: target,
|
|
88175
88200
|
variables,
|
|
@@ -88177,7 +88202,12 @@ var CacheInternal = class {
|
|
|
88177
88202
|
layer
|
|
88178
88203
|
});
|
|
88179
88204
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
88180
|
-
this.cache.list(
|
|
88205
|
+
this.cache.list(
|
|
88206
|
+
operation.list,
|
|
88207
|
+
parentID,
|
|
88208
|
+
operation.target === "all",
|
|
88209
|
+
processedOperations
|
|
88210
|
+
).when(operation.when).remove(target, variables, layer);
|
|
88181
88211
|
} else if (operation.action === "delete" && operation.type && target) {
|
|
88182
88212
|
const targetID = this.id(operation.type, target);
|
|
88183
88213
|
if (!targetID) {
|
|
@@ -88189,6 +88219,16 @@ var CacheInternal = class {
|
|
|
88189
88219
|
this.cache.delete(targetID, layer);
|
|
88190
88220
|
}
|
|
88191
88221
|
}
|
|
88222
|
+
if (operation.list) {
|
|
88223
|
+
const matchingLists = this.cache.list(
|
|
88224
|
+
operation.list,
|
|
88225
|
+
parentID,
|
|
88226
|
+
operation.target === "all"
|
|
88227
|
+
);
|
|
88228
|
+
for (const list3 of matchingLists.lists) {
|
|
88229
|
+
processedOperations.add(list3.fieldRef);
|
|
88230
|
+
}
|
|
88231
|
+
}
|
|
88192
88232
|
}
|
|
88193
88233
|
}
|
|
88194
88234
|
return toNotify;
|
|
@@ -142730,6 +142770,11 @@ var CachePolicy = {
|
|
|
142730
142770
|
CacheAndNetwork: "CacheAndNetwork",
|
|
142731
142771
|
NoCache: "NoCache"
|
|
142732
142772
|
};
|
|
142773
|
+
var DedupeMatchMode = {
|
|
142774
|
+
Variables: "Variables",
|
|
142775
|
+
Operation: "Operation",
|
|
142776
|
+
None: "None"
|
|
142777
|
+
};
|
|
142733
142778
|
var PaginateMode = {
|
|
142734
142779
|
Infinite: "Infinite",
|
|
142735
142780
|
SinglePage: "SinglePage"
|
|
@@ -143273,7 +143318,18 @@ var ListManager2 = class {
|
|
|
143273
143318
|
}
|
|
143274
143319
|
lists = /* @__PURE__ */ new Map();
|
|
143275
143320
|
listsByField = /* @__PURE__ */ new Map();
|
|
143276
|
-
get(listName, id2, allLists) {
|
|
143321
|
+
get(listName, id2, allLists, skipMatches) {
|
|
143322
|
+
const lists = this.getLists(listName, id2, allLists);
|
|
143323
|
+
if (!lists) {
|
|
143324
|
+
return null;
|
|
143325
|
+
}
|
|
143326
|
+
if (skipMatches) {
|
|
143327
|
+
return new ListCollection2(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
|
|
143328
|
+
} else {
|
|
143329
|
+
return lists;
|
|
143330
|
+
}
|
|
143331
|
+
}
|
|
143332
|
+
getLists(listName, id2, allLists) {
|
|
143277
143333
|
const matches = this.lists.get(listName);
|
|
143278
143334
|
if (!matches || matches.size === 0) {
|
|
143279
143335
|
return null;
|
|
@@ -143395,6 +143451,9 @@ var List2 = class {
|
|
|
143395
143451
|
this.manager = manager;
|
|
143396
143452
|
this.abstract = abstract;
|
|
143397
143453
|
}
|
|
143454
|
+
get fieldRef() {
|
|
143455
|
+
return `${this.recordID}.${this.key}`;
|
|
143456
|
+
}
|
|
143398
143457
|
when(when) {
|
|
143399
143458
|
return this.manager.lists.get(this.name).get(this.recordID).when(when);
|
|
143400
143459
|
}
|
|
@@ -144539,8 +144598,8 @@ var Cache2 = class {
|
|
|
144539
144598
|
variables
|
|
144540
144599
|
);
|
|
144541
144600
|
}
|
|
144542
|
-
list(name, parentID, allLists) {
|
|
144543
|
-
const handler = this._internal_unstable.lists.get(name, parentID, allLists);
|
|
144601
|
+
list(name, parentID, allLists, skipMatches) {
|
|
144602
|
+
const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
|
|
144544
144603
|
if (!handler) {
|
|
144545
144604
|
throw new Error(
|
|
144546
144605
|
`Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
|
|
@@ -144955,6 +145014,7 @@ var CacheInternal2 = class {
|
|
|
144955
145014
|
});
|
|
144956
145015
|
}
|
|
144957
145016
|
}
|
|
145017
|
+
const processedOperations = /* @__PURE__ */ new Set();
|
|
144958
145018
|
for (const operation of operations || []) {
|
|
144959
145019
|
let parentID;
|
|
144960
145020
|
if (operation.parentID) {
|
|
@@ -144974,7 +145034,12 @@ var CacheInternal2 = class {
|
|
|
144974
145034
|
const targets = Array.isArray(value) ? value : [value];
|
|
144975
145035
|
for (const target of targets) {
|
|
144976
145036
|
if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
|
|
144977
|
-
this.cache.list(
|
|
145037
|
+
this.cache.list(
|
|
145038
|
+
operation.list,
|
|
145039
|
+
parentID,
|
|
145040
|
+
operation.target === "all",
|
|
145041
|
+
processedOperations
|
|
145042
|
+
).when(operation.when).addToList(
|
|
144978
145043
|
fieldSelection,
|
|
144979
145044
|
target,
|
|
144980
145045
|
variables,
|
|
@@ -144982,7 +145047,12 @@ var CacheInternal2 = class {
|
|
|
144982
145047
|
layer
|
|
144983
145048
|
);
|
|
144984
145049
|
} else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
|
|
144985
|
-
this.cache.list(
|
|
145050
|
+
this.cache.list(
|
|
145051
|
+
operation.list,
|
|
145052
|
+
parentID,
|
|
145053
|
+
operation.target === "all",
|
|
145054
|
+
processedOperations
|
|
145055
|
+
).when(operation.when).toggleElement({
|
|
144986
145056
|
selection: fieldSelection,
|
|
144987
145057
|
data: target,
|
|
144988
145058
|
variables,
|
|
@@ -144990,7 +145060,12 @@ var CacheInternal2 = class {
|
|
|
144990
145060
|
layer
|
|
144991
145061
|
});
|
|
144992
145062
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
144993
|
-
this.cache.list(
|
|
145063
|
+
this.cache.list(
|
|
145064
|
+
operation.list,
|
|
145065
|
+
parentID,
|
|
145066
|
+
operation.target === "all",
|
|
145067
|
+
processedOperations
|
|
145068
|
+
).when(operation.when).remove(target, variables, layer);
|
|
144994
145069
|
} else if (operation.action === "delete" && operation.type && target) {
|
|
144995
145070
|
const targetID = this.id(operation.type, target);
|
|
144996
145071
|
if (!targetID) {
|
|
@@ -145002,6 +145077,16 @@ var CacheInternal2 = class {
|
|
|
145002
145077
|
this.cache.delete(targetID, layer);
|
|
145003
145078
|
}
|
|
145004
145079
|
}
|
|
145080
|
+
if (operation.list) {
|
|
145081
|
+
const matchingLists = this.cache.list(
|
|
145082
|
+
operation.list,
|
|
145083
|
+
parentID,
|
|
145084
|
+
operation.target === "all"
|
|
145085
|
+
);
|
|
145086
|
+
for (const list3 of matchingLists.lists) {
|
|
145087
|
+
processedOperations.add(list3.fieldRef);
|
|
145088
|
+
}
|
|
145089
|
+
}
|
|
145005
145090
|
}
|
|
145006
145091
|
}
|
|
145007
145092
|
return toNotify;
|
|
@@ -147175,14 +147260,27 @@ async function paginate(config, documents) {
|
|
|
147175
147260
|
return {
|
|
147176
147261
|
...node,
|
|
147177
147262
|
variableDefinitions: finalVariables,
|
|
147178
|
-
directives: [
|
|
147263
|
+
directives: config.configFile.supressPaginationDeduplication ? node.directives : [
|
|
147179
147264
|
...node.directives || [],
|
|
147180
147265
|
{
|
|
147181
147266
|
kind: graphql13.Kind.DIRECTIVE,
|
|
147182
147267
|
name: {
|
|
147183
147268
|
kind: graphql13.Kind.NAME,
|
|
147184
147269
|
value: config.dedupeDirective
|
|
147185
|
-
}
|
|
147270
|
+
},
|
|
147271
|
+
arguments: [
|
|
147272
|
+
{
|
|
147273
|
+
kind: "Argument",
|
|
147274
|
+
name: {
|
|
147275
|
+
kind: "Name",
|
|
147276
|
+
value: "match"
|
|
147277
|
+
},
|
|
147278
|
+
value: {
|
|
147279
|
+
kind: "EnumValue",
|
|
147280
|
+
value: DedupeMatchMode.Variables
|
|
147281
|
+
}
|
|
147282
|
+
}
|
|
147283
|
+
]
|
|
147186
147284
|
}
|
|
147187
147285
|
]
|
|
147188
147286
|
};
|
|
@@ -147550,6 +147648,46 @@ function objectNode([type, defaultValue]) {
|
|
|
147550
147648
|
return node;
|
|
147551
147649
|
}
|
|
147552
147650
|
var pageInfoSelection = [
|
|
147651
|
+
{
|
|
147652
|
+
kind: graphql13.Kind.FIELD,
|
|
147653
|
+
name: {
|
|
147654
|
+
kind: graphql13.Kind.NAME,
|
|
147655
|
+
value: "pageInfo"
|
|
147656
|
+
},
|
|
147657
|
+
selectionSet: {
|
|
147658
|
+
kind: graphql13.Kind.SELECTION_SET,
|
|
147659
|
+
selections: [
|
|
147660
|
+
{
|
|
147661
|
+
kind: graphql13.Kind.FIELD,
|
|
147662
|
+
name: {
|
|
147663
|
+
kind: graphql13.Kind.NAME,
|
|
147664
|
+
value: "hasPreviousPage"
|
|
147665
|
+
}
|
|
147666
|
+
},
|
|
147667
|
+
{
|
|
147668
|
+
kind: graphql13.Kind.FIELD,
|
|
147669
|
+
name: {
|
|
147670
|
+
kind: graphql13.Kind.NAME,
|
|
147671
|
+
value: "hasNextPage"
|
|
147672
|
+
}
|
|
147673
|
+
},
|
|
147674
|
+
{
|
|
147675
|
+
kind: graphql13.Kind.FIELD,
|
|
147676
|
+
name: {
|
|
147677
|
+
kind: graphql13.Kind.NAME,
|
|
147678
|
+
value: "startCursor"
|
|
147679
|
+
}
|
|
147680
|
+
},
|
|
147681
|
+
{
|
|
147682
|
+
kind: graphql13.Kind.FIELD,
|
|
147683
|
+
name: {
|
|
147684
|
+
kind: graphql13.Kind.NAME,
|
|
147685
|
+
value: "endCursor"
|
|
147686
|
+
}
|
|
147687
|
+
}
|
|
147688
|
+
]
|
|
147689
|
+
}
|
|
147690
|
+
},
|
|
147553
147691
|
{
|
|
147554
147692
|
kind: graphql13.Kind.FIELD,
|
|
147555
147693
|
name: {
|
|
@@ -148530,7 +148668,13 @@ function artifactGenerator(stats) {
|
|
|
148530
148668
|
const cancelFirstArg = dedupeDirective.arguments?.find(
|
|
148531
148669
|
(arg) => arg.name.value === "cancelFirst"
|
|
148532
148670
|
);
|
|
148533
|
-
|
|
148671
|
+
const matchArg = dedupeDirective.arguments?.find(
|
|
148672
|
+
(arg) => arg.name.value === "match"
|
|
148673
|
+
);
|
|
148674
|
+
dedupe = {
|
|
148675
|
+
cancel: cancelFirstArg && cancelFirstArg.value.kind === "BooleanValue" && cancelFirstArg.value ? "first" : "last",
|
|
148676
|
+
match: matchArg && matchArg.value.kind === "EnumValue" ? matchArg.value.value : DedupeMatchMode.Operation
|
|
148677
|
+
};
|
|
148534
148678
|
}
|
|
148535
148679
|
selectionSet = operation.selectionSet;
|
|
148536
148680
|
if (originalParsed.definitions[0].kind === "OperationDefinition") {
|
|
@@ -152067,11 +152211,20 @@ directive @${config.paginateDirective}(${config.listOrPaginateNameArg}: String,
|
|
|
152067
152211
|
"""
|
|
152068
152212
|
directive @${config.listPrependDirective} on FRAGMENT_SPREAD
|
|
152069
152213
|
|
|
152214
|
+
enum DedupeMatchMode {
|
|
152215
|
+
${DedupeMatchMode.Variables}
|
|
152216
|
+
${DedupeMatchMode.Operation}
|
|
152217
|
+
${DedupeMatchMode.None}
|
|
152218
|
+
}
|
|
152219
|
+
|
|
152070
152220
|
"""
|
|
152071
152221
|
@${config.dedupeDirective} is used to prevent an operation from running more than once at the same time.
|
|
152072
152222
|
If the cancelFirst arg is set to true, the response already in flight will be canceled instead of the second one.
|
|
152223
|
+
If match is set to Operation, then a request will be deduplicated any time there is a request with the same operation.
|
|
152224
|
+
If it's set to Variables then the request will only be deduplicated if the variables match. If match is set to None,
|
|
152225
|
+
then the request will never be deduplicated.
|
|
152073
152226
|
"""
|
|
152074
|
-
directive @${config.dedupeDirective}(cancelFirst: Boolean) on QUERY | MUTATION
|
|
152227
|
+
directive @${config.dedupeDirective}(cancelFirst: Boolean, match: DedupeMatchMode) on QUERY | MUTATION
|
|
152075
152228
|
|
|
152076
152229
|
"""
|
|
152077
152230
|
@${config.optimisticKeyDirective} is used to identify a field as an optimistic key
|
|
@@ -207735,7 +207888,18 @@ var ListManager3 = class {
|
|
|
207735
207888
|
}
|
|
207736
207889
|
lists = /* @__PURE__ */ new Map();
|
|
207737
207890
|
listsByField = /* @__PURE__ */ new Map();
|
|
207738
|
-
get(listName, id2, allLists) {
|
|
207891
|
+
get(listName, id2, allLists, skipMatches) {
|
|
207892
|
+
const lists = this.getLists(listName, id2, allLists);
|
|
207893
|
+
if (!lists) {
|
|
207894
|
+
return null;
|
|
207895
|
+
}
|
|
207896
|
+
if (skipMatches) {
|
|
207897
|
+
return new ListCollection3(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
|
|
207898
|
+
} else {
|
|
207899
|
+
return lists;
|
|
207900
|
+
}
|
|
207901
|
+
}
|
|
207902
|
+
getLists(listName, id2, allLists) {
|
|
207739
207903
|
const matches = this.lists.get(listName);
|
|
207740
207904
|
if (!matches || matches.size === 0) {
|
|
207741
207905
|
return null;
|
|
@@ -207857,6 +208021,9 @@ var List3 = class {
|
|
|
207857
208021
|
this.manager = manager;
|
|
207858
208022
|
this.abstract = abstract;
|
|
207859
208023
|
}
|
|
208024
|
+
get fieldRef() {
|
|
208025
|
+
return `${this.recordID}.${this.key}`;
|
|
208026
|
+
}
|
|
207860
208027
|
when(when) {
|
|
207861
208028
|
return this.manager.lists.get(this.name).get(this.recordID).when(when);
|
|
207862
208029
|
}
|
|
@@ -209001,8 +209168,8 @@ var Cache3 = class {
|
|
|
209001
209168
|
variables
|
|
209002
209169
|
);
|
|
209003
209170
|
}
|
|
209004
|
-
list(name, parentID, allLists) {
|
|
209005
|
-
const handler = this._internal_unstable.lists.get(name, parentID, allLists);
|
|
209171
|
+
list(name, parentID, allLists, skipMatches) {
|
|
209172
|
+
const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
|
|
209006
209173
|
if (!handler) {
|
|
209007
209174
|
throw new Error(
|
|
209008
209175
|
`Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
|
|
@@ -209417,6 +209584,7 @@ var CacheInternal3 = class {
|
|
|
209417
209584
|
});
|
|
209418
209585
|
}
|
|
209419
209586
|
}
|
|
209587
|
+
const processedOperations = /* @__PURE__ */ new Set();
|
|
209420
209588
|
for (const operation of operations || []) {
|
|
209421
209589
|
let parentID;
|
|
209422
209590
|
if (operation.parentID) {
|
|
@@ -209436,7 +209604,12 @@ var CacheInternal3 = class {
|
|
|
209436
209604
|
const targets = Array.isArray(value) ? value : [value];
|
|
209437
209605
|
for (const target of targets) {
|
|
209438
209606
|
if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
|
|
209439
|
-
this.cache.list(
|
|
209607
|
+
this.cache.list(
|
|
209608
|
+
operation.list,
|
|
209609
|
+
parentID,
|
|
209610
|
+
operation.target === "all",
|
|
209611
|
+
processedOperations
|
|
209612
|
+
).when(operation.when).addToList(
|
|
209440
209613
|
fieldSelection,
|
|
209441
209614
|
target,
|
|
209442
209615
|
variables,
|
|
@@ -209444,7 +209617,12 @@ var CacheInternal3 = class {
|
|
|
209444
209617
|
layer
|
|
209445
209618
|
);
|
|
209446
209619
|
} else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
|
|
209447
|
-
this.cache.list(
|
|
209620
|
+
this.cache.list(
|
|
209621
|
+
operation.list,
|
|
209622
|
+
parentID,
|
|
209623
|
+
operation.target === "all",
|
|
209624
|
+
processedOperations
|
|
209625
|
+
).when(operation.when).toggleElement({
|
|
209448
209626
|
selection: fieldSelection,
|
|
209449
209627
|
data: target,
|
|
209450
209628
|
variables,
|
|
@@ -209452,7 +209630,12 @@ var CacheInternal3 = class {
|
|
|
209452
209630
|
layer
|
|
209453
209631
|
});
|
|
209454
209632
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
209455
|
-
this.cache.list(
|
|
209633
|
+
this.cache.list(
|
|
209634
|
+
operation.list,
|
|
209635
|
+
parentID,
|
|
209636
|
+
operation.target === "all",
|
|
209637
|
+
processedOperations
|
|
209638
|
+
).when(operation.when).remove(target, variables, layer);
|
|
209456
209639
|
} else if (operation.action === "delete" && operation.type && target) {
|
|
209457
209640
|
const targetID = this.id(operation.type, target);
|
|
209458
209641
|
if (!targetID) {
|
|
@@ -209464,6 +209647,16 @@ var CacheInternal3 = class {
|
|
|
209464
209647
|
this.cache.delete(targetID, layer);
|
|
209465
209648
|
}
|
|
209466
209649
|
}
|
|
209650
|
+
if (operation.list) {
|
|
209651
|
+
const matchingLists = this.cache.list(
|
|
209652
|
+
operation.list,
|
|
209653
|
+
parentID,
|
|
209654
|
+
operation.target === "all"
|
|
209655
|
+
);
|
|
209656
|
+
for (const list3 of matchingLists.lists) {
|
|
209657
|
+
processedOperations.add(list3.fieldRef);
|
|
209658
|
+
}
|
|
209659
|
+
}
|
|
209467
209660
|
}
|
|
209468
209661
|
}
|
|
209469
209662
|
return toNotify;
|
|
@@ -209923,8 +210116,9 @@ var Config = class {
|
|
|
209923
210116
|
localSchema;
|
|
209924
210117
|
projectRoot;
|
|
209925
210118
|
schema;
|
|
210119
|
+
runtimeDir;
|
|
209926
210120
|
schemaPath;
|
|
209927
|
-
persistedQueriesPath
|
|
210121
|
+
persistedQueriesPath;
|
|
209928
210122
|
exclude;
|
|
209929
210123
|
scalars;
|
|
209930
210124
|
module = "esm";
|
|
@@ -209965,6 +210159,7 @@ var Config = class {
|
|
|
209965
210159
|
let {
|
|
209966
210160
|
schema: schema2,
|
|
209967
210161
|
schemaPath = "./schema.graphql",
|
|
210162
|
+
runtimeDir = "$houdini",
|
|
209968
210163
|
exclude = [],
|
|
209969
210164
|
module = "esm",
|
|
209970
210165
|
scalars,
|
|
@@ -210003,6 +210198,7 @@ var Config = class {
|
|
|
210003
210198
|
this.projectRoot = dirname3(
|
|
210004
210199
|
projectDir ? join4(process.cwd(), projectDir) : filepath
|
|
210005
210200
|
);
|
|
210201
|
+
this.runtimeDir = runtimeDir;
|
|
210006
210202
|
this.scalars = scalars;
|
|
210007
210203
|
this.cacheBufferSize = cacheBufferSize;
|
|
210008
210204
|
this.defaultCachePolicy = defaultCachePolicy;
|
|
@@ -210017,11 +210213,9 @@ var Config = class {
|
|
|
210017
210213
|
this.schemaPollInterval = watchSchema?.interval === void 0 ? 2e3 : watchSchema.interval;
|
|
210018
210214
|
this.schemaPollTimeout = watchSchema?.timeout ?? 3e4;
|
|
210019
210215
|
this.schemaPollHeaders = watchSchema?.headers ?? {};
|
|
210020
|
-
this.rootDir = join4(this.projectRoot,
|
|
210216
|
+
this.rootDir = join4(this.projectRoot, this.runtimeDir);
|
|
210217
|
+
this.persistedQueriesPath = persistedQueriesPath ?? join4(this.rootDir, "persisted_queries.json");
|
|
210021
210218
|
this.#fragmentVariableMaps = {};
|
|
210022
|
-
if (persistedQueriesPath) {
|
|
210023
|
-
this.persistedQueriesPath = persistedQueriesPath;
|
|
210024
|
-
}
|
|
210025
210219
|
if (defaultKeys) {
|
|
210026
210220
|
this.defaultKeys = defaultKeys;
|
|
210027
210221
|
}
|
|
@@ -210604,6 +210798,46 @@ var { keys: keys2 } = Object;
|
|
|
210604
210798
|
var recast42 = __toESM4(require_main23(), 1);
|
|
210605
210799
|
var AST42 = recast42.types.builders;
|
|
210606
210800
|
var pageInfoSelection2 = [
|
|
210801
|
+
{
|
|
210802
|
+
kind: graphql132.Kind.FIELD,
|
|
210803
|
+
name: {
|
|
210804
|
+
kind: graphql132.Kind.NAME,
|
|
210805
|
+
value: "pageInfo"
|
|
210806
|
+
},
|
|
210807
|
+
selectionSet: {
|
|
210808
|
+
kind: graphql132.Kind.SELECTION_SET,
|
|
210809
|
+
selections: [
|
|
210810
|
+
{
|
|
210811
|
+
kind: graphql132.Kind.FIELD,
|
|
210812
|
+
name: {
|
|
210813
|
+
kind: graphql132.Kind.NAME,
|
|
210814
|
+
value: "hasPreviousPage"
|
|
210815
|
+
}
|
|
210816
|
+
},
|
|
210817
|
+
{
|
|
210818
|
+
kind: graphql132.Kind.FIELD,
|
|
210819
|
+
name: {
|
|
210820
|
+
kind: graphql132.Kind.NAME,
|
|
210821
|
+
value: "hasNextPage"
|
|
210822
|
+
}
|
|
210823
|
+
},
|
|
210824
|
+
{
|
|
210825
|
+
kind: graphql132.Kind.FIELD,
|
|
210826
|
+
name: {
|
|
210827
|
+
kind: graphql132.Kind.NAME,
|
|
210828
|
+
value: "startCursor"
|
|
210829
|
+
}
|
|
210830
|
+
},
|
|
210831
|
+
{
|
|
210832
|
+
kind: graphql132.Kind.FIELD,
|
|
210833
|
+
name: {
|
|
210834
|
+
kind: graphql132.Kind.NAME,
|
|
210835
|
+
value: "endCursor"
|
|
210836
|
+
}
|
|
210837
|
+
}
|
|
210838
|
+
]
|
|
210839
|
+
}
|
|
210840
|
+
},
|
|
210607
210841
|
{
|
|
210608
210842
|
kind: graphql132.Kind.FIELD,
|
|
210609
210843
|
name: {
|
|
@@ -231004,30 +231238,30 @@ var require_utils52 = __commonJS5({
|
|
|
231004
231238
|
validate32.oneOf = values;
|
|
231005
231239
|
return validate32;
|
|
231006
231240
|
}
|
|
231007
|
-
function assertNodeType(...
|
|
231241
|
+
function assertNodeType(...types18) {
|
|
231008
231242
|
function validate32(node, key2, val) {
|
|
231009
|
-
for (const type of
|
|
231243
|
+
for (const type of types18) {
|
|
231010
231244
|
if ((0, _is.default)(type, val)) {
|
|
231011
231245
|
(0, _validate.validateChild)(node, key2, val);
|
|
231012
231246
|
return;
|
|
231013
231247
|
}
|
|
231014
231248
|
}
|
|
231015
|
-
throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(
|
|
231249
|
+
throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types18)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
|
|
231016
231250
|
}
|
|
231017
|
-
validate32.oneOfNodeTypes =
|
|
231251
|
+
validate32.oneOfNodeTypes = types18;
|
|
231018
231252
|
return validate32;
|
|
231019
231253
|
}
|
|
231020
|
-
function assertNodeOrValueType(...
|
|
231254
|
+
function assertNodeOrValueType(...types18) {
|
|
231021
231255
|
function validate32(node, key2, val) {
|
|
231022
|
-
for (const type of
|
|
231256
|
+
for (const type of types18) {
|
|
231023
231257
|
if (getType(val) === type || (0, _is.default)(type, val)) {
|
|
231024
231258
|
(0, _validate.validateChild)(node, key2, val);
|
|
231025
231259
|
return;
|
|
231026
231260
|
}
|
|
231027
231261
|
}
|
|
231028
|
-
throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(
|
|
231262
|
+
throw new TypeError(`Property ${key2} of ${node.type} expected node to be of a type ${JSON.stringify(types18)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
|
|
231029
231263
|
}
|
|
231030
|
-
validate32.oneOfNodeOrValueTypes =
|
|
231264
|
+
validate32.oneOfNodeOrValueTypes = types18;
|
|
231031
231265
|
return validate32;
|
|
231032
231266
|
}
|
|
231033
231267
|
function assertValueType(type) {
|
|
@@ -235431,10 +235665,10 @@ var require_generated24 = __commonJS5({
|
|
|
235431
235665
|
body
|
|
235432
235666
|
});
|
|
235433
235667
|
}
|
|
235434
|
-
function intersectionTypeAnnotation(
|
|
235668
|
+
function intersectionTypeAnnotation(types18) {
|
|
235435
235669
|
return (0, _validateNode.default)({
|
|
235436
235670
|
type: "IntersectionTypeAnnotation",
|
|
235437
|
-
types:
|
|
235671
|
+
types: types18
|
|
235438
235672
|
});
|
|
235439
235673
|
}
|
|
235440
235674
|
function mixedTypeAnnotation() {
|
|
@@ -235557,10 +235791,10 @@ var require_generated24 = __commonJS5({
|
|
|
235557
235791
|
type: "ThisTypeAnnotation"
|
|
235558
235792
|
};
|
|
235559
235793
|
}
|
|
235560
|
-
function tupleTypeAnnotation(
|
|
235794
|
+
function tupleTypeAnnotation(types18) {
|
|
235561
235795
|
return (0, _validateNode.default)({
|
|
235562
235796
|
type: "TupleTypeAnnotation",
|
|
235563
|
-
types:
|
|
235797
|
+
types: types18
|
|
235564
235798
|
});
|
|
235565
235799
|
}
|
|
235566
235800
|
function typeofTypeAnnotation(argument) {
|
|
@@ -235611,10 +235845,10 @@ var require_generated24 = __commonJS5({
|
|
|
235611
235845
|
params
|
|
235612
235846
|
});
|
|
235613
235847
|
}
|
|
235614
|
-
function unionTypeAnnotation(
|
|
235848
|
+
function unionTypeAnnotation(types18) {
|
|
235615
235849
|
return (0, _validateNode.default)({
|
|
235616
235850
|
type: "UnionTypeAnnotation",
|
|
235617
|
-
types:
|
|
235851
|
+
types: types18
|
|
235618
235852
|
});
|
|
235619
235853
|
}
|
|
235620
235854
|
function variance(kind) {
|
|
@@ -236127,16 +236361,16 @@ var require_generated24 = __commonJS5({
|
|
|
236127
236361
|
optional
|
|
236128
236362
|
});
|
|
236129
236363
|
}
|
|
236130
|
-
function tsUnionType(
|
|
236364
|
+
function tsUnionType(types18) {
|
|
236131
236365
|
return (0, _validateNode.default)({
|
|
236132
236366
|
type: "TSUnionType",
|
|
236133
|
-
types:
|
|
236367
|
+
types: types18
|
|
236134
236368
|
});
|
|
236135
236369
|
}
|
|
236136
|
-
function tsIntersectionType(
|
|
236370
|
+
function tsIntersectionType(types18) {
|
|
236137
236371
|
return (0, _validateNode.default)({
|
|
236138
236372
|
type: "TSIntersectionType",
|
|
236139
|
-
types:
|
|
236373
|
+
types: types18
|
|
236140
236374
|
});
|
|
236141
236375
|
}
|
|
236142
236376
|
function tsConditionalType(checkType, extendsType, trueType, falseType) {
|
|
@@ -237737,12 +237971,12 @@ var require_removeTypeDuplicates5 = __commonJS5({
|
|
|
237737
237971
|
const generics = /* @__PURE__ */ new Map();
|
|
237738
237972
|
const bases = /* @__PURE__ */ new Map();
|
|
237739
237973
|
const typeGroups = /* @__PURE__ */ new Set();
|
|
237740
|
-
const
|
|
237974
|
+
const types18 = [];
|
|
237741
237975
|
for (let i22 = 0; i22 < nodes.length; i22++) {
|
|
237742
237976
|
const node = nodes[i22];
|
|
237743
237977
|
if (!node)
|
|
237744
237978
|
continue;
|
|
237745
|
-
if (
|
|
237979
|
+
if (types18.indexOf(node) >= 0) {
|
|
237746
237980
|
continue;
|
|
237747
237981
|
}
|
|
237748
237982
|
if ((0, _generated.isAnyTypeAnnotation)(node)) {
|
|
@@ -237776,15 +238010,15 @@ var require_removeTypeDuplicates5 = __commonJS5({
|
|
|
237776
238010
|
}
|
|
237777
238011
|
continue;
|
|
237778
238012
|
}
|
|
237779
|
-
|
|
238013
|
+
types18.push(node);
|
|
237780
238014
|
}
|
|
237781
238015
|
for (const [, baseType] of bases) {
|
|
237782
|
-
|
|
238016
|
+
types18.push(baseType);
|
|
237783
238017
|
}
|
|
237784
238018
|
for (const [, genericName] of generics) {
|
|
237785
|
-
|
|
238019
|
+
types18.push(genericName);
|
|
237786
238020
|
}
|
|
237787
|
-
return
|
|
238021
|
+
return types18;
|
|
237788
238022
|
}
|
|
237789
238023
|
}
|
|
237790
238024
|
});
|
|
@@ -237797,8 +238031,8 @@ var require_createFlowUnionType4 = __commonJS5({
|
|
|
237797
238031
|
exports.default = createFlowUnionType;
|
|
237798
238032
|
var _generated = require_generated24();
|
|
237799
238033
|
var _removeTypeDuplicates = require_removeTypeDuplicates5();
|
|
237800
|
-
function createFlowUnionType(
|
|
237801
|
-
const flattened = (0, _removeTypeDuplicates.default)(
|
|
238034
|
+
function createFlowUnionType(types18) {
|
|
238035
|
+
const flattened = (0, _removeTypeDuplicates.default)(types18);
|
|
237802
238036
|
if (flattened.length === 1) {
|
|
237803
238037
|
return flattened[0];
|
|
237804
238038
|
} else {
|
|
@@ -237823,12 +238057,12 @@ var require_removeTypeDuplicates24 = __commonJS5({
|
|
|
237823
238057
|
const generics = /* @__PURE__ */ new Map();
|
|
237824
238058
|
const bases = /* @__PURE__ */ new Map();
|
|
237825
238059
|
const typeGroups = /* @__PURE__ */ new Set();
|
|
237826
|
-
const
|
|
238060
|
+
const types18 = [];
|
|
237827
238061
|
for (let i22 = 0; i22 < nodes.length; i22++) {
|
|
237828
238062
|
const node = nodes[i22];
|
|
237829
238063
|
if (!node)
|
|
237830
238064
|
continue;
|
|
237831
|
-
if (
|
|
238065
|
+
if (types18.indexOf(node) >= 0) {
|
|
237832
238066
|
continue;
|
|
237833
238067
|
}
|
|
237834
238068
|
if ((0, _generated.isTSAnyKeyword)(node)) {
|
|
@@ -237862,15 +238096,15 @@ var require_removeTypeDuplicates24 = __commonJS5({
|
|
|
237862
238096
|
}
|
|
237863
238097
|
continue;
|
|
237864
238098
|
}
|
|
237865
|
-
|
|
238099
|
+
types18.push(node);
|
|
237866
238100
|
}
|
|
237867
238101
|
for (const [, baseType] of bases) {
|
|
237868
|
-
|
|
238102
|
+
types18.push(baseType);
|
|
237869
238103
|
}
|
|
237870
238104
|
for (const [, genericName] of generics) {
|
|
237871
|
-
|
|
238105
|
+
types18.push(genericName);
|
|
237872
238106
|
}
|
|
237873
|
-
return
|
|
238107
|
+
return types18;
|
|
237874
238108
|
}
|
|
237875
238109
|
}
|
|
237876
238110
|
});
|
|
@@ -237885,10 +238119,10 @@ var require_createTSUnionType4 = __commonJS5({
|
|
|
237885
238119
|
var _removeTypeDuplicates = require_removeTypeDuplicates24();
|
|
237886
238120
|
var _index = require_generated7();
|
|
237887
238121
|
function createTSUnionType(typeAnnotations) {
|
|
237888
|
-
const
|
|
238122
|
+
const types18 = typeAnnotations.map((type) => {
|
|
237889
238123
|
return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
|
|
237890
238124
|
});
|
|
237891
|
-
const flattened = (0, _removeTypeDuplicates.default)(
|
|
238125
|
+
const flattened = (0, _removeTypeDuplicates.default)(types18);
|
|
237892
238126
|
if (flattened.length === 1) {
|
|
237893
238127
|
return flattened[0];
|
|
237894
238128
|
} else {
|
|
@@ -242152,14 +242386,14 @@ var require_lib64 = __commonJS5({
|
|
|
242152
242386
|
this.preserveSpace = !!preserveSpace;
|
|
242153
242387
|
}
|
|
242154
242388
|
};
|
|
242155
|
-
var
|
|
242389
|
+
var types18 = {
|
|
242156
242390
|
brace: new TokContext3("{"),
|
|
242157
242391
|
j_oTag: new TokContext3("<tag"),
|
|
242158
242392
|
j_cTag: new TokContext3("</tag"),
|
|
242159
242393
|
j_expr: new TokContext3("<tag>...</tag>", true)
|
|
242160
242394
|
};
|
|
242161
242395
|
{
|
|
242162
|
-
|
|
242396
|
+
types18.template = new TokContext3("`", true);
|
|
242163
242397
|
}
|
|
242164
242398
|
var beforeExpr2 = true;
|
|
242165
242399
|
var startsExpr2 = true;
|
|
@@ -242697,17 +242931,17 @@ var require_lib64 = __commonJS5({
|
|
|
242697
242931
|
context.pop();
|
|
242698
242932
|
};
|
|
242699
242933
|
tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
|
|
242700
|
-
context.push(
|
|
242934
|
+
context.push(types18.brace);
|
|
242701
242935
|
};
|
|
242702
242936
|
tokenTypes[22].updateContext = (context) => {
|
|
242703
|
-
if (context[context.length - 1] ===
|
|
242937
|
+
if (context[context.length - 1] === types18.template) {
|
|
242704
242938
|
context.pop();
|
|
242705
242939
|
} else {
|
|
242706
|
-
context.push(
|
|
242940
|
+
context.push(types18.template);
|
|
242707
242941
|
}
|
|
242708
242942
|
};
|
|
242709
242943
|
tokenTypes[142].updateContext = (context) => {
|
|
242710
|
-
context.push(
|
|
242944
|
+
context.push(types18.j_expr, types18.j_oTag);
|
|
242711
242945
|
};
|
|
242712
242946
|
}
|
|
242713
242947
|
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";
|
|
@@ -243267,7 +243501,7 @@ var require_lib64 = __commonJS5({
|
|
|
243267
243501
|
this.end = 0;
|
|
243268
243502
|
this.lastTokEndLoc = null;
|
|
243269
243503
|
this.lastTokStartLoc = null;
|
|
243270
|
-
this.context = [
|
|
243504
|
+
this.context = [types18.brace];
|
|
243271
243505
|
this.firstInvalidTemplateEscapePos = null;
|
|
243272
243506
|
this.strictErrors = /* @__PURE__ */ new Map();
|
|
243273
243507
|
this.tokensLength = 0;
|
|
@@ -247094,7 +247328,7 @@ var require_lib64 = __commonJS5({
|
|
|
247094
247328
|
context
|
|
247095
247329
|
} = this.state;
|
|
247096
247330
|
const currentContext = context[context.length - 1];
|
|
247097
|
-
if (currentContext ===
|
|
247331
|
+
if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
|
|
247098
247332
|
context.pop();
|
|
247099
247333
|
}
|
|
247100
247334
|
}
|
|
@@ -248116,9 +248350,9 @@ var require_lib64 = __commonJS5({
|
|
|
248116
248350
|
switch (this.state.type) {
|
|
248117
248351
|
case 5:
|
|
248118
248352
|
node = this.startNode();
|
|
248119
|
-
this.setContext(
|
|
248353
|
+
this.setContext(types18.brace);
|
|
248120
248354
|
this.next();
|
|
248121
|
-
node = this.jsxParseExpressionContainer(node,
|
|
248355
|
+
node = this.jsxParseExpressionContainer(node, types18.j_oTag);
|
|
248122
248356
|
if (node.expression.type === "JSXEmptyExpression") {
|
|
248123
248357
|
this.raise(JsxErrors.AttributeIsEmpty, node);
|
|
248124
248358
|
}
|
|
@@ -248137,7 +248371,7 @@ var require_lib64 = __commonJS5({
|
|
|
248137
248371
|
jsxParseSpreadChild(node) {
|
|
248138
248372
|
this.next();
|
|
248139
248373
|
node.expression = this.parseExpression();
|
|
248140
|
-
this.setContext(
|
|
248374
|
+
this.setContext(types18.j_expr);
|
|
248141
248375
|
this.state.canStartJSXElement = true;
|
|
248142
248376
|
this.expect(8);
|
|
248143
248377
|
return this.finishNode(node, "JSXSpreadChild");
|
|
@@ -248157,11 +248391,11 @@ var require_lib64 = __commonJS5({
|
|
|
248157
248391
|
jsxParseAttribute() {
|
|
248158
248392
|
const node = this.startNode();
|
|
248159
248393
|
if (this.match(5)) {
|
|
248160
|
-
this.setContext(
|
|
248394
|
+
this.setContext(types18.brace);
|
|
248161
248395
|
this.next();
|
|
248162
248396
|
this.expect(21);
|
|
248163
248397
|
node.argument = this.parseMaybeAssignAllowIn();
|
|
248164
|
-
this.setContext(
|
|
248398
|
+
this.setContext(types18.j_oTag);
|
|
248165
248399
|
this.state.canStartJSXElement = true;
|
|
248166
248400
|
this.expect(8);
|
|
248167
248401
|
return this.finishNode(node, "JSXSpreadAttribute");
|
|
@@ -248220,12 +248454,12 @@ var require_lib64 = __commonJS5({
|
|
|
248220
248454
|
break;
|
|
248221
248455
|
case 5: {
|
|
248222
248456
|
const node2 = this.startNode();
|
|
248223
|
-
this.setContext(
|
|
248457
|
+
this.setContext(types18.brace);
|
|
248224
248458
|
this.next();
|
|
248225
248459
|
if (this.match(21)) {
|
|
248226
248460
|
children.push(this.jsxParseSpreadChild(node2));
|
|
248227
248461
|
} else {
|
|
248228
|
-
children.push(this.jsxParseExpressionContainer(node2,
|
|
248462
|
+
children.push(this.jsxParseExpressionContainer(node2, types18.j_expr));
|
|
248229
248463
|
}
|
|
248230
248464
|
break;
|
|
248231
248465
|
}
|
|
@@ -248290,11 +248524,11 @@ var require_lib64 = __commonJS5({
|
|
|
248290
248524
|
}
|
|
248291
248525
|
getTokenFromCode(code2) {
|
|
248292
248526
|
const context = this.curContext();
|
|
248293
|
-
if (context ===
|
|
248527
|
+
if (context === types18.j_expr) {
|
|
248294
248528
|
this.jsxReadToken();
|
|
248295
248529
|
return;
|
|
248296
248530
|
}
|
|
248297
|
-
if (context ===
|
|
248531
|
+
if (context === types18.j_oTag || context === types18.j_cTag) {
|
|
248298
248532
|
if (isIdentifierStart2(code2)) {
|
|
248299
248533
|
this.jsxReadWord();
|
|
248300
248534
|
return;
|
|
@@ -248304,7 +248538,7 @@ var require_lib64 = __commonJS5({
|
|
|
248304
248538
|
this.finishToken(143);
|
|
248305
248539
|
return;
|
|
248306
248540
|
}
|
|
248307
|
-
if ((code2 === 34 || code2 === 39) && context ===
|
|
248541
|
+
if ((code2 === 34 || code2 === 39) && context === types18.j_oTag) {
|
|
248308
248542
|
this.jsxReadString(code2);
|
|
248309
248543
|
return;
|
|
248310
248544
|
}
|
|
@@ -248322,17 +248556,17 @@ var require_lib64 = __commonJS5({
|
|
|
248322
248556
|
type
|
|
248323
248557
|
} = this.state;
|
|
248324
248558
|
if (type === 56 && prevType === 142) {
|
|
248325
|
-
context.splice(-2, 2,
|
|
248559
|
+
context.splice(-2, 2, types18.j_cTag);
|
|
248326
248560
|
this.state.canStartJSXElement = false;
|
|
248327
248561
|
} else if (type === 142) {
|
|
248328
|
-
context.push(
|
|
248562
|
+
context.push(types18.j_oTag);
|
|
248329
248563
|
} else if (type === 143) {
|
|
248330
248564
|
const out = context[context.length - 1];
|
|
248331
|
-
if (out ===
|
|
248565
|
+
if (out === types18.j_oTag && prevType === 56 || out === types18.j_cTag) {
|
|
248332
248566
|
context.pop();
|
|
248333
|
-
this.state.canStartJSXElement = context[context.length - 1] ===
|
|
248567
|
+
this.state.canStartJSXElement = context[context.length - 1] === types18.j_expr;
|
|
248334
248568
|
} else {
|
|
248335
|
-
this.setContext(
|
|
248569
|
+
this.setContext(types18.j_expr);
|
|
248336
248570
|
this.state.canStartJSXElement = true;
|
|
248337
248571
|
}
|
|
248338
248572
|
} else {
|
|
@@ -249707,14 +249941,14 @@ var require_lib64 = __commonJS5({
|
|
|
249707
249941
|
tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
|
|
249708
249942
|
const node = this.startNode();
|
|
249709
249943
|
const hasLeadingOperator = this.eat(operator);
|
|
249710
|
-
const
|
|
249944
|
+
const types19 = [];
|
|
249711
249945
|
do {
|
|
249712
|
-
|
|
249946
|
+
types19.push(parseConstituentType());
|
|
249713
249947
|
} while (this.eat(operator));
|
|
249714
|
-
if (
|
|
249715
|
-
return
|
|
249948
|
+
if (types19.length === 1 && !hasLeadingOperator) {
|
|
249949
|
+
return types19[0];
|
|
249716
249950
|
}
|
|
249717
|
-
node.types =
|
|
249951
|
+
node.types = types19;
|
|
249718
249952
|
return this.finishNode(node, kind);
|
|
249719
249953
|
}
|
|
249720
249954
|
tsParseIntersectionTypeOrHigher() {
|
|
@@ -250278,7 +250512,7 @@ var require_lib64 = __commonJS5({
|
|
|
250278
250512
|
}));
|
|
250279
250513
|
if (node.params.length === 0) {
|
|
250280
250514
|
this.raise(TSErrors.EmptyTypeArguments, node);
|
|
250281
|
-
} else if (!this.state.inType && this.curContext() ===
|
|
250515
|
+
} else if (!this.state.inType && this.curContext() === types18.brace) {
|
|
250282
250516
|
this.reScan_lt_gt();
|
|
250283
250517
|
}
|
|
250284
250518
|
this.expect(48);
|
|
@@ -250904,7 +251138,7 @@ var require_lib64 = __commonJS5({
|
|
|
250904
251138
|
context
|
|
250905
251139
|
} = this.state;
|
|
250906
251140
|
const currentContext = context[context.length - 1];
|
|
250907
|
-
if (currentContext ===
|
|
251141
|
+
if (currentContext === types18.j_oTag || currentContext === types18.j_expr) {
|
|
250908
251142
|
context.pop();
|
|
250909
251143
|
}
|
|
250910
251144
|
}
|
|
@@ -256032,9 +256266,9 @@ var require_shared4 = __commonJS5({
|
|
|
256032
256266
|
var tslib_1 = require_tslib4();
|
|
256033
256267
|
var types_1 = tslib_1.__importDefault(require_types4());
|
|
256034
256268
|
function default_1(fork) {
|
|
256035
|
-
var
|
|
256036
|
-
var Type =
|
|
256037
|
-
var builtin =
|
|
256269
|
+
var types18 = fork.use(types_1.default);
|
|
256270
|
+
var Type = types18.Type;
|
|
256271
|
+
var builtin = types18.builtInTypes;
|
|
256038
256272
|
var isNumber = builtin.number;
|
|
256039
256273
|
function geq(than) {
|
|
256040
256274
|
return Type.from(function(value) {
|
|
@@ -256182,9 +256416,9 @@ var require_types4 = __commonJS5({
|
|
|
256182
256416
|
}(BaseType);
|
|
256183
256417
|
var OrType = function(_super) {
|
|
256184
256418
|
tslib_1.__extends(OrType2, _super);
|
|
256185
|
-
function OrType2(
|
|
256419
|
+
function OrType2(types18) {
|
|
256186
256420
|
var _this = _super.call(this) || this;
|
|
256187
|
-
_this.types =
|
|
256421
|
+
_this.types = types18;
|
|
256188
256422
|
_this.kind = "OrType";
|
|
256189
256423
|
return _this;
|
|
256190
256424
|
}
|
|
@@ -256325,11 +256559,11 @@ var require_types4 = __commonJS5({
|
|
|
256325
256559
|
function typesPlugin(_fork) {
|
|
256326
256560
|
var Type = {
|
|
256327
256561
|
or: function() {
|
|
256328
|
-
var
|
|
256562
|
+
var types18 = [];
|
|
256329
256563
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
256330
|
-
|
|
256564
|
+
types18[_i] = arguments[_i];
|
|
256331
256565
|
}
|
|
256332
|
-
return new OrType(
|
|
256566
|
+
return new OrType(types18.map(function(type) {
|
|
256333
256567
|
return Type.from(type);
|
|
256334
256568
|
}));
|
|
256335
256569
|
},
|
|
@@ -256772,9 +257006,9 @@ var require_path24 = __commonJS5({
|
|
|
256772
257006
|
var Op = Object.prototype;
|
|
256773
257007
|
var hasOwn2 = Op.hasOwnProperty;
|
|
256774
257008
|
function pathPlugin(fork) {
|
|
256775
|
-
var
|
|
256776
|
-
var isArray2 =
|
|
256777
|
-
var isNumber =
|
|
257009
|
+
var types18 = fork.use(types_1.default);
|
|
257010
|
+
var isArray2 = types18.builtInTypes.array;
|
|
257011
|
+
var isNumber = types18.builtInTypes.number;
|
|
256778
257012
|
var Path = function Path2(value, parentPath, name) {
|
|
256779
257013
|
if (!(this instanceof Path2)) {
|
|
256780
257014
|
throw new Error("Path constructor cannot be invoked without 'new'");
|
|
@@ -257074,13 +257308,13 @@ var require_scope4 = __commonJS5({
|
|
|
257074
257308
|
var types_1 = tslib_1.__importDefault(require_types4());
|
|
257075
257309
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
257076
257310
|
function scopePlugin(fork) {
|
|
257077
|
-
var
|
|
257078
|
-
var Type =
|
|
257079
|
-
var namedTypes =
|
|
257311
|
+
var types18 = fork.use(types_1.default);
|
|
257312
|
+
var Type = types18.Type;
|
|
257313
|
+
var namedTypes = types18.namedTypes;
|
|
257080
257314
|
var Node3 = namedTypes.Node;
|
|
257081
257315
|
var Expression = namedTypes.Expression;
|
|
257082
|
-
var isArray2 =
|
|
257083
|
-
var b2 =
|
|
257316
|
+
var isArray2 = types18.builtInTypes.array;
|
|
257317
|
+
var b2 = types18.builders;
|
|
257084
257318
|
var Scope4 = function Scope22(path32, parentScope) {
|
|
257085
257319
|
if (!(this instanceof Scope22)) {
|
|
257086
257320
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
@@ -257143,7 +257377,7 @@ var require_scope4 = __commonJS5({
|
|
|
257143
257377
|
++index;
|
|
257144
257378
|
}
|
|
257145
257379
|
var name = prefix + index;
|
|
257146
|
-
return this.bindings[name] =
|
|
257380
|
+
return this.bindings[name] = types18.builders.identifier(name);
|
|
257147
257381
|
};
|
|
257148
257382
|
Sp.injectTemporary = function(identifier, init2) {
|
|
257149
257383
|
identifier || (identifier = this.declareTemporary());
|
|
@@ -257219,7 +257453,7 @@ var require_scope4 = __commonJS5({
|
|
|
257219
257453
|
bindings
|
|
257220
257454
|
);
|
|
257221
257455
|
} else if (Node3.check(node) && !Expression.check(node)) {
|
|
257222
|
-
|
|
257456
|
+
types18.eachField(node, function(name, child) {
|
|
257223
257457
|
var childPath = path32.get(name);
|
|
257224
257458
|
if (!pathHasValue(childPath, child)) {
|
|
257225
257459
|
throw new Error("");
|
|
@@ -257297,24 +257531,24 @@ var require_scope4 = __commonJS5({
|
|
|
257297
257531
|
addPattern(patternPath.get("argument"), bindings);
|
|
257298
257532
|
}
|
|
257299
257533
|
}
|
|
257300
|
-
function addTypePattern(patternPath,
|
|
257534
|
+
function addTypePattern(patternPath, types19) {
|
|
257301
257535
|
var pattern = patternPath.value;
|
|
257302
257536
|
namedTypes.Pattern.assert(pattern);
|
|
257303
257537
|
if (namedTypes.Identifier.check(pattern)) {
|
|
257304
|
-
if (hasOwn2.call(
|
|
257305
|
-
|
|
257538
|
+
if (hasOwn2.call(types19, pattern.name)) {
|
|
257539
|
+
types19[pattern.name].push(patternPath);
|
|
257306
257540
|
} else {
|
|
257307
|
-
|
|
257541
|
+
types19[pattern.name] = [patternPath];
|
|
257308
257542
|
}
|
|
257309
257543
|
}
|
|
257310
257544
|
}
|
|
257311
|
-
function addTypeParameter(parameterPath,
|
|
257545
|
+
function addTypeParameter(parameterPath, types19) {
|
|
257312
257546
|
var parameter = parameterPath.value;
|
|
257313
257547
|
FlowOrTSTypeParameterType.assert(parameter);
|
|
257314
|
-
if (hasOwn2.call(
|
|
257315
|
-
|
|
257548
|
+
if (hasOwn2.call(types19, parameter.name)) {
|
|
257549
|
+
types19[parameter.name].push(parameterPath);
|
|
257316
257550
|
} else {
|
|
257317
|
-
|
|
257551
|
+
types19[parameter.name] = [parameterPath];
|
|
257318
257552
|
}
|
|
257319
257553
|
}
|
|
257320
257554
|
Sp.lookup = function(name) {
|
|
@@ -257353,11 +257587,11 @@ var require_node_path4 = __commonJS5({
|
|
|
257353
257587
|
var scope_1 = tslib_1.__importDefault(require_scope4());
|
|
257354
257588
|
var shared_1 = require_shared4();
|
|
257355
257589
|
function nodePathPlugin(fork) {
|
|
257356
|
-
var
|
|
257357
|
-
var n2 =
|
|
257358
|
-
var b2 =
|
|
257359
|
-
var isNumber =
|
|
257360
|
-
var isArray2 =
|
|
257590
|
+
var types18 = fork.use(types_1.default);
|
|
257591
|
+
var n2 = types18.namedTypes;
|
|
257592
|
+
var b2 = types18.builders;
|
|
257593
|
+
var isNumber = types18.builtInTypes.number;
|
|
257594
|
+
var isArray2 = types18.builtInTypes.array;
|
|
257361
257595
|
var Path = fork.use(path_1.default);
|
|
257362
257596
|
var Scope4 = fork.use(scope_1.default);
|
|
257363
257597
|
var NodePath = function NodePath2(value, parentPath, name) {
|
|
@@ -257448,7 +257682,7 @@ var require_node_path4 = __commonJS5({
|
|
|
257448
257682
|
return scope || null;
|
|
257449
257683
|
};
|
|
257450
257684
|
NPp.getValueProperty = function(name) {
|
|
257451
|
-
return
|
|
257685
|
+
return types18.getFieldValue(this.value, name);
|
|
257452
257686
|
};
|
|
257453
257687
|
NPp.needsParens = function(assumeExpressionContext) {
|
|
257454
257688
|
var pp2 = this.parentPath;
|
|
@@ -257590,7 +257824,7 @@ var require_node_path4 = __commonJS5({
|
|
|
257590
257824
|
return node.some(containsCallExpression);
|
|
257591
257825
|
}
|
|
257592
257826
|
if (n2.Node.check(node)) {
|
|
257593
|
-
return
|
|
257827
|
+
return types18.someField(node, function(_name, child) {
|
|
257594
257828
|
return containsCallExpression(child);
|
|
257595
257829
|
});
|
|
257596
257830
|
}
|
|
@@ -257709,11 +257943,11 @@ var require_path_visitor4 = __commonJS5({
|
|
|
257709
257943
|
var shared_1 = require_shared4();
|
|
257710
257944
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
257711
257945
|
function pathVisitorPlugin(fork) {
|
|
257712
|
-
var
|
|
257946
|
+
var types18 = fork.use(types_1.default);
|
|
257713
257947
|
var NodePath = fork.use(node_path_1.default);
|
|
257714
|
-
var isArray2 =
|
|
257715
|
-
var isObject2 =
|
|
257716
|
-
var isFunction =
|
|
257948
|
+
var isArray2 = types18.builtInTypes.array;
|
|
257949
|
+
var isObject2 = types18.builtInTypes.object;
|
|
257950
|
+
var isFunction = types18.builtInTypes.function;
|
|
257717
257951
|
var undefined2;
|
|
257718
257952
|
var PathVisitor = function PathVisitor2() {
|
|
257719
257953
|
if (!(this instanceof PathVisitor2)) {
|
|
@@ -257733,7 +257967,7 @@ var require_path_visitor4 = __commonJS5({
|
|
|
257733
257967
|
typeNames[methodName.slice("visit".length)] = true;
|
|
257734
257968
|
}
|
|
257735
257969
|
}
|
|
257736
|
-
var supertypeTable =
|
|
257970
|
+
var supertypeTable = types18.computeSupertypeLookupTable(typeNames);
|
|
257737
257971
|
var methodNameTable = /* @__PURE__ */ Object.create(null);
|
|
257738
257972
|
var typeNameKeys = Object.keys(supertypeTable);
|
|
257739
257973
|
var typeNameCount = typeNameKeys.length;
|
|
@@ -257852,7 +258086,7 @@ var require_path_visitor4 = __commonJS5({
|
|
|
257852
258086
|
path32.each(visitor.visitWithoutReset, visitor);
|
|
257853
258087
|
} else if (!isObject2.check(value)) {
|
|
257854
258088
|
} else {
|
|
257855
|
-
var childNames =
|
|
258089
|
+
var childNames = types18.getFieldNames(value);
|
|
257856
258090
|
if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
|
|
257857
258091
|
childNames.push("comments");
|
|
257858
258092
|
}
|
|
@@ -257861,7 +258095,7 @@ var require_path_visitor4 = __commonJS5({
|
|
|
257861
258095
|
for (var i22 = 0; i22 < childCount; ++i22) {
|
|
257862
258096
|
var childName = childNames[i22];
|
|
257863
258097
|
if (!hasOwn2.call(value, childName)) {
|
|
257864
|
-
value[childName] =
|
|
258098
|
+
value[childName] = types18.getFieldValue(value, childName);
|
|
257865
258099
|
}
|
|
257866
258100
|
childPaths.push(path32.get(childName));
|
|
257867
258101
|
}
|
|
@@ -258002,13 +258236,13 @@ var require_equiv4 = __commonJS5({
|
|
|
258002
258236
|
var shared_1 = require_shared4();
|
|
258003
258237
|
var types_1 = tslib_1.__importDefault(require_types4());
|
|
258004
258238
|
function default_1(fork) {
|
|
258005
|
-
var
|
|
258006
|
-
var getFieldNames =
|
|
258007
|
-
var getFieldValue =
|
|
258008
|
-
var isArray2 =
|
|
258009
|
-
var isObject2 =
|
|
258010
|
-
var isDate =
|
|
258011
|
-
var isRegExp =
|
|
258239
|
+
var types18 = fork.use(types_1.default);
|
|
258240
|
+
var getFieldNames = types18.getFieldNames;
|
|
258241
|
+
var getFieldValue = types18.getFieldValue;
|
|
258242
|
+
var isArray2 = types18.builtInTypes.array;
|
|
258243
|
+
var isObject2 = types18.builtInTypes.object;
|
|
258244
|
+
var isDate = types18.builtInTypes.Date;
|
|
258245
|
+
var isRegExp = types18.builtInTypes.RegExp;
|
|
258012
258246
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
258013
258247
|
function astNodesAreEquivalent(a2, b2, problemPath) {
|
|
258014
258248
|
if (isArray2.check(problemPath)) {
|
|
@@ -258159,24 +258393,24 @@ var require_fork4 = __commonJS5({
|
|
|
258159
258393
|
var shared_1 = require_shared4();
|
|
258160
258394
|
function default_1(plugins) {
|
|
258161
258395
|
var fork = createFork();
|
|
258162
|
-
var
|
|
258396
|
+
var types18 = fork.use(types_1.default);
|
|
258163
258397
|
plugins.forEach(fork.use);
|
|
258164
|
-
|
|
258398
|
+
types18.finalize();
|
|
258165
258399
|
var PathVisitor = fork.use(path_visitor_1.default);
|
|
258166
258400
|
return {
|
|
258167
|
-
Type:
|
|
258168
|
-
builtInTypes:
|
|
258169
|
-
namedTypes:
|
|
258170
|
-
builders:
|
|
258171
|
-
defineMethod:
|
|
258172
|
-
getFieldNames:
|
|
258173
|
-
getFieldValue:
|
|
258174
|
-
eachField:
|
|
258175
|
-
someField:
|
|
258176
|
-
getSupertypeNames:
|
|
258177
|
-
getBuilderName:
|
|
258401
|
+
Type: types18.Type,
|
|
258402
|
+
builtInTypes: types18.builtInTypes,
|
|
258403
|
+
namedTypes: types18.namedTypes,
|
|
258404
|
+
builders: types18.builders,
|
|
258405
|
+
defineMethod: types18.defineMethod,
|
|
258406
|
+
getFieldNames: types18.getFieldNames,
|
|
258407
|
+
getFieldValue: types18.getFieldValue,
|
|
258408
|
+
eachField: types18.eachField,
|
|
258409
|
+
someField: types18.someField,
|
|
258410
|
+
getSupertypeNames: types18.getSupertypeNames,
|
|
258411
|
+
getBuilderName: types18.getBuilderName,
|
|
258178
258412
|
astNodesAreEquivalent: fork.use(equiv_1.default),
|
|
258179
|
-
finalize:
|
|
258413
|
+
finalize: types18.finalize,
|
|
258180
258414
|
Path: fork.use(path_1.default),
|
|
258181
258415
|
NodePath: fork.use(node_path_1.default),
|
|
258182
258416
|
PathVisitor,
|
|
@@ -258336,8 +258570,8 @@ var require_core34 = __commonJS5({
|
|
|
258336
258570
|
var types_1 = tslib_1.__importDefault(require_types4());
|
|
258337
258571
|
var shared_1 = tslib_1.__importStar(require_shared4());
|
|
258338
258572
|
function default_1(fork) {
|
|
258339
|
-
var
|
|
258340
|
-
var Type =
|
|
258573
|
+
var types18 = fork.use(types_1.default);
|
|
258574
|
+
var Type = types18.Type;
|
|
258341
258575
|
var def = Type.def;
|
|
258342
258576
|
var or = Type.or;
|
|
258343
258577
|
var shared2 = fork.use(shared_1.default);
|
|
@@ -258427,9 +258661,9 @@ var require_es64 = __commonJS5({
|
|
|
258427
258661
|
var shared_1 = tslib_1.__importStar(require_shared4());
|
|
258428
258662
|
function default_1(fork) {
|
|
258429
258663
|
fork.use(core_1.default);
|
|
258430
|
-
var
|
|
258431
|
-
var def =
|
|
258432
|
-
var or =
|
|
258664
|
+
var types18 = fork.use(types_1.default);
|
|
258665
|
+
var def = types18.Type.def;
|
|
258666
|
+
var or = types18.Type.or;
|
|
258433
258667
|
var defaults = fork.use(shared_1.default).defaults;
|
|
258434
258668
|
def("Function").field("generator", Boolean, defaults["false"]).field("expression", Boolean, defaults["false"]).field("defaults", [or(def("Expression"), null)], defaults.emptyArray).field("rest", or(def("Identifier"), null), defaults["null"]);
|
|
258435
258669
|
def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
|
|
@@ -258515,8 +258749,8 @@ var require_es20174 = __commonJS5({
|
|
|
258515
258749
|
var shared_1 = tslib_1.__importStar(require_shared4());
|
|
258516
258750
|
function default_1(fork) {
|
|
258517
258751
|
fork.use(es2016_1.default);
|
|
258518
|
-
var
|
|
258519
|
-
var def =
|
|
258752
|
+
var types18 = fork.use(types_1.default);
|
|
258753
|
+
var def = types18.Type.def;
|
|
258520
258754
|
var defaults = fork.use(shared_1.default).defaults;
|
|
258521
258755
|
def("Function").field("async", Boolean, defaults["false"]);
|
|
258522
258756
|
def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
|
|
@@ -258537,9 +258771,9 @@ var require_es20184 = __commonJS5({
|
|
|
258537
258771
|
var shared_1 = tslib_1.__importStar(require_shared4());
|
|
258538
258772
|
function default_1(fork) {
|
|
258539
258773
|
fork.use(es2017_1.default);
|
|
258540
|
-
var
|
|
258541
|
-
var def =
|
|
258542
|
-
var or =
|
|
258774
|
+
var types18 = fork.use(types_1.default);
|
|
258775
|
+
var def = types18.Type.def;
|
|
258776
|
+
var or = types18.Type.or;
|
|
258543
258777
|
var defaults = fork.use(shared_1.default).defaults;
|
|
258544
258778
|
def("ForOfStatement").field("await", Boolean, defaults["false"]);
|
|
258545
258779
|
def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
@@ -258568,9 +258802,9 @@ var require_es20194 = __commonJS5({
|
|
|
258568
258802
|
var shared_1 = tslib_1.__importStar(require_shared4());
|
|
258569
258803
|
function default_1(fork) {
|
|
258570
258804
|
fork.use(es2018_1.default);
|
|
258571
|
-
var
|
|
258572
|
-
var def =
|
|
258573
|
-
var or =
|
|
258805
|
+
var types18 = fork.use(types_1.default);
|
|
258806
|
+
var def = types18.Type.def;
|
|
258807
|
+
var or = types18.Type.or;
|
|
258574
258808
|
var defaults = fork.use(shared_1.default).defaults;
|
|
258575
258809
|
def("CatchClause").field("param", or(def("Pattern"), null), defaults["null"]);
|
|
258576
258810
|
}
|
|
@@ -258592,9 +258826,9 @@ var require_es202024 = __commonJS5({
|
|
|
258592
258826
|
function default_1(fork) {
|
|
258593
258827
|
fork.use(es2020_1.default);
|
|
258594
258828
|
fork.use(es2019_1.default);
|
|
258595
|
-
var
|
|
258596
|
-
var def =
|
|
258597
|
-
var or =
|
|
258829
|
+
var types18 = fork.use(types_1.default);
|
|
258830
|
+
var def = types18.Type.def;
|
|
258831
|
+
var or = types18.Type.or;
|
|
258598
258832
|
var shared2 = fork.use(shared_1.default);
|
|
258599
258833
|
var defaults = shared2.defaults;
|
|
258600
258834
|
def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
|
|
@@ -258640,8 +258874,8 @@ var require_es20224 = __commonJS5({
|
|
|
258640
258874
|
var shared_1 = require_shared4();
|
|
258641
258875
|
function default_1(fork) {
|
|
258642
258876
|
fork.use(es2021_1.default);
|
|
258643
|
-
var
|
|
258644
|
-
var def =
|
|
258877
|
+
var types18 = fork.use(types_1.default);
|
|
258878
|
+
var def = types18.Type.def;
|
|
258645
258879
|
def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
|
|
258646
258880
|
}
|
|
258647
258881
|
exports.default = default_1;
|
|
@@ -258660,9 +258894,9 @@ var require_es_proposals4 = __commonJS5({
|
|
|
258660
258894
|
var es2022_1 = tslib_1.__importDefault(require_es20224());
|
|
258661
258895
|
function default_1(fork) {
|
|
258662
258896
|
fork.use(es2022_1.default);
|
|
258663
|
-
var
|
|
258664
|
-
var Type =
|
|
258665
|
-
var def =
|
|
258897
|
+
var types18 = fork.use(types_1.default);
|
|
258898
|
+
var Type = types18.Type;
|
|
258899
|
+
var def = types18.Type.def;
|
|
258666
258900
|
var or = Type.or;
|
|
258667
258901
|
var shared2 = fork.use(shared_1.default);
|
|
258668
258902
|
var defaults = shared2.defaults;
|
|
@@ -258700,9 +258934,9 @@ var require_jsx24 = __commonJS5({
|
|
|
258700
258934
|
var shared_1 = tslib_1.__importStar(require_shared4());
|
|
258701
258935
|
function default_1(fork) {
|
|
258702
258936
|
fork.use(es_proposals_1.default);
|
|
258703
|
-
var
|
|
258704
|
-
var def =
|
|
258705
|
-
var or =
|
|
258937
|
+
var types18 = fork.use(types_1.default);
|
|
258938
|
+
var def = types18.Type.def;
|
|
258939
|
+
var or = types18.Type.or;
|
|
258706
258940
|
var defaults = fork.use(shared_1.default).defaults;
|
|
258707
258941
|
def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
|
|
258708
258942
|
def("Literal"),
|
|
@@ -258758,9 +258992,9 @@ var require_type_annotations4 = __commonJS5({
|
|
|
258758
258992
|
var types_1 = tslib_1.__importDefault(require_types4());
|
|
258759
258993
|
var shared_1 = tslib_1.__importStar(require_shared4());
|
|
258760
258994
|
function default_1(fork) {
|
|
258761
|
-
var
|
|
258762
|
-
var def =
|
|
258763
|
-
var or =
|
|
258995
|
+
var types18 = fork.use(types_1.default);
|
|
258996
|
+
var def = types18.Type.def;
|
|
258997
|
+
var or = types18.Type.or;
|
|
258764
258998
|
var defaults = fork.use(shared_1.default).defaults;
|
|
258765
258999
|
var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
|
|
258766
259000
|
var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
|
|
@@ -258793,9 +259027,9 @@ var require_flow24 = __commonJS5({
|
|
|
258793
259027
|
function default_1(fork) {
|
|
258794
259028
|
fork.use(es_proposals_1.default);
|
|
258795
259029
|
fork.use(type_annotations_1.default);
|
|
258796
|
-
var
|
|
258797
|
-
var def =
|
|
258798
|
-
var or =
|
|
259030
|
+
var types18 = fork.use(types_1.default);
|
|
259031
|
+
var def = types18.Type.def;
|
|
259032
|
+
var or = types18.Type.or;
|
|
258799
259033
|
var defaults = fork.use(shared_1.default).defaults;
|
|
258800
259034
|
def("Flow").bases("Node");
|
|
258801
259035
|
def("FlowType").bases("Flow");
|
|
@@ -258907,10 +259141,10 @@ var require_esprima6 = __commonJS5({
|
|
|
258907
259141
|
var shared_1 = tslib_1.__importStar(require_shared4());
|
|
258908
259142
|
function default_1(fork) {
|
|
258909
259143
|
fork.use(es_proposals_1.default);
|
|
258910
|
-
var
|
|
259144
|
+
var types18 = fork.use(types_1.default);
|
|
258911
259145
|
var defaults = fork.use(shared_1.default).defaults;
|
|
258912
|
-
var def =
|
|
258913
|
-
var or =
|
|
259146
|
+
var def = types18.Type.def;
|
|
259147
|
+
var or = types18.Type.or;
|
|
258914
259148
|
def("VariableDeclaration").field("declarations", [or(
|
|
258915
259149
|
def("VariableDeclarator"),
|
|
258916
259150
|
def("Identifier")
|
|
@@ -258953,11 +259187,11 @@ var require_babel_core4 = __commonJS5({
|
|
|
258953
259187
|
function default_1(fork) {
|
|
258954
259188
|
var _a, _b, _c, _d, _e;
|
|
258955
259189
|
fork.use(es_proposals_1.default);
|
|
258956
|
-
var
|
|
259190
|
+
var types18 = fork.use(types_1.default);
|
|
258957
259191
|
var defaults = fork.use(shared_1.default).defaults;
|
|
258958
|
-
var def =
|
|
258959
|
-
var or =
|
|
258960
|
-
var isUndefined =
|
|
259192
|
+
var def = types18.Type.def;
|
|
259193
|
+
var or = types18.Type.or;
|
|
259194
|
+
var isUndefined = types18.builtInTypes.undefined;
|
|
258961
259195
|
def("Noop").bases("Statement").build();
|
|
258962
259196
|
def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
|
|
258963
259197
|
def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
|
|
@@ -258982,7 +259216,7 @@ var require_babel_core4 = __commonJS5({
|
|
|
258982
259216
|
raw: String
|
|
258983
259217
|
},
|
|
258984
259218
|
function getDefault() {
|
|
258985
|
-
var value =
|
|
259219
|
+
var value = types18.getFieldValue(this, "value");
|
|
258986
259220
|
return {
|
|
258987
259221
|
rawValue: value,
|
|
258988
259222
|
raw: toRaw ? toRaw(value) : String(value)
|
|
@@ -259083,8 +259317,8 @@ var require_babel4 = __commonJS5({
|
|
|
259083
259317
|
var flow_1 = tslib_1.__importDefault(require_flow24());
|
|
259084
259318
|
var shared_1 = require_shared4();
|
|
259085
259319
|
function default_1(fork) {
|
|
259086
|
-
var
|
|
259087
|
-
var def =
|
|
259320
|
+
var types18 = fork.use(types_1.default);
|
|
259321
|
+
var def = types18.Type.def;
|
|
259088
259322
|
fork.use(babel_core_1.default);
|
|
259089
259323
|
fork.use(flow_1.default);
|
|
259090
259324
|
def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
|
|
@@ -259108,12 +259342,12 @@ var require_typescript24 = __commonJS5({
|
|
|
259108
259342
|
function default_1(fork) {
|
|
259109
259343
|
fork.use(babel_core_1.default);
|
|
259110
259344
|
fork.use(type_annotations_1.default);
|
|
259111
|
-
var
|
|
259112
|
-
var n2 =
|
|
259113
|
-
var def =
|
|
259114
|
-
var or =
|
|
259345
|
+
var types18 = fork.use(types_1.default);
|
|
259346
|
+
var n2 = types18.namedTypes;
|
|
259347
|
+
var def = types18.Type.def;
|
|
259348
|
+
var or = types18.Type.or;
|
|
259115
259349
|
var defaults = fork.use(shared_1.default).defaults;
|
|
259116
|
-
var StringLiteral =
|
|
259350
|
+
var StringLiteral = types18.Type.from(function(value, deep) {
|
|
259117
259351
|
if (n2.StringLiteral && n2.StringLiteral.check(value, deep)) {
|
|
259118
259352
|
return true;
|
|
259119
259353
|
}
|
|
@@ -261061,8 +261295,8 @@ var require_util24 = __commonJS5({
|
|
|
261061
261295
|
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;
|
|
261062
261296
|
var tslib_1 = require_tslib4();
|
|
261063
261297
|
var assert_1 = tslib_1.__importDefault(__require5("assert"));
|
|
261064
|
-
var
|
|
261065
|
-
var n2 =
|
|
261298
|
+
var types18 = tslib_1.__importStar(require_main5());
|
|
261299
|
+
var n2 = types18.namedTypes;
|
|
261066
261300
|
var source_map_1 = tslib_1.__importDefault(require_source_map4());
|
|
261067
261301
|
var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
|
|
261068
261302
|
var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
|
|
@@ -268368,10 +268602,10 @@ var require_comments4 = __commonJS5({
|
|
|
268368
268602
|
exports.printComments = exports.attach = void 0;
|
|
268369
268603
|
var tslib_1 = require_tslib4();
|
|
268370
268604
|
var assert_1 = tslib_1.__importDefault(__require5("assert"));
|
|
268371
|
-
var
|
|
268372
|
-
var n2 =
|
|
268373
|
-
var isArray2 =
|
|
268374
|
-
var isObject2 =
|
|
268605
|
+
var types18 = tslib_1.__importStar(require_main5());
|
|
268606
|
+
var n2 = types18.namedTypes;
|
|
268607
|
+
var isArray2 = types18.builtInTypes.array;
|
|
268608
|
+
var isObject2 = types18.builtInTypes.object;
|
|
268375
268609
|
var lines_1 = require_lines4();
|
|
268376
268610
|
var util_1 = require_util24();
|
|
268377
268611
|
var childNodesCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -268402,7 +268636,7 @@ var require_comments4 = __commonJS5({
|
|
|
268402
268636
|
if (isArray2.check(node)) {
|
|
268403
268637
|
names = Object.keys(node);
|
|
268404
268638
|
} else if (isObject2.check(node)) {
|
|
268405
|
-
names =
|
|
268639
|
+
names = types18.getFieldNames(node);
|
|
268406
268640
|
} else {
|
|
268407
268641
|
return resultArray;
|
|
268408
268642
|
}
|
|
@@ -268580,7 +268814,7 @@ var require_comments4 = __commonJS5({
|
|
|
268580
268814
|
function printComments(path32, print132) {
|
|
268581
268815
|
var value = path32.getValue();
|
|
268582
268816
|
var innerLines = print132(path32);
|
|
268583
|
-
var comments = n2.Node.check(value) &&
|
|
268817
|
+
var comments = n2.Node.check(value) && types18.getFieldValue(value, "comments");
|
|
268584
268818
|
if (!comments || comments.length === 0) {
|
|
268585
268819
|
return innerLines;
|
|
268586
268820
|
}
|
|
@@ -268588,8 +268822,8 @@ var require_comments4 = __commonJS5({
|
|
|
268588
268822
|
var trailingParts = [innerLines];
|
|
268589
268823
|
path32.each(function(commentPath) {
|
|
268590
268824
|
var comment = commentPath.getValue();
|
|
268591
|
-
var leading =
|
|
268592
|
-
var trailing =
|
|
268825
|
+
var leading = types18.getFieldValue(comment, "leading");
|
|
268826
|
+
var trailing = types18.getFieldValue(comment, "trailing");
|
|
268593
268827
|
if (leading || trailing && !(n2.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
|
|
268594
268828
|
leadingParts.push(printLeadingComment(commentPath, print132));
|
|
268595
268829
|
} else if (trailing) {
|
|
@@ -268609,10 +268843,10 @@ var require_parser4 = __commonJS5({
|
|
|
268609
268843
|
exports.parse = void 0;
|
|
268610
268844
|
var tslib_1 = require_tslib4();
|
|
268611
268845
|
var assert_1 = tslib_1.__importDefault(__require5("assert"));
|
|
268612
|
-
var
|
|
268613
|
-
var b2 =
|
|
268614
|
-
var isObject2 =
|
|
268615
|
-
var isArray2 =
|
|
268846
|
+
var types18 = tslib_1.__importStar(require_main5());
|
|
268847
|
+
var b2 = types18.builders;
|
|
268848
|
+
var isObject2 = types18.builtInTypes.object;
|
|
268849
|
+
var isArray2 = types18.builtInTypes.array;
|
|
268616
268850
|
var options_1 = require_options4();
|
|
268617
268851
|
var lines_1 = require_lines4();
|
|
268618
268852
|
var comments_1 = require_comments4();
|
|
@@ -268796,11 +269030,11 @@ var require_fast_path4 = __commonJS5({
|
|
|
268796
269030
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
268797
269031
|
var tslib_1 = require_tslib4();
|
|
268798
269032
|
var assert_1 = tslib_1.__importDefault(__require5("assert"));
|
|
268799
|
-
var
|
|
269033
|
+
var types18 = tslib_1.__importStar(require_main5());
|
|
268800
269034
|
var util = tslib_1.__importStar(require_util24());
|
|
268801
|
-
var n2 =
|
|
268802
|
-
var isArray2 =
|
|
268803
|
-
var isNumber =
|
|
269035
|
+
var n2 = types18.namedTypes;
|
|
269036
|
+
var isArray2 = types18.builtInTypes.array;
|
|
269037
|
+
var isNumber = types18.builtInTypes.number;
|
|
268804
269038
|
var PRECEDENCE = {};
|
|
268805
269039
|
[
|
|
268806
269040
|
["??"],
|
|
@@ -268829,7 +269063,7 @@ var require_fast_path4 = __commonJS5({
|
|
|
268829
269063
|
if (obj instanceof FastPath) {
|
|
268830
269064
|
return obj.copy();
|
|
268831
269065
|
}
|
|
268832
|
-
if (obj instanceof
|
|
269066
|
+
if (obj instanceof types18.NodePath) {
|
|
268833
269067
|
var copy = Object.create(FastPath.prototype);
|
|
268834
269068
|
var stack = [obj.value];
|
|
268835
269069
|
for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
|
|
@@ -269140,7 +269374,7 @@ var require_fast_path4 = __commonJS5({
|
|
|
269140
269374
|
return node.some(containsCallExpression);
|
|
269141
269375
|
}
|
|
269142
269376
|
if (n2.Node.check(node)) {
|
|
269143
|
-
return
|
|
269377
|
+
return types18.someField(node, function(_name, child) {
|
|
269144
269378
|
return containsCallExpression(child);
|
|
269145
269379
|
});
|
|
269146
269380
|
}
|
|
@@ -269228,16 +269462,16 @@ var require_patcher4 = __commonJS5({
|
|
|
269228
269462
|
var tslib_1 = require_tslib4();
|
|
269229
269463
|
var assert_1 = tslib_1.__importDefault(__require5("assert"));
|
|
269230
269464
|
var linesModule = tslib_1.__importStar(require_lines4());
|
|
269231
|
-
var
|
|
269232
|
-
var Printable =
|
|
269233
|
-
var Expression =
|
|
269234
|
-
var ReturnStatement =
|
|
269235
|
-
var SourceLocation3 =
|
|
269465
|
+
var types18 = tslib_1.__importStar(require_main5());
|
|
269466
|
+
var Printable = types18.namedTypes.Printable;
|
|
269467
|
+
var Expression = types18.namedTypes.Expression;
|
|
269468
|
+
var ReturnStatement = types18.namedTypes.ReturnStatement;
|
|
269469
|
+
var SourceLocation3 = types18.namedTypes.SourceLocation;
|
|
269236
269470
|
var util_1 = require_util24();
|
|
269237
269471
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path4());
|
|
269238
|
-
var isObject2 =
|
|
269239
|
-
var isArray2 =
|
|
269240
|
-
var isString =
|
|
269472
|
+
var isObject2 = types18.builtInTypes.object;
|
|
269473
|
+
var isArray2 = types18.builtInTypes.array;
|
|
269474
|
+
var isString = types18.builtInTypes.string;
|
|
269241
269475
|
var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
|
|
269242
269476
|
var Patcher = function Patcher2(lines) {
|
|
269243
269477
|
assert_1.default.ok(this instanceof Patcher2);
|
|
@@ -269507,8 +269741,8 @@ var require_patcher4 = __commonJS5({
|
|
|
269507
269741
|
if (k2.charAt(0) === "_") {
|
|
269508
269742
|
continue;
|
|
269509
269743
|
}
|
|
269510
|
-
newPath.stack.push(k2,
|
|
269511
|
-
oldPath.stack.push(k2,
|
|
269744
|
+
newPath.stack.push(k2, types18.getFieldValue(newNode, k2));
|
|
269745
|
+
oldPath.stack.push(k2, types18.getFieldValue(oldNode, k2));
|
|
269512
269746
|
var canReprint = findAnyReprints(newPath, oldPath, reprints);
|
|
269513
269747
|
newPath.stack.length -= 2;
|
|
269514
269748
|
oldPath.stack.length -= 2;
|
|
@@ -269530,16 +269764,16 @@ var require_printer4 = __commonJS5({
|
|
|
269530
269764
|
exports.Printer = void 0;
|
|
269531
269765
|
var tslib_1 = require_tslib4();
|
|
269532
269766
|
var assert_1 = tslib_1.__importDefault(__require5("assert"));
|
|
269533
|
-
var
|
|
269767
|
+
var types18 = tslib_1.__importStar(require_main5());
|
|
269534
269768
|
var comments_1 = require_comments4();
|
|
269535
269769
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path4());
|
|
269536
269770
|
var lines_1 = require_lines4();
|
|
269537
269771
|
var options_1 = require_options4();
|
|
269538
269772
|
var patcher_1 = require_patcher4();
|
|
269539
269773
|
var util = tslib_1.__importStar(require_util24());
|
|
269540
|
-
var namedTypes =
|
|
269541
|
-
var isString =
|
|
269542
|
-
var isObject2 =
|
|
269774
|
+
var namedTypes = types18.namedTypes;
|
|
269775
|
+
var isString = types18.builtInTypes.string;
|
|
269776
|
+
var isObject2 = types18.builtInTypes.object;
|
|
269543
269777
|
var PrintResult = function PrintResult2(code, sourceMap) {
|
|
269544
269778
|
assert_1.default.ok(this instanceof PrintResult2);
|
|
269545
269779
|
isString.assert(code);
|
|
@@ -269701,7 +269935,7 @@ var require_printer4 = __commonJS5({
|
|
|
269701
269935
|
case "OptionalMemberExpression": {
|
|
269702
269936
|
parts.push(path32.call(print132, "object"));
|
|
269703
269937
|
var property = path32.call(print132, "property");
|
|
269704
|
-
var optional =
|
|
269938
|
+
var optional = types18.getFieldValue(n2, "optional");
|
|
269705
269939
|
if (n2.computed) {
|
|
269706
269940
|
parts.push(optional ? "?.[" : "[", property, "]");
|
|
269707
269941
|
} else {
|
|
@@ -269972,7 +270206,7 @@ var require_printer4 = __commonJS5({
|
|
|
269972
270206
|
if (n2.typeArguments) {
|
|
269973
270207
|
parts.push(path32.call(print132, "typeArguments"));
|
|
269974
270208
|
}
|
|
269975
|
-
if (
|
|
270209
|
+
if (types18.getFieldValue(n2, "optional")) {
|
|
269976
270210
|
parts.push("?.");
|
|
269977
270211
|
}
|
|
269978
270212
|
parts.push(printArgumentsList(path32, options, print132));
|
|
@@ -271651,8 +271885,8 @@ var require_printer4 = __commonJS5({
|
|
|
271651
271885
|
});
|
|
271652
271886
|
}
|
|
271653
271887
|
function getPossibleRaw(node) {
|
|
271654
|
-
var value =
|
|
271655
|
-
var extra =
|
|
271888
|
+
var value = types18.getFieldValue(node, "value");
|
|
271889
|
+
var extra = types18.getFieldValue(node, "extra");
|
|
271656
271890
|
if (extra && typeof extra.raw === "string" && value == extra.rawValue) {
|
|
271657
271891
|
return extra.raw;
|
|
271658
271892
|
}
|
|
@@ -271698,8 +271932,8 @@ var require_main24 = __commonJS5({
|
|
|
271698
271932
|
exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
|
|
271699
271933
|
var tslib_1 = require_tslib4();
|
|
271700
271934
|
var fs_1 = tslib_1.__importDefault(__require5("fs"));
|
|
271701
|
-
var
|
|
271702
|
-
exports.types =
|
|
271935
|
+
var types18 = tslib_1.__importStar(require_main5());
|
|
271936
|
+
exports.types = types18;
|
|
271703
271937
|
var parser_1 = require_parser4();
|
|
271704
271938
|
Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
|
|
271705
271939
|
return parser_1.parse;
|
|
@@ -272359,7 +272593,7 @@ var printDocASTReducer4 = {
|
|
|
272359
272593
|
leave: ({ name, interfaces, directives, fields }) => join5(["interface", name, wrap4("implements ", join5(interfaces, " & ")), join5(directives, " "), block4(fields)], " ")
|
|
272360
272594
|
},
|
|
272361
272595
|
UnionTypeDefinition: {
|
|
272362
|
-
leave: ({ name, directives, types:
|
|
272596
|
+
leave: ({ name, directives, types: types18 }) => join5(["union", name, join5(directives, " "), wrap4("= ", join5(types18, " | "))], " ")
|
|
272363
272597
|
},
|
|
272364
272598
|
EnumTypeDefinition: {
|
|
272365
272599
|
leave: ({ name, directives, values }) => join5(["enum", name, join5(directives, " "), block4(values)], " ")
|
|
@@ -272386,7 +272620,7 @@ var printDocASTReducer4 = {
|
|
|
272386
272620
|
leave: ({ name, interfaces, directives, fields }) => join5(["extend interface", name, wrap4("implements ", join5(interfaces, " & ")), join5(directives, " "), block4(fields)], " ")
|
|
272387
272621
|
},
|
|
272388
272622
|
UnionTypeExtension: {
|
|
272389
|
-
leave: ({ name, directives, types:
|
|
272623
|
+
leave: ({ name, directives, types: types18 }) => join5(["extend union", name, join5(directives, " "), wrap4("= ", join5(types18, " | "))], " ")
|
|
272390
272624
|
},
|
|
272391
272625
|
EnumTypeExtension: {
|
|
272392
272626
|
leave: ({ name, directives, values }) => join5(["extend enum", name, join5(directives, " "), block4(values)], " ")
|
|
@@ -273801,7 +274035,18 @@ var ListManager4 = class {
|
|
|
273801
274035
|
}
|
|
273802
274036
|
lists = /* @__PURE__ */ new Map();
|
|
273803
274037
|
listsByField = /* @__PURE__ */ new Map();
|
|
273804
|
-
get(listName, id2, allLists) {
|
|
274038
|
+
get(listName, id2, allLists, skipMatches) {
|
|
274039
|
+
const lists = this.getLists(listName, id2, allLists);
|
|
274040
|
+
if (!lists) {
|
|
274041
|
+
return null;
|
|
274042
|
+
}
|
|
274043
|
+
if (skipMatches) {
|
|
274044
|
+
return new ListCollection4(lists.lists.filter((list3) => !skipMatches.has(list3.fieldRef)));
|
|
274045
|
+
} else {
|
|
274046
|
+
return lists;
|
|
274047
|
+
}
|
|
274048
|
+
}
|
|
274049
|
+
getLists(listName, id2, allLists) {
|
|
273805
274050
|
const matches = this.lists.get(listName);
|
|
273806
274051
|
if (!matches || matches.size === 0) {
|
|
273807
274052
|
return null;
|
|
@@ -273923,6 +274168,9 @@ var List4 = class {
|
|
|
273923
274168
|
this.manager = manager;
|
|
273924
274169
|
this.abstract = abstract;
|
|
273925
274170
|
}
|
|
274171
|
+
get fieldRef() {
|
|
274172
|
+
return `${this.recordID}.${this.key}`;
|
|
274173
|
+
}
|
|
273926
274174
|
when(when) {
|
|
273927
274175
|
return this.manager.lists.get(this.name).get(this.recordID).when(when);
|
|
273928
274176
|
}
|
|
@@ -275067,8 +275315,8 @@ var Cache4 = class {
|
|
|
275067
275315
|
variables
|
|
275068
275316
|
);
|
|
275069
275317
|
}
|
|
275070
|
-
list(name, parentID, allLists) {
|
|
275071
|
-
const handler = this._internal_unstable.lists.get(name, parentID, allLists);
|
|
275318
|
+
list(name, parentID, allLists, skipMatches) {
|
|
275319
|
+
const handler = this._internal_unstable.lists.get(name, parentID, allLists, skipMatches);
|
|
275072
275320
|
if (!handler) {
|
|
275073
275321
|
throw new Error(
|
|
275074
275322
|
`Cannot find list with name: ${name}${parentID ? " under parent " + parentID : ""}. Is it possible that the query is not mounted?`
|
|
@@ -275483,6 +275731,7 @@ var CacheInternal4 = class {
|
|
|
275483
275731
|
});
|
|
275484
275732
|
}
|
|
275485
275733
|
}
|
|
275734
|
+
const processedOperations = /* @__PURE__ */ new Set();
|
|
275486
275735
|
for (const operation of operations || []) {
|
|
275487
275736
|
let parentID;
|
|
275488
275737
|
if (operation.parentID) {
|
|
@@ -275502,7 +275751,12 @@ var CacheInternal4 = class {
|
|
|
275502
275751
|
const targets = Array.isArray(value) ? value : [value];
|
|
275503
275752
|
for (const target of targets) {
|
|
275504
275753
|
if (operation.action === "insert" && target instanceof Object && fieldSelection && operation.list) {
|
|
275505
|
-
this.cache.list(
|
|
275754
|
+
this.cache.list(
|
|
275755
|
+
operation.list,
|
|
275756
|
+
parentID,
|
|
275757
|
+
operation.target === "all",
|
|
275758
|
+
processedOperations
|
|
275759
|
+
).when(operation.when).addToList(
|
|
275506
275760
|
fieldSelection,
|
|
275507
275761
|
target,
|
|
275508
275762
|
variables,
|
|
@@ -275510,7 +275764,12 @@ var CacheInternal4 = class {
|
|
|
275510
275764
|
layer
|
|
275511
275765
|
);
|
|
275512
275766
|
} else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
|
|
275513
|
-
this.cache.list(
|
|
275767
|
+
this.cache.list(
|
|
275768
|
+
operation.list,
|
|
275769
|
+
parentID,
|
|
275770
|
+
operation.target === "all",
|
|
275771
|
+
processedOperations
|
|
275772
|
+
).when(operation.when).toggleElement({
|
|
275514
275773
|
selection: fieldSelection,
|
|
275515
275774
|
data: target,
|
|
275516
275775
|
variables,
|
|
@@ -275518,7 +275777,12 @@ var CacheInternal4 = class {
|
|
|
275518
275777
|
layer
|
|
275519
275778
|
});
|
|
275520
275779
|
} else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
|
|
275521
|
-
this.cache.list(
|
|
275780
|
+
this.cache.list(
|
|
275781
|
+
operation.list,
|
|
275782
|
+
parentID,
|
|
275783
|
+
operation.target === "all",
|
|
275784
|
+
processedOperations
|
|
275785
|
+
).when(operation.when).remove(target, variables, layer);
|
|
275522
275786
|
} else if (operation.action === "delete" && operation.type && target) {
|
|
275523
275787
|
const targetID = this.id(operation.type, target);
|
|
275524
275788
|
if (!targetID) {
|
|
@@ -275530,6 +275794,16 @@ var CacheInternal4 = class {
|
|
|
275530
275794
|
this.cache.delete(targetID, layer);
|
|
275531
275795
|
}
|
|
275532
275796
|
}
|
|
275797
|
+
if (operation.list) {
|
|
275798
|
+
const matchingLists = this.cache.list(
|
|
275799
|
+
operation.list,
|
|
275800
|
+
parentID,
|
|
275801
|
+
operation.target === "all"
|
|
275802
|
+
);
|
|
275803
|
+
for (const list3 of matchingLists.lists) {
|
|
275804
|
+
processedOperations.add(list3.fieldRef);
|
|
275805
|
+
}
|
|
275806
|
+
}
|
|
275533
275807
|
}
|
|
275534
275808
|
}
|
|
275535
275809
|
return toNotify;
|
|
@@ -275995,6 +276269,46 @@ var { keys: keys3 } = Object;
|
|
|
275995
276269
|
var recast43 = __toESM5(require_main24(), 1);
|
|
275996
276270
|
var AST43 = recast43.types.builders;
|
|
275997
276271
|
var pageInfoSelection3 = [
|
|
276272
|
+
{
|
|
276273
|
+
kind: graphql133.Kind.FIELD,
|
|
276274
|
+
name: {
|
|
276275
|
+
kind: graphql133.Kind.NAME,
|
|
276276
|
+
value: "pageInfo"
|
|
276277
|
+
},
|
|
276278
|
+
selectionSet: {
|
|
276279
|
+
kind: graphql133.Kind.SELECTION_SET,
|
|
276280
|
+
selections: [
|
|
276281
|
+
{
|
|
276282
|
+
kind: graphql133.Kind.FIELD,
|
|
276283
|
+
name: {
|
|
276284
|
+
kind: graphql133.Kind.NAME,
|
|
276285
|
+
value: "hasPreviousPage"
|
|
276286
|
+
}
|
|
276287
|
+
},
|
|
276288
|
+
{
|
|
276289
|
+
kind: graphql133.Kind.FIELD,
|
|
276290
|
+
name: {
|
|
276291
|
+
kind: graphql133.Kind.NAME,
|
|
276292
|
+
value: "hasNextPage"
|
|
276293
|
+
}
|
|
276294
|
+
},
|
|
276295
|
+
{
|
|
276296
|
+
kind: graphql133.Kind.FIELD,
|
|
276297
|
+
name: {
|
|
276298
|
+
kind: graphql133.Kind.NAME,
|
|
276299
|
+
value: "startCursor"
|
|
276300
|
+
}
|
|
276301
|
+
},
|
|
276302
|
+
{
|
|
276303
|
+
kind: graphql133.Kind.FIELD,
|
|
276304
|
+
name: {
|
|
276305
|
+
kind: graphql133.Kind.NAME,
|
|
276306
|
+
value: "endCursor"
|
|
276307
|
+
}
|
|
276308
|
+
}
|
|
276309
|
+
]
|
|
276310
|
+
}
|
|
276311
|
+
},
|
|
275998
276312
|
{
|
|
275999
276313
|
kind: graphql133.Kind.FIELD,
|
|
276000
276314
|
name: {
|
|
@@ -276265,7 +276579,7 @@ var printDocASTReducer22 = {
|
|
|
276265
276579
|
], " ")
|
|
276266
276580
|
},
|
|
276267
276581
|
UnionTypeDefinition: {
|
|
276268
|
-
leave: ({ name, directives, types:
|
|
276582
|
+
leave: ({ name, directives, types: types18 }) => join32(["union", name, join32(directives, " "), wrap22("= ", join32(types18, " | "))], " ")
|
|
276269
276583
|
},
|
|
276270
276584
|
EnumTypeDefinition: {
|
|
276271
276585
|
leave: ({ name, directives, values }) => join32(["enum", name, join32(directives, " "), block22(values)], " ")
|
|
@@ -276304,7 +276618,7 @@ var printDocASTReducer22 = {
|
|
|
276304
276618
|
], " ")
|
|
276305
276619
|
},
|
|
276306
276620
|
UnionTypeExtension: {
|
|
276307
|
-
leave: ({ name, directives, types:
|
|
276621
|
+
leave: ({ name, directives, types: types18 }) => join32(["extend union", name, join32(directives, " "), wrap22("= ", join32(types18, " | "))], " ")
|
|
276308
276622
|
},
|
|
276309
276623
|
EnumTypeExtension: {
|
|
276310
276624
|
leave: ({ name, directives, values }) => join32(["extend enum", name, join32(directives, " "), block22(values)], " ")
|
|
@@ -276341,6 +276655,8 @@ For more information, please visit these links:
|
|
|
276341
276655
|
- https://graphql.org/learn/global-object-identification/
|
|
276342
276656
|
- ${siteURL3}/guides/caching-data#custom-ids
|
|
276343
276657
|
`;
|
|
276658
|
+
var recast142 = __toESM5(require_main24(), 1);
|
|
276659
|
+
var AST142 = recast142.types.builders;
|
|
276344
276660
|
function find_insert_index(script) {
|
|
276345
276661
|
let insert_index = script.body.findIndex((statement) => {
|
|
276346
276662
|
return statement.type !== "ImportDeclaration";
|
|
@@ -276359,7 +276675,7 @@ function find_exported_fn(body, name) {
|
|
|
276359
276675
|
if (exportDeclaration.declaration?.type === "FunctionDeclaration") {
|
|
276360
276676
|
const value = exportDeclaration.declaration;
|
|
276361
276677
|
if (value.id?.name === name) {
|
|
276362
|
-
return exportDeclaration.declaration;
|
|
276678
|
+
return { declaration: exportDeclaration.declaration, export: exportDeclaration };
|
|
276363
276679
|
}
|
|
276364
276680
|
} else if (exportDeclaration.declaration?.type === "VariableDeclaration") {
|
|
276365
276681
|
const value = exportDeclaration.declaration;
|
|
@@ -276378,7 +276694,10 @@ function find_exported_fn(body, name) {
|
|
|
276378
276694
|
init2 = init2.arguments[0];
|
|
276379
276695
|
}
|
|
276380
276696
|
if (init2.type === "FunctionExpression" || init2.type === "ArrowFunctionExpression") {
|
|
276381
|
-
return init2;
|
|
276697
|
+
return { declaration: init2, export: exportDeclaration };
|
|
276698
|
+
}
|
|
276699
|
+
if (init2.type === "Identifier" || init2.type === "CallExpression") {
|
|
276700
|
+
return { declaration: init2, export: exportDeclaration };
|
|
276382
276701
|
}
|
|
276383
276702
|
} else {
|
|
276384
276703
|
continue;
|
|
@@ -276390,10 +276709,10 @@ function find_exported_fn(body, name) {
|
|
|
276390
276709
|
if (!exported) {
|
|
276391
276710
|
return null;
|
|
276392
276711
|
}
|
|
276393
|
-
return exported.declaration;
|
|
276712
|
+
return { declaration: exported.declaration, export: exported };
|
|
276394
276713
|
}
|
|
276395
|
-
var
|
|
276396
|
-
var
|
|
276714
|
+
var recast152 = __toESM5(require_main24(), 1);
|
|
276715
|
+
var AST152 = recast152.types.builders;
|
|
276397
276716
|
function ensure_imports({
|
|
276398
276717
|
config: config2,
|
|
276399
276718
|
script,
|
|
@@ -276409,13 +276728,13 @@ function ensure_imports({
|
|
|
276409
276728
|
if (!has_import) {
|
|
276410
276729
|
script.body.unshift({
|
|
276411
276730
|
type: "ImportDeclaration",
|
|
276412
|
-
source:
|
|
276731
|
+
source: AST152.stringLiteral(sourceModule),
|
|
276413
276732
|
importKind
|
|
276414
276733
|
});
|
|
276415
276734
|
}
|
|
276416
276735
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
276417
276736
|
}
|
|
276418
|
-
const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) =>
|
|
276737
|
+
const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST152.identifier(id2));
|
|
276419
276738
|
const toImport = idList.filter(
|
|
276420
276739
|
(identifier) => !script.body.find(
|
|
276421
276740
|
(statement) => statement.type === "ImportDeclaration" && statement.specifiers?.find(
|
|
@@ -276426,16 +276745,16 @@ function ensure_imports({
|
|
|
276426
276745
|
if (toImport.length > 0) {
|
|
276427
276746
|
script.body.unshift({
|
|
276428
276747
|
type: "ImportDeclaration",
|
|
276429
|
-
source:
|
|
276748
|
+
source: AST152.stringLiteral(sourceModule),
|
|
276430
276749
|
specifiers: toImport.map(
|
|
276431
|
-
(identifier, i22) => !Array.isArray(importID) ?
|
|
276750
|
+
(identifier, i22) => !Array.isArray(importID) ? AST152.importDefaultSpecifier(identifier) : AST152.importSpecifier(identifier, as?.[i22] ? AST152.identifier(as[i22]) : identifier)
|
|
276432
276751
|
),
|
|
276433
276752
|
importKind
|
|
276434
276753
|
});
|
|
276435
276754
|
}
|
|
276436
276755
|
for (const [i22, target] of (as ?? []).entries()) {
|
|
276437
276756
|
if (target) {
|
|
276438
|
-
idList[i22] =
|
|
276757
|
+
idList[i22] = AST152.identifier(target);
|
|
276439
276758
|
}
|
|
276440
276759
|
}
|
|
276441
276760
|
return {
|
|
@@ -294267,7 +294586,7 @@ function is_root_route(filepath) {
|
|
|
294267
294586
|
if (filepath.toString().endsWith("/")) {
|
|
294268
294587
|
filepath = filepath.slice(0, -1);
|
|
294269
294588
|
}
|
|
294270
|
-
return filepath.endsWith(path_exports.join("src", "routes")) && !filepath.includes(".svelte-kit") && !filepath.includes("$houdini");
|
|
294589
|
+
return filepath.endsWith(path_exports.join("src", "routes")) && !filepath.includes(".svelte-kit") && !filepath.includes(_config.runtimeDir ?? "$houdini");
|
|
294271
294590
|
}
|
|
294272
294591
|
var empty_layout = "<slot />";
|
|
294273
294592
|
|
|
@@ -295032,24 +295351,28 @@ function add_load_return(page, properties) {
|
|
|
295032
295351
|
} else {
|
|
295033
295352
|
return_statement = AST20.returnStatement(AST20.objectExpression([]));
|
|
295034
295353
|
body.body.push(return_statement);
|
|
295035
|
-
return_statement_index = body.body.length - 1;
|
|
295036
295354
|
}
|
|
295037
|
-
|
|
295038
|
-
|
|
295039
|
-
|
|
295040
|
-
|
|
295041
|
-
|
|
295042
|
-
|
|
295043
|
-
|
|
295044
|
-
|
|
295045
|
-
|
|
295046
|
-
|
|
295047
|
-
|
|
295355
|
+
return walk(body, {
|
|
295356
|
+
enter(node) {
|
|
295357
|
+
if (node.type === "ReturnStatement") {
|
|
295358
|
+
const returnedValue = node.argument;
|
|
295359
|
+
this.replace(
|
|
295360
|
+
AST20.returnStatement(
|
|
295361
|
+
AST20.objectExpression([
|
|
295362
|
+
...properties(event_id),
|
|
295363
|
+
AST20.spreadElement(returnedValue ?? AST20.objectExpression([]))
|
|
295364
|
+
])
|
|
295365
|
+
)
|
|
295366
|
+
);
|
|
295367
|
+
}
|
|
295368
|
+
}
|
|
295369
|
+
});
|
|
295048
295370
|
});
|
|
295049
295371
|
}
|
|
295050
295372
|
function modify_load(page, cb) {
|
|
295051
|
-
let
|
|
295373
|
+
let exported = find_exported_fn(page.script.body, "load");
|
|
295052
295374
|
let event_id = AST20.identifier("event");
|
|
295375
|
+
let load_fn = exported?.declaration || null;
|
|
295053
295376
|
let body = AST20.blockStatement([]);
|
|
295054
295377
|
if (load_fn?.type === "ArrowFunctionExpression") {
|
|
295055
295378
|
if (load_fn.body.type === "BlockStatement") {
|
|
@@ -295058,7 +295381,7 @@ function modify_load(page, cb) {
|
|
|
295058
295381
|
body = AST20.blockStatement([AST20.returnStatement(load_fn.body)]);
|
|
295059
295382
|
load_fn.body = body;
|
|
295060
295383
|
}
|
|
295061
|
-
} else if (load_fn) {
|
|
295384
|
+
} else if (load_fn && "body" in load_fn) {
|
|
295062
295385
|
body = load_fn.body;
|
|
295063
295386
|
}
|
|
295064
295387
|
if (!load_fn) {
|
|
@@ -295074,6 +295397,30 @@ function modify_load(page, cb) {
|
|
|
295074
295397
|
AST20.exportNamedDeclaration(load_fn)
|
|
295075
295398
|
);
|
|
295076
295399
|
body = load_fn.body;
|
|
295400
|
+
} else if (load_fn.type === "CallExpression" || load_fn.type === "Identifier") {
|
|
295401
|
+
const exportStatement = exported?.export;
|
|
295402
|
+
if (!exportStatement) {
|
|
295403
|
+
return;
|
|
295404
|
+
}
|
|
295405
|
+
const intermediateID = AST20.identifier("houdini__intermediate__load__");
|
|
295406
|
+
page.script.body.push(
|
|
295407
|
+
AST20.variableDeclaration("const", [AST20.variableDeclarator(intermediateID, load_fn)])
|
|
295408
|
+
);
|
|
295409
|
+
const newLoad = AST20.arrowFunctionExpression(
|
|
295410
|
+
[AST20.identifier("event")],
|
|
295411
|
+
AST20.blockStatement([
|
|
295412
|
+
AST20.variableDeclaration("const", [
|
|
295413
|
+
AST20.variableDeclarator(
|
|
295414
|
+
AST20.identifier("result"),
|
|
295415
|
+
AST20.callExpression(intermediateID, [AST20.identifier("event")])
|
|
295416
|
+
)
|
|
295417
|
+
]),
|
|
295418
|
+
AST20.returnStatement(AST20.identifier("result"))
|
|
295419
|
+
])
|
|
295420
|
+
);
|
|
295421
|
+
exportStatement.declaration.declarations[0].init = newLoad;
|
|
295422
|
+
load_fn = newLoad;
|
|
295423
|
+
body = newLoad.body;
|
|
295077
295424
|
} else {
|
|
295078
295425
|
if (load_fn.params.length === 0) {
|
|
295079
295426
|
load_fn.params.push(event_id);
|
|
@@ -295091,7 +295438,7 @@ function modify_load(page, cb) {
|
|
|
295091
295438
|
);
|
|
295092
295439
|
}
|
|
295093
295440
|
}
|
|
295094
|
-
cb(body, event_id);
|
|
295441
|
+
load_fn.body = cb(body, event_id);
|
|
295095
295442
|
}
|
|
295096
295443
|
|
|
295097
295444
|
// src/plugin/transforms/kit/index.ts
|