houdini 1.2.50 → 1.2.52

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.
@@ -65090,6 +65090,137 @@ function plugin(name, hooks) {
65090
65090
  return data;
65091
65091
  }
65092
65092
 
65093
+ // src/lib/router/conventions.ts
65094
+ var conventions_exports = {};
65095
+ __export(conventions_exports, {
65096
+ adapter_config_path: () => adapter_config_path,
65097
+ app_component_path: () => app_component_path,
65098
+ componentField_unit_path: () => componentField_unit_path,
65099
+ fallback_unit_path: () => fallback_unit_path,
65100
+ is_layout: () => is_layout,
65101
+ layout_unit_path: () => layout_unit_path,
65102
+ page_entries_dir: () => page_entries_dir,
65103
+ page_entry_path: () => page_entry_path,
65104
+ page_id: () => page_id,
65105
+ page_unit_path: () => page_unit_path,
65106
+ read_layoutQuery: () => read_layoutQuery,
65107
+ read_layoutView: () => read_layoutView,
65108
+ read_pageQuery: () => read_pageQuery,
65109
+ read_pageView: () => read_pageView,
65110
+ router_index_path: () => router_index_path,
65111
+ router_path: () => router_path,
65112
+ serialized_manifest_path: () => serialized_manifest_path,
65113
+ server_adapter_path: () => server_adapter_path,
65114
+ temp_dir: () => temp_dir,
65115
+ units_dir: () => units_dir,
65116
+ vite_render_path: () => vite_render_path
65117
+ });
65118
+ function router_path(config) {
65119
+ return path_exports.join(base_dir(config), "Router.jsx");
65120
+ }
65121
+ function page_entry_path(config, id, base) {
65122
+ return path_exports.join(page_entries_dir(config, base), `${id}.jsx`);
65123
+ }
65124
+ function server_adapter_path(config, base) {
65125
+ return path_exports.join(units_dir(config, base), "render", "server.js");
65126
+ }
65127
+ function adapter_config_path(config, base) {
65128
+ return path_exports.join(units_dir(config, base), "render", "config.js");
65129
+ }
65130
+ function vite_render_path(config, base) {
65131
+ return path_exports.join(units_dir(config, base), "render", "vite.js");
65132
+ }
65133
+ function app_component_path(config, base) {
65134
+ return path_exports.join(units_dir(config, base), "render", "App.jsx");
65135
+ }
65136
+ function page_unit_path(config, id, base) {
65137
+ return path_exports.join(page_units_dir(config, base), `${id}.jsx`);
65138
+ }
65139
+ function layout_unit_path(config, id, base) {
65140
+ return path_exports.join(layout_units_dir(config, base), `${id}.jsx`);
65141
+ }
65142
+ function componentField_unit_path(config, id, base) {
65143
+ return path_exports.join(units_dir(config, base), "componentFields", `wrapper_${id}.jsx`);
65144
+ }
65145
+ function fallback_unit_path(config, which, id, base) {
65146
+ return path_exports.join(fallbacks_units_dir(config, which, base), `${id}.jsx`);
65147
+ }
65148
+ async function read_pageQuery(base) {
65149
+ const target = path_exports.join(base, "+page.gql");
65150
+ return [target, await fs_exports.readFile(target)];
65151
+ }
65152
+ async function read_pageView(base) {
65153
+ for (const name of ["+page.tsx", "+page.jsx"]) {
65154
+ let target = path_exports.join(base, name);
65155
+ let result = await fs_exports.readFile(target);
65156
+ if (result) {
65157
+ return [target, result];
65158
+ }
65159
+ }
65160
+ return [null, null];
65161
+ }
65162
+ async function read_layoutQuery(base) {
65163
+ const target = path_exports.join(base, "+layout.gql");
65164
+ return [target, await fs_exports.readFile(target)];
65165
+ }
65166
+ async function read_layoutView(base) {
65167
+ for (const name of ["+layout.tsx", "+layout.jsx"]) {
65168
+ let target = path_exports.join(base, name);
65169
+ let result = await fs_exports.readFile(target);
65170
+ if (result) {
65171
+ return [target, result];
65172
+ }
65173
+ }
65174
+ return [null, null];
65175
+ }
65176
+ function temp_dir(config, key) {
65177
+ return path_exports.join(config.rootDir, "temp", key);
65178
+ }
65179
+ function router_index_path(config) {
65180
+ return path_exports.join(config.routesDir, "..", "+index.jsx");
65181
+ }
65182
+ function is_layout(path3) {
65183
+ return path3.endsWith("+layout.tsx") || path3.endsWith("+layout.jsx");
65184
+ }
65185
+ function page_id(path3) {
65186
+ if (path3.endsWith("/") && path3.length > 1) {
65187
+ path3 = path3.substring(0, path3.length - 1);
65188
+ }
65189
+ const special_chars = ["/", "]", "[", "(", ")", "-"];
65190
+ const mask = "_";
65191
+ let copy = "";
65192
+ for (const char of path3) {
65193
+ const match = special_chars.indexOf(char);
65194
+ if (match !== -1) {
65195
+ copy += mask;
65196
+ } else {
65197
+ copy += char;
65198
+ }
65199
+ }
65200
+ return copy;
65201
+ }
65202
+ function page_entries_dir(config, base) {
65203
+ return path_exports.join(units_dir(config, base), "entries");
65204
+ }
65205
+ function page_units_dir(config, base) {
65206
+ return path_exports.join(units_dir(config, base), "pages");
65207
+ }
65208
+ function layout_units_dir(config, base) {
65209
+ return path_exports.join(units_dir(config, base), "layouts");
65210
+ }
65211
+ function fallbacks_units_dir(config, which, base) {
65212
+ return path_exports.join(units_dir(config, base), "fallbacks", which);
65213
+ }
65214
+ function units_dir(config, base = base_dir(config)) {
65215
+ return path_exports.join(base, "units");
65216
+ }
65217
+ function base_dir(config) {
65218
+ return config.pluginDirectory("houdini-react");
65219
+ }
65220
+ function serialized_manifest_path(config, base = base_dir(config)) {
65221
+ return path_exports.join(base, "manifest.json");
65222
+ }
65223
+
65093
65224
  // src/lib/router/manifest.ts
65094
65225
  var t2 = __toESM(require_lib5(), 1);
65095
65226
  var graphql2 = __toESM(require("graphql"), 1);
