houdini-svelte 0.17.9 → 0.17.10
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/README.md +33 -0
- package/build/plugin-cjs/index.js +11 -11
- package/build/plugin-esm/index.js +11 -11
- package/build/runtime/adapter.d.ts +1 -7
- package/build/runtime-cjs/adapter.d.ts +1 -7
- package/build/runtime-cjs/adapter.js +2 -6
- package/build/runtime-esm/adapter.d.ts +1 -7
- package/build/runtime-esm/adapter.js +2 -5
- package/build/test-cjs/index.js +11 -11
- package/build/test-esm/index.js +11 -11
- package/package.json +19 -2
- package/.turbo/turbo-compile.log +0 -5
- package/.turbo/turbo-typedefs.log +0 -5
- package/CHANGELOG.md +0 -75
- package/src/plugin/codegen/components/index.ts +0 -149
- package/src/plugin/codegen/index.ts +0 -26
- package/src/plugin/codegen/routes/index.ts +0 -324
- package/src/plugin/codegen/routes/kit.test.ts +0 -534
- package/src/plugin/codegen/stores/custom.ts +0 -22
- package/src/plugin/codegen/stores/fragment.test.ts +0 -62
- package/src/plugin/codegen/stores/fragment.ts +0 -86
- package/src/plugin/codegen/stores/index.ts +0 -55
- package/src/plugin/codegen/stores/mutation.test.ts +0 -56
- package/src/plugin/codegen/stores/mutation.ts +0 -58
- package/src/plugin/codegen/stores/query.test.ts +0 -504
- package/src/plugin/codegen/stores/query.ts +0 -98
- package/src/plugin/codegen/stores/subscription.test.ts +0 -60
- package/src/plugin/codegen/stores/subscription.ts +0 -61
- package/src/plugin/extract.test.ts +0 -290
- package/src/plugin/extract.ts +0 -127
- package/src/plugin/extractLoadFunction.test.ts +0 -247
- package/src/plugin/extractLoadFunction.ts +0 -249
- package/src/plugin/fsPatch.ts +0 -246
- package/src/plugin/index.ts +0 -210
- package/src/plugin/kit.ts +0 -408
- package/src/plugin/transforms/index.ts +0 -90
- package/src/plugin/transforms/kit/index.ts +0 -20
- package/src/plugin/transforms/kit/init.test.ts +0 -28
- package/src/plugin/transforms/kit/init.ts +0 -75
- package/src/plugin/transforms/kit/load.test.ts +0 -1279
- package/src/plugin/transforms/kit/load.ts +0 -516
- package/src/plugin/transforms/kit/session.test.ts +0 -268
- package/src/plugin/transforms/kit/session.ts +0 -161
- package/src/plugin/transforms/query.test.ts +0 -99
- package/src/plugin/transforms/query.ts +0 -263
- package/src/plugin/transforms/reactive.ts +0 -126
- package/src/plugin/transforms/tags.ts +0 -20
- package/src/plugin/transforms/types.ts +0 -9
- package/src/plugin/validate.test.ts +0 -95
- package/src/plugin/validate.ts +0 -50
- package/src/preprocess/index.ts +0 -33
- package/src/runtime/adapter.ts +0 -21
- package/src/runtime/fragments.ts +0 -86
- package/src/runtime/index.ts +0 -95
- package/src/runtime/network.ts +0 -6
- package/src/runtime/session.ts +0 -187
- package/src/runtime/stores/fragment.ts +0 -48
- package/src/runtime/stores/index.ts +0 -5
- package/src/runtime/stores/mutation.ts +0 -190
- package/src/runtime/stores/pagination/cursor.ts +0 -260
- package/src/runtime/stores/pagination/fetch.ts +0 -7
- package/src/runtime/stores/pagination/fragment.ts +0 -236
- package/src/runtime/stores/pagination/index.ts +0 -7
- package/src/runtime/stores/pagination/offset.ts +0 -157
- package/src/runtime/stores/pagination/pageInfo.test.ts +0 -39
- package/src/runtime/stores/pagination/pageInfo.ts +0 -67
- package/src/runtime/stores/pagination/query.ts +0 -132
- package/src/runtime/stores/query.ts +0 -521
- package/src/runtime/stores/store.ts +0 -13
- package/src/runtime/stores/subscription.ts +0 -107
- package/src/runtime/types.ts +0 -40
- package/src/test/index.ts +0 -208
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img alt="houdini" height="200" src="https://raw.githubusercontent.com/HoudiniGraphql/houdini/main/.github/assets/houdini-v5.png" />
|
|
3
|
+
<br />
|
|
4
|
+
<br />
|
|
5
|
+
<strong>
|
|
6
|
+
The disappearing GraphQL clients.
|
|
7
|
+
</strong>
|
|
8
|
+
<br />
|
|
9
|
+
<br />
|
|
10
|
+
<a href="https://npmjs.org/package/houdini">
|
|
11
|
+
<img src="https://img.shields.io/npm/v/houdini.svg" alt="version" />
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://github.com/HoudiniGraphql/houdini/actions">
|
|
14
|
+
<img src="https://github.com/HoudiniGraphql/houdini/actions/workflows/tests.yml/badge.svg" alt="CI Tests" />
|
|
15
|
+
</a>
|
|
16
|
+
<a href="https://github.com/HoudiniGraphql/houdini">
|
|
17
|
+
<img src="https://img.shields.io/github/stars/HoudiniGraphql/houdini.svg?label=stars" alt="github stars" />
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://npmjs.org/package/houdini">
|
|
20
|
+
<img src="https://img.shields.io/npm/dm/houdini.svg" alt="downloads" />
|
|
21
|
+
</a>
|
|
22
|
+
<a href="https://github.com/HoudiniGraphql/houdini/blob/main/LICENSE">
|
|
23
|
+
<img src="https://img.shields.io/github/license/HoudiniGraphql/houdini.svg?maxAge=2592000" alt="license" />
|
|
24
|
+
</a>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
----
|
|
28
|
+
|
|
29
|
+
At its core, houdini seeks to enable a high quality developer experience
|
|
30
|
+
without compromising bundle size. Like Svelte, houdini shifts what is
|
|
31
|
+
traditionally handled by a bloated runtime into a compile step that allows
|
|
32
|
+
for the generation of an incredibly lean GraphQL abstraction for your application.
|
|
33
|
+
See more at <a href="https://www.houdinigraphql.com">HoudiniGraphQL.com</a> 🚀
|
|
@@ -179521,6 +179521,7 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179521
179521
|
let layoutExports = [];
|
|
179522
179522
|
let pageQueries = [];
|
|
179523
179523
|
let layoutQueries = [];
|
|
179524
|
+
let validRoute = false;
|
|
179524
179525
|
for (const child of await fs_exports.readdir(dirpath)) {
|
|
179525
179526
|
const childPath = path_exports.join(dirpath, child);
|
|
179526
179527
|
if ((await fs_exports.stat(childPath)).isDirectory()) {
|
|
@@ -179528,18 +179529,21 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179528
179529
|
continue;
|
|
179529
179530
|
}
|
|
179530
179531
|
if (is_layout_script(framework2, childPath)) {
|
|
179532
|
+
validRoute = true;
|
|
179531
179533
|
const { houdini_load, exports } = await extract_load_function(config2, childPath);
|
|
179532
179534
|
await visitor.layoutQueries?.(houdini_load ?? [], childPath);
|
|
179533
179535
|
layoutQueries.push(...houdini_load ?? []);
|
|
179534
179536
|
await visitor.layoutExports?.(exports, childPath);
|
|
179535
179537
|
layoutExports.push(...exports);
|
|
179536
179538
|
} else if (is_page_script(framework2, childPath)) {
|
|
179539
|
+
validRoute = true;
|
|
179537
179540
|
const { houdini_load, exports } = await extract_load_function(config2, childPath);
|
|
179538
179541
|
await visitor.pageQueries?.(houdini_load ?? [], childPath);
|
|
179539
179542
|
pageQueries.push(...houdini_load ?? []);
|
|
179540
179543
|
await visitor.pageExports?.(exports, childPath);
|
|
179541
179544
|
pageExports.push(...exports);
|
|
179542
179545
|
} else if (is_layout_component(framework2, childPath)) {
|
|
179546
|
+
validRoute = true;
|
|
179543
179547
|
const contents = await fs_exports.readFile(childPath);
|
|
179544
179548
|
if (!contents) {
|
|
179545
179549
|
continue;
|
|
@@ -179563,6 +179567,7 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179563
179567
|
}
|
|
179564
179568
|
});
|
|
179565
179569
|
} else if (is_component(config2, framework2, child)) {
|
|
179570
|
+
validRoute = true;
|
|
179566
179571
|
const contents = await fs_exports.readFile(childPath);
|
|
179567
179572
|
if (!contents) {
|
|
179568
179573
|
continue;
|
|
@@ -179586,6 +179591,7 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179586
179591
|
}
|
|
179587
179592
|
});
|
|
179588
179593
|
} else if (child === plugin_config(config2).layoutQueryFilename) {
|
|
179594
|
+
validRoute = true;
|
|
179589
179595
|
const contents = await fs_exports.readFile(childPath);
|
|
179590
179596
|
if (!contents) {
|
|
179591
179597
|
continue;
|
|
@@ -179598,6 +179604,7 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179598
179604
|
throw routeQueryError(childPath);
|
|
179599
179605
|
}
|
|
179600
179606
|
} else if (child === plugin_config(config2).pageQueryFilename) {
|
|
179607
|
+
validRoute = true;
|
|
179601
179608
|
const contents = await fs_exports.readFile(childPath);
|
|
179602
179609
|
if (!contents) {
|
|
179603
179610
|
continue;
|
|
@@ -179613,7 +179620,7 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179613
179620
|
continue;
|
|
179614
179621
|
}
|
|
179615
179622
|
}
|
|
179616
|
-
if (visitor.route &&
|
|
179623
|
+
if (visitor.route && validRoute) {
|
|
179617
179624
|
const relative_path_regex = /src(.*)/;
|
|
179618
179625
|
const svelteTypeFilePath = path_exports.join(
|
|
179619
179626
|
config2.projectRoot,
|
|
@@ -180336,10 +180343,10 @@ import_fs.default.readdirSync = function(filepath, options) {
|
|
|
180336
180343
|
function contains2(...names2) {
|
|
180337
180344
|
return names2.some((name2) => file_names.includes(name2));
|
|
180338
180345
|
}
|
|
180339
|
-
if (contains2("+page.svelte") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
|
|
180346
|
+
if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
|
|
180340
180347
|
result.push(virtual_file("+page.js", options));
|
|
180341
180348
|
}
|
|
180342
|
-
if (contains2("+layout.svelte") && !contains2("+layout.ts", "+layout.js")) {
|
|
180349
|
+
if (contains2("+layout.svelte", "+layout.gql") && !contains2("+layout.ts", "+layout.js")) {
|
|
180343
180350
|
result.push(virtual_file("+layout.js", options));
|
|
180344
180351
|
}
|
|
180345
180352
|
const posix_filepath = path_exports.posixify(filepath.toString());
|
|
@@ -181393,16 +181400,9 @@ var HoudiniSveltePlugin = async () => ({
|
|
|
181393
181400
|
return content.replace("HOUDINI_CLIENT_PATH", relativePath);
|
|
181394
181401
|
},
|
|
181395
181402
|
"adapter.js": ({ content }) => {
|
|
181396
|
-
const sveltekit_adapter = `import {
|
|
181397
|
-
import { get } from 'svelte/store';
|
|
181398
|
-
import { browser, prerendering } from '$app/environment'
|
|
181399
|
-
import { page } from '$app/stores'
|
|
181403
|
+
const sveltekit_adapter = `import { browser, prerendering } from '$app/environment'
|
|
181400
181404
|
import { error as svelteKitError } from '@sveltejs/kit'
|
|
181401
181405
|
|
|
181402
|
-
export function goTo(location, options) {
|
|
181403
|
-
go(location, options)
|
|
181404
|
-
}
|
|
181405
|
-
|
|
181406
181406
|
export const isBrowser = browser
|
|
181407
181407
|
|
|
181408
181408
|
export let clientStarted = false;
|
|
@@ -179517,6 +179517,7 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179517
179517
|
let layoutExports = [];
|
|
179518
179518
|
let pageQueries = [];
|
|
179519
179519
|
let layoutQueries = [];
|
|
179520
|
+
let validRoute = false;
|
|
179520
179521
|
for (const child of await fs_exports.readdir(dirpath)) {
|
|
179521
179522
|
const childPath = path_exports.join(dirpath, child);
|
|
179522
179523
|
if ((await fs_exports.stat(childPath)).isDirectory()) {
|
|
@@ -179524,18 +179525,21 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179524
179525
|
continue;
|
|
179525
179526
|
}
|
|
179526
179527
|
if (is_layout_script(framework2, childPath)) {
|
|
179528
|
+
validRoute = true;
|
|
179527
179529
|
const { houdini_load, exports } = await extract_load_function(config2, childPath);
|
|
179528
179530
|
await visitor.layoutQueries?.(houdini_load ?? [], childPath);
|
|
179529
179531
|
layoutQueries.push(...houdini_load ?? []);
|
|
179530
179532
|
await visitor.layoutExports?.(exports, childPath);
|
|
179531
179533
|
layoutExports.push(...exports);
|
|
179532
179534
|
} else if (is_page_script(framework2, childPath)) {
|
|
179535
|
+
validRoute = true;
|
|
179533
179536
|
const { houdini_load, exports } = await extract_load_function(config2, childPath);
|
|
179534
179537
|
await visitor.pageQueries?.(houdini_load ?? [], childPath);
|
|
179535
179538
|
pageQueries.push(...houdini_load ?? []);
|
|
179536
179539
|
await visitor.pageExports?.(exports, childPath);
|
|
179537
179540
|
pageExports.push(...exports);
|
|
179538
179541
|
} else if (is_layout_component(framework2, childPath)) {
|
|
179542
|
+
validRoute = true;
|
|
179539
179543
|
const contents = await fs_exports.readFile(childPath);
|
|
179540
179544
|
if (!contents) {
|
|
179541
179545
|
continue;
|
|
@@ -179559,6 +179563,7 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179559
179563
|
}
|
|
179560
179564
|
});
|
|
179561
179565
|
} else if (is_component(config2, framework2, child)) {
|
|
179566
|
+
validRoute = true;
|
|
179562
179567
|
const contents = await fs_exports.readFile(childPath);
|
|
179563
179568
|
if (!contents) {
|
|
179564
179569
|
continue;
|
|
@@ -179582,6 +179587,7 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179582
179587
|
}
|
|
179583
179588
|
});
|
|
179584
179589
|
} else if (child === plugin_config(config2).layoutQueryFilename) {
|
|
179590
|
+
validRoute = true;
|
|
179585
179591
|
const contents = await fs_exports.readFile(childPath);
|
|
179586
179592
|
if (!contents) {
|
|
179587
179593
|
continue;
|
|
@@ -179594,6 +179600,7 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179594
179600
|
throw routeQueryError(childPath);
|
|
179595
179601
|
}
|
|
179596
179602
|
} else if (child === plugin_config(config2).pageQueryFilename) {
|
|
179603
|
+
validRoute = true;
|
|
179597
179604
|
const contents = await fs_exports.readFile(childPath);
|
|
179598
179605
|
if (!contents) {
|
|
179599
179606
|
continue;
|
|
@@ -179609,7 +179616,7 @@ async function walk_routes(config2, framework2, visitor, dirpath = config2.route
|
|
|
179609
179616
|
continue;
|
|
179610
179617
|
}
|
|
179611
179618
|
}
|
|
179612
|
-
if (visitor.route &&
|
|
179619
|
+
if (visitor.route && validRoute) {
|
|
179613
179620
|
const relative_path_regex = /src(.*)/;
|
|
179614
179621
|
const svelteTypeFilePath = path_exports.join(
|
|
179615
179622
|
config2.projectRoot,
|
|
@@ -180332,10 +180339,10 @@ filesystem.readdirSync = function(filepath, options) {
|
|
|
180332
180339
|
function contains2(...names2) {
|
|
180333
180340
|
return names2.some((name2) => file_names.includes(name2));
|
|
180334
180341
|
}
|
|
180335
|
-
if (contains2("+page.svelte") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
|
|
180342
|
+
if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
|
|
180336
180343
|
result.push(virtual_file("+page.js", options));
|
|
180337
180344
|
}
|
|
180338
|
-
if (contains2("+layout.svelte") && !contains2("+layout.ts", "+layout.js")) {
|
|
180345
|
+
if (contains2("+layout.svelte", "+layout.gql") && !contains2("+layout.ts", "+layout.js")) {
|
|
180339
180346
|
result.push(virtual_file("+layout.js", options));
|
|
180340
180347
|
}
|
|
180341
180348
|
const posix_filepath = path_exports.posixify(filepath.toString());
|
|
@@ -181389,16 +181396,9 @@ var HoudiniSveltePlugin = async () => ({
|
|
|
181389
181396
|
return content.replace("HOUDINI_CLIENT_PATH", relativePath);
|
|
181390
181397
|
},
|
|
181391
181398
|
"adapter.js": ({ content }) => {
|
|
181392
|
-
const sveltekit_adapter = `import {
|
|
181393
|
-
import { get } from 'svelte/store';
|
|
181394
|
-
import { browser, prerendering } from '$app/environment'
|
|
181395
|
-
import { page } from '$app/stores'
|
|
181399
|
+
const sveltekit_adapter = `import { browser, prerendering } from '$app/environment'
|
|
181396
181400
|
import { error as svelteKitError } from '@sveltejs/kit'
|
|
181397
181401
|
|
|
181398
|
-
export function goTo(location, options) {
|
|
181399
|
-
go(location, options)
|
|
181400
|
-
}
|
|
181401
|
-
|
|
181402
181402
|
export const isBrowser = browser
|
|
181403
181403
|
|
|
181404
181404
|
export let clientStarted = false;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
replaceState?: boolean;
|
|
3
|
-
noscroll?: boolean;
|
|
4
|
-
keepfocus?: boolean;
|
|
5
|
-
state?: any;
|
|
6
|
-
}): Promise<void>;
|
|
7
|
-
export declare const isBrowser = false;
|
|
1
|
+
export declare const isBrowser = true;
|
|
8
2
|
/**
|
|
9
3
|
* After `clientStarted = true`, only client side navigation will happen.
|
|
10
4
|
*/
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
replaceState?: boolean;
|
|
3
|
-
noscroll?: boolean;
|
|
4
|
-
keepfocus?: boolean;
|
|
5
|
-
state?: any;
|
|
6
|
-
}): Promise<void>;
|
|
7
|
-
export declare const isBrowser = false;
|
|
1
|
+
export declare const isBrowser = true;
|
|
8
2
|
/**
|
|
9
3
|
* After `clientStarted = true`, only client side navigation will happen.
|
|
10
4
|
*/
|
|
@@ -20,16 +20,13 @@ var adapter_exports = {};
|
|
|
20
20
|
__export(adapter_exports, {
|
|
21
21
|
clientStarted: () => clientStarted,
|
|
22
22
|
error: () => error,
|
|
23
|
-
goTo: () => goTo,
|
|
24
23
|
isBrowser: () => isBrowser,
|
|
25
24
|
isPrerender: () => isPrerender,
|
|
26
25
|
setClientStarted: () => setClientStarted
|
|
27
26
|
});
|
|
28
27
|
module.exports = __toCommonJS(adapter_exports);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const isBrowser = false;
|
|
32
|
-
let clientStarted = false;
|
|
28
|
+
const isBrowser = true;
|
|
29
|
+
let clientStarted = true;
|
|
33
30
|
let isPrerender = false;
|
|
34
31
|
const error = (code, message) => message;
|
|
35
32
|
function setClientStarted() {
|
|
@@ -39,7 +36,6 @@ function setClientStarted() {
|
|
|
39
36
|
0 && (module.exports = {
|
|
40
37
|
clientStarted,
|
|
41
38
|
error,
|
|
42
|
-
goTo,
|
|
43
39
|
isBrowser,
|
|
44
40
|
isPrerender,
|
|
45
41
|
setClientStarted
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
replaceState?: boolean;
|
|
3
|
-
noscroll?: boolean;
|
|
4
|
-
keepfocus?: boolean;
|
|
5
|
-
state?: any;
|
|
6
|
-
}): Promise<void>;
|
|
7
|
-
export declare const isBrowser = false;
|
|
1
|
+
export declare const isBrowser = true;
|
|
8
2
|
/**
|
|
9
3
|
* After `clientStarted = true`, only client side navigation will happen.
|
|
10
4
|
*/
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const isBrowser = false;
|
|
4
|
-
let clientStarted = false;
|
|
1
|
+
const isBrowser = true;
|
|
2
|
+
let clientStarted = true;
|
|
5
3
|
let isPrerender = false;
|
|
6
4
|
const error = (code, message) => message;
|
|
7
5
|
function setClientStarted() {
|
|
@@ -10,7 +8,6 @@ function setClientStarted() {
|
|
|
10
8
|
export {
|
|
11
9
|
clientStarted,
|
|
12
10
|
error,
|
|
13
|
-
goTo,
|
|
14
11
|
isBrowser,
|
|
15
12
|
isPrerender,
|
|
16
13
|
setClientStarted
|
package/build/test-cjs/index.js
CHANGED
|
@@ -294176,6 +294176,7 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294176
294176
|
let layoutExports = [];
|
|
294177
294177
|
let pageQueries = [];
|
|
294178
294178
|
let layoutQueries = [];
|
|
294179
|
+
let validRoute = false;
|
|
294179
294180
|
for (const child of await fs_exports.readdir(dirpath)) {
|
|
294180
294181
|
const childPath = path_exports.join(dirpath, child);
|
|
294181
294182
|
if ((await fs_exports.stat(childPath)).isDirectory()) {
|
|
@@ -294183,18 +294184,21 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294183
294184
|
continue;
|
|
294184
294185
|
}
|
|
294185
294186
|
if (is_layout_script(framework2, childPath)) {
|
|
294187
|
+
validRoute = true;
|
|
294186
294188
|
const { houdini_load, exports } = await extract_load_function(config3, childPath);
|
|
294187
294189
|
await visitor.layoutQueries?.(houdini_load ?? [], childPath);
|
|
294188
294190
|
layoutQueries.push(...houdini_load ?? []);
|
|
294189
294191
|
await visitor.layoutExports?.(exports, childPath);
|
|
294190
294192
|
layoutExports.push(...exports);
|
|
294191
294193
|
} else if (is_page_script(framework2, childPath)) {
|
|
294194
|
+
validRoute = true;
|
|
294192
294195
|
const { houdini_load, exports } = await extract_load_function(config3, childPath);
|
|
294193
294196
|
await visitor.pageQueries?.(houdini_load ?? [], childPath);
|
|
294194
294197
|
pageQueries.push(...houdini_load ?? []);
|
|
294195
294198
|
await visitor.pageExports?.(exports, childPath);
|
|
294196
294199
|
pageExports.push(...exports);
|
|
294197
294200
|
} else if (is_layout_component(framework2, childPath)) {
|
|
294201
|
+
validRoute = true;
|
|
294198
294202
|
const contents = await fs_exports.readFile(childPath);
|
|
294199
294203
|
if (!contents) {
|
|
294200
294204
|
continue;
|
|
@@ -294218,6 +294222,7 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294218
294222
|
}
|
|
294219
294223
|
});
|
|
294220
294224
|
} else if (is_component(config3, framework2, child)) {
|
|
294225
|
+
validRoute = true;
|
|
294221
294226
|
const contents = await fs_exports.readFile(childPath);
|
|
294222
294227
|
if (!contents) {
|
|
294223
294228
|
continue;
|
|
@@ -294241,6 +294246,7 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294241
294246
|
}
|
|
294242
294247
|
});
|
|
294243
294248
|
} else if (child === plugin_config(config3).layoutQueryFilename) {
|
|
294249
|
+
validRoute = true;
|
|
294244
294250
|
const contents = await fs_exports.readFile(childPath);
|
|
294245
294251
|
if (!contents) {
|
|
294246
294252
|
continue;
|
|
@@ -294253,6 +294259,7 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294253
294259
|
throw routeQueryError(childPath);
|
|
294254
294260
|
}
|
|
294255
294261
|
} else if (child === plugin_config(config3).pageQueryFilename) {
|
|
294262
|
+
validRoute = true;
|
|
294256
294263
|
const contents = await fs_exports.readFile(childPath);
|
|
294257
294264
|
if (!contents) {
|
|
294258
294265
|
continue;
|
|
@@ -294268,7 +294275,7 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294268
294275
|
continue;
|
|
294269
294276
|
}
|
|
294270
294277
|
}
|
|
294271
|
-
if (visitor.route &&
|
|
294278
|
+
if (visitor.route && validRoute) {
|
|
294272
294279
|
const relative_path_regex = /src(.*)/;
|
|
294273
294280
|
const svelteTypeFilePath = path_exports.join(
|
|
294274
294281
|
config3.projectRoot,
|
|
@@ -294991,10 +294998,10 @@ import_fs.default.readdirSync = function(filepath, options) {
|
|
|
294991
294998
|
function contains2(...names2) {
|
|
294992
294999
|
return names2.some((name2) => file_names.includes(name2));
|
|
294993
295000
|
}
|
|
294994
|
-
if (contains2("+page.svelte") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
|
|
295001
|
+
if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
|
|
294995
295002
|
result.push(virtual_file("+page.js", options));
|
|
294996
295003
|
}
|
|
294997
|
-
if (contains2("+layout.svelte") && !contains2("+layout.ts", "+layout.js")) {
|
|
295004
|
+
if (contains2("+layout.svelte", "+layout.gql") && !contains2("+layout.ts", "+layout.js")) {
|
|
294998
295005
|
result.push(virtual_file("+layout.js", options));
|
|
294999
295006
|
}
|
|
295000
295007
|
const posix_filepath = path_exports.posixify(filepath.toString());
|
|
@@ -296048,16 +296055,9 @@ var HoudiniSveltePlugin = async () => ({
|
|
|
296048
296055
|
return content.replace("HOUDINI_CLIENT_PATH", relativePath);
|
|
296049
296056
|
},
|
|
296050
296057
|
"adapter.js": ({ content }) => {
|
|
296051
|
-
const sveltekit_adapter = `import {
|
|
296052
|
-
import { get } from 'svelte/store';
|
|
296053
|
-
import { browser, prerendering } from '$app/environment'
|
|
296054
|
-
import { page } from '$app/stores'
|
|
296058
|
+
const sveltekit_adapter = `import { browser, prerendering } from '$app/environment'
|
|
296055
296059
|
import { error as svelteKitError } from '@sveltejs/kit'
|
|
296056
296060
|
|
|
296057
|
-
export function goTo(location, options) {
|
|
296058
|
-
go(location, options)
|
|
296059
|
-
}
|
|
296060
|
-
|
|
296061
296061
|
export const isBrowser = browser
|
|
296062
296062
|
|
|
296063
296063
|
export let clientStarted = false;
|
package/build/test-esm/index.js
CHANGED
|
@@ -294165,6 +294165,7 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294165
294165
|
let layoutExports = [];
|
|
294166
294166
|
let pageQueries = [];
|
|
294167
294167
|
let layoutQueries = [];
|
|
294168
|
+
let validRoute = false;
|
|
294168
294169
|
for (const child of await fs_exports.readdir(dirpath)) {
|
|
294169
294170
|
const childPath = path_exports.join(dirpath, child);
|
|
294170
294171
|
if ((await fs_exports.stat(childPath)).isDirectory()) {
|
|
@@ -294172,18 +294173,21 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294172
294173
|
continue;
|
|
294173
294174
|
}
|
|
294174
294175
|
if (is_layout_script(framework2, childPath)) {
|
|
294176
|
+
validRoute = true;
|
|
294175
294177
|
const { houdini_load, exports } = await extract_load_function(config3, childPath);
|
|
294176
294178
|
await visitor.layoutQueries?.(houdini_load ?? [], childPath);
|
|
294177
294179
|
layoutQueries.push(...houdini_load ?? []);
|
|
294178
294180
|
await visitor.layoutExports?.(exports, childPath);
|
|
294179
294181
|
layoutExports.push(...exports);
|
|
294180
294182
|
} else if (is_page_script(framework2, childPath)) {
|
|
294183
|
+
validRoute = true;
|
|
294181
294184
|
const { houdini_load, exports } = await extract_load_function(config3, childPath);
|
|
294182
294185
|
await visitor.pageQueries?.(houdini_load ?? [], childPath);
|
|
294183
294186
|
pageQueries.push(...houdini_load ?? []);
|
|
294184
294187
|
await visitor.pageExports?.(exports, childPath);
|
|
294185
294188
|
pageExports.push(...exports);
|
|
294186
294189
|
} else if (is_layout_component(framework2, childPath)) {
|
|
294190
|
+
validRoute = true;
|
|
294187
294191
|
const contents = await fs_exports.readFile(childPath);
|
|
294188
294192
|
if (!contents) {
|
|
294189
294193
|
continue;
|
|
@@ -294207,6 +294211,7 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294207
294211
|
}
|
|
294208
294212
|
});
|
|
294209
294213
|
} else if (is_component(config3, framework2, child)) {
|
|
294214
|
+
validRoute = true;
|
|
294210
294215
|
const contents = await fs_exports.readFile(childPath);
|
|
294211
294216
|
if (!contents) {
|
|
294212
294217
|
continue;
|
|
@@ -294230,6 +294235,7 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294230
294235
|
}
|
|
294231
294236
|
});
|
|
294232
294237
|
} else if (child === plugin_config(config3).layoutQueryFilename) {
|
|
294238
|
+
validRoute = true;
|
|
294233
294239
|
const contents = await fs_exports.readFile(childPath);
|
|
294234
294240
|
if (!contents) {
|
|
294235
294241
|
continue;
|
|
@@ -294242,6 +294248,7 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294242
294248
|
throw routeQueryError(childPath);
|
|
294243
294249
|
}
|
|
294244
294250
|
} else if (child === plugin_config(config3).pageQueryFilename) {
|
|
294251
|
+
validRoute = true;
|
|
294245
294252
|
const contents = await fs_exports.readFile(childPath);
|
|
294246
294253
|
if (!contents) {
|
|
294247
294254
|
continue;
|
|
@@ -294257,7 +294264,7 @@ async function walk_routes(config3, framework2, visitor, dirpath = config3.route
|
|
|
294257
294264
|
continue;
|
|
294258
294265
|
}
|
|
294259
294266
|
}
|
|
294260
|
-
if (visitor.route &&
|
|
294267
|
+
if (visitor.route && validRoute) {
|
|
294261
294268
|
const relative_path_regex = /src(.*)/;
|
|
294262
294269
|
const svelteTypeFilePath = path_exports.join(
|
|
294263
294270
|
config3.projectRoot,
|
|
@@ -294980,10 +294987,10 @@ filesystem.readdirSync = function(filepath, options) {
|
|
|
294980
294987
|
function contains2(...names2) {
|
|
294981
294988
|
return names2.some((name2) => file_names.includes(name2));
|
|
294982
294989
|
}
|
|
294983
|
-
if (contains2("+page.svelte") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
|
|
294990
|
+
if (contains2("+page.svelte", "+page.gql") && !contains2("+page.js", "+page.ts", "+page.server.js", "+page.server.ts")) {
|
|
294984
294991
|
result.push(virtual_file("+page.js", options));
|
|
294985
294992
|
}
|
|
294986
|
-
if (contains2("+layout.svelte") && !contains2("+layout.ts", "+layout.js")) {
|
|
294993
|
+
if (contains2("+layout.svelte", "+layout.gql") && !contains2("+layout.ts", "+layout.js")) {
|
|
294987
294994
|
result.push(virtual_file("+layout.js", options));
|
|
294988
294995
|
}
|
|
294989
294996
|
const posix_filepath = path_exports.posixify(filepath.toString());
|
|
@@ -296037,16 +296044,9 @@ var HoudiniSveltePlugin = async () => ({
|
|
|
296037
296044
|
return content.replace("HOUDINI_CLIENT_PATH", relativePath);
|
|
296038
296045
|
},
|
|
296039
296046
|
"adapter.js": ({ content }) => {
|
|
296040
|
-
const sveltekit_adapter = `import {
|
|
296041
|
-
import { get } from 'svelte/store';
|
|
296042
|
-
import { browser, prerendering } from '$app/environment'
|
|
296043
|
-
import { page } from '$app/stores'
|
|
296047
|
+
const sveltekit_adapter = `import { browser, prerendering } from '$app/environment'
|
|
296044
296048
|
import { error as svelteKitError } from '@sveltejs/kit'
|
|
296045
296049
|
|
|
296046
|
-
export function goTo(location, options) {
|
|
296047
|
-
go(location, options)
|
|
296048
|
-
}
|
|
296049
|
-
|
|
296050
296050
|
export const isBrowser = browser
|
|
296051
296051
|
|
|
296052
296052
|
export let clientStarted = false;
|
package/package.json
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-svelte",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.10",
|
|
4
4
|
"description": "The svelte plugin for houdini",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"typescript",
|
|
7
|
+
"svelte",
|
|
8
|
+
"sveltekit",
|
|
9
|
+
"graphql",
|
|
10
|
+
"graphql-client"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/HoudiniGraphql/houdini",
|
|
13
|
+
"funding": "https://github.com/sponsors/HoudiniGraphql",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/HoudiniGraphql/houdini.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
5
19
|
"type": "module",
|
|
6
20
|
"dependencies": {
|
|
7
21
|
"@kitql/helper": "^0.5.0",
|
|
@@ -9,7 +23,7 @@
|
|
|
9
23
|
"ast-types": "^0.15.1",
|
|
10
24
|
"estree-walker": "^3.0.1",
|
|
11
25
|
"graphql": "^15.8.0",
|
|
12
|
-
"houdini": "^0.17.
|
|
26
|
+
"houdini": "^0.17.10",
|
|
13
27
|
"minimatch": "^5.1.0",
|
|
14
28
|
"recast": "^0.21.5",
|
|
15
29
|
"svelte": "^3.52.0"
|
|
@@ -22,6 +36,9 @@
|
|
|
22
36
|
"peerDependencies": {
|
|
23
37
|
"graphql": "^14.0.0 || ^15.0.0"
|
|
24
38
|
},
|
|
39
|
+
"files": [
|
|
40
|
+
"build"
|
|
41
|
+
],
|
|
25
42
|
"exports": {
|
|
26
43
|
"./package.json": "./package.json",
|
|
27
44
|
".": {
|
package/.turbo/turbo-compile.log
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
houdini-svelte:compile: cache hit, replaying output a6f23d9fada7a9db
|
|
2
|
-
houdini-svelte:compile:
|
|
3
|
-
houdini-svelte:compile: > houdini-svelte@0.17.9 compile /home/runner/work/houdini/houdini/packages/houdini-svelte
|
|
4
|
-
houdini-svelte:compile: > scripts build --plugin
|
|
5
|
-
houdini-svelte:compile:
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
houdini-svelte:typedefs: cache hit, replaying output dc7aa0cae2a15b45
|
|
2
|
-
houdini-svelte:typedefs:
|
|
3
|
-
houdini-svelte:typedefs: > houdini-svelte@0.17.9 typedefs /home/runner/work/houdini/houdini/packages/houdini-svelte
|
|
4
|
-
houdini-svelte:typedefs: > scripts typedefs --plugin
|
|
5
|
-
houdini-svelte:typedefs:
|
package/CHANGELOG.md
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# houdini-svelte
|
|
2
|
-
|
|
3
|
-
## 0.17.9
|
|
4
|
-
|
|
5
|
-
- Updated dependencies [[`6e36775`](https://github.com/HoudiniGraphql/houdini/commit/6e367755d902eca3242519b4c609c0d5bc76f4ff)]:
|
|
6
|
-
- houdini@0.17.9
|
|
7
|
-
|
|
8
|
-
## 0.17.8
|
|
9
|
-
|
|
10
|
-
### 🐛 Fixes
|
|
11
|
-
|
|
12
|
-
- [#691](https://github.com/HoudiniGraphql/houdini/pull/691) [`e707fbe`](https://github.com/HoudiniGraphql/houdini/commit/e707fbec36c223ad549c31df6bfa68ae312ffa9a) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Added artifact import to subscription stores
|
|
13
|
-
|
|
14
|
-
- Updated dependencies []:
|
|
15
|
-
- houdini@0.17.8
|
|
16
|
-
|
|
17
|
-
## 0.17.7
|
|
18
|
-
|
|
19
|
-
### 🐛 Fixes
|
|
20
|
-
|
|
21
|
-
- [#689](https://github.com/HoudiniGraphql/houdini/pull/689) [`db67e82`](https://github.com/HoudiniGraphql/houdini/commit/db67e822fcec2362538bda548d058fa7e3397ffa) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Fix duplicate import for generated subscription stores
|
|
22
|
-
|
|
23
|
-
## 0.17.6
|
|
24
|
-
|
|
25
|
-
### 🐛 Fixes
|
|
26
|
-
|
|
27
|
-
- [#686](https://github.com/HoudiniGraphql/houdini/pull/686) [`f138bff`](https://github.com/HoudiniGraphql/houdini/commit/f138bff8854181da63b545f54462b198794e2bbc) Thanks [@jycouet](https://github.com/jycouet)! - isFetching will switch only when a network call is happening (and starts at true for queries)
|
|
28
|
-
|
|
29
|
-
### ✨ Features
|
|
30
|
-
|
|
31
|
-
- [#676](https://github.com/HoudiniGraphql/houdini/pull/676) [`b7a07a3`](https://github.com/HoudiniGraphql/houdini/commit/b7a07a37ec1fd2fe7b9e6ca34e9e2beb53b84bce) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Add config for users to specify custom stores
|
|
32
|
-
|
|
33
|
-
- [#673](https://github.com/HoudiniGraphql/houdini/pull/673) [`3986d5e`](https://github.com/HoudiniGraphql/houdini/commit/3986d5e5491565a19fabc440972ef4d95d548e92) Thanks [@sjcobb2022](https://github.com/sjcobb2022)! - Improve generated types for routes
|
|
34
|
-
|
|
35
|
-
## 0.17.5
|
|
36
|
-
|
|
37
|
-
### 🐛 Fixes
|
|
38
|
-
|
|
39
|
-
- [#659](https://github.com/HoudiniGraphql/houdini/pull/659) [`579fb0b`](https://github.com/HoudiniGraphql/houdini/commit/579fb0bd4ccc5ee6e9aad0cc6278b0a9bfa972d1) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Improve typing for loadAll
|
|
40
|
-
|
|
41
|
-
## 0.17.3
|
|
42
|
-
|
|
43
|
-
### 🐛 Fixes
|
|
44
|
-
|
|
45
|
-
- [#643](https://github.com/HoudiniGraphql/houdini/pull/643) [`35b189f`](https://github.com/HoudiniGraphql/houdini/commit/35b189f8cc494ce4f80d54c00736e9dd8d3c69e7) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Fix error preventing session in certain node versions
|
|
46
|
-
|
|
47
|
-
## 0.17.2
|
|
48
|
-
|
|
49
|
-
### 🐛 Fixes
|
|
50
|
-
|
|
51
|
-
- [#639](https://github.com/HoudiniGraphql/houdini/pull/639) [`cfdb009`](https://github.com/HoudiniGraphql/houdini/commit/cfdb00907829576b142366bad8835e2d32f3ea78) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Fix error with generated route types
|
|
52
|
-
|
|
53
|
-
- [#633](https://github.com/HoudiniGraphql/houdini/pull/633) [`8e52a90`](https://github.com/HoudiniGraphql/houdini/commit/8e52a907642003c3b9c9f9b2a4c9824e49136b5d) Thanks [@jycouet](https://github.com/jycouet)! - fix: queries will be sent once if they are defined in +(page|layout).gql
|
|
54
|
-
|
|
55
|
-
## 0.17.1
|
|
56
|
-
|
|
57
|
-
### 🐛 Fixes
|
|
58
|
-
|
|
59
|
-
- [#630](https://github.com/HoudiniGraphql/houdini/pull/630) [`02d8fc4`](https://github.com/HoudiniGraphql/houdini/commit/02d8fc47f71980bd2b6492162b8e57808447bdbc) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Fix relative imports from root layout
|
|
60
|
-
|
|
61
|
-
## 0.17.0
|
|
62
|
-
|
|
63
|
-
### ⚠️ Breaking Changes
|
|
64
|
-
|
|
65
|
-
- [#593](https://github.com/HoudiniGraphql/houdini/pull/593) [`c1363fe`](https://github.com/HoudiniGraphql/houdini/commit/c1363fe938ab94281272cad8939b892fd705a803) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Split houdini into two packages: `houdini` and `houdini-svelte`
|
|
66
|
-
|
|
67
|
-
### ✨ Features
|
|
68
|
-
|
|
69
|
-
- [#593](https://github.com/HoudiniGraphql/houdini/pull/593) [`c1363fe`](https://github.com/HoudiniGraphql/houdini/commit/c1363fe938ab94281272cad8939b892fd705a803) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Adding layout.gql special file
|
|
70
|
-
|
|
71
|
-
- [#610](https://github.com/HoudiniGraphql/houdini/pull/610) [`3168f7d`](https://github.com/HoudiniGraphql/houdini/commit/3168f7dffd06f5074d08652d2d2c459377bc73d6) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Generate variable function definitions for non-route queries
|
|
72
|
-
|
|
73
|
-
### 🐛 Fixes
|
|
74
|
-
|
|
75
|
-
- [#613](https://github.com/HoudiniGraphql/houdini/pull/613) [`eb3ffe1`](https://github.com/HoudiniGraphql/houdini/commit/eb3ffe1fbf14180210464863cb7e2ca29892a1fe) Thanks [@AlecAivazis](https://github.com/AlecAivazis)! - Avoid unnecessary data prop being added to route
|