houdini-svelte 2.1.11 → 2.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/plugin-cjs/index.js +62 -35
- package/build/plugin-esm/index.js +62 -35
- package/build/preprocess-cjs/index.js +62 -35
- package/build/preprocess-esm/index.js +62 -35
- package/build/test-cjs/index.js +62 -35
- package/build/test-esm/index.js +62 -35
- package/package.json +1 -1
|
@@ -151559,7 +151559,7 @@ function ensure_imports({
|
|
|
151559
151559
|
script.body.unshift({
|
|
151560
151560
|
type: "ImportDeclaration",
|
|
151561
151561
|
source: AST16.stringLiteral(sourceModule),
|
|
151562
|
-
importKind
|
|
151562
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
151563
151563
|
});
|
|
151564
151564
|
}
|
|
151565
151565
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
@@ -151573,13 +151573,12 @@ function ensure_imports({
|
|
|
151573
151573
|
)
|
|
151574
151574
|
);
|
|
151575
151575
|
if (toImport.length > 0) {
|
|
151576
|
+
const specifier = (identifier, i22) => importKind !== "module" ? !Array.isArray(importID) ? AST16.importDefaultSpecifier(identifier) : AST16.importSpecifier(identifier, as?.[i22] ? AST16.identifier(as[i22]) : identifier) : AST16.importNamespaceSpecifier(identifier);
|
|
151576
151577
|
script.body.unshift({
|
|
151577
151578
|
type: "ImportDeclaration",
|
|
151578
151579
|
source: AST16.stringLiteral(sourceModule),
|
|
151579
|
-
specifiers: toImport.map(
|
|
151580
|
-
|
|
151581
|
-
),
|
|
151582
|
-
importKind
|
|
151580
|
+
specifiers: toImport.map(specifier),
|
|
151581
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
151583
151582
|
});
|
|
151584
151583
|
}
|
|
151585
151584
|
for (const [i22, target] of (as ?? []).entries()) {
|
|
@@ -153249,22 +153248,43 @@ async function QueryProcessor(config, page) {
|
|
|
153249
153248
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
153250
153249
|
propsStatement.id.properties.forEach((property) => {
|
|
153251
153250
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
153252
|
-
|
|
153251
|
+
const key = property.key.name;
|
|
153252
|
+
let value = property.key.name;
|
|
153253
|
+
switch (property.value.type) {
|
|
153254
|
+
case "Identifier":
|
|
153255
|
+
value = property.value.name;
|
|
153256
|
+
break;
|
|
153257
|
+
case "AssignmentPattern":
|
|
153258
|
+
if (property.value.left.type === "Identifier") {
|
|
153259
|
+
value = property.value.left.name;
|
|
153260
|
+
}
|
|
153261
|
+
break;
|
|
153262
|
+
default:
|
|
153263
|
+
break;
|
|
153264
|
+
}
|
|
153265
|
+
props.push({ key, value });
|
|
153253
153266
|
}
|
|
153254
153267
|
});
|
|
153255
153268
|
}
|
|
153256
153269
|
}
|
|
153257
153270
|
} else {
|
|
153258
153271
|
props = page.script.body.filter(
|
|
153259
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
153260
|
-
).flatMap(
|
|
153261
|
-
(
|
|
153262
|
-
|
|
153263
|
-
|
|
153264
|
-
|
|
153265
|
-
|
|
153266
|
-
|
|
153267
|
-
|
|
153272
|
+
(statement) => statement.type === "ExportNamedDeclaration" && (!statement.declaration || statement.declaration.type === "VariableDeclaration")
|
|
153273
|
+
).flatMap(({ declaration, specifiers }) => {
|
|
153274
|
+
if (declaration?.type === "VariableDeclaration") {
|
|
153275
|
+
return declaration.declarations.map((dec) => {
|
|
153276
|
+
if (dec.type === "VariableDeclarator") {
|
|
153277
|
+
const name = dec.id.type === "Identifier" ? dec.id.name : "";
|
|
153278
|
+
return { key: name, value: name };
|
|
153279
|
+
}
|
|
153280
|
+
return { key: dec.name, value: dec.name };
|
|
153281
|
+
});
|
|
153282
|
+
}
|
|
153283
|
+
return specifiers?.flatMap((spec) => ({
|
|
153284
|
+
key: spec.exported.name,
|
|
153285
|
+
value: spec.local?.name ?? ""
|
|
153286
|
+
})) ?? [];
|
|
153287
|
+
});
|
|
153268
153288
|
}
|
|
153269
153289
|
ensure_imports({
|
|
153270
153290
|
config: page.config,
|
|
@@ -153355,10 +153375,10 @@ async function QueryProcessor(config, page) {
|
|
|
153355
153375
|
props.map(
|
|
153356
153376
|
(prop) => AST17.objectProperty(
|
|
153357
153377
|
AST17.identifier(
|
|
153358
|
-
prop
|
|
153378
|
+
prop.key
|
|
153359
153379
|
),
|
|
153360
153380
|
AST17.identifier(
|
|
153361
|
-
prop
|
|
153381
|
+
prop.value
|
|
153362
153382
|
)
|
|
153363
153383
|
)
|
|
153364
153384
|
)
|
|
@@ -153470,27 +153490,34 @@ async function kit_init(page) {
|
|
|
153470
153490
|
script: page.script,
|
|
153471
153491
|
config: page.config,
|
|
153472
153492
|
sourceModule: "$app/stores",
|
|
153473
|
-
|
|
153474
|
-
|
|
153493
|
+
importKind: "module",
|
|
153494
|
+
import: "__houdini__pageStores"
|
|
153495
|
+
}).ids;
|
|
153475
153496
|
page.script.body.push(
|
|
153476
153497
|
AST18.expressionStatement(
|
|
153477
|
-
AST18.callExpression(
|
|
153478
|
-
AST18.
|
|
153479
|
-
|
|
153480
|
-
AST18.
|
|
153481
|
-
|
|
153482
|
-
|
|
153483
|
-
|
|
153484
|
-
|
|
153485
|
-
|
|
153486
|
-
|
|
153487
|
-
|
|
153498
|
+
AST18.callExpression(
|
|
153499
|
+
AST18.memberExpression(
|
|
153500
|
+
AST18.memberExpression(store_id, AST18.identifier("page")),
|
|
153501
|
+
AST18.identifier("subscribe")
|
|
153502
|
+
),
|
|
153503
|
+
[
|
|
153504
|
+
AST18.arrowFunctionExpression(
|
|
153505
|
+
[AST18.identifier("val")],
|
|
153506
|
+
AST18.blockStatement([
|
|
153507
|
+
AST18.expressionStatement(
|
|
153508
|
+
AST18.callExpression(set_session, [
|
|
153509
|
+
AST18.callExpression(extract_session, [
|
|
153510
|
+
AST18.memberExpression(
|
|
153511
|
+
AST18.identifier("val"),
|
|
153512
|
+
AST18.identifier("data")
|
|
153513
|
+
)
|
|
153514
|
+
])
|
|
153488
153515
|
])
|
|
153489
|
-
|
|
153490
|
-
)
|
|
153491
|
-
|
|
153492
|
-
|
|
153493
|
-
|
|
153516
|
+
)
|
|
153517
|
+
])
|
|
153518
|
+
)
|
|
153519
|
+
]
|
|
153520
|
+
)
|
|
153494
153521
|
)
|
|
153495
153522
|
);
|
|
153496
153523
|
}
|
|
@@ -151554,7 +151554,7 @@ function ensure_imports({
|
|
|
151554
151554
|
script.body.unshift({
|
|
151555
151555
|
type: "ImportDeclaration",
|
|
151556
151556
|
source: AST16.stringLiteral(sourceModule),
|
|
151557
|
-
importKind
|
|
151557
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
151558
151558
|
});
|
|
151559
151559
|
}
|
|
151560
151560
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
@@ -151568,13 +151568,12 @@ function ensure_imports({
|
|
|
151568
151568
|
)
|
|
151569
151569
|
);
|
|
151570
151570
|
if (toImport.length > 0) {
|
|
151571
|
+
const specifier = (identifier, i22) => importKind !== "module" ? !Array.isArray(importID) ? AST16.importDefaultSpecifier(identifier) : AST16.importSpecifier(identifier, as?.[i22] ? AST16.identifier(as[i22]) : identifier) : AST16.importNamespaceSpecifier(identifier);
|
|
151571
151572
|
script.body.unshift({
|
|
151572
151573
|
type: "ImportDeclaration",
|
|
151573
151574
|
source: AST16.stringLiteral(sourceModule),
|
|
151574
|
-
specifiers: toImport.map(
|
|
151575
|
-
|
|
151576
|
-
),
|
|
151577
|
-
importKind
|
|
151575
|
+
specifiers: toImport.map(specifier),
|
|
151576
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
151578
151577
|
});
|
|
151579
151578
|
}
|
|
151580
151579
|
for (const [i22, target] of (as ?? []).entries()) {
|
|
@@ -153244,22 +153243,43 @@ async function QueryProcessor(config, page) {
|
|
|
153244
153243
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
153245
153244
|
propsStatement.id.properties.forEach((property) => {
|
|
153246
153245
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
153247
|
-
|
|
153246
|
+
const key = property.key.name;
|
|
153247
|
+
let value = property.key.name;
|
|
153248
|
+
switch (property.value.type) {
|
|
153249
|
+
case "Identifier":
|
|
153250
|
+
value = property.value.name;
|
|
153251
|
+
break;
|
|
153252
|
+
case "AssignmentPattern":
|
|
153253
|
+
if (property.value.left.type === "Identifier") {
|
|
153254
|
+
value = property.value.left.name;
|
|
153255
|
+
}
|
|
153256
|
+
break;
|
|
153257
|
+
default:
|
|
153258
|
+
break;
|
|
153259
|
+
}
|
|
153260
|
+
props.push({ key, value });
|
|
153248
153261
|
}
|
|
153249
153262
|
});
|
|
153250
153263
|
}
|
|
153251
153264
|
}
|
|
153252
153265
|
} else {
|
|
153253
153266
|
props = page.script.body.filter(
|
|
153254
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
153255
|
-
).flatMap(
|
|
153256
|
-
(
|
|
153257
|
-
|
|
153258
|
-
|
|
153259
|
-
|
|
153260
|
-
|
|
153261
|
-
|
|
153262
|
-
|
|
153267
|
+
(statement) => statement.type === "ExportNamedDeclaration" && (!statement.declaration || statement.declaration.type === "VariableDeclaration")
|
|
153268
|
+
).flatMap(({ declaration, specifiers }) => {
|
|
153269
|
+
if (declaration?.type === "VariableDeclaration") {
|
|
153270
|
+
return declaration.declarations.map((dec) => {
|
|
153271
|
+
if (dec.type === "VariableDeclarator") {
|
|
153272
|
+
const name = dec.id.type === "Identifier" ? dec.id.name : "";
|
|
153273
|
+
return { key: name, value: name };
|
|
153274
|
+
}
|
|
153275
|
+
return { key: dec.name, value: dec.name };
|
|
153276
|
+
});
|
|
153277
|
+
}
|
|
153278
|
+
return specifiers?.flatMap((spec) => ({
|
|
153279
|
+
key: spec.exported.name,
|
|
153280
|
+
value: spec.local?.name ?? ""
|
|
153281
|
+
})) ?? [];
|
|
153282
|
+
});
|
|
153263
153283
|
}
|
|
153264
153284
|
ensure_imports({
|
|
153265
153285
|
config: page.config,
|
|
@@ -153350,10 +153370,10 @@ async function QueryProcessor(config, page) {
|
|
|
153350
153370
|
props.map(
|
|
153351
153371
|
(prop) => AST17.objectProperty(
|
|
153352
153372
|
AST17.identifier(
|
|
153353
|
-
prop
|
|
153373
|
+
prop.key
|
|
153354
153374
|
),
|
|
153355
153375
|
AST17.identifier(
|
|
153356
|
-
prop
|
|
153376
|
+
prop.value
|
|
153357
153377
|
)
|
|
153358
153378
|
)
|
|
153359
153379
|
)
|
|
@@ -153465,27 +153485,34 @@ async function kit_init(page) {
|
|
|
153465
153485
|
script: page.script,
|
|
153466
153486
|
config: page.config,
|
|
153467
153487
|
sourceModule: "$app/stores",
|
|
153468
|
-
|
|
153469
|
-
|
|
153488
|
+
importKind: "module",
|
|
153489
|
+
import: "__houdini__pageStores"
|
|
153490
|
+
}).ids;
|
|
153470
153491
|
page.script.body.push(
|
|
153471
153492
|
AST18.expressionStatement(
|
|
153472
|
-
AST18.callExpression(
|
|
153473
|
-
AST18.
|
|
153474
|
-
|
|
153475
|
-
AST18.
|
|
153476
|
-
|
|
153477
|
-
|
|
153478
|
-
|
|
153479
|
-
|
|
153480
|
-
|
|
153481
|
-
|
|
153482
|
-
|
|
153493
|
+
AST18.callExpression(
|
|
153494
|
+
AST18.memberExpression(
|
|
153495
|
+
AST18.memberExpression(store_id, AST18.identifier("page")),
|
|
153496
|
+
AST18.identifier("subscribe")
|
|
153497
|
+
),
|
|
153498
|
+
[
|
|
153499
|
+
AST18.arrowFunctionExpression(
|
|
153500
|
+
[AST18.identifier("val")],
|
|
153501
|
+
AST18.blockStatement([
|
|
153502
|
+
AST18.expressionStatement(
|
|
153503
|
+
AST18.callExpression(set_session, [
|
|
153504
|
+
AST18.callExpression(extract_session, [
|
|
153505
|
+
AST18.memberExpression(
|
|
153506
|
+
AST18.identifier("val"),
|
|
153507
|
+
AST18.identifier("data")
|
|
153508
|
+
)
|
|
153509
|
+
])
|
|
153483
153510
|
])
|
|
153484
|
-
|
|
153485
|
-
)
|
|
153486
|
-
|
|
153487
|
-
|
|
153488
|
-
|
|
153511
|
+
)
|
|
153512
|
+
])
|
|
153513
|
+
)
|
|
153514
|
+
]
|
|
153515
|
+
)
|
|
153489
153516
|
)
|
|
153490
153517
|
);
|
|
153491
153518
|
}
|
|
@@ -155824,7 +155824,7 @@ function ensure_imports({
|
|
|
155824
155824
|
script.body.unshift({
|
|
155825
155825
|
type: "ImportDeclaration",
|
|
155826
155826
|
source: AST16.stringLiteral(sourceModule),
|
|
155827
|
-
importKind
|
|
155827
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
155828
155828
|
});
|
|
155829
155829
|
}
|
|
155830
155830
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
@@ -155838,13 +155838,12 @@ function ensure_imports({
|
|
|
155838
155838
|
)
|
|
155839
155839
|
);
|
|
155840
155840
|
if (toImport.length > 0) {
|
|
155841
|
+
const specifier = (identifier, i22) => importKind !== "module" ? !Array.isArray(importID) ? AST16.importDefaultSpecifier(identifier) : AST16.importSpecifier(identifier, as?.[i22] ? AST16.identifier(as[i22]) : identifier) : AST16.importNamespaceSpecifier(identifier);
|
|
155841
155842
|
script.body.unshift({
|
|
155842
155843
|
type: "ImportDeclaration",
|
|
155843
155844
|
source: AST16.stringLiteral(sourceModule),
|
|
155844
|
-
specifiers: toImport.map(
|
|
155845
|
-
|
|
155846
|
-
),
|
|
155847
|
-
importKind
|
|
155845
|
+
specifiers: toImport.map(specifier),
|
|
155846
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
155848
155847
|
});
|
|
155849
155848
|
}
|
|
155850
155849
|
for (const [i22, target] of (as ?? []).entries()) {
|
|
@@ -156179,22 +156178,43 @@ async function QueryProcessor(config, page) {
|
|
|
156179
156178
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
156180
156179
|
propsStatement.id.properties.forEach((property) => {
|
|
156181
156180
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
156182
|
-
|
|
156181
|
+
const key = property.key.name;
|
|
156182
|
+
let value = property.key.name;
|
|
156183
|
+
switch (property.value.type) {
|
|
156184
|
+
case "Identifier":
|
|
156185
|
+
value = property.value.name;
|
|
156186
|
+
break;
|
|
156187
|
+
case "AssignmentPattern":
|
|
156188
|
+
if (property.value.left.type === "Identifier") {
|
|
156189
|
+
value = property.value.left.name;
|
|
156190
|
+
}
|
|
156191
|
+
break;
|
|
156192
|
+
default:
|
|
156193
|
+
break;
|
|
156194
|
+
}
|
|
156195
|
+
props.push({ key, value });
|
|
156183
156196
|
}
|
|
156184
156197
|
});
|
|
156185
156198
|
}
|
|
156186
156199
|
}
|
|
156187
156200
|
} else {
|
|
156188
156201
|
props = page.script.body.filter(
|
|
156189
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
156190
|
-
).flatMap(
|
|
156191
|
-
(
|
|
156192
|
-
|
|
156193
|
-
|
|
156194
|
-
|
|
156195
|
-
|
|
156196
|
-
|
|
156197
|
-
|
|
156202
|
+
(statement) => statement.type === "ExportNamedDeclaration" && (!statement.declaration || statement.declaration.type === "VariableDeclaration")
|
|
156203
|
+
).flatMap(({ declaration, specifiers }) => {
|
|
156204
|
+
if (declaration?.type === "VariableDeclaration") {
|
|
156205
|
+
return declaration.declarations.map((dec) => {
|
|
156206
|
+
if (dec.type === "VariableDeclarator") {
|
|
156207
|
+
const name = dec.id.type === "Identifier" ? dec.id.name : "";
|
|
156208
|
+
return { key: name, value: name };
|
|
156209
|
+
}
|
|
156210
|
+
return { key: dec.name, value: dec.name };
|
|
156211
|
+
});
|
|
156212
|
+
}
|
|
156213
|
+
return specifiers?.flatMap((spec) => ({
|
|
156214
|
+
key: spec.exported.name,
|
|
156215
|
+
value: spec.local?.name ?? ""
|
|
156216
|
+
})) ?? [];
|
|
156217
|
+
});
|
|
156198
156218
|
}
|
|
156199
156219
|
ensure_imports({
|
|
156200
156220
|
config: page.config,
|
|
@@ -156285,10 +156305,10 @@ async function QueryProcessor(config, page) {
|
|
|
156285
156305
|
props.map(
|
|
156286
156306
|
(prop) => AST17.objectProperty(
|
|
156287
156307
|
AST17.identifier(
|
|
156288
|
-
prop
|
|
156308
|
+
prop.key
|
|
156289
156309
|
),
|
|
156290
156310
|
AST17.identifier(
|
|
156291
|
-
prop
|
|
156311
|
+
prop.value
|
|
156292
156312
|
)
|
|
156293
156313
|
)
|
|
156294
156314
|
)
|
|
@@ -156400,27 +156420,34 @@ async function kit_init(page) {
|
|
|
156400
156420
|
script: page.script,
|
|
156401
156421
|
config: page.config,
|
|
156402
156422
|
sourceModule: "$app/stores",
|
|
156403
|
-
|
|
156404
|
-
|
|
156423
|
+
importKind: "module",
|
|
156424
|
+
import: "__houdini__pageStores"
|
|
156425
|
+
}).ids;
|
|
156405
156426
|
page.script.body.push(
|
|
156406
156427
|
AST18.expressionStatement(
|
|
156407
|
-
AST18.callExpression(
|
|
156408
|
-
AST18.
|
|
156409
|
-
|
|
156410
|
-
AST18.
|
|
156411
|
-
|
|
156412
|
-
|
|
156413
|
-
|
|
156414
|
-
|
|
156415
|
-
|
|
156416
|
-
|
|
156417
|
-
|
|
156428
|
+
AST18.callExpression(
|
|
156429
|
+
AST18.memberExpression(
|
|
156430
|
+
AST18.memberExpression(store_id, AST18.identifier("page")),
|
|
156431
|
+
AST18.identifier("subscribe")
|
|
156432
|
+
),
|
|
156433
|
+
[
|
|
156434
|
+
AST18.arrowFunctionExpression(
|
|
156435
|
+
[AST18.identifier("val")],
|
|
156436
|
+
AST18.blockStatement([
|
|
156437
|
+
AST18.expressionStatement(
|
|
156438
|
+
AST18.callExpression(set_session, [
|
|
156439
|
+
AST18.callExpression(extract_session, [
|
|
156440
|
+
AST18.memberExpression(
|
|
156441
|
+
AST18.identifier("val"),
|
|
156442
|
+
AST18.identifier("data")
|
|
156443
|
+
)
|
|
156444
|
+
])
|
|
156418
156445
|
])
|
|
156419
|
-
|
|
156420
|
-
)
|
|
156421
|
-
|
|
156422
|
-
|
|
156423
|
-
|
|
156446
|
+
)
|
|
156447
|
+
])
|
|
156448
|
+
)
|
|
156449
|
+
]
|
|
156450
|
+
)
|
|
156424
156451
|
)
|
|
156425
156452
|
);
|
|
156426
156453
|
}
|
|
@@ -155820,7 +155820,7 @@ function ensure_imports({
|
|
|
155820
155820
|
script.body.unshift({
|
|
155821
155821
|
type: "ImportDeclaration",
|
|
155822
155822
|
source: AST16.stringLiteral(sourceModule),
|
|
155823
|
-
importKind
|
|
155823
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
155824
155824
|
});
|
|
155825
155825
|
}
|
|
155826
155826
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
@@ -155834,13 +155834,12 @@ function ensure_imports({
|
|
|
155834
155834
|
)
|
|
155835
155835
|
);
|
|
155836
155836
|
if (toImport.length > 0) {
|
|
155837
|
+
const specifier = (identifier, i22) => importKind !== "module" ? !Array.isArray(importID) ? AST16.importDefaultSpecifier(identifier) : AST16.importSpecifier(identifier, as?.[i22] ? AST16.identifier(as[i22]) : identifier) : AST16.importNamespaceSpecifier(identifier);
|
|
155837
155838
|
script.body.unshift({
|
|
155838
155839
|
type: "ImportDeclaration",
|
|
155839
155840
|
source: AST16.stringLiteral(sourceModule),
|
|
155840
|
-
specifiers: toImport.map(
|
|
155841
|
-
|
|
155842
|
-
),
|
|
155843
|
-
importKind
|
|
155841
|
+
specifiers: toImport.map(specifier),
|
|
155842
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
155844
155843
|
});
|
|
155845
155844
|
}
|
|
155846
155845
|
for (const [i22, target] of (as ?? []).entries()) {
|
|
@@ -156175,22 +156174,43 @@ async function QueryProcessor(config, page) {
|
|
|
156175
156174
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
156176
156175
|
propsStatement.id.properties.forEach((property) => {
|
|
156177
156176
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
156178
|
-
|
|
156177
|
+
const key = property.key.name;
|
|
156178
|
+
let value = property.key.name;
|
|
156179
|
+
switch (property.value.type) {
|
|
156180
|
+
case "Identifier":
|
|
156181
|
+
value = property.value.name;
|
|
156182
|
+
break;
|
|
156183
|
+
case "AssignmentPattern":
|
|
156184
|
+
if (property.value.left.type === "Identifier") {
|
|
156185
|
+
value = property.value.left.name;
|
|
156186
|
+
}
|
|
156187
|
+
break;
|
|
156188
|
+
default:
|
|
156189
|
+
break;
|
|
156190
|
+
}
|
|
156191
|
+
props.push({ key, value });
|
|
156179
156192
|
}
|
|
156180
156193
|
});
|
|
156181
156194
|
}
|
|
156182
156195
|
}
|
|
156183
156196
|
} else {
|
|
156184
156197
|
props = page.script.body.filter(
|
|
156185
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
156186
|
-
).flatMap(
|
|
156187
|
-
(
|
|
156188
|
-
|
|
156189
|
-
|
|
156190
|
-
|
|
156191
|
-
|
|
156192
|
-
|
|
156193
|
-
|
|
156198
|
+
(statement) => statement.type === "ExportNamedDeclaration" && (!statement.declaration || statement.declaration.type === "VariableDeclaration")
|
|
156199
|
+
).flatMap(({ declaration, specifiers }) => {
|
|
156200
|
+
if (declaration?.type === "VariableDeclaration") {
|
|
156201
|
+
return declaration.declarations.map((dec) => {
|
|
156202
|
+
if (dec.type === "VariableDeclarator") {
|
|
156203
|
+
const name = dec.id.type === "Identifier" ? dec.id.name : "";
|
|
156204
|
+
return { key: name, value: name };
|
|
156205
|
+
}
|
|
156206
|
+
return { key: dec.name, value: dec.name };
|
|
156207
|
+
});
|
|
156208
|
+
}
|
|
156209
|
+
return specifiers?.flatMap((spec) => ({
|
|
156210
|
+
key: spec.exported.name,
|
|
156211
|
+
value: spec.local?.name ?? ""
|
|
156212
|
+
})) ?? [];
|
|
156213
|
+
});
|
|
156194
156214
|
}
|
|
156195
156215
|
ensure_imports({
|
|
156196
156216
|
config: page.config,
|
|
@@ -156281,10 +156301,10 @@ async function QueryProcessor(config, page) {
|
|
|
156281
156301
|
props.map(
|
|
156282
156302
|
(prop) => AST17.objectProperty(
|
|
156283
156303
|
AST17.identifier(
|
|
156284
|
-
prop
|
|
156304
|
+
prop.key
|
|
156285
156305
|
),
|
|
156286
156306
|
AST17.identifier(
|
|
156287
|
-
prop
|
|
156307
|
+
prop.value
|
|
156288
156308
|
)
|
|
156289
156309
|
)
|
|
156290
156310
|
)
|
|
@@ -156396,27 +156416,34 @@ async function kit_init(page) {
|
|
|
156396
156416
|
script: page.script,
|
|
156397
156417
|
config: page.config,
|
|
156398
156418
|
sourceModule: "$app/stores",
|
|
156399
|
-
|
|
156400
|
-
|
|
156419
|
+
importKind: "module",
|
|
156420
|
+
import: "__houdini__pageStores"
|
|
156421
|
+
}).ids;
|
|
156401
156422
|
page.script.body.push(
|
|
156402
156423
|
AST18.expressionStatement(
|
|
156403
|
-
AST18.callExpression(
|
|
156404
|
-
AST18.
|
|
156405
|
-
|
|
156406
|
-
AST18.
|
|
156407
|
-
|
|
156408
|
-
|
|
156409
|
-
|
|
156410
|
-
|
|
156411
|
-
|
|
156412
|
-
|
|
156413
|
-
|
|
156424
|
+
AST18.callExpression(
|
|
156425
|
+
AST18.memberExpression(
|
|
156426
|
+
AST18.memberExpression(store_id, AST18.identifier("page")),
|
|
156427
|
+
AST18.identifier("subscribe")
|
|
156428
|
+
),
|
|
156429
|
+
[
|
|
156430
|
+
AST18.arrowFunctionExpression(
|
|
156431
|
+
[AST18.identifier("val")],
|
|
156432
|
+
AST18.blockStatement([
|
|
156433
|
+
AST18.expressionStatement(
|
|
156434
|
+
AST18.callExpression(set_session, [
|
|
156435
|
+
AST18.callExpression(extract_session, [
|
|
156436
|
+
AST18.memberExpression(
|
|
156437
|
+
AST18.identifier("val"),
|
|
156438
|
+
AST18.identifier("data")
|
|
156439
|
+
)
|
|
156440
|
+
])
|
|
156414
156441
|
])
|
|
156415
|
-
|
|
156416
|
-
)
|
|
156417
|
-
|
|
156418
|
-
|
|
156419
|
-
|
|
156442
|
+
)
|
|
156443
|
+
])
|
|
156444
|
+
)
|
|
156445
|
+
]
|
|
156446
|
+
)
|
|
156420
156447
|
)
|
|
156421
156448
|
);
|
|
156422
156449
|
}
|
package/build/test-cjs/index.js
CHANGED
|
@@ -281416,7 +281416,7 @@ function ensure_imports({
|
|
|
281416
281416
|
script.body.unshift({
|
|
281417
281417
|
type: "ImportDeclaration",
|
|
281418
281418
|
source: AST162.stringLiteral(sourceModule),
|
|
281419
|
-
importKind
|
|
281419
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
281420
281420
|
});
|
|
281421
281421
|
}
|
|
281422
281422
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
@@ -281430,13 +281430,12 @@ function ensure_imports({
|
|
|
281430
281430
|
)
|
|
281431
281431
|
);
|
|
281432
281432
|
if (toImport.length > 0) {
|
|
281433
|
+
const specifier = (identifier, i22) => importKind !== "module" ? !Array.isArray(importID) ? AST162.importDefaultSpecifier(identifier) : AST162.importSpecifier(identifier, as?.[i22] ? AST162.identifier(as[i22]) : identifier) : AST162.importNamespaceSpecifier(identifier);
|
|
281433
281434
|
script.body.unshift({
|
|
281434
281435
|
type: "ImportDeclaration",
|
|
281435
281436
|
source: AST162.stringLiteral(sourceModule),
|
|
281436
|
-
specifiers: toImport.map(
|
|
281437
|
-
|
|
281438
|
-
),
|
|
281439
|
-
importKind
|
|
281437
|
+
specifiers: toImport.map(specifier),
|
|
281438
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
281440
281439
|
});
|
|
281441
281440
|
}
|
|
281442
281441
|
for (const [i22, target] of (as ?? []).entries()) {
|
|
@@ -283106,22 +283105,43 @@ async function QueryProcessor(config, page) {
|
|
|
283106
283105
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
283107
283106
|
propsStatement.id.properties.forEach((property) => {
|
|
283108
283107
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
283109
|
-
|
|
283108
|
+
const key = property.key.name;
|
|
283109
|
+
let value = property.key.name;
|
|
283110
|
+
switch (property.value.type) {
|
|
283111
|
+
case "Identifier":
|
|
283112
|
+
value = property.value.name;
|
|
283113
|
+
break;
|
|
283114
|
+
case "AssignmentPattern":
|
|
283115
|
+
if (property.value.left.type === "Identifier") {
|
|
283116
|
+
value = property.value.left.name;
|
|
283117
|
+
}
|
|
283118
|
+
break;
|
|
283119
|
+
default:
|
|
283120
|
+
break;
|
|
283121
|
+
}
|
|
283122
|
+
props.push({ key, value });
|
|
283110
283123
|
}
|
|
283111
283124
|
});
|
|
283112
283125
|
}
|
|
283113
283126
|
}
|
|
283114
283127
|
} else {
|
|
283115
283128
|
props = page.script.body.filter(
|
|
283116
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
283117
|
-
).flatMap(
|
|
283118
|
-
(
|
|
283119
|
-
|
|
283120
|
-
|
|
283121
|
-
|
|
283122
|
-
|
|
283123
|
-
|
|
283124
|
-
|
|
283129
|
+
(statement) => statement.type === "ExportNamedDeclaration" && (!statement.declaration || statement.declaration.type === "VariableDeclaration")
|
|
283130
|
+
).flatMap(({ declaration, specifiers }) => {
|
|
283131
|
+
if (declaration?.type === "VariableDeclaration") {
|
|
283132
|
+
return declaration.declarations.map((dec) => {
|
|
283133
|
+
if (dec.type === "VariableDeclarator") {
|
|
283134
|
+
const name = dec.id.type === "Identifier" ? dec.id.name : "";
|
|
283135
|
+
return { key: name, value: name };
|
|
283136
|
+
}
|
|
283137
|
+
return { key: dec.name, value: dec.name };
|
|
283138
|
+
});
|
|
283139
|
+
}
|
|
283140
|
+
return specifiers?.flatMap((spec) => ({
|
|
283141
|
+
key: spec.exported.name,
|
|
283142
|
+
value: spec.local?.name ?? ""
|
|
283143
|
+
})) ?? [];
|
|
283144
|
+
});
|
|
283125
283145
|
}
|
|
283126
283146
|
ensure_imports({
|
|
283127
283147
|
config: page.config,
|
|
@@ -283212,10 +283232,10 @@ async function QueryProcessor(config, page) {
|
|
|
283212
283232
|
props.map(
|
|
283213
283233
|
(prop) => AST18.objectProperty(
|
|
283214
283234
|
AST18.identifier(
|
|
283215
|
-
prop
|
|
283235
|
+
prop.key
|
|
283216
283236
|
),
|
|
283217
283237
|
AST18.identifier(
|
|
283218
|
-
prop
|
|
283238
|
+
prop.value
|
|
283219
283239
|
)
|
|
283220
283240
|
)
|
|
283221
283241
|
)
|
|
@@ -283327,27 +283347,34 @@ async function kit_init(page) {
|
|
|
283327
283347
|
script: page.script,
|
|
283328
283348
|
config: page.config,
|
|
283329
283349
|
sourceModule: "$app/stores",
|
|
283330
|
-
|
|
283331
|
-
|
|
283350
|
+
importKind: "module",
|
|
283351
|
+
import: "__houdini__pageStores"
|
|
283352
|
+
}).ids;
|
|
283332
283353
|
page.script.body.push(
|
|
283333
283354
|
AST19.expressionStatement(
|
|
283334
|
-
AST19.callExpression(
|
|
283335
|
-
AST19.
|
|
283336
|
-
|
|
283337
|
-
AST19.
|
|
283338
|
-
|
|
283339
|
-
|
|
283340
|
-
|
|
283341
|
-
|
|
283342
|
-
|
|
283343
|
-
|
|
283344
|
-
|
|
283355
|
+
AST19.callExpression(
|
|
283356
|
+
AST19.memberExpression(
|
|
283357
|
+
AST19.memberExpression(store_id, AST19.identifier("page")),
|
|
283358
|
+
AST19.identifier("subscribe")
|
|
283359
|
+
),
|
|
283360
|
+
[
|
|
283361
|
+
AST19.arrowFunctionExpression(
|
|
283362
|
+
[AST19.identifier("val")],
|
|
283363
|
+
AST19.blockStatement([
|
|
283364
|
+
AST19.expressionStatement(
|
|
283365
|
+
AST19.callExpression(set_session, [
|
|
283366
|
+
AST19.callExpression(extract_session, [
|
|
283367
|
+
AST19.memberExpression(
|
|
283368
|
+
AST19.identifier("val"),
|
|
283369
|
+
AST19.identifier("data")
|
|
283370
|
+
)
|
|
283371
|
+
])
|
|
283345
283372
|
])
|
|
283346
|
-
|
|
283347
|
-
)
|
|
283348
|
-
|
|
283349
|
-
|
|
283350
|
-
|
|
283373
|
+
)
|
|
283374
|
+
])
|
|
283375
|
+
)
|
|
283376
|
+
]
|
|
283377
|
+
)
|
|
283351
283378
|
)
|
|
283352
283379
|
);
|
|
283353
283380
|
}
|
package/build/test-esm/index.js
CHANGED
|
@@ -281405,7 +281405,7 @@ function ensure_imports({
|
|
|
281405
281405
|
script.body.unshift({
|
|
281406
281406
|
type: "ImportDeclaration",
|
|
281407
281407
|
source: AST162.stringLiteral(sourceModule),
|
|
281408
|
-
importKind
|
|
281408
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
281409
281409
|
});
|
|
281410
281410
|
}
|
|
281411
281411
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
@@ -281419,13 +281419,12 @@ function ensure_imports({
|
|
|
281419
281419
|
)
|
|
281420
281420
|
);
|
|
281421
281421
|
if (toImport.length > 0) {
|
|
281422
|
+
const specifier = (identifier, i22) => importKind !== "module" ? !Array.isArray(importID) ? AST162.importDefaultSpecifier(identifier) : AST162.importSpecifier(identifier, as?.[i22] ? AST162.identifier(as[i22]) : identifier) : AST162.importNamespaceSpecifier(identifier);
|
|
281422
281423
|
script.body.unshift({
|
|
281423
281424
|
type: "ImportDeclaration",
|
|
281424
281425
|
source: AST162.stringLiteral(sourceModule),
|
|
281425
|
-
specifiers: toImport.map(
|
|
281426
|
-
|
|
281427
|
-
),
|
|
281428
|
-
importKind
|
|
281426
|
+
specifiers: toImport.map(specifier),
|
|
281427
|
+
importKind: importKind === "type" ? "type" : "value"
|
|
281429
281428
|
});
|
|
281430
281429
|
}
|
|
281431
281430
|
for (const [i22, target] of (as ?? []).entries()) {
|
|
@@ -283095,22 +283094,43 @@ async function QueryProcessor(config, page) {
|
|
|
283095
283094
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
283096
283095
|
propsStatement.id.properties.forEach((property) => {
|
|
283097
283096
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
283098
|
-
|
|
283097
|
+
const key = property.key.name;
|
|
283098
|
+
let value = property.key.name;
|
|
283099
|
+
switch (property.value.type) {
|
|
283100
|
+
case "Identifier":
|
|
283101
|
+
value = property.value.name;
|
|
283102
|
+
break;
|
|
283103
|
+
case "AssignmentPattern":
|
|
283104
|
+
if (property.value.left.type === "Identifier") {
|
|
283105
|
+
value = property.value.left.name;
|
|
283106
|
+
}
|
|
283107
|
+
break;
|
|
283108
|
+
default:
|
|
283109
|
+
break;
|
|
283110
|
+
}
|
|
283111
|
+
props.push({ key, value });
|
|
283099
283112
|
}
|
|
283100
283113
|
});
|
|
283101
283114
|
}
|
|
283102
283115
|
}
|
|
283103
283116
|
} else {
|
|
283104
283117
|
props = page.script.body.filter(
|
|
283105
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
283106
|
-
).flatMap(
|
|
283107
|
-
(
|
|
283108
|
-
|
|
283109
|
-
|
|
283110
|
-
|
|
283111
|
-
|
|
283112
|
-
|
|
283113
|
-
|
|
283118
|
+
(statement) => statement.type === "ExportNamedDeclaration" && (!statement.declaration || statement.declaration.type === "VariableDeclaration")
|
|
283119
|
+
).flatMap(({ declaration, specifiers }) => {
|
|
283120
|
+
if (declaration?.type === "VariableDeclaration") {
|
|
283121
|
+
return declaration.declarations.map((dec) => {
|
|
283122
|
+
if (dec.type === "VariableDeclarator") {
|
|
283123
|
+
const name = dec.id.type === "Identifier" ? dec.id.name : "";
|
|
283124
|
+
return { key: name, value: name };
|
|
283125
|
+
}
|
|
283126
|
+
return { key: dec.name, value: dec.name };
|
|
283127
|
+
});
|
|
283128
|
+
}
|
|
283129
|
+
return specifiers?.flatMap((spec) => ({
|
|
283130
|
+
key: spec.exported.name,
|
|
283131
|
+
value: spec.local?.name ?? ""
|
|
283132
|
+
})) ?? [];
|
|
283133
|
+
});
|
|
283114
283134
|
}
|
|
283115
283135
|
ensure_imports({
|
|
283116
283136
|
config: page.config,
|
|
@@ -283201,10 +283221,10 @@ async function QueryProcessor(config, page) {
|
|
|
283201
283221
|
props.map(
|
|
283202
283222
|
(prop) => AST18.objectProperty(
|
|
283203
283223
|
AST18.identifier(
|
|
283204
|
-
prop
|
|
283224
|
+
prop.key
|
|
283205
283225
|
),
|
|
283206
283226
|
AST18.identifier(
|
|
283207
|
-
prop
|
|
283227
|
+
prop.value
|
|
283208
283228
|
)
|
|
283209
283229
|
)
|
|
283210
283230
|
)
|
|
@@ -283316,27 +283336,34 @@ async function kit_init(page) {
|
|
|
283316
283336
|
script: page.script,
|
|
283317
283337
|
config: page.config,
|
|
283318
283338
|
sourceModule: "$app/stores",
|
|
283319
|
-
|
|
283320
|
-
|
|
283339
|
+
importKind: "module",
|
|
283340
|
+
import: "__houdini__pageStores"
|
|
283341
|
+
}).ids;
|
|
283321
283342
|
page.script.body.push(
|
|
283322
283343
|
AST19.expressionStatement(
|
|
283323
|
-
AST19.callExpression(
|
|
283324
|
-
AST19.
|
|
283325
|
-
|
|
283326
|
-
AST19.
|
|
283327
|
-
|
|
283328
|
-
|
|
283329
|
-
|
|
283330
|
-
|
|
283331
|
-
|
|
283332
|
-
|
|
283333
|
-
|
|
283344
|
+
AST19.callExpression(
|
|
283345
|
+
AST19.memberExpression(
|
|
283346
|
+
AST19.memberExpression(store_id, AST19.identifier("page")),
|
|
283347
|
+
AST19.identifier("subscribe")
|
|
283348
|
+
),
|
|
283349
|
+
[
|
|
283350
|
+
AST19.arrowFunctionExpression(
|
|
283351
|
+
[AST19.identifier("val")],
|
|
283352
|
+
AST19.blockStatement([
|
|
283353
|
+
AST19.expressionStatement(
|
|
283354
|
+
AST19.callExpression(set_session, [
|
|
283355
|
+
AST19.callExpression(extract_session, [
|
|
283356
|
+
AST19.memberExpression(
|
|
283357
|
+
AST19.identifier("val"),
|
|
283358
|
+
AST19.identifier("data")
|
|
283359
|
+
)
|
|
283360
|
+
])
|
|
283334
283361
|
])
|
|
283335
|
-
|
|
283336
|
-
)
|
|
283337
|
-
|
|
283338
|
-
|
|
283339
|
-
|
|
283362
|
+
)
|
|
283363
|
+
])
|
|
283364
|
+
)
|
|
283365
|
+
]
|
|
283366
|
+
)
|
|
283340
283367
|
)
|
|
283341
283368
|
);
|
|
283342
283369
|
}
|