houdini 1.2.2 → 1.2.4

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.
Files changed (64) hide show
  1. package/build/cmd-cjs/index.js +183 -63
  2. package/build/cmd-esm/index.js +183 -63
  3. package/build/codegen-cjs/index.js +181 -61
  4. package/build/codegen-esm/index.js +181 -61
  5. package/build/lib/fs.d.ts +8 -1
  6. package/build/lib/index.d.ts +1 -0
  7. package/build/lib/parse.d.ts +1 -1
  8. package/build/lib/types.d.ts +11 -0
  9. package/build/lib-cjs/index.js +181 -69
  10. package/build/lib-esm/index.js +179 -69
  11. package/build/runtime/cache/cache.d.ts +5 -1
  12. package/build/runtime/cache/lists.d.ts +3 -3
  13. package/build/runtime/cache/storage.d.ts +8 -2
  14. package/build/runtime/cache/subscription.d.ts +1 -0
  15. package/build/runtime/client/documentStore.d.ts +9 -2
  16. package/build/runtime/client/index.d.ts +6 -3
  17. package/build/runtime/lib/index.d.ts +1 -0
  18. package/build/runtime/lib/lru.d.ts +52 -0
  19. package/build/runtime/lib/types.d.ts +1 -0
  20. package/build/runtime-cjs/cache/cache.d.ts +5 -1
  21. package/build/runtime-cjs/cache/cache.js +84 -27
  22. package/build/runtime-cjs/cache/lists.d.ts +3 -3
  23. package/build/runtime-cjs/cache/lists.js +20 -8
  24. package/build/runtime-cjs/cache/storage.d.ts +8 -2
  25. package/build/runtime-cjs/cache/storage.js +22 -5
  26. package/build/runtime-cjs/cache/subscription.d.ts +1 -0
  27. package/build/runtime-cjs/cache/subscription.js +3 -0
  28. package/build/runtime-cjs/client/documentStore.d.ts +9 -2
  29. package/build/runtime-cjs/client/documentStore.js +13 -9
  30. package/build/runtime-cjs/client/index.d.ts +6 -3
  31. package/build/runtime-cjs/client/index.js +6 -8
  32. package/build/runtime-cjs/client/plugins/cache.js +3 -0
  33. package/build/runtime-cjs/client/plugins/mutation.js +10 -6
  34. package/build/runtime-cjs/lib/index.d.ts +1 -0
  35. package/build/runtime-cjs/lib/index.js +1 -0
  36. package/build/runtime-cjs/lib/lru.d.ts +52 -0
  37. package/build/runtime-cjs/lib/lru.js +73 -0
  38. package/build/runtime-cjs/lib/types.d.ts +1 -0
  39. package/build/runtime-cjs/lib/types.js +7 -2
  40. package/build/runtime-esm/cache/cache.d.ts +5 -1
  41. package/build/runtime-esm/cache/cache.js +84 -27
  42. package/build/runtime-esm/cache/lists.d.ts +3 -3
  43. package/build/runtime-esm/cache/lists.js +20 -8
  44. package/build/runtime-esm/cache/storage.d.ts +8 -2
  45. package/build/runtime-esm/cache/storage.js +22 -5
  46. package/build/runtime-esm/cache/subscription.d.ts +1 -0
  47. package/build/runtime-esm/cache/subscription.js +3 -0
  48. package/build/runtime-esm/client/documentStore.d.ts +9 -2
  49. package/build/runtime-esm/client/documentStore.js +13 -9
  50. package/build/runtime-esm/client/index.d.ts +6 -3
  51. package/build/runtime-esm/client/index.js +6 -8
  52. package/build/runtime-esm/client/plugins/cache.js +3 -0
  53. package/build/runtime-esm/client/plugins/mutation.js +10 -6
  54. package/build/runtime-esm/lib/index.d.ts +1 -0
  55. package/build/runtime-esm/lib/index.js +1 -0
  56. package/build/runtime-esm/lib/lru.d.ts +52 -0
  57. package/build/runtime-esm/lib/lru.js +48 -0
  58. package/build/runtime-esm/lib/types.d.ts +1 -0
  59. package/build/runtime-esm/lib/types.js +5 -1
  60. package/build/test-cjs/index.js +181 -61
  61. package/build/test-esm/index.js +181 -61
  62. package/build/vite-cjs/index.js +200 -62
  63. package/build/vite-esm/index.js +200 -62
  64. package/package.json +1 -1
