houdini 1.2.22 → 1.2.23
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 +5 -5
- package/build/cmd-esm/index.js +5 -5
- package/build/lib/router/conventions.d.ts +1 -0
- package/build/lib/router/server.d.ts +3 -1
- package/build/lib/types.d.ts +1 -1
- package/build/lib-cjs/index.js +19 -6
- package/build/lib-esm/index.js +18 -6
- package/build/runtime/router/server.d.ts +11 -11
- package/build/runtime-cjs/router/match.js +1 -1
- package/build/runtime-cjs/router/server.d.ts +11 -11
- package/build/runtime-cjs/router/server.js +14 -18
- package/build/runtime-esm/router/match.js +1 -1
- package/build/runtime-esm/router/server.d.ts +11 -11
- package/build/runtime-esm/router/server.js +12 -11
- package/build/test-cjs/index.js +1 -1
- package/build/test-esm/index.js +1 -1
- package/build/vite-cjs/index.js +19 -13
- package/build/vite-esm/index.js +19 -13
- 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
|
@@ -67967,7 +67967,7 @@ var Config = class {
|
|
|
67967
67967
|
return join2(this.definitionsDirectory, "schema.graphql");
|
|
67968
67968
|
}
|
|
67969
67969
|
get routerBuildDirectory() {
|
|
67970
|
-
return join2(this.projectRoot, "dist");
|
|
67970
|
+
return join2(this.projectRoot, "dist", "assets");
|
|
67971
67971
|
}
|
|
67972
67972
|
get definitionsDocumentsPath() {
|
|
67973
67973
|
return join2(this.definitionsDirectory, "documents.gql");
|
|
@@ -69070,7 +69070,7 @@ var graphql5 = __toESM(require("graphql"), 1);
|
|
|
69070
69070
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
69071
69071
|
async function buildLocalSchema(config2) {
|
|
69072
69072
|
const { build } = await import("vite");
|
|
69073
|
-
process.env.
|
|
69073
|
+
process.env.HOUDINI_SECONDARY_BUILD = "true";
|
|
69074
69074
|
await build({
|
|
69075
69075
|
logLevel: "silent",
|
|
69076
69076
|
build: {
|
|
@@ -69092,7 +69092,7 @@ async function buildLocalSchema(config2) {
|
|
|
69092
69092
|
}
|
|
69093
69093
|
}
|
|
69094
69094
|
});
|
|
69095
|
-
process.env.
|
|
69095
|
+
process.env.HOUDINI_SECONDARY_BUILD = "false";
|
|
69096
69096
|
}
|
|
69097
69097
|
async function loadLocalSchema(config2) {
|
|
69098
69098
|
await buildLocalSchema(config2);
|
|
@@ -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"
|
|
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"
|
|
76185
76185
|
};
|
|
76186
76186
|
} else {
|
|
76187
76187
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -67972,7 +67972,7 @@ var Config = class {
|
|
|
67972
67972
|
return join2(this.definitionsDirectory, "schema.graphql");
|
|
67973
67973
|
}
|
|
67974
67974
|
get routerBuildDirectory() {
|
|
67975
|
-
return join2(this.projectRoot, "dist");
|
|
67975
|
+
return join2(this.projectRoot, "dist", "assets");
|
|
67976
67976
|
}
|
|
67977
67977
|
get definitionsDocumentsPath() {
|
|
67978
67978
|
return join2(this.definitionsDirectory, "documents.gql");
|
|
@@ -69075,7 +69075,7 @@ import * as graphql5 from "graphql";
|
|
|
69075
69075
|
import path2 from "node:path";
|
|
69076
69076
|
async function buildLocalSchema(config2) {
|
|
69077
69077
|
const { build } = await import("vite");
|
|
69078
|
-
process.env.
|
|
69078
|
+
process.env.HOUDINI_SECONDARY_BUILD = "true";
|
|
69079
69079
|
await build({
|
|
69080
69080
|
logLevel: "silent",
|
|
69081
69081
|
build: {
|
|
@@ -69097,7 +69097,7 @@ async function buildLocalSchema(config2) {
|
|
|
69097
69097
|
}
|
|
69098
69098
|
}
|
|
69099
69099
|
});
|
|
69100
|
-
process.env.
|
|
69100
|
+
process.env.HOUDINI_SECONDARY_BUILD = "false";
|
|
69101
69101
|
}
|
|
69102
69102
|
async function loadLocalSchema(config2) {
|
|
69103
69103
|
await buildLocalSchema(config2);
|
|
@@ -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"
|
|
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"
|
|
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
|
-
|
|
3
|
+
import { type ConfigFile } from '../types';
|
|
4
|
+
export declare function isSecondaryBuild(): boolean | "" | undefined;
|
|
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/types.d.ts
CHANGED
|
@@ -253,7 +253,7 @@ export type PluginHooks = {
|
|
|
253
253
|
houdiniConfig: Config;
|
|
254
254
|
}) => void;
|
|
255
255
|
buildEnd?: (this: PluginContext, error?: Error, houdiniConfig?: Config) => void | Promise<void>;
|
|
256
|
-
closeBundle?: (this: PluginContext) => void | Promise<void>;
|
|
256
|
+
closeBundle?: (this: PluginContext, config: Config) => void | Promise<void>;
|
|
257
257
|
configResolved?: ObjectHook<(this: void, config: ResolvedConfig) => void | Promise<void>>;
|
|
258
258
|
options?: (this: MinimalPluginContext, options: InputOptions & {
|
|
259
259
|
houdiniConfig: Config;
|
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,
|
|
@@ -67120,7 +67121,7 @@ var Config = class {
|
|
|
67120
67121
|
return join2(this.definitionsDirectory, "schema.graphql");
|
|
67121
67122
|
}
|
|
67122
67123
|
get routerBuildDirectory() {
|
|
67123
|
-
return join2(this.projectRoot, "dist");
|
|
67124
|
+
return join2(this.projectRoot, "dist", "assets");
|
|
67124
67125
|
}
|
|
67125
67126
|
get definitionsDocumentsPath() {
|
|
67126
67127
|
return join2(this.definitionsDirectory, "documents.gql");
|
|
@@ -68148,7 +68149,7 @@ function exec(match, params) {
|
|
|
68148
68149
|
const result = {};
|
|
68149
68150
|
const values = match.slice(1);
|
|
68150
68151
|
let buffered = "";
|
|
68151
|
-
for (let i2 = 0; i2 < params.length; i2 += 1) {
|
|
68152
|
+
for (let i2 = 0; i2 < (params || []).length; i2 += 1) {
|
|
68152
68153
|
const param = params[i2];
|
|
68153
68154
|
let value = values[i2];
|
|
68154
68155
|
if (param.chained && param.rest && buffered) {
|
|
@@ -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
|
}
|
|
@@ -68701,11 +68706,18 @@ async function extractQueries(source) {
|
|
|
68701
68706
|
// src/lib/router/server.ts
|
|
68702
68707
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
68703
68708
|
function isSecondaryBuild() {
|
|
68704
|
-
return process.env.
|
|
68709
|
+
return process.env.HOUDINI_SECONDARY_BUILD && process.env.HOUDINI_SECONDARY_BUILD !== "false";
|
|
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;
|
|
68705
68717
|
}
|
|
68706
68718
|
async function buildLocalSchema(config2) {
|
|
68707
68719
|
const { build } = await import("vite");
|
|
68708
|
-
process.env.
|
|
68720
|
+
process.env.HOUDINI_SECONDARY_BUILD = "true";
|
|
68709
68721
|
await build({
|
|
68710
68722
|
logLevel: "silent",
|
|
68711
68723
|
build: {
|
|
@@ -68727,7 +68739,7 @@ async function buildLocalSchema(config2) {
|
|
|
68727
68739
|
}
|
|
68728
68740
|
}
|
|
68729
68741
|
});
|
|
68730
|
-
process.env.
|
|
68742
|
+
process.env.HOUDINI_SECONDARY_BUILD = "false";
|
|
68731
68743
|
}
|
|
68732
68744
|
async function loadLocalSchema(config2) {
|
|
68733
68745
|
await buildLocalSchema(config2);
|
|
@@ -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
|
@@ -67043,7 +67043,7 @@ var Config = class {
|
|
|
67043
67043
|
return join2(this.definitionsDirectory, "schema.graphql");
|
|
67044
67044
|
}
|
|
67045
67045
|
get routerBuildDirectory() {
|
|
67046
|
-
return join2(this.projectRoot, "dist");
|
|
67046
|
+
return join2(this.projectRoot, "dist", "assets");
|
|
67047
67047
|
}
|
|
67048
67048
|
get definitionsDocumentsPath() {
|
|
67049
67049
|
return join2(this.definitionsDirectory, "documents.gql");
|
|
@@ -68071,7 +68071,7 @@ function exec(match, params) {
|
|
|
68071
68071
|
const result = {};
|
|
68072
68072
|
const values = match.slice(1);
|
|
68073
68073
|
let buffered = "";
|
|
68074
|
-
for (let i2 = 0; i2 < params.length; i2 += 1) {
|
|
68074
|
+
for (let i2 = 0; i2 < (params || []).length; i2 += 1) {
|
|
68075
68075
|
const param = params[i2];
|
|
68076
68076
|
let value = values[i2];
|
|
68077
68077
|
if (param.chained && param.rest && buffered) {
|
|
@@ -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
|
}
|
|
@@ -68624,11 +68628,18 @@ async function extractQueries(source) {
|
|
|
68624
68628
|
// src/lib/router/server.ts
|
|
68625
68629
|
import path2 from "node:path";
|
|
68626
68630
|
function isSecondaryBuild() {
|
|
68627
|
-
return process.env.
|
|
68631
|
+
return process.env.HOUDINI_SECONDARY_BUILD && process.env.HOUDINI_SECONDARY_BUILD !== "false";
|
|
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;
|
|
68628
68639
|
}
|
|
68629
68640
|
async function buildLocalSchema(config2) {
|
|
68630
68641
|
const { build } = await import("vite");
|
|
68631
|
-
process.env.
|
|
68642
|
+
process.env.HOUDINI_SECONDARY_BUILD = "true";
|
|
68632
68643
|
await build({
|
|
68633
68644
|
logLevel: "silent",
|
|
68634
68645
|
build: {
|
|
@@ -68650,7 +68661,7 @@ async function buildLocalSchema(config2) {
|
|
|
68650
68661
|
}
|
|
68651
68662
|
}
|
|
68652
68663
|
});
|
|
68653
|
-
process.env.
|
|
68664
|
+
process.env.HOUDINI_SECONDARY_BUILD = "false";
|
|
68654
68665
|
}
|
|
68655
68666
|
async function loadLocalSchema(config2) {
|
|
68656
68667
|
await buildLocalSchema(config2);
|
|
@@ -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
17
|
manifest: RouterManifest<unknown>;
|
|
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;
|
|
@@ -119,7 +119,7 @@ function exec(match, params) {
|
|
|
119
119
|
const result = {};
|
|
120
120
|
const values = match.slice(1);
|
|
121
121
|
let buffered = "";
|
|
122
|
-
for (let i = 0; i < params.length; i += 1) {
|
|
122
|
+
for (let i = 0; i < (params || []).length; i += 1) {
|
|
123
123
|
const param = params[i];
|
|
124
124
|
let value = values[i];
|
|
125
125
|
if (param.chained && param.rest && buffered) {
|
|
@@ -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
17
|
manifest: RouterManifest<unknown>;
|
|
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
|
});
|
|
@@ -93,7 +93,7 @@ function exec(match, params) {
|
|
|
93
93
|
const result = {};
|
|
94
94
|
const values = match.slice(1);
|
|
95
95
|
let buffered = "";
|
|
96
|
-
for (let i = 0; i < params.length; i += 1) {
|
|
96
|
+
for (let i = 0; i < (params || []).length; i += 1) {
|
|
97
97
|
const param = params[i];
|
|
98
98
|
let value = values[i];
|
|
99
99
|
if (param.chained && param.rest && buffered) {
|
|
@@ -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
17
|
manifest: RouterManifest<unknown>;
|
|
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/test-cjs/index.js
CHANGED
|
@@ -57351,7 +57351,7 @@ var Config = class {
|
|
|
57351
57351
|
return join(this.definitionsDirectory, "schema.graphql");
|
|
57352
57352
|
}
|
|
57353
57353
|
get routerBuildDirectory() {
|
|
57354
|
-
return join(this.projectRoot, "dist");
|
|
57354
|
+
return join(this.projectRoot, "dist", "assets");
|
|
57355
57355
|
}
|
|
57356
57356
|
get definitionsDocumentsPath() {
|
|
57357
57357
|
return join(this.definitionsDirectory, "documents.gql");
|
package/build/test-esm/index.js
CHANGED
|
@@ -57347,7 +57347,7 @@ var Config = class {
|
|
|
57347
57347
|
return join(this.definitionsDirectory, "schema.graphql");
|
|
57348
57348
|
}
|
|
57349
57349
|
get routerBuildDirectory() {
|
|
57350
|
-
return join(this.projectRoot, "dist");
|
|
57350
|
+
return join(this.projectRoot, "dist", "assets");
|
|
57351
57351
|
}
|
|
57352
57352
|
get definitionsDocumentsPath() {
|
|
57353
57353
|
return join(this.definitionsDirectory, "documents.gql");
|
package/build/vite-cjs/index.js
CHANGED
|
@@ -69747,7 +69747,7 @@ var Config = class {
|
|
|
69747
69747
|
return join2(this.definitionsDirectory, "schema.graphql");
|
|
69748
69748
|
}
|
|
69749
69749
|
get routerBuildDirectory() {
|
|
69750
|
-
return join2(this.projectRoot, "dist");
|
|
69750
|
+
return join2(this.projectRoot, "dist", "assets");
|
|
69751
69751
|
}
|
|
69752
69752
|
get definitionsDocumentsPath() {
|
|
69753
69753
|
return join2(this.definitionsDirectory, "documents.gql");
|
|
@@ -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
|
}
|
|
@@ -71134,11 +71138,11 @@ async function extractQueries(source) {
|
|
|
71134
71138
|
// src/lib/router/server.ts
|
|
71135
71139
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
71136
71140
|
function isSecondaryBuild() {
|
|
71137
|
-
return process.env.
|
|
71141
|
+
return process.env.HOUDINI_SECONDARY_BUILD && process.env.HOUDINI_SECONDARY_BUILD !== "false";
|
|
71138
71142
|
}
|
|
71139
71143
|
async function buildLocalSchema(config4) {
|
|
71140
71144
|
const { build } = await import("vite");
|
|
71141
|
-
process.env.
|
|
71145
|
+
process.env.HOUDINI_SECONDARY_BUILD = "true";
|
|
71142
71146
|
await build({
|
|
71143
71147
|
logLevel: "silent",
|
|
71144
71148
|
build: {
|
|
@@ -71160,7 +71164,7 @@ async function buildLocalSchema(config4) {
|
|
|
71160
71164
|
}
|
|
71161
71165
|
}
|
|
71162
71166
|
});
|
|
71163
|
-
process.env.
|
|
71167
|
+
process.env.HOUDINI_SECONDARY_BUILD = "false";
|
|
71164
71168
|
}
|
|
71165
71169
|
async function loadLocalSchema(config4) {
|
|
71166
71170
|
await buildLocalSchema(config4);
|
|
@@ -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",
|
|
@@ -77257,14 +77262,14 @@ function Plugin(opts = {}) {
|
|
|
77257
77262
|
}
|
|
77258
77263
|
},
|
|
77259
77264
|
async closeBundle() {
|
|
77260
|
-
if (isSecondaryBuild() || viteEnv.mode !== "production") {
|
|
77261
|
-
return;
|
|
77262
|
-
}
|
|
77263
77265
|
for (const plugin2 of config3.plugins) {
|
|
77264
77266
|
if (typeof plugin2.vite?.closeBundle !== "function") {
|
|
77265
77267
|
continue;
|
|
77266
77268
|
}
|
|
77267
|
-
await plugin2.vite.closeBundle.call(this);
|
|
77269
|
+
await plugin2.vite.closeBundle.call(this, config3);
|
|
77270
|
+
}
|
|
77271
|
+
if (isSecondaryBuild() || viteEnv.mode !== "production" || devServer) {
|
|
77272
|
+
return;
|
|
77268
77273
|
}
|
|
77269
77274
|
if (!opts.adapter) {
|
|
77270
77275
|
return;
|
|
@@ -77286,7 +77291,7 @@ function Plugin(opts = {}) {
|
|
|
77286
77291
|
publicBase: viteConfig.base,
|
|
77287
77292
|
outDir: config3.routerBuildDirectory,
|
|
77288
77293
|
manifest,
|
|
77289
|
-
adapterPath: "
|
|
77294
|
+
adapterPath: "./assets/ssr/entries/adapter"
|
|
77290
77295
|
});
|
|
77291
77296
|
if (fs_exports.existsSync(path_exports.join(config3.projectRoot, "public"))) {
|
|
77292
77297
|
await fs_exports.recursiveCopy(
|
|
@@ -77305,8 +77310,8 @@ function Plugin(opts = {}) {
|
|
|
77305
77310
|
houdiniConfig: config3
|
|
77306
77311
|
});
|
|
77307
77312
|
}
|
|
77308
|
-
if (
|
|
77309
|
-
if (config3.localSchema) {
|
|
77313
|
+
if (!devServer && !isSecondaryBuild()) {
|
|
77314
|
+
if (config3.localSchema && !config3.schema) {
|
|
77310
77315
|
config3.schema = await loadLocalSchema(config3);
|
|
77311
77316
|
}
|
|
77312
77317
|
try {
|
|
@@ -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;
|
|
@@ -77341,7 +77347,7 @@ function Plugin(opts = {}) {
|
|
|
77341
77347
|
houdiniConfig: config3
|
|
77342
77348
|
});
|
|
77343
77349
|
}
|
|
77344
|
-
if (config3.localSchema) {
|
|
77350
|
+
if (config3.localSchema && !config3.schema) {
|
|
77345
77351
|
config3.schema = await loadLocalSchema(config3);
|
|
77346
77352
|
}
|
|
77347
77353
|
process.env.HOUDINI_PORT = String(server.config.server.port ?? 5173);
|
package/build/vite-esm/index.js
CHANGED
|
@@ -69742,7 +69742,7 @@ var Config = class {
|
|
|
69742
69742
|
return join2(this.definitionsDirectory, "schema.graphql");
|
|
69743
69743
|
}
|
|
69744
69744
|
get routerBuildDirectory() {
|
|
69745
|
-
return join2(this.projectRoot, "dist");
|
|
69745
|
+
return join2(this.projectRoot, "dist", "assets");
|
|
69746
69746
|
}
|
|
69747
69747
|
get definitionsDocumentsPath() {
|
|
69748
69748
|
return join2(this.definitionsDirectory, "documents.gql");
|
|
@@ -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
|
}
|
|
@@ -71129,11 +71133,11 @@ async function extractQueries(source) {
|
|
|
71129
71133
|
// src/lib/router/server.ts
|
|
71130
71134
|
import path2 from "node:path";
|
|
71131
71135
|
function isSecondaryBuild() {
|
|
71132
|
-
return process.env.
|
|
71136
|
+
return process.env.HOUDINI_SECONDARY_BUILD && process.env.HOUDINI_SECONDARY_BUILD !== "false";
|
|
71133
71137
|
}
|
|
71134
71138
|
async function buildLocalSchema(config4) {
|
|
71135
71139
|
const { build } = await import("vite");
|
|
71136
|
-
process.env.
|
|
71140
|
+
process.env.HOUDINI_SECONDARY_BUILD = "true";
|
|
71137
71141
|
await build({
|
|
71138
71142
|
logLevel: "silent",
|
|
71139
71143
|
build: {
|
|
@@ -71155,7 +71159,7 @@ async function buildLocalSchema(config4) {
|
|
|
71155
71159
|
}
|
|
71156
71160
|
}
|
|
71157
71161
|
});
|
|
71158
|
-
process.env.
|
|
71162
|
+
process.env.HOUDINI_SECONDARY_BUILD = "false";
|
|
71159
71163
|
}
|
|
71160
71164
|
async function loadLocalSchema(config4) {
|
|
71161
71165
|
await buildLocalSchema(config4);
|
|
@@ -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",
|
|
@@ -77252,14 +77257,14 @@ function Plugin(opts = {}) {
|
|
|
77252
77257
|
}
|
|
77253
77258
|
},
|
|
77254
77259
|
async closeBundle() {
|
|
77255
|
-
if (isSecondaryBuild() || viteEnv.mode !== "production") {
|
|
77256
|
-
return;
|
|
77257
|
-
}
|
|
77258
77260
|
for (const plugin2 of config3.plugins) {
|
|
77259
77261
|
if (typeof plugin2.vite?.closeBundle !== "function") {
|
|
77260
77262
|
continue;
|
|
77261
77263
|
}
|
|
77262
|
-
await plugin2.vite.closeBundle.call(this);
|
|
77264
|
+
await plugin2.vite.closeBundle.call(this, config3);
|
|
77265
|
+
}
|
|
77266
|
+
if (isSecondaryBuild() || viteEnv.mode !== "production" || devServer) {
|
|
77267
|
+
return;
|
|
77263
77268
|
}
|
|
77264
77269
|
if (!opts.adapter) {
|
|
77265
77270
|
return;
|
|
@@ -77281,7 +77286,7 @@ function Plugin(opts = {}) {
|
|
|
77281
77286
|
publicBase: viteConfig.base,
|
|
77282
77287
|
outDir: config3.routerBuildDirectory,
|
|
77283
77288
|
manifest,
|
|
77284
|
-
adapterPath: "
|
|
77289
|
+
adapterPath: "./assets/ssr/entries/adapter"
|
|
77285
77290
|
});
|
|
77286
77291
|
if (fs_exports.existsSync(path_exports.join(config3.projectRoot, "public"))) {
|
|
77287
77292
|
await fs_exports.recursiveCopy(
|
|
@@ -77300,8 +77305,8 @@ function Plugin(opts = {}) {
|
|
|
77300
77305
|
houdiniConfig: config3
|
|
77301
77306
|
});
|
|
77302
77307
|
}
|
|
77303
|
-
if (
|
|
77304
|
-
if (config3.localSchema) {
|
|
77308
|
+
if (!devServer && !isSecondaryBuild()) {
|
|
77309
|
+
if (config3.localSchema && !config3.schema) {
|
|
77305
77310
|
config3.schema = await loadLocalSchema(config3);
|
|
77306
77311
|
}
|
|
77307
77312
|
try {
|
|
@@ -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;
|
|
@@ -77336,7 +77342,7 @@ function Plugin(opts = {}) {
|
|
|
77336
77342
|
houdiniConfig: config3
|
|
77337
77343
|
});
|
|
77338
77344
|
}
|
|
77339
|
-
if (config3.localSchema) {
|
|
77345
|
+
if (config3.localSchema && !config3.schema) {
|
|
77340
77346
|
config3.schema = await loadLocalSchema(config3);
|
|
77341
77347
|
}
|
|
77342
77348
|
process.env.HOUDINI_PORT = String(server.config.server.port ?? 5173);
|