houdini 1.2.22 → 1.2.23-next.0
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/adapter/index.d.ts +1 -1
- package/build/cmd-cjs/index.js +2 -2
- package/build/cmd-esm/index.js +2 -2
- package/build/lib/router/conventions.d.ts +1 -0
- package/build/lib/router/server.d.ts +2 -0
- package/build/lib-cjs/index.js +14 -1
- package/build/lib-esm/index.js +13 -1
- package/build/runtime/router/server.d.ts +12 -12
- package/build/runtime-cjs/router/server.d.ts +12 -12
- package/build/runtime-cjs/router/server.js +14 -18
- package/build/runtime-esm/router/server.d.ts +12 -12
- package/build/runtime-esm/router/server.js +12 -11
- package/build/vite-cjs/index.js +9 -3
- package/build/vite-esm/index.js +9 -3
- package/package.json +1 -1
package/build/adapter/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { serverAdapterFactory as createAdapter } from '../runtime/router/server';
|
|
2
2
|
export declare const endpoint: string;
|
|
3
|
-
export declare let createServerAdapter: (args: Omit<Parameters<typeof createAdapter>[0], 'on_render' | 'manifest' | 'yoga' | 'schema' | 'graphqlEndpoint'>) => ReturnType<typeof createAdapter>;
|
|
3
|
+
export declare let createServerAdapter: (args: Omit<Parameters<typeof createAdapter>[0], 'on_render' | 'manifest' | 'yoga' | 'schema' | 'graphqlEndpoint' | 'client'>) => ReturnType<typeof createAdapter>;
|
package/build/cmd-cjs/index.js
CHANGED
|
@@ -76176,12 +76176,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
76176
76176
|
}
|
|
76177
76177
|
packageJSON2.devDependencies = {
|
|
76178
76178
|
...packageJSON2.devDependencies,
|
|
76179
|
-
houdini: "^1.2.
|
|
76179
|
+
houdini: "^1.2.23-next.0"
|
|
76180
76180
|
};
|
|
76181
76181
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
76182
76182
|
packageJSON2.devDependencies = {
|
|
76183
76183
|
...packageJSON2.devDependencies,
|
|
76184
|
-
"houdini-svelte": "^1.2.
|
|
76184
|
+
"houdini-svelte": "^1.2.23-next.0"
|
|
76185
76185
|
};
|
|
76186
76186
|
} else {
|
|
76187
76187
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -76181,12 +76181,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
76181
76181
|
}
|
|
76182
76182
|
packageJSON2.devDependencies = {
|
|
76183
76183
|
...packageJSON2.devDependencies,
|
|
76184
|
-
houdini: "^1.2.
|
|
76184
|
+
houdini: "^1.2.23-next.0"
|
|
76185
76185
|
};
|
|
76186
76186
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
76187
76187
|
packageJSON2.devDependencies = {
|
|
76188
76188
|
...packageJSON2.devDependencies,
|
|
76189
|
-
"houdini-svelte": "^1.2.
|
|
76189
|
+
"houdini-svelte": "^1.2.23-next.0"
|
|
76190
76190
|
};
|
|
76191
76191
|
} else {
|
|
76192
76192
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
|
@@ -5,6 +5,7 @@ export declare function router_path(config: Config): string;
|
|
|
5
5
|
export declare function page_entry_path(config: Config, id: string, base?: string): string;
|
|
6
6
|
export declare function server_adapter_path(config: Config, base?: string): string;
|
|
7
7
|
export declare function adapter_config_path(config: Config, base?: string): string;
|
|
8
|
+
export declare function vite_render_path(config: Config, base?: string): string;
|
|
8
9
|
export declare function app_component_path(config: Config, base?: string): string;
|
|
9
10
|
export declare function page_unit_path(config: Config, id: string, base?: string): string;
|
|
10
11
|
export declare function layout_unit_path(config: Config, id: string, base?: string): string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type * as graphql from 'graphql';
|
|
2
2
|
import type { Config } from '../config';
|
|
3
|
+
import { ConfigFile } from '../types';
|
|
3
4
|
export declare function isSecondaryBuild(): boolean;
|
|
5
|
+
export declare function internalRoutes(config: ConfigFile): string[];
|
|
4
6
|
export declare function buildLocalSchema(config: Config): Promise<void>;
|
|
5
7
|
export declare function loadLocalSchema(config: Config): Promise<graphql.GraphQLSchema>;
|
package/build/lib-cjs/index.js
CHANGED
|
@@ -58628,6 +58628,7 @@ __export(lib_exports, {
|
|
|
58628
58628
|
hashOriginal: () => hashOriginal,
|
|
58629
58629
|
hashRaw: () => hashRaw,
|
|
58630
58630
|
houdini_mode: () => houdini_mode,
|
|
58631
|
+
internalRoutes: () => internalRoutes,
|
|
58631
58632
|
isPending: () => isPending,
|
|
58632
58633
|
isSecondaryBuild: () => isSecondaryBuild,
|
|
58633
58634
|
keyFieldsForType: () => keyFieldsForType,
|
|
@@ -68373,7 +68374,8 @@ __export(conventions_exports, {
|
|
|
68373
68374
|
router_index_path: () => router_index_path,
|
|
68374
68375
|
router_path: () => router_path,
|
|
68375
68376
|
serialized_manifest_path: () => serialized_manifest_path,
|
|
68376
|
-
server_adapter_path: () => server_adapter_path
|
|
68377
|
+
server_adapter_path: () => server_adapter_path,
|
|
68378
|
+
vite_render_path: () => vite_render_path
|
|
68377
68379
|
});
|
|
68378
68380
|
function router_path(config2) {
|
|
68379
68381
|
return path_exports.join(base_dir(config2), "Router.jsx");
|
|
@@ -68387,6 +68389,9 @@ function server_adapter_path(config2, base) {
|
|
|
68387
68389
|
function adapter_config_path(config2, base) {
|
|
68388
68390
|
return path_exports.join(units_dir(config2, base), "render", "config.js");
|
|
68389
68391
|
}
|
|
68392
|
+
function vite_render_path(config2, base) {
|
|
68393
|
+
return path_exports.join(units_dir(config2, base), "render", "vite.js");
|
|
68394
|
+
}
|
|
68390
68395
|
function app_component_path(config2, base) {
|
|
68391
68396
|
return path_exports.join(units_dir(config2, base), "render", "App.jsx");
|
|
68392
68397
|
}
|
|
@@ -68703,6 +68708,13 @@ var import_node_path2 = __toESM(require("node:path"), 1);
|
|
|
68703
68708
|
function isSecondaryBuild() {
|
|
68704
68709
|
return process.env.HOUDINI_SCHEMA_BUILD === "true";
|
|
68705
68710
|
}
|
|
68711
|
+
function internalRoutes(config2) {
|
|
68712
|
+
const routes = [localApiEndpoint(config2)];
|
|
68713
|
+
if (config2.router?.auth && "redirect" in config2.router.auth) {
|
|
68714
|
+
routes.push(config2.router.auth.redirect);
|
|
68715
|
+
}
|
|
68716
|
+
return routes;
|
|
68717
|
+
}
|
|
68706
68718
|
async function buildLocalSchema(config2) {
|
|
68707
68719
|
const { build } = await import("vite");
|
|
68708
68720
|
process.env.HOUDINI_SCHEMA_BUILD = "true";
|
|
@@ -69028,6 +69040,7 @@ async function get_session(req, secrets) {
|
|
|
69028
69040
|
hashOriginal,
|
|
69029
69041
|
hashRaw,
|
|
69030
69042
|
houdini_mode,
|
|
69043
|
+
internalRoutes,
|
|
69031
69044
|
isPending,
|
|
69032
69045
|
isSecondaryBuild,
|
|
69033
69046
|
keyFieldsForType,
|
package/build/lib-esm/index.js
CHANGED
|
@@ -68296,7 +68296,8 @@ __export(conventions_exports, {
|
|
|
68296
68296
|
router_index_path: () => router_index_path,
|
|
68297
68297
|
router_path: () => router_path,
|
|
68298
68298
|
serialized_manifest_path: () => serialized_manifest_path,
|
|
68299
|
-
server_adapter_path: () => server_adapter_path
|
|
68299
|
+
server_adapter_path: () => server_adapter_path,
|
|
68300
|
+
vite_render_path: () => vite_render_path
|
|
68300
68301
|
});
|
|
68301
68302
|
function router_path(config2) {
|
|
68302
68303
|
return path_exports.join(base_dir(config2), "Router.jsx");
|
|
@@ -68310,6 +68311,9 @@ function server_adapter_path(config2, base) {
|
|
|
68310
68311
|
function adapter_config_path(config2, base) {
|
|
68311
68312
|
return path_exports.join(units_dir(config2, base), "render", "config.js");
|
|
68312
68313
|
}
|
|
68314
|
+
function vite_render_path(config2, base) {
|
|
68315
|
+
return path_exports.join(units_dir(config2, base), "render", "vite.js");
|
|
68316
|
+
}
|
|
68313
68317
|
function app_component_path(config2, base) {
|
|
68314
68318
|
return path_exports.join(units_dir(config2, base), "render", "App.jsx");
|
|
68315
68319
|
}
|
|
@@ -68626,6 +68630,13 @@ import path2 from "node:path";
|
|
|
68626
68630
|
function isSecondaryBuild() {
|
|
68627
68631
|
return process.env.HOUDINI_SCHEMA_BUILD === "true";
|
|
68628
68632
|
}
|
|
68633
|
+
function internalRoutes(config2) {
|
|
68634
|
+
const routes = [localApiEndpoint(config2)];
|
|
68635
|
+
if (config2.router?.auth && "redirect" in config2.router.auth) {
|
|
68636
|
+
routes.push(config2.router.auth.redirect);
|
|
68637
|
+
}
|
|
68638
|
+
return routes;
|
|
68639
|
+
}
|
|
68629
68640
|
async function buildLocalSchema(config2) {
|
|
68630
68641
|
const { build } = await import("vite");
|
|
68631
68642
|
process.env.HOUDINI_SCHEMA_BUILD = "true";
|
|
@@ -68950,6 +68961,7 @@ export {
|
|
|
68950
68961
|
hashOriginal,
|
|
68951
68962
|
hashRaw,
|
|
68952
68963
|
houdini_mode,
|
|
68964
|
+
internalRoutes,
|
|
68953
68965
|
isPending,
|
|
68954
68966
|
isSecondaryBuild,
|
|
68955
68967
|
keyFieldsForType,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { createServerAdapter as createAdapter } from '@whatwg-node/server';
|
|
3
2
|
import { type GraphQLSchema } from 'graphql';
|
|
4
3
|
import { createYoga } from 'graphql-yoga';
|
|
5
|
-
import type {
|
|
4
|
+
import type { HoudiniClient } from '../client';
|
|
6
5
|
import type { RouterManifest, RouterPageManifest, YogaServerOptions } from './types';
|
|
7
|
-
export declare
|
|
8
|
-
schema?: GraphQLSchema | null
|
|
9
|
-
yoga?:
|
|
6
|
+
export declare function _serverHandler<ComponentType = unknown>({ schema, yoga, client, production, manifest, graphqlEndpoint, on_render, }: {
|
|
7
|
+
schema?: GraphQLSchema | null;
|
|
8
|
+
yoga?: ReturnType<typeof createYoga> | null;
|
|
9
|
+
client: HoudiniClient;
|
|
10
|
+
production: boolean;
|
|
11
|
+
manifest: RouterManifest<ComponentType> | null;
|
|
10
12
|
assetPrefix: string;
|
|
11
|
-
|
|
12
|
-
pipe?: ServerResponse<IncomingMessage> | undefined;
|
|
13
|
+
graphqlEndpoint: string;
|
|
13
14
|
on_render: (args: {
|
|
14
15
|
url: string;
|
|
15
16
|
match: RouterPageManifest<ComponentType> | null;
|
|
16
|
-
manifest: RouterManifest<
|
|
17
|
+
manifest: RouterManifest<ComponentType>;
|
|
17
18
|
session: App.Session;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} & Omit<import("graphql-yoga").YogaServerOptions<Record<string, any>, Record<string, any>>, "schema">) => ReturnType<typeof createAdapter>;
|
|
19
|
+
}) => Response | Promise<Response | undefined> | undefined;
|
|
20
|
+
} & Omit<YogaServerOptions, 'schema'>): (request: Request) => Promise<Response>;
|
|
21
|
+
export declare const serverAdapterFactory: (args: Parameters<typeof _serverHandler>[0]) => ReturnType<typeof createAdapter>;
|
|
22
22
|
export type ServerAdapterFactory = typeof serverAdapterFactory;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { createServerAdapter as createAdapter } from '@whatwg-node/server';
|
|
3
2
|
import { type GraphQLSchema } from 'graphql';
|
|
4
3
|
import { createYoga } from 'graphql-yoga';
|
|
5
|
-
import type {
|
|
4
|
+
import type { HoudiniClient } from '../client';
|
|
6
5
|
import type { RouterManifest, RouterPageManifest, YogaServerOptions } from './types';
|
|
7
|
-
export declare
|
|
8
|
-
schema?: GraphQLSchema | null
|
|
9
|
-
yoga?:
|
|
6
|
+
export declare function _serverHandler<ComponentType = unknown>({ schema, yoga, client, production, manifest, graphqlEndpoint, on_render, }: {
|
|
7
|
+
schema?: GraphQLSchema | null;
|
|
8
|
+
yoga?: ReturnType<typeof createYoga> | null;
|
|
9
|
+
client: HoudiniClient;
|
|
10
|
+
production: boolean;
|
|
11
|
+
manifest: RouterManifest<ComponentType> | null;
|
|
10
12
|
assetPrefix: string;
|
|
11
|
-
|
|
12
|
-
pipe?: ServerResponse<IncomingMessage> | undefined;
|
|
13
|
+
graphqlEndpoint: string;
|
|
13
14
|
on_render: (args: {
|
|
14
15
|
url: string;
|
|
15
16
|
match: RouterPageManifest<ComponentType> | null;
|
|
16
|
-
manifest: RouterManifest<
|
|
17
|
+
manifest: RouterManifest<ComponentType>;
|
|
17
18
|
session: App.Session;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} & Omit<import("graphql-yoga").YogaServerOptions<Record<string, any>, Record<string, any>>, "schema">) => ReturnType<typeof createAdapter>;
|
|
19
|
+
}) => Response | Promise<Response | undefined> | undefined;
|
|
20
|
+
} & Omit<YogaServerOptions, 'schema'>): (request: Request) => Promise<Response>;
|
|
21
|
+
export declare const serverAdapterFactory: (args: Parameters<typeof _serverHandler>[0]) => ReturnType<typeof createAdapter>;
|
|
22
22
|
export type ServerAdapterFactory = typeof serverAdapterFactory;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,35 +15,30 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
19
|
var server_exports = {};
|
|
26
20
|
__export(server_exports, {
|
|
21
|
+
_serverHandler: () => _serverHandler,
|
|
27
22
|
serverAdapterFactory: () => serverAdapterFactory
|
|
28
23
|
});
|
|
29
24
|
module.exports = __toCommonJS(server_exports);
|
|
30
25
|
var import_server = require("@whatwg-node/server");
|
|
31
26
|
var import_graphql = require("graphql");
|
|
32
27
|
var import_graphql_yoga = require("graphql-yoga");
|
|
33
|
-
var import_client = __toESM(require("../../../src/+client"), 1);
|
|
34
28
|
var import_config = require("../lib/config");
|
|
35
29
|
var import_match = require("./match");
|
|
36
30
|
var import_session = require("./session");
|
|
37
31
|
const config_file = (0, import_config.getCurrentConfig)();
|
|
38
32
|
const session_keys = (0, import_config.localApiSessionKeys)(config_file);
|
|
39
|
-
|
|
40
|
-
const serverAdapterFactory = ({
|
|
33
|
+
function _serverHandler({
|
|
41
34
|
schema,
|
|
42
35
|
yoga,
|
|
36
|
+
client,
|
|
43
37
|
production,
|
|
44
38
|
manifest,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}) => {
|
|
39
|
+
graphqlEndpoint,
|
|
40
|
+
on_render
|
|
41
|
+
}) {
|
|
49
42
|
if (schema && !yoga) {
|
|
50
43
|
yoga = (0, import_graphql_yoga.createYoga)({
|
|
51
44
|
schema,
|
|
@@ -54,12 +47,12 @@ const serverAdapterFactory = ({
|
|
|
54
47
|
});
|
|
55
48
|
}
|
|
56
49
|
if (schema) {
|
|
57
|
-
|
|
50
|
+
client.registerProxy(graphqlEndpoint, async ({ query, variables, session }) => {
|
|
58
51
|
const parsed = (0, import_graphql.parse)(query);
|
|
59
52
|
return await (0, import_graphql.execute)(schema, parsed, null, session, variables);
|
|
60
53
|
});
|
|
61
54
|
}
|
|
62
|
-
return
|
|
55
|
+
return async (request) => {
|
|
63
56
|
if (!manifest) {
|
|
64
57
|
return new Response(
|
|
65
58
|
"Adapter did not provide the project's manifest. Please open an issue on github.",
|
|
@@ -84,16 +77,19 @@ const serverAdapterFactory = ({
|
|
|
84
77
|
url,
|
|
85
78
|
match,
|
|
86
79
|
session: await (0, import_session.get_session)(request.headers, session_keys),
|
|
87
|
-
manifest
|
|
88
|
-
pipe
|
|
80
|
+
manifest
|
|
89
81
|
});
|
|
90
82
|
if (rendered) {
|
|
91
83
|
return rendered;
|
|
92
84
|
}
|
|
93
85
|
return new Response("404", { status: 404 });
|
|
94
|
-
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
const serverAdapterFactory = (args) => {
|
|
89
|
+
return (0, import_server.createServerAdapter)(_serverHandler(args));
|
|
95
90
|
};
|
|
96
91
|
// Annotate the CommonJS export names for ESM import in node:
|
|
97
92
|
0 && (module.exports = {
|
|
93
|
+
_serverHandler,
|
|
98
94
|
serverAdapterFactory
|
|
99
95
|
});
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { createServerAdapter as createAdapter } from '@whatwg-node/server';
|
|
3
2
|
import { type GraphQLSchema } from 'graphql';
|
|
4
3
|
import { createYoga } from 'graphql-yoga';
|
|
5
|
-
import type {
|
|
4
|
+
import type { HoudiniClient } from '../client';
|
|
6
5
|
import type { RouterManifest, RouterPageManifest, YogaServerOptions } from './types';
|
|
7
|
-
export declare
|
|
8
|
-
schema?: GraphQLSchema | null
|
|
9
|
-
yoga?:
|
|
6
|
+
export declare function _serverHandler<ComponentType = unknown>({ schema, yoga, client, production, manifest, graphqlEndpoint, on_render, }: {
|
|
7
|
+
schema?: GraphQLSchema | null;
|
|
8
|
+
yoga?: ReturnType<typeof createYoga> | null;
|
|
9
|
+
client: HoudiniClient;
|
|
10
|
+
production: boolean;
|
|
11
|
+
manifest: RouterManifest<ComponentType> | null;
|
|
10
12
|
assetPrefix: string;
|
|
11
|
-
|
|
12
|
-
pipe?: ServerResponse<IncomingMessage> | undefined;
|
|
13
|
+
graphqlEndpoint: string;
|
|
13
14
|
on_render: (args: {
|
|
14
15
|
url: string;
|
|
15
16
|
match: RouterPageManifest<ComponentType> | null;
|
|
16
|
-
manifest: RouterManifest<
|
|
17
|
+
manifest: RouterManifest<ComponentType>;
|
|
17
18
|
session: App.Session;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} & Omit<import("graphql-yoga").YogaServerOptions<Record<string, any>, Record<string, any>>, "schema">) => ReturnType<typeof createAdapter>;
|
|
19
|
+
}) => Response | Promise<Response | undefined> | undefined;
|
|
20
|
+
} & Omit<YogaServerOptions, 'schema'>): (request: Request) => Promise<Response>;
|
|
21
|
+
export declare const serverAdapterFactory: (args: Parameters<typeof _serverHandler>[0]) => ReturnType<typeof createAdapter>;
|
|
22
22
|
export type ServerAdapterFactory = typeof serverAdapterFactory;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { createServerAdapter as createAdapter } from "@whatwg-node/server";
|
|
2
2
|
import { parse, execute } from "graphql";
|
|
3
3
|
import { createYoga } from "graphql-yoga";
|
|
4
|
-
import client from "../../../src/+client";
|
|
5
4
|
import { localApiSessionKeys, localApiEndpoint, getCurrentConfig } from "../lib/config";
|
|
6
5
|
import { find_match } from "./match";
|
|
7
6
|
import { get_session, handle_request } from "./session";
|
|
8
7
|
const config_file = getCurrentConfig();
|
|
9
8
|
const session_keys = localApiSessionKeys(config_file);
|
|
10
|
-
|
|
11
|
-
const serverAdapterFactory = ({
|
|
9
|
+
function _serverHandler({
|
|
12
10
|
schema,
|
|
13
11
|
yoga,
|
|
12
|
+
client,
|
|
14
13
|
production,
|
|
15
14
|
manifest,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}) => {
|
|
15
|
+
graphqlEndpoint,
|
|
16
|
+
on_render
|
|
17
|
+
}) {
|
|
20
18
|
if (schema && !yoga) {
|
|
21
19
|
yoga = createYoga({
|
|
22
20
|
schema,
|
|
@@ -30,7 +28,7 @@ const serverAdapterFactory = ({
|
|
|
30
28
|
return await execute(schema, parsed, null, session, variables);
|
|
31
29
|
});
|
|
32
30
|
}
|
|
33
|
-
return
|
|
31
|
+
return async (request) => {
|
|
34
32
|
if (!manifest) {
|
|
35
33
|
return new Response(
|
|
36
34
|
"Adapter did not provide the project's manifest. Please open an issue on github.",
|
|
@@ -55,15 +53,18 @@ const serverAdapterFactory = ({
|
|
|
55
53
|
url,
|
|
56
54
|
match,
|
|
57
55
|
session: await get_session(request.headers, session_keys),
|
|
58
|
-
manifest
|
|
59
|
-
pipe
|
|
56
|
+
manifest
|
|
60
57
|
});
|
|
61
58
|
if (rendered) {
|
|
62
59
|
return rendered;
|
|
63
60
|
}
|
|
64
61
|
return new Response("404", { status: 404 });
|
|
65
|
-
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const serverAdapterFactory = (args) => {
|
|
65
|
+
return createAdapter(_serverHandler(args));
|
|
66
66
|
};
|
|
67
67
|
export {
|
|
68
|
+
_serverHandler,
|
|
68
69
|
serverAdapterFactory
|
|
69
70
|
};
|
package/build/vite-cjs/index.js
CHANGED
|
@@ -70806,7 +70806,8 @@ __export(conventions_exports, {
|
|
|
70806
70806
|
router_index_path: () => router_index_path,
|
|
70807
70807
|
router_path: () => router_path,
|
|
70808
70808
|
serialized_manifest_path: () => serialized_manifest_path,
|
|
70809
|
-
server_adapter_path: () => server_adapter_path
|
|
70809
|
+
server_adapter_path: () => server_adapter_path,
|
|
70810
|
+
vite_render_path: () => vite_render_path
|
|
70810
70811
|
});
|
|
70811
70812
|
function router_path(config4) {
|
|
70812
70813
|
return path_exports.join(base_dir(config4), "Router.jsx");
|
|
@@ -70820,6 +70821,9 @@ function server_adapter_path(config4, base) {
|
|
|
70820
70821
|
function adapter_config_path(config4, base) {
|
|
70821
70822
|
return path_exports.join(units_dir(config4, base), "render", "config.js");
|
|
70822
70823
|
}
|
|
70824
|
+
function vite_render_path(config4, base) {
|
|
70825
|
+
return path_exports.join(units_dir(config4, base), "render", "vite.js");
|
|
70826
|
+
}
|
|
70823
70827
|
function app_component_path(config4, base) {
|
|
70824
70828
|
return path_exports.join(units_dir(config4, base), "render", "App.jsx");
|
|
70825
70829
|
}
|
|
@@ -77213,6 +77217,7 @@ function logStyled(kind, stat3, logLevel, plugin2) {
|
|
|
77213
77217
|
var config3;
|
|
77214
77218
|
var viteConfig;
|
|
77215
77219
|
var viteEnv;
|
|
77220
|
+
var devServer = false;
|
|
77216
77221
|
function Plugin(opts = {}) {
|
|
77217
77222
|
return {
|
|
77218
77223
|
name: "houdini",
|
|
@@ -77266,7 +77271,7 @@ function Plugin(opts = {}) {
|
|
|
77266
77271
|
}
|
|
77267
77272
|
await plugin2.vite.closeBundle.call(this);
|
|
77268
77273
|
}
|
|
77269
|
-
if (!opts.adapter) {
|
|
77274
|
+
if (!opts.adapter || devServer) {
|
|
77270
77275
|
return;
|
|
77271
77276
|
}
|
|
77272
77277
|
console.log("\u{1F3A9} Generating Deployment Assets...");
|
|
@@ -77286,7 +77291,7 @@ function Plugin(opts = {}) {
|
|
|
77286
77291
|
publicBase: viteConfig.base,
|
|
77287
77292
|
outDir: config3.routerBuildDirectory,
|
|
77288
77293
|
manifest,
|
|
77289
|
-
adapterPath: "../$houdini/plugins/houdini-react/units/render/
|
|
77294
|
+
adapterPath: "../$houdini/plugins/houdini-react/units/render/server.js"
|
|
77290
77295
|
});
|
|
77291
77296
|
if (fs_exports.existsSync(path_exports.join(config3.projectRoot, "public"))) {
|
|
77292
77297
|
await fs_exports.recursiveCopy(
|
|
@@ -77332,6 +77337,7 @@ function Plugin(opts = {}) {
|
|
|
77332
77337
|
);
|
|
77333
77338
|
},
|
|
77334
77339
|
async configureServer(server) {
|
|
77340
|
+
devServer = true;
|
|
77335
77341
|
for (const plugin2 of config3.plugins) {
|
|
77336
77342
|
if (typeof plugin2.vite?.configureServer !== "function") {
|
|
77337
77343
|
continue;
|
package/build/vite-esm/index.js
CHANGED
|
@@ -70801,7 +70801,8 @@ __export(conventions_exports, {
|
|
|
70801
70801
|
router_index_path: () => router_index_path,
|
|
70802
70802
|
router_path: () => router_path,
|
|
70803
70803
|
serialized_manifest_path: () => serialized_manifest_path,
|
|
70804
|
-
server_adapter_path: () => server_adapter_path
|
|
70804
|
+
server_adapter_path: () => server_adapter_path,
|
|
70805
|
+
vite_render_path: () => vite_render_path
|
|
70805
70806
|
});
|
|
70806
70807
|
function router_path(config4) {
|
|
70807
70808
|
return path_exports.join(base_dir(config4), "Router.jsx");
|
|
@@ -70815,6 +70816,9 @@ function server_adapter_path(config4, base) {
|
|
|
70815
70816
|
function adapter_config_path(config4, base) {
|
|
70816
70817
|
return path_exports.join(units_dir(config4, base), "render", "config.js");
|
|
70817
70818
|
}
|
|
70819
|
+
function vite_render_path(config4, base) {
|
|
70820
|
+
return path_exports.join(units_dir(config4, base), "render", "vite.js");
|
|
70821
|
+
}
|
|
70818
70822
|
function app_component_path(config4, base) {
|
|
70819
70823
|
return path_exports.join(units_dir(config4, base), "render", "App.jsx");
|
|
70820
70824
|
}
|
|
@@ -77208,6 +77212,7 @@ function logStyled(kind, stat3, logLevel, plugin2) {
|
|
|
77208
77212
|
var config3;
|
|
77209
77213
|
var viteConfig;
|
|
77210
77214
|
var viteEnv;
|
|
77215
|
+
var devServer = false;
|
|
77211
77216
|
function Plugin(opts = {}) {
|
|
77212
77217
|
return {
|
|
77213
77218
|
name: "houdini",
|
|
@@ -77261,7 +77266,7 @@ function Plugin(opts = {}) {
|
|
|
77261
77266
|
}
|
|
77262
77267
|
await plugin2.vite.closeBundle.call(this);
|
|
77263
77268
|
}
|
|
77264
|
-
if (!opts.adapter) {
|
|
77269
|
+
if (!opts.adapter || devServer) {
|
|
77265
77270
|
return;
|
|
77266
77271
|
}
|
|
77267
77272
|
console.log("\u{1F3A9} Generating Deployment Assets...");
|
|
@@ -77281,7 +77286,7 @@ function Plugin(opts = {}) {
|
|
|
77281
77286
|
publicBase: viteConfig.base,
|
|
77282
77287
|
outDir: config3.routerBuildDirectory,
|
|
77283
77288
|
manifest,
|
|
77284
|
-
adapterPath: "../$houdini/plugins/houdini-react/units/render/
|
|
77289
|
+
adapterPath: "../$houdini/plugins/houdini-react/units/render/server.js"
|
|
77285
77290
|
});
|
|
77286
77291
|
if (fs_exports.existsSync(path_exports.join(config3.projectRoot, "public"))) {
|
|
77287
77292
|
await fs_exports.recursiveCopy(
|
|
@@ -77327,6 +77332,7 @@ function Plugin(opts = {}) {
|
|
|
77327
77332
|
);
|
|
77328
77333
|
},
|
|
77329
77334
|
async configureServer(server) {
|
|
77335
|
+
devServer = true;
|
|
77330
77336
|
for (const plugin2 of config3.plugins) {
|
|
77331
77337
|
if (typeof plugin2.vite?.configureServer !== "function") {
|
|
77332
77338
|
continue;
|