@@ -65517,6 +65517,7 @@ __export(fs_exports, {
65517
65517
  recursiveCopy: () => recursiveCopy,
65518
65518
  remove: () => remove,
65519
65519
  rmdir: () => rmdir,
65520
+ snapshot: () => snapshot,
65520
65521
  stat: () => stat,
65521
65522
  writeFile: () => writeFile
65522
65523
  });
@@ -65711,16 +65712,17 @@ function existsSync(dirPath) {
65711
65712
  }
65712
65713
  return import_memfs.fs.existsSync(dirPath);
65713
65714
  }
65714
- async function readdir(filepath) {
65715
+ async function readdir(filepath, opts) {
65715
65716
  if (!houdini_mode.is_testing) {
65716
- return await import_promises.default.readdir(filepath);
65717
+ return await import_promises.default.readdir(filepath, opts);
65717
65718
  }
65718
65719
  if (filepath.includes("build/runtime")) {
65719
- return await import_promises.default.readdir(filepath);
65720
+ return await import_promises.default.readdir(filepath, opts);
65720
65721
  }
65721
65722
  try {
65722
- return import_memfs.fs.readdirSync(filepath);
65723
- } catch {
65723
+ return import_memfs.fs.readdirSync(filepath, opts);
65724
+ } catch (e2) {
65725
+ console.log(e2);
65724
65726
  return [];
65725
65727
  }
65726
65728
  }
@@ -65771,6 +65773,11 @@ async function recursiveCopy(source, target, transforms, notRoot) {
65771
65773
  );
65772
65774
  }
65773
65775
  }
65776
+ function snapshot(base) {
65777
+ return Object.fromEntries(
65778
+ Object.entries(import_memfs.vol.toJSON()).filter(([key]) => !base || key.startsWith(base)).map(([key, value]) => [!base ? key : key.substring(base.length), value])
65779
+ );
65780
+ }
65774
65781
  async function glob(pattern) {
65775
65782
  return await (0, import_node_util.promisify)(import_glob.glob)(posixify(pattern));
65776
65783
  }
@@ -67158,10 +67165,10 @@ var ListManager = class {
67158
67165
  this.lists.get(list.name).get(parentID).lists.push(handler);
67159
67166
  this.listsByField.get(parentID).get(list.key).push(handler);
67160
67167
  }
