houdini-svelte 2.1.12 → 2.1.14
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 +33 -12
- package/build/plugin-esm/index.js +33 -12
- package/build/preprocess-cjs/index.js +34 -13
- package/build/preprocess-esm/index.js +34 -13
- package/build/test-cjs/index.js +33 -12
- package/build/test-esm/index.js +33 -12
- package/package.json +2 -2
|
@@ -153248,22 +153248,43 @@ async function QueryProcessor(config, page) {
|
|
|
153248
153248
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
153249
153249
|
propsStatement.id.properties.forEach((property) => {
|
|
153250
153250
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
153251
|
-
|
|
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 });
|
|
153252
153266
|
}
|
|
153253
153267
|
});
|
|
153254
153268
|
}
|
|
153255
153269
|
}
|
|
153256
153270
|
} else {
|
|
153257
153271
|
props = page.script.body.filter(
|
|
153258
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
153259
|
-
).flatMap(
|
|
153260
|
-
(
|
|
153261
|
-
|
|
153262
|
-
|
|
153263
|
-
|
|
153264
|
-
|
|
153265
|
-
|
|
153266
|
-
|
|
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
|
+
});
|
|
153267
153288
|
}
|
|
153268
153289
|
ensure_imports({
|
|
153269
153290
|
config: page.config,
|
|
@@ -153354,10 +153375,10 @@ async function QueryProcessor(config, page) {
|
|
|
153354
153375
|
props.map(
|
|
153355
153376
|
(prop) => AST17.objectProperty(
|
|
153356
153377
|
AST17.identifier(
|
|
153357
|
-
prop
|
|
153378
|
+
prop.key
|
|
153358
153379
|
),
|
|
153359
153380
|
AST17.identifier(
|
|
153360
|
-
prop
|
|
153381
|
+
prop.value
|
|
153361
153382
|
)
|
|
153362
153383
|
)
|
|
153363
153384
|
)
|
|
@@ -153243,22 +153243,43 @@ async function QueryProcessor(config, page) {
|
|
|
153243
153243
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
153244
153244
|
propsStatement.id.properties.forEach((property) => {
|
|
153245
153245
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
153246
|
-
|
|
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 });
|
|
153247
153261
|
}
|
|
153248
153262
|
});
|
|
153249
153263
|
}
|
|
153250
153264
|
}
|
|
153251
153265
|
} else {
|
|
153252
153266
|
props = page.script.body.filter(
|
|
153253
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
153254
|
-
).flatMap(
|
|
153255
|
-
(
|
|
153256
|
-
|
|
153257
|
-
|
|
153258
|
-
|
|
153259
|
-
|
|
153260
|
-
|
|
153261
|
-
|
|
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
|
+
});
|
|
153262
153283
|
}
|
|
153263
153284
|
ensure_imports({
|
|
153264
153285
|
config: page.config,
|
|
@@ -153349,10 +153370,10 @@ async function QueryProcessor(config, page) {
|
|
|
153349
153370
|
props.map(
|
|
153350
153371
|
(prop) => AST17.objectProperty(
|
|
153351
153372
|
AST17.identifier(
|
|
153352
|
-
prop
|
|
153373
|
+
prop.key
|
|
153353
153374
|
),
|
|
153354
153375
|
AST17.identifier(
|
|
153355
|
-
prop
|
|
153376
|
+
prop.value
|
|
153356
153377
|
)
|
|
153357
153378
|
)
|
|
153358
153379
|
)
|
|
@@ -86097,7 +86097,7 @@ async function getConfig({
|
|
|
86097
86097
|
if (apiURL) {
|
|
86098
86098
|
if (glob2.hasMagic(_config.schemaPath)) {
|
|
86099
86099
|
console.log(
|
|
86100
|
-
`\u26A0\uFE0F Your houdini configuration contains
|
|
86100
|
+
`\u26A0\uFE0F Your houdini configuration contains a watchSchema url and a path pointing to multiple files.
|
|
86101
86101
|
This will prevent your schema from being pulled.`
|
|
86102
86102
|
);
|
|
86103
86103
|
} else if (!await readFile(_config.schemaPath)) {
|
|
@@ -156178,22 +156178,43 @@ async function QueryProcessor(config, page) {
|
|
|
156178
156178
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
156179
156179
|
propsStatement.id.properties.forEach((property) => {
|
|
156180
156180
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
156181
|
-
|
|
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 });
|
|
156182
156196
|
}
|
|
156183
156197
|
});
|
|
156184
156198
|
}
|
|
156185
156199
|
}
|
|
156186
156200
|
} else {
|
|
156187
156201
|
props = page.script.body.filter(
|
|
156188
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
156189
|
-
).flatMap(
|
|
156190
|
-
(
|
|
156191
|
-
|
|
156192
|
-
|
|
156193
|
-
|
|
156194
|
-
|
|
156195
|
-
|
|
156196
|
-
|
|
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
|
+
});
|
|
156197
156218
|
}
|
|
156198
156219
|
ensure_imports({
|
|
156199
156220
|
config: page.config,
|
|
@@ -156284,10 +156305,10 @@ async function QueryProcessor(config, page) {
|
|
|
156284
156305
|
props.map(
|
|
156285
156306
|
(prop) => AST17.objectProperty(
|
|
156286
156307
|
AST17.identifier(
|
|
156287
|
-
prop
|
|
156308
|
+
prop.key
|
|
156288
156309
|
),
|
|
156289
156310
|
AST17.identifier(
|
|
156290
|
-
prop
|
|
156311
|
+
prop.value
|
|
156291
156312
|
)
|
|
156292
156313
|
)
|
|
156293
156314
|
)
|
|
@@ -86094,7 +86094,7 @@ async function getConfig({
|
|
|
86094
86094
|
if (apiURL) {
|
|
86095
86095
|
if (glob2.hasMagic(_config.schemaPath)) {
|
|
86096
86096
|
console.log(
|
|
86097
|
-
`\u26A0\uFE0F Your houdini configuration contains
|
|
86097
|
+
`\u26A0\uFE0F Your houdini configuration contains a watchSchema url and a path pointing to multiple files.
|
|
86098
86098
|
This will prevent your schema from being pulled.`
|
|
86099
86099
|
);
|
|
86100
86100
|
} else if (!await readFile(_config.schemaPath)) {
|
|
@@ -156174,22 +156174,43 @@ async function QueryProcessor(config, page) {
|
|
|
156174
156174
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
156175
156175
|
propsStatement.id.properties.forEach((property) => {
|
|
156176
156176
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
156177
|
-
|
|
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 });
|
|
156178
156192
|
}
|
|
156179
156193
|
});
|
|
156180
156194
|
}
|
|
156181
156195
|
}
|
|
156182
156196
|
} else {
|
|
156183
156197
|
props = page.script.body.filter(
|
|
156184
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
156185
|
-
).flatMap(
|
|
156186
|
-
(
|
|
156187
|
-
|
|
156188
|
-
|
|
156189
|
-
|
|
156190
|
-
|
|
156191
|
-
|
|
156192
|
-
|
|
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
|
+
});
|
|
156193
156214
|
}
|
|
156194
156215
|
ensure_imports({
|
|
156195
156216
|
config: page.config,
|
|
@@ -156280,10 +156301,10 @@ async function QueryProcessor(config, page) {
|
|
|
156280
156301
|
props.map(
|
|
156281
156302
|
(prop) => AST17.objectProperty(
|
|
156282
156303
|
AST17.identifier(
|
|
156283
|
-
prop
|
|
156304
|
+
prop.key
|
|
156284
156305
|
),
|
|
156285
156306
|
AST17.identifier(
|
|
156286
|
-
prop
|
|
156307
|
+
prop.value
|
|
156287
156308
|
)
|
|
156288
156309
|
)
|
|
156289
156310
|
)
|
package/build/test-cjs/index.js
CHANGED
|
@@ -283105,22 +283105,43 @@ async function QueryProcessor(config, page) {
|
|
|
283105
283105
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
283106
283106
|
propsStatement.id.properties.forEach((property) => {
|
|
283107
283107
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
283108
|
-
|
|
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 });
|
|
283109
283123
|
}
|
|
283110
283124
|
});
|
|
283111
283125
|
}
|
|
283112
283126
|
}
|
|
283113
283127
|
} else {
|
|
283114
283128
|
props = page.script.body.filter(
|
|
283115
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
283116
|
-
).flatMap(
|
|
283117
|
-
(
|
|
283118
|
-
|
|
283119
|
-
|
|
283120
|
-
|
|
283121
|
-
|
|
283122
|
-
|
|
283123
|
-
|
|
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
|
+
});
|
|
283124
283145
|
}
|
|
283125
283146
|
ensure_imports({
|
|
283126
283147
|
config: page.config,
|
|
@@ -283211,10 +283232,10 @@ async function QueryProcessor(config, page) {
|
|
|
283211
283232
|
props.map(
|
|
283212
283233
|
(prop) => AST18.objectProperty(
|
|
283213
283234
|
AST18.identifier(
|
|
283214
|
-
prop
|
|
283235
|
+
prop.key
|
|
283215
283236
|
),
|
|
283216
283237
|
AST18.identifier(
|
|
283217
|
-
prop
|
|
283238
|
+
prop.value
|
|
283218
283239
|
)
|
|
283219
283240
|
)
|
|
283220
283241
|
)
|
package/build/test-esm/index.js
CHANGED
|
@@ -283094,22 +283094,43 @@ async function QueryProcessor(config, page) {
|
|
|
283094
283094
|
if (propsStatement && propsStatement.id.type === "ObjectPattern") {
|
|
283095
283095
|
propsStatement.id.properties.forEach((property) => {
|
|
283096
283096
|
if (property.type === "ObjectProperty" && property.key.type === "Identifier") {
|
|
283097
|
-
|
|
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 });
|
|
283098
283112
|
}
|
|
283099
283113
|
});
|
|
283100
283114
|
}
|
|
283101
283115
|
}
|
|
283102
283116
|
} else {
|
|
283103
283117
|
props = page.script.body.filter(
|
|
283104
|
-
(statement) => statement.type === "ExportNamedDeclaration" && statement.declaration
|
|
283105
|
-
).flatMap(
|
|
283106
|
-
(
|
|
283107
|
-
|
|
283108
|
-
|
|
283109
|
-
|
|
283110
|
-
|
|
283111
|
-
|
|
283112
|
-
|
|
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
|
+
});
|
|
283113
283134
|
}
|
|
283114
283135
|
ensure_imports({
|
|
283115
283136
|
config: page.config,
|
|
@@ -283200,10 +283221,10 @@ async function QueryProcessor(config, page) {
|
|
|
283200
283221
|
props.map(
|
|
283201
283222
|
(prop) => AST18.objectProperty(
|
|
283202
283223
|
AST18.identifier(
|
|
283203
|
-
prop
|
|
283224
|
+
prop.key
|
|
283204
283225
|
),
|
|
283205
283226
|
AST18.identifier(
|
|
283206
|
-
prop
|
|
283227
|
+
prop.value
|
|
283207
283228
|
)
|
|
283208
283229
|
)
|
|
283209
283230
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-svelte",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.14",
|
|
4
4
|
"description": "The svelte plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"graphql": "^15.8.0",
|
|
31
31
|
"recast": "^0.23.1",
|
|
32
32
|
"rollup": "^4.28.1",
|
|
33
|
-
"houdini": "^1.5.
|
|
33
|
+
"houdini": "^1.5.5"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@sveltejs/kit": "^2.9.0",
|