@@ -67321,7 +67452,7 @@ function isSecondaryBuild() {
67321
67452
  async function buildLocalSchema(config) {
67322
67453
  const { build } = await import("vite");
67323
67454
  const schema = import_node_path2.default.join(config.localApiDir, "+schema");
67324
- const outDir = import_node_path2.default.join(config.rootDir, "temp");
67455
+ const outDir = conventions_exports.temp_dir(config, "schema");
67325
67456
  process.env.HOUDINI_SECONDARY_BUILD = "true";
67326
67457
  try {
67327
67458
  await fs_exports.remove(import_node_path2.default.join(outDir, "assets", "schema.js"));
@@ -67340,7 +67471,7 @@ async function buildLocalSchema(config) {
67340
67471
  schema
67341
67472
  },
67342
67473
  output: {
67343
- entryFileNames: "assets/[name].js"
67474
+ entryFileNames: "[name].js"
67344
67475
  }
67345
67476
  },
67346
67477
  ssr: true,
@@ -67358,7 +67489,10 @@ async function loadLocalSchema(config) {
67358
67489
  if (!isSecondaryBuild()) {
67359
67490
  await buildLocalSchema(config);
67360
67491
  }
67361
- const { default: schema } = await import(import_node_path2.default.join(config.rootDir, "temp", "assets", `schema.js?${Date.now().valueOf()}}`));
67492
+ const { default: schema } = await import(import_node_path2.default.join(
67493
+ conventions_exports.temp_dir(config, "schema"),
67494
+ `schema.js?${Date.now().valueOf()}}`
67495
+ ));
67362
67496
  return schema;
67363
67497
  }
67364
67498
 
@@ -67396,6 +67530,7 @@ var Config = class {
67396
67530
  schemaPollHeaders;
67397
67531
  pluginMode = false;
67398
67532
  plugins = [];
67533
+ adapter;
67399
67534
  componentFields = {};
67400
67535
  constructor({
67401
67536
  filepath,
@@ -71723,6 +71858,7 @@ function artifactGenerator(stats) {
71723
71858
  return;
71724
71859
  }
71725
71860
  const usedVariableNames = /* @__PURE__ */ new Set();
71861
+ const unusedVariables = /* @__PURE__ */ new Set();
71726
71862
  let documentWithoutInternalDirectives = graphql17.visit(document, {
71727
71863
  Directive(node) {
71728
71864
  if (config.isInternalDirective(node.name.value)) {
@@ -71742,6 +71878,7 @@ function artifactGenerator(stats) {
71742
71878
  VariableDefinition(variableDefinitionNode) {
71743
71879
  const name2 = variableDefinitionNode.variable.name.value;
71744
71880
  if (!usedVariableNames.has(name2)) {
71881
+ unusedVariables.add(name2);
71745
71882
  return null;
71746
71883
  }
71747
71884
  }
@@ -71830,6 +71967,7 @@ function artifactGenerator(stats) {
71830
71967
  refetch: doc.refetch,
71831
71968
  raw: rawString,
71832
71969
  rootType,
71970
+ stripVariables: [...unusedVariables],
71833
71971
  selection: selection_default({
71834
71972
  config,
71835
71973
  filepath: doc.filename,
@@ -78192,12 +78330,12 @@ async function packageJSON(targetPath, frameworkInfo) {
78192
78330
  }
78193
78331
  packageJSON2.devDependencies = {
78194
78332
  ...packageJSON2.devDependencies,
78195
- houdini: "^1.2.50"
78333
+ houdini: "^1.2.52"
78196
78334
  };
78197
78335
  if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
78198
78336
  packageJSON2.devDependencies = {
78199
78337
  ...packageJSON2.devDependencies,
78200
- "houdini-svelte": "^1.2.50"
78338
+ "houdini-svelte": "^1.2.52"
78201
78339
  };
78202
78340
  } else {
78203
78341
  throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
@@ -65096,6 +65096,137 @@ function plugin(name, hooks) {
65096
65096
  return data;
65097
65097
  }
65098
65098
 
65099
+ // src/lib/router/conventions.ts
65100
+ var conventions_exports = {};
65101
+ __export(conventions_exports, {
65102
+ adapter_config_path: () => adapter_config_path,
65103
+ app_component_path: () => app_component_path,
65104
+ componentField_unit_path: () => componentField_unit_path,
65105
+ fallback_unit_path: () => fallback_unit_path,
65106
+ is_layout: () => is_layout,
65107
+ layout_unit_path: () => layout_unit_path,
65108
+ page_entries_dir: () => page_entries_dir,
65109
+ page_entry_path: () => page_entry_path,
65110
+ page_id: () => page_id,
65111
+ page_unit_path: () => page_unit_path,
65112
+ read_layoutQuery: () => read_layoutQuery,
65113
+ read_layoutView: () => read_layoutView,
65114
+ read_pageQuery: () => read_pageQuery,
65115
+ read_pageView: () => read_pageView,
65116
+ router_index_path: () => router_index_path,
65117
+ router_path: () => router_path,
65118
+ serialized_manifest_path: () => serialized_manifest_path,
65119
+ server_adapter_path: () => server_adapter_path,
65120
+ temp_dir: () => temp_dir,
65121
+ units_dir: () => units_dir,
65122
+ vite_render_path: () => vite_render_path
65123
+ });
65124
+ function router_path(config) {
65125
+ return path_exports.join(base_dir(config), "Router.jsx");
65126
+ }
65127
+ function page_entry_path(config, id, base) {
65128
+ return path_exports.join(page_entries_dir(config, base), `${id}.jsx`);
65129
+ }
65130
+ function server_adapter_path(config, base) {
65131
+ return path_exports.join(units_dir(config, base), "render", "server.js");
65132
+ }
65133
+ function adapter_config_path(config, base) {
65134
+ return path_exports.join(units_dir(config, base), "render", "config.js");
65135
+ }
65136
+ function vite_render_path(config, base) {
65137
+ return path_exports.join(units_dir(config, base), "render", "vite.js");
65138
+ }
65139
+ function app_component_path(config, base) {
65140
+ return path_exports.join(units_dir(config, base), "render", "App.jsx");
65141
+ }
65142
+ function page_unit_path(config, id, base) {
65143
+ return path_exports.join(page_units_dir(config, base), `${id}.jsx`);
65144
+ }
65145
+ function layout_unit_path(config, id, base) {
65146
+ return path_exports.join(layout_units_dir(config, base), `${id}.jsx`);
65147
+ }
65148
+ function componentField_unit_path(config, id, base) {
65149
+ return path_exports.join(units_dir(config, base), "componentFields", `wrapper_${id}.jsx`);
65150
+ }
65151
+ function fallback_unit_path(config, which, id, base) {
65152
+ return path_exports.join(fallbacks_units_dir(config, which, base), `${id}.jsx`);
65153
+ }
65154
+ async function read_pageQuery(base) {
65155
+ const target = path_exports.join(base, "+page.gql");
65156
+ return [target, await fs_exports.readFile(target)];
65157
+ }
65158
+ async function read_pageView(base) {
65159
+ for (const name of ["+page.tsx", "+page.jsx"]) {
65160
+ let target = path_exports.join(base, name);
65161
+ let result = await fs_exports.readFile(target);
65162
+ if (result) {
65163
+ return [target, result];
65164
+ }
65165
+ }
65166
+ return [null, null];
65167
+ }
65168
+ async function read_layoutQuery(base) {
65169
+ const target = path_exports.join(base, "+layout.gql");
65170
+ return [target, await fs_exports.readFile(target)];
65171
+ }
65172
+ async function read_layoutView(base) {
65173
+ for (const name of ["+layout.tsx", "+layout.jsx"]) {
65174
+ let target = path_exports.join(base, name);
65175
+ let result = await fs_exports.readFile(target);
65176
+ if (result) {
65177
+ return [target, result];
65178
+ }
65179
+ }
65180
+ return [null, null];
65181
+ }
65182
+ function temp_dir(config, key) {
65183
+ return path_exports.join(config.rootDir, "temp", key);
65184
+ }
65185
+ function router_index_path(config) {
65186
+ return path_exports.join(config.routesDir, "..", "+index.jsx");
65187
+ }
65188
+ function is_layout(path3) {
65189
+ return path3.endsWith("+layout.tsx") || path3.endsWith("+layout.jsx");
65190
+ }
65191
+ function page_id(path3) {
65192
+ if (path3.endsWith("/") && path3.length > 1) {
65193
+ path3 = path3.substring(0, path3.length - 1);
65194
+ }
65195
+ const special_chars = ["/", "]", "[", "(", ")", "-"];
65196
+ const mask = "_";
65197
+ let copy = "";
65198
+ for (const char of path3) {
65199
+ const match = special_chars.indexOf(char);
65200
+ if (match !== -1) {
65201
+ copy += mask;
65202
+ } else {
65203
+ copy += char;
65204
+ }
65205
+ }
65206
+ return copy;
65207
+ }
65208
+ function page_entries_dir(config, base) {
65209
+ return path_exports.join(units_dir(config, base), "entries");
65210
+ }
65211
+ function page_units_dir(config, base) {
65212
+ return path_exports.join(units_dir(config, base), "pages");
65213
+ }
65214
+ function layout_units_dir(config, base) {
65215
+ return path_exports.join(units_dir(config, base), "layouts");
65216
+ }
65217
+ function fallbacks_units_dir(config, which, base) {
65218
+ return path_exports.join(units_dir(config, base), "fallbacks", which);
65219
+ }
65220
+ function units_dir(config, base = base_dir(config)) {
65221
+ return path_exports.join(base, "units");
65222
+ }
65223
+ function base_dir(config) {
65224
+ return config.pluginDirectory("houdini-react");
65225
+ }
65226
+ function serialized_manifest_path(config, base = base_dir(config)) {
65227
+ return path_exports.join(base, "manifest.json");
65228
+ }
65229
+
65099
65230
  // src/lib/router/manifest.ts
65100
65231
  var t2 = __toESM(require_lib5(), 1);
65101
65232
  import * as graphql2 from "graphql";
@@ -67327,7 +67458,7 @@ function isSecondaryBuild() {
67327
67458
  async function buildLocalSchema(config) {
67328
67459
  const { build } = await import("vite");
67329
67460
  const schema = path2.join(config.localApiDir, "+schema");
67330
- const outDir = path2.join(config.rootDir, "temp");
67461
+ const outDir = conventions_exports.temp_dir(config, "schema");
67331
67462
  process.env.HOUDINI_SECONDARY_BUILD = "true";
67332
67463
  try {
67333
67464
  await fs_exports.remove(path2.join(outDir, "assets", "schema.js"));
@@ -67346,7 +67477,7 @@ async function buildLocalSchema(config) {
67346
67477
  schema
67347
67478
  },
67348
67479
  output: {
67349
- entryFileNames: "assets/[name].js"
67480
+ entryFileNames: "[name].js"
67350
67481
  }
67351
67482
  },
67352
67483
  ssr: true,
@@ -67364,7 +67495,10 @@ async function loadLocalSchema(config) {
67364
67495
  if (!isSecondaryBuild()) {
67365
67496
  await buildLocalSchema(config);
67366
67497
  }
67367
- const { default: schema } = await import(path2.join(config.rootDir, "temp", "assets", `schema.js?${Date.now().valueOf()}}`));
67498
+ const { default: schema } = await import(path2.join(
67499
+ conventions_exports.temp_dir(config, "schema"),
67500
+ `schema.js?${Date.now().valueOf()}}`
67501
+ ));
67368
67502
  return schema;
67369
67503
  }
67370
67504
 
@@ -67401,6 +67535,7 @@ var Config = class {
67401
67535
  schemaPollHeaders;
67402
67536
  pluginMode = false;
67403
67537
  plugins = [];
67538
+ adapter;
67404
67539
  componentFields = {};
67405
67540
  constructor({
67406
67541
  filepath,
@@ -71728,6 +71863,7 @@ function artifactGenerator(stats) {
71728
71863
  return;
71729
71864
  }
71730
71865
  const usedVariableNames = /* @__PURE__ */ new Set();
71866
+ const unusedVariables = /* @__PURE__ */ new Set();
71731
71867
  let documentWithoutInternalDirectives = graphql17.visit(document, {
71732
71868
  Directive(node) {
71733
71869
  if (config.isInternalDirective(node.name.value)) {
@@ -71747,6 +71883,7 @@ function artifactGenerator(stats) {
71747
71883
  VariableDefinition(variableDefinitionNode) {
71748
71884
  const name2 = variableDefinitionNode.variable.name.value;
71749
71885
  if (!usedVariableNames.has(name2)) {
71886
+ unusedVariables.add(name2);
71750
71887
  return null;
71751
71888
  }
71752
71889
  }
@@ -71835,6 +71972,7 @@ function artifactGenerator(stats) {
71835
71972
  refetch: doc.refetch,
71836
71973
  raw: rawString,
71837
71974
  rootType,
71975
+ stripVariables: [...unusedVariables],
71838
71976
  selection: selection_default({
71839
71977
  config,
71840
71978
  filepath: doc.filename,
@@ -78197,12 +78335,12 @@ async function packageJSON(targetPath, frameworkInfo) {
78197
78335
  }
78198
78336
  packageJSON2.devDependencies = {
78199
78337
  ...packageJSON2.devDependencies,
78200
- houdini: "^1.2.50"
78338
+ houdini: "^1.2.52"
78201
78339
  };
78202
78340
  if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
78203
78341
  packageJSON2.devDependencies = {
78204
78342
  ...packageJSON2.devDependencies,
78205
- "houdini-svelte": "^1.2.50"
78343
+ "houdini-svelte": "^1.2.52"
78206
78344
  };
78207
78345
  } else {
78208
78346
  throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
@@ -60059,6 +60059,7 @@ function artifactGenerator(stats) {
60059
60059
  return;
60060
60060
  }
60061
60061
  const usedVariableNames = /* @__PURE__ */ new Set();
60062
+ const unusedVariables = /* @__PURE__ */ new Set();
60062
60063
  let documentWithoutInternalDirectives = graphql17.visit(document, {
60063
60064
  Directive(node) {
60064
60065
  if (config.isInternalDirective(node.name.value)) {
@@ -60078,6 +60079,7 @@ function artifactGenerator(stats) {
60078
60079
  VariableDefinition(variableDefinitionNode) {
60079
60080
  const name2 = variableDefinitionNode.variable.name.value;
60080
60081
  if (!usedVariableNames.has(name2)) {
60082
+ unusedVariables.add(name2);
60081
60083
  return null;
60082
60084
  }
60083
60085
  }
@@ -60166,6 +60168,7 @@ function artifactGenerator(stats) {
60166
60168
  refetch: doc.refetch,
60167
60169
  raw: rawString,
60168
60170
  rootType,
60171
+ stripVariables: [...unusedVariables],
60169
60172
  selection: selection_default({
60170
60173
  config,
60171
60174
  filepath: doc.filename,
@@ -60058,6 +60058,7 @@ function artifactGenerator(stats) {
60058
60058
  return;
60059
60059
  }
60060
60060
  const usedVariableNames = /* @__PURE__ */ new Set();
60061
+ const unusedVariables = /* @__PURE__ */ new Set();
60061
60062
  let documentWithoutInternalDirectives = graphql17.visit(document, {
60062
60063
  Directive(node) {
60063
60064
  if (config.isInternalDirective(node.name.value)) {
@@ -60077,6 +60078,7 @@ function artifactGenerator(stats) {
60077
60078
  VariableDefinition(variableDefinitionNode) {
60078
60079
  const name2 = variableDefinitionNode.variable.name.value;
60079
60080
  if (!usedVariableNames.has(name2)) {
60081
+ unusedVariables.add(name2);
60080
60082
  return null;
60081
60083
  }
60082
60084
  }
@@ -60165,6 +60167,7 @@ function artifactGenerator(stats) {
60165
60167
  refetch: doc.refetch,
60166
60168
  raw: rawString,
60167
60169
  rootType,
60170
+ stripVariables: [...unusedVariables],
60168
60171
  selection: selection_default({
60169
60172
  config,
60170
60173
  filepath: doc.filename,
@@ -1,5 +1,6 @@
1
1
  import * as graphql from 'graphql';
2
2
  import type { CachePolicies, ConfigFile, PaginateModes } from '../runtime/lib';
3
+ import { type Adapter } from './router';
3
4
  import type { LogLevels, PluginConfig, PluginHooks, ValueMap } from './types';
4
5
  export type PluginMeta = PluginHooks & {
5
6
  name: string;
@@ -37,6 +38,7 @@ export declare class Config {
37
38
  schemaPollHeaders: ((env: any) => Record<string, string>) | Record<string, string | ((env: any) => string)>;
38
39
  pluginMode: boolean;
39
40
  plugins: PluginMeta[];
41
+ adapter?: Adapter;
40
42
  componentFields: Record<string, Record<string, {
41
43
  fragment: string;
42
44
  directive: graphql.DirectiveNode;
@@ -19,6 +19,7 @@ export declare function read_pageView(base: string): Promise<string[] | null[]>;
19
19
  export declare function read_layoutQuery(base: string): Promise<(string | null)[]>;
20
20
  /** Load the layout view for the given route from disk */
21
21
  export declare function read_layoutView(base: string): Promise<string[] | null[]>;
22
+ export declare function temp_dir(config: Config, key: string): string;
22
23
  export declare function router_index_path(config: Config): string;
23
24
  export declare function is_layout(path: string): boolean;
24
25
  /** Transforms paths to ids */
@@ -1,6 +1,6 @@
1
1
  import type { ProjectManifest, routerConventions } from '.';
2
2
  import type { Config } from '../config';
3
- export type Adapter = (args: {
3
+ export type Adapter = ((args: {
4
4
  config: Config;
5
5
  conventions: typeof routerConventions;
6
6
  sourceDir: string;
@@ -8,4 +8,14 @@ export type Adapter = (args: {
8
8
  outDir: string;
9
9
  manifest: ProjectManifest;
10
10
  adapterPath: string;
11
- }) => void | Promise<void>;
11
+ }) => void | Promise<void>) & {
12
+ includePaths?: Record<string, string>;
13
+ disableServer?: boolean;
14
+ pre?: (args: {
15
+ config: Config;
16
+ conventions: typeof routerConventions;
17
+ sourceDir: string;
18
+ publicBase: string;
19
+ outDir: string;
20
+ }) => Promise<void> | void;
21
+ };
@@ -63501,6 +63501,7 @@ __export(conventions_exports, {
63501
63501
  router_path: () => router_path,
63502
63502
  serialized_manifest_path: () => serialized_manifest_path,
63503
63503
  server_adapter_path: () => server_adapter_path,
63504
+ temp_dir: () => temp_dir,
63504
63505
  units_dir: () => units_dir,
63505
63506
  vite_render_path: () => vite_render_path
63506
63507
  });
@@ -63562,6 +63563,9 @@ async function read_layoutView(base) {
63562
63563
  }
63563
63564
  return [null, null];
63564
63565
  }
63566
+ function temp_dir(config, key) {
63567
+ return path_exports.join(config.rootDir, "temp", key);
63568
+ }
63565
63569
  function router_index_path(config) {
63566
63570
  return path_exports.join(config.routesDir, "..", "+index.jsx");
63567
63571
  }
@@ -66643,6 +66647,11 @@ var defaultErrorFn = async (errors) => new Error(errors.map((error) => error.mes
66643
66647
  // src/runtime/client/plugins/fetchParams.ts
66644
66648
  var fetchParams = (fn = () => ({})) => () => ({
66645
66649
  start(ctx, { next, marshalVariables: marshalVariables2 }) {
66650
+ if (ctx.variables) {
66651
+ for (const variable of ctx.artifact.stripVariables) {
66652
+ delete ctx.variables[variable];
66653
+ }
66654
+ }
66646
66655
  next({
66647
66656
  ...ctx,
66648
66657
  fetchParams: fn({
@@ -67447,7 +67456,7 @@ function internalRoutes(config) {
67447
67456
  async function buildLocalSchema(config) {
67448
67457
  const { build } = await import("vite");
67449
67458
  const schema = import_node_path2.default.join(config.localApiDir, "+schema");
67450
- const outDir = import_node_path2.default.join(config.rootDir, "temp");
67459
+ const outDir = conventions_exports.temp_dir(config, "schema");
67451
67460
  process.env.HOUDINI_SECONDARY_BUILD = "true";
67452
67461
  try {
67453
67462
  await fs_exports.remove(import_node_path2.default.join(outDir, "assets", "schema.js"));
@@ -67466,7 +67475,7 @@ async function buildLocalSchema(config) {
67466
67475
  schema
67467
67476
  },
67468
67477
  output: {
67469
- entryFileNames: "assets/[name].js"
67478
+ entryFileNames: "[name].js"
67470
67479
  }
67471
67480
  },
67472
67481
  ssr: true,
@@ -67484,7 +67493,10 @@ async function loadLocalSchema(config) {
67484
67493
  if (!isSecondaryBuild()) {
67485
67494
  await buildLocalSchema(config);
67486
67495
  }
67487
- const { default: schema } = await import(import_node_path2.default.join(config.rootDir, "temp", "assets", `schema.js?${Date.now().valueOf()}}`));
67496
+ const { default: schema } = await import(import_node_path2.default.join(
67497
+ conventions_exports.temp_dir(config, "schema"),
67498
+ `schema.js?${Date.now().valueOf()}}`
67499
+ ));
67488
67500
  return schema;
67489
67501
  }
67490
67502
 
@@ -67784,6 +67796,7 @@ var Config = class {
67784
67796
  schemaPollHeaders;
67785
67797
  pluginMode = false;
67786
67798
  plugins = [];
67799
+ adapter;
67787
67800
  componentFields = {};
67788
67801
  constructor({
67789
67802
  filepath,
@@ -63417,6 +63417,7 @@ __export(conventions_exports, {
63417
63417
  router_path: () => router_path,
63418
63418
  serialized_manifest_path: () => serialized_manifest_path,
63419
63419
  server_adapter_path: () => server_adapter_path,
63420
+ temp_dir: () => temp_dir,
63420
63421
  units_dir: () => units_dir,
63421
63422
  vite_render_path: () => vite_render_path
63422
63423
  });
@@ -63478,6 +63479,9 @@ async function read_layoutView(base) {
63478
63479
  }
63479
63480
  return [null, null];
63480
63481
  }
63482
+ function temp_dir(config, key) {
63483
+ return path_exports.join(config.rootDir, "temp", key);
63484
+ }
63481
63485
  function router_index_path(config) {
63482
63486
  return path_exports.join(config.routesDir, "..", "+index.jsx");
63483
63487
  }
@@ -66559,6 +66563,11 @@ var defaultErrorFn = async (errors) => new Error(errors.map((error) => error.mes
66559
66563
  // src/runtime/client/plugins/fetchParams.ts
66560
66564
  var fetchParams = (fn = () => ({})) => () => ({
66561
66565
  start(ctx, { next, marshalVariables: marshalVariables2 }) {
66566
+ if (ctx.variables) {
66567
+ for (const variable of ctx.artifact.stripVariables) {
66568
+ delete ctx.variables[variable];
66569
+ }
66570
+ }
66562
66571
  next({
66563
66572
  ...ctx,
66564
66573
  fetchParams: fn({
@@ -67363,7 +67372,7 @@ function internalRoutes(config) {
67363
67372
  async function buildLocalSchema(config) {
67364
67373
  const { build } = await import("vite");
67365
67374
  const schema = path2.join(config.localApiDir, "+schema");
67366
- const outDir = path2.join(config.rootDir, "temp");
67375
+ const outDir = conventions_exports.temp_dir(config, "schema");
67367
67376
  process.env.HOUDINI_SECONDARY_BUILD = "true";
67368
67377
  try {
67369
67378
  await fs_exports.remove(path2.join(outDir, "assets", "schema.js"));
@@ -67382,7 +67391,7 @@ async function buildLocalSchema(config) {
67382
67391
  schema
67383
67392
  },
67384
67393
  output: {
67385
- entryFileNames: "assets/[name].js"
67394
+ entryFileNames: "[name].js"
67386
67395
  }
67387
67396
  },
67388
67397
  ssr: true,
@@ -67400,7 +67409,10 @@ async function loadLocalSchema(config) {
67400
67409
  if (!isSecondaryBuild()) {
67401
67410
  await buildLocalSchema(config);
67402
67411
  }
67403
- const { default: schema } = await import(path2.join(config.rootDir, "temp", "assets", `schema.js?${Date.now().valueOf()}}`));
67412
+ const { default: schema } = await import(path2.join(
67413
+ conventions_exports.temp_dir(config, "schema"),
67414
+ `schema.js?${Date.now().valueOf()}}`
67415
+ ));
67404
67416
  return schema;
67405
67417
  }
67406
67418
 
@@ -67699,6 +67711,7 @@ var Config = class {
67699
67711
  schemaPollHeaders;
67700
67712
  pluginMode = false;
67701
67713
  plugins = [];
67714
+ adapter;
67702
67715
  componentFields = {};
67703
67716
  constructor({
67704
67717
  filepath,
@@ -89,6 +89,7 @@ export type BaseCompiledDocument<_Kind extends ArtifactKinds> = {
89
89
  rootType: string;
90
90
  input?: InputObject;
91
91
  hasComponents?: boolean;
92
+ stripVariables: Array<string>;
92
93
  refetch?: {
93
94
  path: string[];
94
95
  method: 'cursor' | 'offset';
@@ -23,6 +23,11 @@ __export(fetchParams_exports, {
23
23
  module.exports = __toCommonJS(fetchParams_exports);
24
24
  const fetchParams = (fn = () => ({})) => () => ({
25
25
  start(ctx, { next, marshalVariables }) {
26
+ if (ctx.variables) {
27
+ for (const variable of ctx.artifact.stripVariables) {
28
+ delete ctx.variables[variable];
29
+ }
30
+ }
26
31
  next({
27
32
  ...ctx,
28
33
  fetchParams: fn({
@@ -39,6 +39,7 @@ function createStore(args = {}) {
39
39
  pipeline: args.pipeline ? (0, import__.createPluginHooks)(client.plugins) : void 0,
40
40
  client,
41
41
  artifact: args.artifact ?? {
42
+ stripVariables: [],
42
43
  kind: import_types.ArtifactKind.Query,
43
44
  hash: "7777",
44
45
  raw: "RAW_TEXT",
@@ -89,6 +89,7 @@ export type BaseCompiledDocument<_Kind extends ArtifactKinds> = {
89
89
  rootType: string;
90
90
  input?: InputObject;
91
91
  hasComponents?: boolean;
92
+ stripVariables: Array<string>;
92
93
  refetch?: {
93
94
  path: string[];
94
95
  method: 'cursor' | 'offset';
@@ -30,6 +30,7 @@ var import_cache2 = require("../cache");
30
30
  const testCache = () => new import_cache2.Cache(new import_cache.Cache((0, import_test.testConfigFile)()));
31
31
  const testFragment = (selection) => ({
32
32
  artifact: {
33
+ stripVariables: [],
33
34
  kind: import_lib.ArtifactKind.Fragment,
34
35
  hash: "",
35
36
  raw: "",
@@ -41,6 +42,7 @@ const testFragment = (selection) => ({
41
42
  });
42
43
  const testQuery = (selection) => ({
43
44
  artifact: {
45
+ stripVariables: [],
44
46
  kind: import_lib.ArtifactKind.Query,
45
47
  hash: "",
46
48
  raw: "",
@@ -1,5 +1,10 @@
1
1
  const fetchParams = (fn = () => ({})) => () => ({
2
2
  start(ctx, { next, marshalVariables }) {
3
+ if (ctx.variables) {
4
+ for (const variable of ctx.artifact.stripVariables) {
5
+ delete ctx.variables[variable];
6
+ }
7
+ }
3
8
  next({
4
9
  ...ctx,
5
10
  fetchParams: fn({
@@ -15,6 +15,7 @@ function createStore(args = {}) {
15
15
  pipeline: args.pipeline ? createPluginHooks(client.plugins) : void 0,
16
16
  client,
17
17
  artifact: args.artifact ?? {
18
+ stripVariables: [],
18
19
  kind: ArtifactKind.Query,
19
20
  hash: "7777",
20
21
  raw: "RAW_TEXT",
@@ -89,6 +89,7 @@ export type BaseCompiledDocument<_Kind extends ArtifactKinds> = {
89
89
  rootType: string;
90
90
  input?: InputObject;
91
91
  hasComponents?: boolean;
92
+ stripVariables: Array<string>;
92
93
  refetch?: {
93
94
  path: string[];
94
95
  method: 'cursor' | 'offset';
@@ -7,6 +7,7 @@ import { Cache } from "../cache";
7
7
  const testCache = () => new Cache(new _Cache(testConfigFile()));
8
8
  const testFragment = (selection) => ({
9
9
  artifact: {
10
+ stripVariables: [],
10
11
  kind: ArtifactKind.Fragment,
11
12
  hash: "",
12
13
  raw: "",
@@ -18,6 +19,7 @@ const testFragment = (selection) => ({
18
19
  });
19
20
  const testQuery = (selection) => ({
20
21
  artifact: {
22
+ stripVariables: [],
21
23
  kind: ArtifactKind.Query,
22
24
  hash: "",
23
25
  raw: "",
@@ -56710,6 +56710,7 @@ var Config = class {
56710
56710
  schemaPollHeaders;
56711
56711
  pluginMode = false;
56712
56712
  plugins = [];
56713
+ adapter;
56713
56714
  componentFields = {};
56714
56715
  constructor({
56715
56716
  filepath,
@@ -60424,6 +60425,7 @@ function artifactGenerator(stats) {
60424
60425
  return;
60425
60426
  }
60426
60427
  const usedVariableNames = /* @__PURE__ */ new Set();
60428
+ const unusedVariables = /* @__PURE__ */ new Set();
60427
60429
  let documentWithoutInternalDirectives = graphql17.visit(document, {
60428
60430
  Directive(node) {
60429
60431
  if (config.isInternalDirective(node.name.value)) {
@@ -60443,6 +60445,7 @@ function artifactGenerator(stats) {
60443
60445
  VariableDefinition(variableDefinitionNode) {
60444
60446
  const name2 = variableDefinitionNode.variable.name.value;
60445
60447
  if (!usedVariableNames.has(name2)) {
60448
+ unusedVariables.add(name2);
60446
60449
  return null;
60447
60450
  }
60448
60451
  }
@@ -60531,6 +60534,7 @@ function artifactGenerator(stats) {
60531
60534
  refetch: doc.refetch,
60532
60535
  raw: rawString,
60533
60536
  rootType,
60537
+ stripVariables: [...unusedVariables],
60534
60538
  selection: selection_default({
60535
60539
  config,
60536
60540
  filepath: doc.filename,
@@ -56706,6 +56706,7 @@ var Config = class {
56706
56706
  schemaPollHeaders;
56707
56707
  pluginMode = false;
56708
56708
  plugins = [];
56709
+ adapter;
56709
56710
  componentFields = {};
56710
56711
  constructor({
56711
56712
  filepath,
@@ -60420,6 +60421,7 @@ function artifactGenerator(stats) {
60420
60421
  return;
60421
60422
  }
60422
60423
  const usedVariableNames = /* @__PURE__ */ new Set();
60424
+ const unusedVariables = /* @__PURE__ */ new Set();
60423
60425
  let documentWithoutInternalDirectives = graphql17.visit(document, {
60424
60426
  Directive(node) {
60425
60427
  if (config.isInternalDirective(node.name.value)) {
@@ -60439,6 +60441,7 @@ function artifactGenerator(stats) {
60439
60441
  VariableDefinition(variableDefinitionNode) {
60440
60442
  const name2 = variableDefinitionNode.variable.name.value;
60441
60443
  if (!usedVariableNames.has(name2)) {
60444
+ unusedVariables.add(name2);
60442
60445
  return null;
60443
60446
  }
60444
60447
  }
@@ -60527,6 +60530,7 @@ function artifactGenerator(stats) {
60527
60530
  refetch: doc.refetch,
60528
60531
  raw: rawString,
60529
60532
  rootType,
60533
+ stripVariables: [...unusedVariables],
60530
60534
  selection: selection_default({
60531
60535
  config,
60532
60536
  filepath: doc.filename,
@@ -66251,6 +66251,7 @@ __export(conventions_exports, {
66251
66251
  router_path: () => router_path,
66252
66252
  serialized_manifest_path: () => serialized_manifest_path,
66253
66253
  server_adapter_path: () => server_adapter_path,
66254
+ temp_dir: () => temp_dir,
66254
66255
  units_dir: () => units_dir,
66255
66256
  vite_render_path: () => vite_render_path
66256
66257
  });
@@ -66312,6 +66313,9 @@ async function read_layoutView(base) {
66312
66313
  }
66313
66314
  return [null, null];
66314
66315
  }
66316
+ function temp_dir(config2, key) {
66317
+ return path_exports.join(config2.rootDir, "temp", key);
66318
+ }
66315
66319
  function router_index_path(config2) {
66316
66320
  return path_exports.join(config2.routesDir, "..", "+index.jsx");
66317
66321
  }
@@ -68845,7 +68849,7 @@ function isSecondaryBuild() {
68845
68849
  async function buildLocalSchema(config2) {
68846
68850
  const { build } = await import("vite");
68847
68851
  const schema = import_node_path2.default.join(config2.localApiDir, "+schema");
68848
- const outDir = import_node_path2.default.join(config2.rootDir, "temp");
68852
+ const outDir = conventions_exports.temp_dir(config2, "schema");
68849
68853
  process.env.HOUDINI_SECONDARY_BUILD = "true";
68850
68854
  try {
68851
68855
  await fs_exports.remove(import_node_path2.default.join(outDir, "assets", "schema.js"));
@@ -68864,7 +68868,7 @@ async function buildLocalSchema(config2) {
68864
68868
  schema
68865
68869
  },
68866
68870
  output: {
68867
- entryFileNames: "assets/[name].js"
68871
+ entryFileNames: "[name].js"
68868
68872
  }
68869
68873
  },
68870
68874
  ssr: true,
@@ -68882,7 +68886,10 @@ async function loadLocalSchema(config2) {
68882
68886
  if (!isSecondaryBuild()) {
68883
68887
  await buildLocalSchema(config2);
68884
68888
  }
68885
- const { default: schema } = await import(import_node_path2.default.join(config2.rootDir, "temp", "assets", `schema.js?${Date.now().valueOf()}}`));
68889
+ const { default: schema } = await import(import_node_path2.default.join(
68890
+ conventions_exports.temp_dir(config2, "schema"),
68891
+ `schema.js?${Date.now().valueOf()}}`
68892
+ ));
68886
68893
  return schema;
68887
68894
  }
68888
68895
 
@@ -68920,6 +68927,7 @@ var Config = class {
68920
68927
  schemaPollHeaders;
68921
68928
  pluginMode = false;
68922
68929
  plugins = [];
68930
+ adapter;
68923
68931
  componentFields = {};
68924
68932
  constructor({
68925
68933
  filepath,
@@ -73268,6 +73276,7 @@ function artifactGenerator(stats) {
73268
73276
  return;
73269
73277
  }
73270
73278
  const usedVariableNames = /* @__PURE__ */ new Set();
73279
+ const unusedVariables = /* @__PURE__ */ new Set();
73271
73280
  let documentWithoutInternalDirectives = graphql17.visit(document, {
73272
73281
  Directive(node) {
73273
73282
  if (config2.isInternalDirective(node.name.value)) {
@@ -73287,6 +73296,7 @@ function artifactGenerator(stats) {
73287
73296
  VariableDefinition(variableDefinitionNode) {
73288
73297
  const name2 = variableDefinitionNode.variable.name.value;
73289
73298
  if (!usedVariableNames.has(name2)) {
73299
+ unusedVariables.add(name2);
73290
73300
  return null;
73291
73301
  }
73292
73302
  }
@@ -73375,6 +73385,7 @@ function artifactGenerator(stats) {
73375
73385
  refetch: doc.refetch,
73376
73386
  raw: rawString,
73377
73387
  rootType,
73388
+ stripVariables: [...unusedVariables],
73378
73389
  selection: selection_default({
73379
73390
  config: config2,
73380
73391
  filepath: doc.filename,
@@ -78708,6 +78719,7 @@ function Plugin(opts = {}) {
78708
78719
  enforce: "pre",
78709
78720
  async config(userConfig, env2) {
78710
78721
  config = await getConfig(opts);
78722
+ config.adapter = opts.adapter;
78711
78723
  viteEnv = env2;
78712
78724
  let result = {
78713
78725
  server: {
@@ -78770,8 +78782,10 @@ function Plugin(opts = {}) {
78770
78782
  }
78771
78783
  await fs_exports.mkdirp(config.routerBuildDirectory);
78772
78784
  const manifest = await load_manifest({ config, includeArtifacts: true });
78773
- await fs_exports.recursiveCopy(path_exports.join(sourceDir, "ssr"), path_exports.join(outDir, "ssr"));
78774
- await fs_exports.rmdir(path_exports.join(sourceDir, "ssr"));
78785
+ if (!config.adapter?.disableServer) {
78786
+ await fs_exports.recursiveCopy(path_exports.join(sourceDir, "ssr"), path_exports.join(outDir, "ssr"));
78787
+ await fs_exports.rmdir(path_exports.join(sourceDir, "ssr"));
78788
+ }
78775
78789
  await fs_exports.recursiveCopy(sourceDir, path_exports.join(outDir, "assets"));
78776
78790
  await opts.adapter({
78777
78791
  config,
@@ -78787,6 +78801,15 @@ function Plugin(opts = {}) {
78787
78801
  }
78788
78802
  },
78789
78803
  async buildStart(args) {
78804
+ if (config.adapter?.pre && viteEnv.command === "build" && !isSecondaryBuild()) {
78805
+ await config.adapter.pre({
78806
+ config,
78807
+ conventions: conventions_exports,
78808
+ sourceDir: viteConfig.build.outDir,
78809
+ publicBase: viteConfig.base,
78810
+ outDir: config.routerBuildDirectory
78811
+ });
78812
+ }
78790
78813
  for (const plugin2 of config.plugins) {
78791
78814
  if (typeof plugin2.vite?.buildStart !== "function") {
78792
78815
  continue;
@@ -79109,7 +79132,7 @@ function artifact_import({
79109
79132
  function vite_default(opts) {
79110
79133
  process.env.HOUDINI_PLUGIN = "true";
79111
79134
  const watchSchemaListref = { list: [] };
79112
- return isSecondaryBuild() ? [] : [
79135
+ return [
79113
79136
  Plugin(opts),
79114
79137
  watch_remote_schema(opts),
79115
79138
  watch_local_schema(watchSchemaListref),
@@ -66245,6 +66245,7 @@ __export(conventions_exports, {
66245
66245
  router_path: () => router_path,
66246
66246
  serialized_manifest_path: () => serialized_manifest_path,
66247
66247
  server_adapter_path: () => server_adapter_path,
66248
+ temp_dir: () => temp_dir,
66248
66249
  units_dir: () => units_dir,
66249
66250
  vite_render_path: () => vite_render_path
66250
66251
  });
@@ -66306,6 +66307,9 @@ async function read_layoutView(base) {
66306
66307
  }
66307
66308
  return [null, null];
66308
66309
  }
66310
+ function temp_dir(config2, key) {
66311
+ return path_exports.join(config2.rootDir, "temp", key);
66312
+ }
66309
66313
  function router_index_path(config2) {
66310
66314
  return path_exports.join(config2.routesDir, "..", "+index.jsx");
66311
66315
  }
@@ -68839,7 +68843,7 @@ function isSecondaryBuild() {
68839
68843
  async function buildLocalSchema(config2) {
68840
68844
  const { build } = await import("vite");
68841
68845
  const schema = path2.join(config2.localApiDir, "+schema");
68842
- const outDir = path2.join(config2.rootDir, "temp");
68846
+ const outDir = conventions_exports.temp_dir(config2, "schema");
68843
68847
  process.env.HOUDINI_SECONDARY_BUILD = "true";
68844
68848
  try {
68845
68849
  await fs_exports.remove(path2.join(outDir, "assets", "schema.js"));
@@ -68858,7 +68862,7 @@ async function buildLocalSchema(config2) {
68858
68862
  schema
68859
68863
  },
68860
68864
  output: {
68861
- entryFileNames: "assets/[name].js"
68865
+ entryFileNames: "[name].js"
68862
68866
  }
68863
68867
  },
68864
68868
  ssr: true,
@@ -68876,7 +68880,10 @@ async function loadLocalSchema(config2) {
68876
68880
  if (!isSecondaryBuild()) {
68877
68881
  await buildLocalSchema(config2);
68878
68882
  }
68879
- const { default: schema } = await import(path2.join(config2.rootDir, "temp", "assets", `schema.js?${Date.now().valueOf()}}`));
68883
+ const { default: schema } = await import(path2.join(
68884
+ conventions_exports.temp_dir(config2, "schema"),
68885
+ `schema.js?${Date.now().valueOf()}}`
68886
+ ));
68880
68887
  return schema;
68881
68888
  }
68882
68889
 
@@ -68913,6 +68920,7 @@ var Config = class {
68913
68920
  schemaPollHeaders;
68914
68921
  pluginMode = false;
68915
68922
  plugins = [];
68923
+ adapter;
68916
68924
  componentFields = {};
68917
68925
  constructor({
68918
68926
  filepath,
@@ -73261,6 +73269,7 @@ function artifactGenerator(stats) {
73261
73269
  return;
73262
73270
  }
73263
73271
  const usedVariableNames = /* @__PURE__ */ new Set();
73272
+ const unusedVariables = /* @__PURE__ */ new Set();
73264
73273
  let documentWithoutInternalDirectives = graphql17.visit(document, {
73265
73274
  Directive(node) {
73266
73275
  if (config2.isInternalDirective(node.name.value)) {
@@ -73280,6 +73289,7 @@ function artifactGenerator(stats) {
73280
73289
  VariableDefinition(variableDefinitionNode) {
73281
73290
  const name2 = variableDefinitionNode.variable.name.value;
73282
73291
  if (!usedVariableNames.has(name2)) {
73292
+ unusedVariables.add(name2);
73283
73293
  return null;
73284
73294
  }
73285
73295
  }
@@ -73368,6 +73378,7 @@ function artifactGenerator(stats) {
73368
73378
  refetch: doc.refetch,
73369
73379
  raw: rawString,
73370
73380
  rootType,
73381
+ stripVariables: [...unusedVariables],
73371
73382
  selection: selection_default({
73372
73383
  config: config2,
73373
73384
  filepath: doc.filename,
@@ -78701,6 +78712,7 @@ function Plugin(opts = {}) {
78701
78712
  enforce: "pre",
78702
78713
  async config(userConfig, env2) {
78703
78714
  config = await getConfig(opts);
78715
+ config.adapter = opts.adapter;
78704
78716
  viteEnv = env2;
78705
78717
  let result = {
78706
78718
  server: {
@@ -78763,8 +78775,10 @@ function Plugin(opts = {}) {
78763
78775
  }
78764
78776
  await fs_exports.mkdirp(config.routerBuildDirectory);
78765
78777
  const manifest = await load_manifest({ config, includeArtifacts: true });
78766
- await fs_exports.recursiveCopy(path_exports.join(sourceDir, "ssr"), path_exports.join(outDir, "ssr"));
78767
- await fs_exports.rmdir(path_exports.join(sourceDir, "ssr"));
78778
+ if (!config.adapter?.disableServer) {
78779
+ await fs_exports.recursiveCopy(path_exports.join(sourceDir, "ssr"), path_exports.join(outDir, "ssr"));
78780
+ await fs_exports.rmdir(path_exports.join(sourceDir, "ssr"));
78781
+ }
78768
78782
  await fs_exports.recursiveCopy(sourceDir, path_exports.join(outDir, "assets"));
78769
78783
  await opts.adapter({
78770
78784
  config,
@@ -78780,6 +78794,15 @@ function Plugin(opts = {}) {
78780
78794
  }
78781
78795
  },
78782
78796
  async buildStart(args) {
78797
+ if (config.adapter?.pre && viteEnv.command === "build" && !isSecondaryBuild()) {
78798
+ await config.adapter.pre({
78799
+ config,
78800
+ conventions: conventions_exports,
78801
+ sourceDir: viteConfig.build.outDir,
78802
+ publicBase: viteConfig.base,
78803
+ outDir: config.routerBuildDirectory
78804
+ });
78805
+ }
78783
78806
  for (const plugin2 of config.plugins) {
78784
78807
  if (typeof plugin2.vite?.buildStart !== "function") {
78785
78808
  continue;
@@ -79102,7 +79125,7 @@ function artifact_import({
79102
79125
  function vite_default(opts) {
79103
79126
  process.env.HOUDINI_PLUGIN = "true";
79104
79127
  const watchSchemaListref = { list: [] };
79105
- return isSecondaryBuild() ? [] : [
79128
+ return [
79106
79129
  Plugin(opts),
79107
79130
  watch_remote_schema(opts),
79108
79131
  watch_local_schema(watchSchemaListref),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini",
3
- "version": "1.2.50",
3
+ "version": "1.2.52",
4
4
  "description": "The disappearing GraphQL clients",
5
5
  "keywords": [
6
6
  "typescript",
@@ -26,7 +26,7 @@
26
26
  "prettier": "^2.8.3",
27
27
  "rollup": "^3.7.4",
28
28
  "vite": "^4.1.4",
29
- "vitest": "^0.28.3",
29
+ "vitest": "^1.6.0",
30
30
  "scripts": "^1.0.0"
31
31
  },
32
32
  "dependencies": {