67161
- removeIDFromAllLists(id) {
67168
+ removeIDFromAllLists(id, layer) {
67162
67169
  for (const fieldMap of this.lists.values()) {
67163
67170
  for (const list of fieldMap.values()) {
67164
- list.removeID(id);
67171
+ list.removeID(id, void 0, layer);
67165
67172
  }
67166
67173
  }
67167
67174
  }
@@ -67258,6 +67265,10 @@ var List = class {
67258
67265
  updates: ["append", "prepend"],
67259
67266
  selection: {
67260
67267
  fields: {
67268
+ __typename: {
67269
+ keyRaw: "__typename",
67270
+ type: "String"
67271
+ },
67261
67272
  node: {
67262
67273
  type: listType,
67263
67274
  keyRaw: "node",
@@ -67282,7 +67293,15 @@ var List = class {
67282
67293
  };
67283
67294
  insertData = {
67284
67295
  newEntry: {
67285
- edges: [{ node: { ...data, __typename: listType } }]
67296
+ edges: [
67297
+ {
67298
+ __typename: listType + "Edge",
67299
+ node: {
67300
+ ...data,
67301
+ __typename: listType
67302
+ }
67303
+ }
67304
+ ]
67286
67305
  }
67287
67306
  };
67288
67307
  } else {
@@ -67318,7 +67337,7 @@ var List = class {
67318
67337
  layer: layer?.id
67319
67338
  });
67320
67339
  }
67321
- removeID(id, variables = {}) {
67340
+ removeID(id, variables = {}, layer) {
67322
67341
  if (!this.validateWhen()) {
67323
67342
  return;
67324
67343
  }
@@ -67365,7 +67384,7 @@ var List = class {
67365
67384
  subscribers.map((sub) => sub[0]),
67366
67385
  variables
67367
67386
  );
67368
- this.cache._internal_unstable.storage.remove(parentID, targetKey, targetID);
67387
+ this.cache._internal_unstable.storage.remove(parentID, targetKey, targetID, layer);
67369
67388
  for (const [spec] of subscribers) {
67370
67389
  spec.set(
67371
67390
  this.cache._internal_unstable.getSelection({
@@ -67378,12 +67397,12 @@ var List = class {
67378
67397
  }
67379
67398
  return true;
67380
67399
  }
67381
- remove(data, variables = {}) {
67400
+ remove(data, variables = {}, layer) {
67382
67401
  const targetID = this.cache._internal_unstable.id(this.listType(data), data);
67383
67402
  if (!targetID) {
67384
67403
  return;
67385
67404
  }
67386
- return this.removeID(targetID, variables);
67405
+ return this.removeID(targetID, variables, layer);
67387
67406
  }
67388
67407
  listType(data) {
67389
67408
  return data.__typename || this.type;
@@ -67415,7 +67434,7 @@ var List = class {
67415
67434
  layer,
67416
67435
  where
67417
67436
  }) {
67418
- if (!this.remove(data, variables)) {
67437
+ if (!this.remove(data, variables, layer)) {
67419
67438
  this.addToList(selection, data, variables, where, layer);
67420
67439
  }
67421
67440
  }
@@ -67552,7 +67571,7 @@ var StaleManager = class {
67552
67571
  // src/runtime/cache/storage.ts
67553
67572
  var InMemoryStorage = class {
67554
67573
  data;
67555
- idCount = 0;
67574
+ idCount = 1;
67556
67575
  rank = 0;
67557
67576
  constructor() {
67558
67577
  this.data = [];
@@ -67572,11 +67591,11 @@ var InMemoryStorage = class {
67572
67591
  insert(id, field, location, target) {
67573
67592
  return this.topLayer.insert(id, field, location, target);
67574
67593
  }
67575
- remove(id, field, target) {
67576
- return this.topLayer.remove(id, field, target);
67594
+ remove(id, field, target, layerToUser = this.topLayer) {
67595
+ return layerToUser.remove(id, field, target);
67577
67596
  }
67578
- delete(id) {
67579
- return this.topLayer.delete(id);
67597
+ delete(id, layerToUser = this.topLayer) {
67598
+ return layerToUser.delete(id);
67580
67599
  }
67581
67600
  deleteField(id, field) {
67582
67601
  return this.topLayer.deleteField(id, field);
@@ -67710,6 +67729,23 @@ var InMemoryStorage = class {
67710
67729
  }
67711
67730
  return this.data[this.data.length - 1];
67712
67731
  }
67732
+ serialize() {
67733
+ return JSON.stringify({
67734
+ rank: this.rank,
67735
+ fields: this.topLayer.fields,
67736
+ links: this.topLayer.links
67737
+ });
67738
+ }
67739
+ hydrate(args, layer) {
67740
+ if (!args) {
67741
+ return;
67742
+ }
67743
+ const { rank, fields, links } = args;
67744
+ this.rank = rank;
67745
+ layer ??= this.createLayer(true);
67746
+ layer.fields = fields;
67747
+ layer.links = links;
67748
+ }
67713
67749
  };
67714
67750
  var Layer = class {
67715
67751
  id;
@@ -67948,6 +67984,9 @@ var InMemorySubscriptions = class {
67948
67984
  subscribers = {};
67949
67985
  referenceCounts = {};
67950
67986
  keyVersions = {};
67987
+ activeFields(parent2) {
67988
+ return Object.keys(this.subscribers[parent2] || {});
67989
+ }
67951
67990
  add({
67952
67991
  parent: parent2,
67953
67992
  spec,
@@ -68216,20 +68255,7 @@ var Cache = class {
68216
68255
  }) {
68217
68256
  const layer = layerID ? this._internal_unstable.storage.getLayer(layerID) : this._internal_unstable.storage.topLayer;
68218
68257
  const subscribers = this._internal_unstable.writeSelection({ ...args, layer }).map((sub) => sub[0]);
68219
- const notified = [];
68220
- for (const spec of subscribers.concat(notifySubscribers)) {
68221
- if (!notified.includes(spec.set)) {
68222
- notified.push(spec.set);
68223
- spec.set(
68224
- this._internal_unstable.getSelection({
68225
- parent: spec.parentID || rootID,
68226
- selection: spec.selection,
68227
- variables: spec.variables?.() || {},
68228
- ignoreMasking: false
68229
- }).data
68230
- );
68231
- }
68232
- }
68258
+ this.#notifySubscribers(subscribers.concat(notifySubscribers));
68233
68259
  return subscribers;
68234
68260
  }
68235
68261
  read(...args) {
@@ -68268,10 +68294,10 @@ var Cache = class {
68268
68294
  }
68269
68295
  return handler;
68270
68296
  }
68271
- delete(id) {
68297
+ delete(id, layer) {
68272
68298
  this._internal_unstable.subscriptions.removeAllSubscribers(id);
68273
- this._internal_unstable.lists.removeIDFromAllLists(id);
68274
- this._internal_unstable.storage.delete(id);
68299
+ this._internal_unstable.lists.removeIDFromAllLists(id, layer);
68300
+ this._internal_unstable.storage.delete(id, layer);
68275
68301
  }
68276
68302
  setConfig(config4) {
68277
68303
  this._internal_unstable.setConfig(config4);
@@ -68303,6 +68329,76 @@ var Cache = class {
68303
68329
  config() {
68304
68330
  return this._internal_unstable.config;
68305
68331
  }
68332
+ serialize() {
68333
+ return this._internal_unstable.storage.serialize();
68334
+ }
68335
+ hydrate(...args) {
68336
+ return this._internal_unstable.storage.hydrate(...args);
68337
+ }
68338
+ clearLayer(layerID) {
68339
+ const layer = this._internal_unstable.storage.getLayer(layerID);
68340
+ if (!layer) {
68341
+ throw new Error("Cannot find layer with id: " + layerID);
68342
+ }
68343
+ const toNotify = [];
68344
+ const allFields = [];
68345
+ for (const target of [layer.fields, layer.links]) {
68346
+ for (const [id, fields] of Object.entries(target)) {
68347
+ allFields.push(
68348
+ ...Object.entries(fields).map(([field, value]) => ({ id, field, value }))
68349
+ );
68350
+ }
68351
+ }
68352
+ const displayFields = [];
68353
+ for (const pair of allFields) {
68354
+ const { displayLayers } = this._internal_unstable.storage.get(pair.id, pair.field);
68355
+ if (!displayLayers.includes(layerID)) {
68356
+ continue;
68357
+ }
68358
+ displayFields.push(pair);
68359
+ }
68360
+ for (const [id, operation] of Object.entries(layer.operations)) {
68361
+ if (operation.deleted) {
68362
+ displayFields.push(
68363
+ ...this._internal_unstable.subscriptions.activeFields(id).map((field) => ({ id, field }))
68364
+ );
68365
+ }
68366
+ const fields = Object.keys(operation.fields ?? {});
68367
+ if (fields.length > 0) {
68368
+ displayFields.push(...fields.map((field) => ({ id, field })));
68369
+ }
68370
+ }
68371
+ layer.clear();
68372
+ for (const display of displayFields) {
68373
+ const { field, id } = display;
68374
+ const notify = !("value" in display) || this._internal_unstable.storage.get(id, field).value !== display.value;
68375
+ if (notify) {
68376
+ toNotify.push(
68377
+ ...this._internal_unstable.subscriptions.get(id, field).map((sub) => sub[0])
68378
+ );
68379
+ }
68380
+ }
68381
+ this.#notifySubscribers(toNotify);
68382
+ }
68383
+ #notifySubscribers(subs) {
68384
+ if (subs.length === 0) {
68385
+ return;
68386
+ }
68387
+ const notified = [];
68388
+ for (const spec of subs) {
68389
+ if (!notified.includes(spec.set)) {
68390
+ notified.push(spec.set);
68391
+ spec.set(
68392
+ this._internal_unstable.getSelection({
68393
+ parent: spec.parentID || rootID,
68394
+ selection: spec.selection,
68395
+ variables: spec.variables?.() || {},
68396
+ ignoreMasking: false
68397
+ }).data
68398
+ );
68399
+ }
68400
+ }
68401
+ }
68306
68402
  };
68307
68403
  var CacheInternal = class {
68308
68404
  _disabled = false;
@@ -68590,8 +68686,16 @@ var CacheInternal = class {
68590
68686
  operation.position || "last",
68591
68687
  layer
68592
68688
  );
68689
+ } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
68690
+ this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
68691
+ selection: fieldSelection,
68692
+ data: target,
68693
+ variables,
68694
+ where: operation.position || "last",
68695
+ layer
68696
+ });
68593
68697
  } else if (operation.action === "remove" && target instanceof Object && fieldSelection && operation.list) {
68594
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables);
68698
+ this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).remove(target, variables, layer);
68595
68699
  } else if (operation.action === "delete" && operation.type) {
68596
68700
  if (typeof target !== "string") {
68597
68701
  throw new Error("Cannot delete a record with a non-string ID");
@@ -68600,15 +68704,7 @@ var CacheInternal = class {
68600
68704
  if (!targetID) {
68601
68705
  continue;
68602
68706
  }
68603
- this.cache.delete(targetID);
68604
- } else if (operation.action === "toggle" && target instanceof Object && fieldSelection && operation.list) {
68605
- this.cache.list(operation.list, parentID, operation.target === "all").when(operation.when).toggleElement({
68606
- selection: fieldSelection,
68607
- data: target,
68608
- variables,
68609
- where: operation.position || "last",
68610
- layer
68611
- });
68707
+ this.cache.delete(targetID, layer);
68612
68708
  }
68613
68709
  }
68614
68710
  }
@@ -69143,7 +69239,7 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
69143
69239
  var mutation = documentPlugin(ArtifactKind.Mutation, () => {
69144
69240
  return {
69145
69241
  async start(ctx, { next, marshalVariables }) {
69146
- const layer = cache_default._internal_unstable.storage.createLayer(true);
69242
+ const layerOptimistic = cache_default._internal_unstable.storage.createLayer(true);
69147
69243
  const optimisticResponse = ctx.stuff.optimisticResponse;
69148
69244
  let toNotify = [];
69149
69245
  if (optimisticResponse) {
@@ -69154,25 +69250,29 @@ var mutation = documentPlugin(ArtifactKind.Mutation, () => {
69154
69250
  data: optimisticResponse
69155
69251
  }),
69156
69252
  variables: marshalVariables(ctx),
69157
- layer: layer.id
69253
+ layer: layerOptimistic.id
69158
69254
  });
69159
69255
  }
69160
69256
  ctx.cacheParams = {
69161
69257
  ...ctx.cacheParams,
69162
- layer,
69258
+ layer: layerOptimistic,
69163
69259
  notifySubscribers: toNotify,
69164
69260
  forceNotify: true
69165
69261
  };
69166
69262
  next(ctx);
69167
69263
  },
69168
69264
  afterNetwork(ctx, { resolve: resolve2 }) {
69169
- ctx.cacheParams?.layer?.clear();
69265
+ if (ctx.cacheParams?.layer) {
69266
+ cache_default.clearLayer(ctx.cacheParams.layer.id);
69267
+ }
69170
69268
  resolve2(ctx);
69171
69269
  },
69172
69270
  end(ctx, { resolve: resolve2, value }) {
69173
69271
  const hasErrors = value.errors && value.errors.length > 0;
69174
69272
  if (hasErrors) {
69175
- ctx.cacheParams?.layer?.clear();
69273
+ if (ctx.cacheParams?.layer) {
69274
+ cache_default.clearLayer(ctx.cacheParams.layer.id);
69275
+ }
69176
69276
  }
69177
69277
  if (ctx.cacheParams?.layer) {
69178
69278
  cache_default._internal_unstable.storage.resolveLayer(ctx.cacheParams.layer.id);
@@ -69182,7 +69282,7 @@ var mutation = documentPlugin(ArtifactKind.Mutation, () => {
69182
69282
  catch(ctx, { error }) {
69183
69283
  if (ctx.cacheParams?.layer) {
69184
69284
  const { layer } = ctx.cacheParams;
69185
- layer.clear();
69285
+ cache_default.clearLayer(layer.id);
69186
69286
  cache_default._internal_unstable.storage.resolveLayer(layer.id);
69187
69287
  }
69188
69288
  throw error;
@@ -70195,7 +70295,7 @@ function deepMerge2(filepath, ...targets) {
70195
70295
  }
70196
70296
 
70197
70297
  // src/lib/parse.ts
70198
- async function parseJS(str, config4) {
70298
+ function parseJS(str, config4) {
70199
70299
  const defaultConfig = {
70200
70300
  plugins: ["typescript", "importAssertions"],
70201
70301
  sourceType: "module"
@@ -71606,7 +71706,7 @@ function operationObject({
71606
71706
  if (operationKind === "insert" || operationKind === "toggle") {
71607
71707
  operation.position = position;
71608
71708
  }
71609
- if (operationKind === "insert" && allLists) {
71709
+ if (allLists && operationKind !== "delete") {
71610
71710
  operation.target = "all";
71611
71711
  }
71612
71712
  if (parentID) {
@@ -73448,12 +73548,28 @@ ${exportStatement("config")}
73448
73548
  },
73449
73549
  [path_exports.join(config4.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config4, content, importStatement, exportStatement })
73450
73550
  }),
73451
- ...config4.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config4, docs, plugin2)),
73551
+ ...config4.plugins.filter((plugin2) => plugin2.includeRuntime).map(
73552
+ (plugin2) => generatePluginRuntime({
73553
+ config: config4,
73554
+ docs,
73555
+ plugin: plugin2,
73556
+ importStatement,
73557
+ exportDefaultStatement: exportStatement,
73558
+ exportStarStatement: exportStar
73559
+ })
73560
+ ),
73452
73561
  generatePluginIndex({ config: config4, exportStatement: exportStar })
73453
73562
  ]);
73454
73563
  await generateGraphqlReturnTypes(config4, docs);
73455
73564
  }
73456
- async function generatePluginRuntime(config4, docs, plugin2) {
73565
+ async function generatePluginRuntime({
73566
+ config: config4,
73567
+ docs,
73568
+ plugin: plugin2,
73569
+ importStatement,
73570
+ exportDefaultStatement,
73571
+ exportStarStatement
73572
+ }) {
73457
73573
  if (houdini_mode.is_testing || !plugin2.includeRuntime) {
73458
73574
  return;
73459
73575
  }
@@ -73481,7 +73597,13 @@ async function generatePluginRuntime(config4, docs, plugin2) {
73481
73597
  Object.fromEntries(
73482
73598
  Object.entries(transformMap).map(([key, value]) => [
73483
73599
  path_exports.join(runtime_path, key),
73484
- (content) => value({ config: config4, content })
73600
+ (content) => value({
73601
+ config: config4,
73602
+ content,
73603
+ importStatement,
73604
+ exportDefaultStatement,
73605
+ exportStarStatement
73606
+ })
73485
73607
  ])
73486
73608
  )
73487
73609
  );
@@ -75349,14 +75471,12 @@ async function typeCheck(config4, docs) {
75349
75471
  for (const targetType of targetTypes) {
75350
75472
  const missingIDFields = config4.keyFieldsForType(targetType.name).filter((fieldName) => !targetType.getFields()[fieldName]);
75351
75473
  if (missingIDFields.length > 0) {
75352
- const message = `@${config4.listDirective} on ${logGreen2(
75353
- targetType.name
75354
- )} as a configuration issue. Object identification missing: ${missingIDFields.map((c) => `"${logYellow2(c)}"`).join(", ")}. Check 'Custom IDs' if needed.`;
75355
75474
  errors.push(
75356
75475
  new HoudiniError({
75357
75476
  filepath: filename,
75358
- message,
75359
- description: message
75477
+ message: `@${config4.listDirective} on ${logGreen2(
75478
+ targetType.name
75479
+ )} has a configuration issue: ${targetType} dos not have a valid key. Please check this link for more information: https://houdinigraphql.com/guides/caching-data#custom-ids`
75360
75480
  })
75361
75481
  );
75362
75482
  return;
@@ -76443,7 +76563,7 @@ function Plugin(opts = {}) {
76443
76563
  enforce: "pre",
76444
76564
  async config(viteConfig) {
76445
76565
  config3 = await getConfig(opts);
76446
- return {
76566
+ let result = {
76447
76567
  server: {
76448
76568
  ...viteConfig.server,
76449
76569
  fs: {
@@ -76452,6 +76572,13 @@ function Plugin(opts = {}) {
76452
76572
  }
76453
76573
  }
76454
76574
  };
76575
+ for (const plugin2 of config3.plugins) {
76576
+ if (typeof plugin2.vite?.config !== "function") {
76577
+ continue;
76578
+ }
76579
+ result = deepMerge2("", result, plugin2.vite.config.call(this, config3));
76580
+ }
76581
+ return result;
76455
76582
  },
76456
76583
  async buildStart() {
76457
76584
  try {
@@ -76460,6 +76587,17 @@ function Plugin(opts = {}) {
76460
76587
  formatErrors(e2);
76461
76588
  }
76462
76589
  },
76590
+ configureServer(server) {
76591
+ for (const plugin2 of config3.plugins) {
76592
+ if (typeof plugin2.vite?.configureServer !== "function") {
76593
+ continue;
76594
+ }
76595
+ const result = plugin2.vite.configureServer.call(this, {
76596
+ ...server,
76597
+ houdiniConfig: config3
76598
+ });
76599
+ }
76600
+ },
76463
76601
  async transform(code, filepath) {
76464
76602
  filepath = path_exports.posixify(filepath);
76465
76603
  if (filepath.startsWith("/src/")) {