houdini 1.1.4-react.0 → 1.1.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 (47) hide show
  1. package/build/cmd-cjs/index.js +607 -444
  2. package/build/cmd-esm/index.js +607 -444
  3. package/build/codegen/transforms/fragmentVariables.d.ts +0 -11
  4. package/build/codegen-cjs/index.js +577 -403
  5. package/build/codegen-esm/index.js +577 -403
  6. package/build/lib/config.d.ts +1 -1
  7. package/build/lib/parse.d.ts +1 -2
  8. package/build/lib/types.d.ts +1 -4
  9. package/build/lib-cjs/index.js +187 -195
  10. package/build/lib-esm/index.js +187 -195
  11. package/build/runtime/cache/cache.d.ts +4 -2
  12. package/build/runtime/client/documentStore.d.ts +0 -3
  13. package/build/runtime/client/index.d.ts +1 -1
  14. package/build/runtime/lib/types.d.ts +4 -46
  15. package/build/runtime-cjs/cache/cache.d.ts +4 -2
  16. package/build/runtime-cjs/cache/cache.js +37 -14
  17. package/build/runtime-cjs/client/documentStore.d.ts +0 -3
  18. package/build/runtime-cjs/client/documentStore.js +6 -11
  19. package/build/runtime-cjs/client/index.d.ts +1 -1
  20. package/build/runtime-cjs/client/plugins/cache.js +3 -5
  21. package/build/runtime-cjs/client/plugins/fragment.js +1 -8
  22. package/build/runtime-cjs/client/plugins/query.js +1 -2
  23. package/build/runtime-cjs/lib/types.d.ts +4 -46
  24. package/build/runtime-esm/cache/cache.d.ts +4 -2
  25. package/build/runtime-esm/cache/cache.js +37 -14
  26. package/build/runtime-esm/client/documentStore.d.ts +0 -3
  27. package/build/runtime-esm/client/documentStore.js +6 -11
  28. package/build/runtime-esm/client/index.d.ts +1 -1
  29. package/build/runtime-esm/client/plugins/cache.js +3 -5
  30. package/build/runtime-esm/client/plugins/fragment.js +1 -8
  31. package/build/runtime-esm/client/plugins/query.js +1 -2
  32. package/build/runtime-esm/lib/types.d.ts +4 -46
  33. package/build/test-cjs/index.js +598 -428
  34. package/build/test-esm/index.js +598 -428
  35. package/build/vite-cjs/index.js +617 -454
  36. package/build/vite-esm/index.js +617 -454
  37. package/package.json +3 -1
  38. package/build/runtime/lib/pageInfo.d.ts +0 -7
  39. package/build/runtime/lib/pagination.d.ts +0 -29
  40. package/build/runtime-cjs/lib/pageInfo.d.ts +0 -7
  41. package/build/runtime-cjs/lib/pageInfo.js +0 -79
  42. package/build/runtime-cjs/lib/pagination.d.ts +0 -29
  43. package/build/runtime-cjs/lib/pagination.js +0 -231
  44. package/build/runtime-esm/lib/pageInfo.d.ts +0 -7
  45. package/build/runtime-esm/lib/pageInfo.js +0 -52
  46. package/build/runtime-esm/lib/pagination.d.ts +0 -29
  47. package/build/runtime-esm/lib/pagination.js +0 -206
@@ -230,16 +230,16 @@ var require_GraphQLError = __commonJS({
230
230
  return obj && obj.__esModule ? obj : { default: obj };
231
231
  }
232
232
  function ownKeys(object, enumerableOnly) {
233
- var keys = Object.keys(object);
233
+ var keys2 = Object.keys(object);
234
234
  if (Object.getOwnPropertySymbols) {
235
235
  var symbols = Object.getOwnPropertySymbols(object);
236
236
  if (enumerableOnly)
237
237
  symbols = symbols.filter(function(sym) {
238
238
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
239
239
  });
240
- keys.push.apply(keys, symbols);
240
+ keys2.push.apply(keys2, symbols);
241
241
  }
242
- return keys;
242
+ return keys2;
243
243
  }
244
244
  function _objectSpread(target) {
245
245
  for (var i = 1; i < arguments.length; i++) {
@@ -476,7 +476,7 @@ var require_GraphQLError = __commonJS({
476
476
  }
477
477
  _createClass(GraphQLError4, [{
478
478
  key: "toString",
479
- value: function toString() {
479
+ value: function toString2() {
480
480
  return printError(this);
481
481
  }
482
482
  }, {
@@ -798,14 +798,14 @@ var require_inspect = __commonJS({
798
798
  return formatObject(value, seenValues);
799
799
  }
800
800
  function formatObject(object, seenValues) {
801
- var keys = Object.keys(object);
802
- if (keys.length === 0) {
801
+ var keys2 = Object.keys(object);
802
+ if (keys2.length === 0) {
803
803
  return "{}";
804
804
  }
805
805
  if (seenValues.length > MAX_RECURSIVE_DEPTH) {
806
806
  return "[" + getObjectTag(object) + "]";
807
807
  }
808
- var properties = keys.map(function(key) {
808
+ var properties = keys2.map(function(key) {
809
809
  var value = formatValue(object[key], seenValues);
810
810
  return key + ": " + value;
811
811
  });
@@ -2403,7 +2403,7 @@ var require_visitor = __commonJS({
2403
2403
  Object.defineProperty(exports, "__esModule", {
2404
2404
  value: true
2405
2405
  });
2406
- exports.visit = visit13;
2406
+ exports.visit = visit12;
2407
2407
  exports.visitInParallel = visitInParallel;
2408
2408
  exports.getVisitFn = getVisitFn;
2409
2409
  exports.BREAK = exports.QueryDocumentKeys = void 0;
@@ -2466,11 +2466,11 @@ var require_visitor = __commonJS({
2466
2466
  exports.QueryDocumentKeys = QueryDocumentKeys;
2467
2467
  var BREAK = Object.freeze({});
2468
2468
  exports.BREAK = BREAK;
2469
- function visit13(root, visitor) {
2469
+ function visit12(root, visitor) {
2470
2470
  var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
2471
2471
  var stack = void 0;
2472
2472
  var inArray = Array.isArray(root);
2473
- var keys = [root];
2473
+ var keys2 = [root];
2474
2474
  var index = -1;
2475
2475
  var edits = [];
2476
2476
  var node = void 0;
@@ -2481,7 +2481,7 @@ var require_visitor = __commonJS({
2481
2481
  var newRoot = root;
2482
2482
  do {
2483
2483
  index++;
2484
- var isLeaving = index === keys.length;
2484
+ var isLeaving = index === keys2.length;
2485
2485
  var isEdited = isLeaving && edits.length !== 0;
2486
2486
  if (isLeaving) {
2487
2487
  key = ancestors.length === 0 ? void 0 : path2[path2.length - 1];
@@ -2514,12 +2514,12 @@ var require_visitor = __commonJS({
2514
2514
  }
2515
2515
  }
2516
2516
  index = stack.index;
2517
- keys = stack.keys;
2517
+ keys2 = stack.keys;
2518
2518
  edits = stack.edits;
2519
2519
  inArray = stack.inArray;
2520
2520
  stack = stack.prev;
2521
2521
  } else {
2522
- key = parent ? inArray ? index : keys[index] : void 0;
2522
+ key = parent ? inArray ? index : keys2[index] : void 0;
2523
2523
  node = parent ? parent[key] : newRoot;
2524
2524
  if (node === null || node === void 0) {
2525
2525
  continue;
@@ -2567,12 +2567,12 @@ var require_visitor = __commonJS({
2567
2567
  stack = {
2568
2568
  inArray,
2569
2569
  index,
2570
- keys,
2570
+ keys: keys2,
2571
2571
  edits,
2572
2572
  prev: stack
2573
2573
  };
2574
2574
  inArray = Array.isArray(node);
2575
- keys = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
2575
+ keys2 = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
2576
2576
  index = -1;
2577
2577
  edits = [];
2578
2578
  if (parent) {
@@ -3555,7 +3555,7 @@ var require_definition = __commonJS({
3555
3555
  return new GraphQLList2(ofType);
3556
3556
  }
3557
3557
  }
3558
- GraphQLList2.prototype.toString = function toString() {
3558
+ GraphQLList2.prototype.toString = function toString2() {
3559
3559
  return "[" + String(this.ofType) + "]";
3560
3560
  };
3561
3561
  GraphQLList2.prototype.toJSON = function toJSON() {
@@ -3574,7 +3574,7 @@ var require_definition = __commonJS({
3574
3574
  return new GraphQLNonNull2(ofType);
3575
3575
  }
3576
3576
  }
3577
- GraphQLNonNull2.prototype.toString = function toString() {
3577
+ GraphQLNonNull2.prototype.toString = function toString2() {
3578
3578
  return String(this.ofType) + "!";
3579
3579
  };
3580
3580
  GraphQLNonNull2.prototype.toJSON = function toJSON() {
@@ -3670,7 +3670,7 @@ var require_definition = __commonJS({
3670
3670
  extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : []
3671
3671
  };
3672
3672
  };
3673
- _proto.toString = function toString() {
3673
+ _proto.toString = function toString2() {
3674
3674
  return this.name;
3675
3675
  };
3676
3676
  _proto.toJSON = function toJSON() {
@@ -3724,7 +3724,7 @@ var require_definition = __commonJS({
3724
3724
  extensionASTNodes: this.extensionASTNodes || []
3725
3725
  };
3726
3726
  };
3727
- _proto2.toString = function toString() {
3727
+ _proto2.toString = function toString2() {
3728
3728
  return this.name;
3729
3729
  };
3730
3730
  _proto2.toJSON = function toJSON() {
@@ -3855,7 +3855,7 @@ var require_definition = __commonJS({
3855
3855
  extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : []
3856
3856
  };
3857
3857
  };
3858
- _proto3.toString = function toString() {
3858
+ _proto3.toString = function toString2() {
3859
3859
  return this.name;
3860
3860
  };
3861
3861
  _proto3.toJSON = function toJSON() {
@@ -3902,7 +3902,7 @@ var require_definition = __commonJS({
3902
3902
  extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : []
3903
3903
  };
3904
3904
  };
3905
- _proto4.toString = function toString() {
3905
+ _proto4.toString = function toString2() {
3906
3906
  return this.name;
3907
3907
  };
3908
3908
  _proto4.toJSON = function toJSON() {
@@ -3946,7 +3946,7 @@ var require_definition = __commonJS({
3946
3946
  _proto5.getValue = function getValue(name) {
3947
3947
  return this._nameLookup[name];
3948
3948
  };
3949
- _proto5.serialize = function serialize(outputValue) {
3949
+ _proto5.serialize = function serialize2(outputValue) {
3950
3950
  var enumValue = this._valueLookup.get(outputValue);
3951
3951
  if (enumValue === void 0) {
3952
3952
  throw new _GraphQLError.GraphQLError('Enum "'.concat(this.name, '" cannot represent value: ').concat((0, _inspect.default)(outputValue)));
@@ -3998,7 +3998,7 @@ var require_definition = __commonJS({
3998
3998
  extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : []
3999
3999
  };
4000
4000
  };
4001
- _proto5.toString = function toString() {
4001
+ _proto5.toString = function toString2() {
4002
4002
  return this.name;
4003
4003
  };
4004
4004
  _proto5.toJSON = function toJSON() {
@@ -4076,7 +4076,7 @@ var require_definition = __commonJS({
4076
4076
  extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : []
4077
4077
  };
4078
4078
  };
4079
- _proto6.toString = function toString() {
4079
+ _proto6.toString = function toString2() {
4080
4080
  return this.name;
4081
4081
  };
4082
4082
  _proto6.toJSON = function toJSON() {
@@ -5330,7 +5330,7 @@ var require_directives = __commonJS({
5330
5330
  astNode: this.astNode
5331
5331
  };
5332
5332
  };
5333
- _proto.toString = function toString() {
5333
+ _proto.toString = function toString2() {
5334
5334
  return "@" + this.name;
5335
5335
  };
5336
5336
  _proto.toJSON = function toJSON() {
@@ -7267,16 +7267,16 @@ var require_KnownArgumentNamesRule = __commonJS({
7267
7267
  return obj && obj.__esModule ? obj : { default: obj };
7268
7268
  }
7269
7269
  function ownKeys(object, enumerableOnly) {
7270
- var keys = Object.keys(object);
7270
+ var keys2 = Object.keys(object);
7271
7271
  if (Object.getOwnPropertySymbols) {
7272
7272
  var symbols = Object.getOwnPropertySymbols(object);
7273
7273
  if (enumerableOnly)
7274
7274
  symbols = symbols.filter(function(sym) {
7275
7275
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
7276
7276
  });
7277
- keys.push.apply(keys, symbols);
7277
+ keys2.push.apply(keys2, symbols);
7278
7278
  }
7279
- return keys;
7279
+ return keys2;
7280
7280
  }
7281
7281
  function _objectSpread(target) {
7282
7282
  for (var i = 1; i < arguments.length; i++) {
@@ -7523,16 +7523,16 @@ var require_ProvidedRequiredArgumentsRule = __commonJS({
7523
7523
  return obj && obj.__esModule ? obj : { default: obj };
7524
7524
  }
7525
7525
  function ownKeys(object, enumerableOnly) {
7526
- var keys = Object.keys(object);
7526
+ var keys2 = Object.keys(object);
7527
7527
  if (Object.getOwnPropertySymbols) {
7528
7528
  var symbols = Object.getOwnPropertySymbols(object);
7529
7529
  if (enumerableOnly)
7530
7530
  symbols = symbols.filter(function(sym) {
7531
7531
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
7532
7532
  });
7533
- keys.push.apply(keys, symbols);
7533
+ keys2.push.apply(keys2, symbols);
7534
7534
  }
7535
- return keys;
7535
+ return keys2;
7536
7536
  }
7537
7537
  function _objectSpread(target) {
7538
7538
  for (var i = 1; i < arguments.length; i++) {
@@ -8790,13 +8790,13 @@ var require_promiseForObject = __commonJS({
8790
8790
  });
8791
8791
  exports.default = promiseForObject;
8792
8792
  function promiseForObject(object) {
8793
- var keys = Object.keys(object);
8794
- var valuesAndPromises = keys.map(function(name) {
8793
+ var keys2 = Object.keys(object);
8794
+ var valuesAndPromises = keys2.map(function(name) {
8795
8795
  return object[name];
8796
8796
  });
8797
8797
  return Promise.all(valuesAndPromises).then(function(values) {
8798
8798
  return values.reduce(function(resolvedObject, value, i) {
8799
- resolvedObject[keys[i]] = value;
8799
+ resolvedObject[keys2[i]] = value;
8800
8800
  return resolvedObject;
8801
8801
  }, /* @__PURE__ */ Object.create(null));
8802
8802
  });
@@ -11248,16 +11248,16 @@ var require_getIntrospectionQuery = __commonJS({
11248
11248
  });
11249
11249
  exports.getIntrospectionQuery = getIntrospectionQuery;
11250
11250
  function ownKeys(object, enumerableOnly) {
11251
- var keys = Object.keys(object);
11251
+ var keys2 = Object.keys(object);
11252
11252
  if (Object.getOwnPropertySymbols) {
11253
11253
  var symbols = Object.getOwnPropertySymbols(object);
11254
11254
  if (enumerableOnly)
11255
11255
  symbols = symbols.filter(function(sym) {
11256
11256
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11257
11257
  });
11258
- keys.push.apply(keys, symbols);
11258
+ keys2.push.apply(keys2, symbols);
11259
11259
  }
11260
- return keys;
11260
+ return keys2;
11261
11261
  }
11262
11262
  function _objectSpread(target) {
11263
11263
  for (var i = 1; i < arguments.length; i++) {
@@ -11350,16 +11350,16 @@ var require_introspectionFromSchema = __commonJS({
11350
11350
  return obj && obj.__esModule ? obj : { default: obj };
11351
11351
  }
11352
11352
  function ownKeys(object, enumerableOnly) {
11353
- var keys = Object.keys(object);
11353
+ var keys2 = Object.keys(object);
11354
11354
  if (Object.getOwnPropertySymbols) {
11355
11355
  var symbols = Object.getOwnPropertySymbols(object);
11356
11356
  if (enumerableOnly)
11357
11357
  symbols = symbols.filter(function(sym) {
11358
11358
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11359
11359
  });
11360
- keys.push.apply(keys, symbols);
11360
+ keys2.push.apply(keys2, symbols);
11361
11361
  }
11362
- return keys;
11362
+ return keys2;
11363
11363
  }
11364
11364
  function _objectSpread(target) {
11365
11365
  for (var i = 1; i < arguments.length; i++) {
@@ -11691,16 +11691,16 @@ var require_extendSchema = __commonJS({
11691
11691
  return obj && obj.__esModule ? obj : { default: obj };
11692
11692
  }
11693
11693
  function ownKeys(object, enumerableOnly) {
11694
- var keys = Object.keys(object);
11694
+ var keys2 = Object.keys(object);
11695
11695
  if (Object.getOwnPropertySymbols) {
11696
11696
  var symbols = Object.getOwnPropertySymbols(object);
11697
11697
  if (enumerableOnly)
11698
11698
  symbols = symbols.filter(function(sym) {
11699
11699
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
11700
11700
  });
11701
- keys.push.apply(keys, symbols);
11701
+ keys2.push.apply(keys2, symbols);
11702
11702
  }
11703
- return keys;
11703
+ return keys2;
11704
11704
  }
11705
11705
  function _objectSpread(target) {
11706
11706
  for (var i = 1; i < arguments.length; i++) {
@@ -12291,16 +12291,16 @@ var require_lexicographicSortSchema = __commonJS({
12291
12291
  return obj && obj.__esModule ? obj : { default: obj };
12292
12292
  }
12293
12293
  function ownKeys(object, enumerableOnly) {
12294
- var keys = Object.keys(object);
12294
+ var keys2 = Object.keys(object);
12295
12295
  if (Object.getOwnPropertySymbols) {
12296
12296
  var symbols = Object.getOwnPropertySymbols(object);
12297
12297
  if (enumerableOnly)
12298
12298
  symbols = symbols.filter(function(sym) {
12299
12299
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
12300
12300
  });
12301
- keys.push.apply(keys, symbols);
12301
+ keys2.push.apply(keys2, symbols);
12302
12302
  }
12303
- return keys;
12303
+ return keys2;
12304
12304
  }
12305
12305
  function _objectSpread(target) {
12306
12306
  for (var i = 1; i < arguments.length; i++) {
@@ -12841,16 +12841,16 @@ var require_findBreakingChanges = __commonJS({
12841
12841
  return obj && obj.__esModule ? obj : { default: obj };
12842
12842
  }
12843
12843
  function ownKeys(object, enumerableOnly) {
12844
- var keys = Object.keys(object);
12844
+ var keys2 = Object.keys(object);
12845
12845
  if (Object.getOwnPropertySymbols) {
12846
12846
  var symbols = Object.getOwnPropertySymbols(object);
12847
12847
  if (enumerableOnly)
12848
12848
  symbols = symbols.filter(function(sym) {
12849
12849
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
12850
12850
  });
12851
- keys.push.apply(keys, symbols);
12851
+ keys2.push.apply(keys2, symbols);
12852
12852
  }
12853
- return keys;
12853
+ return keys2;
12854
12854
  }
12855
12855
  function _objectSpread(target) {
12856
12856
  for (var i = 1; i < arguments.length; i++) {
@@ -15847,9 +15847,9 @@ var require_legacy_streams = __commonJS({
15847
15847
  this.mode = 438;
15848
15848
  this.bufferSize = 64 * 1024;
15849
15849
  options = options || {};
15850
- var keys = Object.keys(options);
15851
- for (var index = 0, length = keys.length; index < length; index++) {
15852
- var key = keys[index];
15850
+ var keys2 = Object.keys(options);
15851
+ for (var index = 0, length = keys2.length; index < length; index++) {
15852
+ var key = keys2[index];
15853
15853
  this[key] = options[key];
15854
15854
  }
15855
15855
  if (this.encoding)
@@ -15897,9 +15897,9 @@ var require_legacy_streams = __commonJS({
15897
15897
  this.mode = 438;
15898
15898
  this.bytesWritten = 0;
15899
15899
  options = options || {};
15900
- var keys = Object.keys(options);
15901
- for (var index = 0, length = keys.length; index < length; index++) {
15902
- var key = keys[index];
15900
+ var keys2 = Object.keys(options);
15901
+ for (var index = 0, length = keys2.length; index < length; index++) {
15902
+ var key = keys2[index];
15903
15903
  this[key] = options[key];
15904
15904
  }
15905
15905
  if (this.start !== void 0) {
@@ -19116,10 +19116,10 @@ var require_glob = __commonJS({
19116
19116
  if (add === null || typeof add !== "object") {
19117
19117
  return origin;
19118
19118
  }
19119
- var keys = Object.keys(add);
19120
- var i = keys.length;
19119
+ var keys2 = Object.keys(add);
19120
+ var i = keys2.length;
19121
19121
  while (i--) {
19122
- origin[keys[i]] = add[keys[i]];
19122
+ origin[keys2[i]] = add[keys2[i]];
19123
19123
  }
19124
19124
  return origin;
19125
19125
  }
@@ -23185,12 +23185,12 @@ var require_lib3 = __commonJS({
23185
23185
  SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
23186
23186
  SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
23187
23187
  };
23188
- var reflect = (keys, last = keys.length - 1) => ({
23188
+ var reflect = (keys2, last = keys2.length - 1) => ({
23189
23189
  get() {
23190
- return keys.reduce((object, key) => object[key], this);
23190
+ return keys2.reduce((object, key) => object[key], this);
23191
23191
  },
23192
23192
  set(value) {
23193
- keys.reduce(
23193
+ keys2.reduce(
23194
23194
  (item, key, i) => i === last ? item[key] = value : item[key],
23195
23195
  this
23196
23196
  );
@@ -25123,9 +25123,9 @@ var require_lib3 = __commonJS({
25123
25123
  }
25124
25124
  clone(skipArrays) {
25125
25125
  const state = new State();
25126
- const keys = Object.keys(this);
25127
- for (let i = 0, length = keys.length; i < length; i++) {
25128
- const key = keys[i];
25126
+ const keys2 = Object.keys(this);
25127
+ for (let i = 0, length = keys2.length; i < length; i++) {
25128
+ const key = keys2[i];
25129
25129
  let val = this[key];
25130
25130
  if (!skipArrays && Array.isArray(val)) {
25131
25131
  val = val.slice();
@@ -27030,9 +27030,9 @@ var require_lib3 = __commonJS({
27030
27030
  {
27031
27031
  NodePrototype.__clone = function() {
27032
27032
  const newNode = new Node(void 0, this.start, this.loc.start);
27033
- const keys = Object.keys(this);
27034
- for (let i = 0, length = keys.length; i < length; i++) {
27035
- const key = keys[i];
27033
+ const keys2 = Object.keys(this);
27034
+ for (let i = 0, length = keys2.length; i < length; i++) {
27035
+ const key = keys2[i];
27036
27036
  if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
27037
27037
  newNode[key] = this[key];
27038
27038
  }
@@ -37672,109 +37672,6 @@ var require_lib3 = __commonJS({
37672
37672
  }
37673
37673
  });
37674
37674
 
37675
- // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
37676
- var require_cjs = __commonJS({
37677
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
37678
- "use strict";
37679
- var isMergeableObject = function isMergeableObject2(value) {
37680
- return isNonNullObject(value) && !isSpecial(value);
37681
- };
37682
- function isNonNullObject(value) {
37683
- return !!value && typeof value === "object";
37684
- }
37685
- function isSpecial(value) {
37686
- var stringValue = Object.prototype.toString.call(value);
37687
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
37688
- }
37689
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
37690
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
37691
- function isReactElement(value) {
37692
- return value.$$typeof === REACT_ELEMENT_TYPE;
37693
- }
37694
- function emptyTarget(val) {
37695
- return Array.isArray(val) ? [] : {};
37696
- }
37697
- function cloneUnlessOtherwiseSpecified(value, options) {
37698
- return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
37699
- }
37700
- function defaultArrayMerge(target, source, options) {
37701
- return target.concat(source).map(function(element) {
37702
- return cloneUnlessOtherwiseSpecified(element, options);
37703
- });
37704
- }
37705
- function getMergeFunction(key, options) {
37706
- if (!options.customMerge) {
37707
- return deepmerge;
37708
- }
37709
- var customMerge = options.customMerge(key);
37710
- return typeof customMerge === "function" ? customMerge : deepmerge;
37711
- }
37712
- function getEnumerableOwnPropertySymbols(target) {
37713
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
37714
- return target.propertyIsEnumerable(symbol);
37715
- }) : [];
37716
- }
37717
- function getKeys(target) {
37718
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
37719
- }
37720
- function propertyIsOnObject(object, property) {
37721
- try {
37722
- return property in object;
37723
- } catch (_) {
37724
- return false;
37725
- }
37726
- }
37727
- function propertyIsUnsafe(target, key) {
37728
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
37729
- }
37730
- function mergeObject(target, source, options) {
37731
- var destination = {};
37732
- if (options.isMergeableObject(target)) {
37733
- getKeys(target).forEach(function(key) {
37734
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
37735
- });
37736
- }
37737
- getKeys(source).forEach(function(key) {
37738
- if (propertyIsUnsafe(target, key)) {
37739
- return;
37740
- }
37741
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
37742
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
37743
- } else {
37744
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
37745
- }
37746
- });
37747
- return destination;
37748
- }
37749
- function deepmerge(target, source, options) {
37750
- options = options || {};
37751
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
37752
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
37753
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
37754
- var sourceIsArray = Array.isArray(source);
37755
- var targetIsArray = Array.isArray(target);
37756
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
37757
- if (!sourceAndTargetTypesMatch) {
37758
- return cloneUnlessOtherwiseSpecified(source, options);
37759
- } else if (sourceIsArray) {
37760
- return options.arrayMerge(target, source, options);
37761
- } else {
37762
- return mergeObject(target, source, options);
37763
- }
37764
- }
37765
- deepmerge.all = function deepmergeAll(array, options) {
37766
- if (!Array.isArray(array)) {
37767
- throw new Error("first argument should be an array");
37768
- }
37769
- return array.reduce(function(prev, next) {
37770
- return deepmerge(prev, next, options);
37771
- }, {});
37772
- };
37773
- var deepmerge_1 = deepmerge;
37774
- module.exports = deepmerge_1;
37775
- }
37776
- });
37777
-
37778
37675
  // ../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js
37779
37676
  var require_tslib = __commonJS({
37780
37677
  "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module) {
@@ -40044,7 +39941,7 @@ var require_path_visitor = __commonJS({
40044
39941
  }
40045
39942
  return target;
40046
39943
  }
40047
- PathVisitor.visit = function visit13(node, methods) {
39944
+ PathVisitor.visit = function visit12(node, methods) {
40048
39945
  return PathVisitor.fromMethodsObject(methods).visit(node);
40049
39946
  };
40050
39947
  var PVp = PathVisitor.prototype;
@@ -40235,7 +40132,7 @@ var require_path_visitor = __commonJS({
40235
40132
  this.needToCallTraverse = false;
40236
40133
  return visitChildren(path2, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
40237
40134
  };
40238
- sharedContextProtoMethods.visit = function visit13(path2, newVisitor) {
40135
+ sharedContextProtoMethods.visit = function visit12(path2, newVisitor) {
40239
40136
  if (!(this instanceof this.Context)) {
40240
40137
  throw new Error("");
40241
40138
  }
@@ -41628,7 +41525,7 @@ var require_main = __commonJS({
41628
41525
  var someField = _a.someField;
41629
41526
  var Type = _a.Type;
41630
41527
  var use = _a.use;
41631
- var visit13 = _a.visit;
41528
+ var visit12 = _a.visit;
41632
41529
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
41633
41530
  exports.builders = builders;
41634
41531
  exports.builtInTypes = builtInTypes;
@@ -41645,7 +41542,7 @@ var require_main = __commonJS({
41645
41542
  exports.someField = someField;
41646
41543
  exports.Type = Type;
41647
41544
  exports.use = use;
41648
- exports.visit = visit13;
41545
+ exports.visit = visit12;
41649
41546
  Object.assign(namedTypes_1.namedTypes, n);
41650
41547
  }
41651
41548
  });
@@ -43433,10 +43330,10 @@ var require_util2 = __commonJS({
43433
43330
  var result = {};
43434
43331
  var argc = args.length;
43435
43332
  for (var i = 0; i < argc; ++i) {
43436
- var keys = Object.keys(args[i]);
43437
- var keyCount = keys.length;
43333
+ var keys2 = Object.keys(args[i]);
43334
+ var keyCount = keys2.length;
43438
43335
  for (var j = 0; j < keyCount; ++j) {
43439
- result[keys[j]] = true;
43336
+ result[keys2[j]] = true;
43440
43337
  }
43441
43338
  }
43442
43339
  return result;
@@ -51096,10 +50993,10 @@ var require_parser2 = __commonJS({
51096
50993
  loc.indent = newIndent;
51097
50994
  this.findTokenRange(loc);
51098
50995
  }
51099
- var keys = Object.keys(node);
51100
- var keyCount = keys.length;
50996
+ var keys2 = Object.keys(node);
50997
+ var keyCount = keys2.length;
51101
50998
  for (var i = 0; i < keyCount; ++i) {
51102
- var key = keys[i];
50999
+ var key = keys2[i];
51103
51000
  if (key === "loc") {
51104
51001
  copy[key] = node[key];
51105
51002
  } else if (key === "tokens" && node.type === "File") {
@@ -51858,13 +51755,13 @@ var require_patcher = __commonJS({
51858
51755
  if (newPath.needsParens() && !oldPath.hasParens()) {
51859
51756
  return false;
51860
51757
  }
51861
- var keys = (0, util_1.getUnionOfKeys)(oldNode, newNode);
51758
+ var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
51862
51759
  if (oldNode.type === "File" || newNode.type === "File") {
51863
- delete keys.tokens;
51760
+ delete keys2.tokens;
51864
51761
  }
51865
- delete keys.loc;
51762
+ delete keys2.loc;
51866
51763
  var originalReprintCount = reprints.length;
51867
- for (var k in keys) {
51764
+ for (var k in keys2) {
51868
51765
  if (k.charAt(0) === "_") {
51869
51766
  continue;
51870
51767
  }
@@ -54107,6 +54004,109 @@ var require_main2 = __commonJS({
54107
54004
  }
54108
54005
  });
54109
54006
 
54007
+ // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
54008
+ var require_cjs = __commonJS({
54009
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
54010
+ "use strict";
54011
+ var isMergeableObject = function isMergeableObject2(value) {
54012
+ return isNonNullObject(value) && !isSpecial(value);
54013
+ };
54014
+ function isNonNullObject(value) {
54015
+ return !!value && typeof value === "object";
54016
+ }
54017
+ function isSpecial(value) {
54018
+ var stringValue = Object.prototype.toString.call(value);
54019
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
54020
+ }
54021
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
54022
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
54023
+ function isReactElement(value) {
54024
+ return value.$$typeof === REACT_ELEMENT_TYPE;
54025
+ }
54026
+ function emptyTarget(val) {
54027
+ return Array.isArray(val) ? [] : {};
54028
+ }
54029
+ function cloneUnlessOtherwiseSpecified(value, options) {
54030
+ return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
54031
+ }
54032
+ function defaultArrayMerge(target, source, options) {
54033
+ return target.concat(source).map(function(element) {
54034
+ return cloneUnlessOtherwiseSpecified(element, options);
54035
+ });
54036
+ }
54037
+ function getMergeFunction(key, options) {
54038
+ if (!options.customMerge) {
54039
+ return deepmerge;
54040
+ }
54041
+ var customMerge = options.customMerge(key);
54042
+ return typeof customMerge === "function" ? customMerge : deepmerge;
54043
+ }
54044
+ function getEnumerableOwnPropertySymbols(target) {
54045
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
54046
+ return target.propertyIsEnumerable(symbol);
54047
+ }) : [];
54048
+ }
54049
+ function getKeys(target) {
54050
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
54051
+ }
54052
+ function propertyIsOnObject(object, property) {
54053
+ try {
54054
+ return property in object;
54055
+ } catch (_) {
54056
+ return false;
54057
+ }
54058
+ }
54059
+ function propertyIsUnsafe(target, key) {
54060
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
54061
+ }
54062
+ function mergeObject(target, source, options) {
54063
+ var destination = {};
54064
+ if (options.isMergeableObject(target)) {
54065
+ getKeys(target).forEach(function(key) {
54066
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
54067
+ });
54068
+ }
54069
+ getKeys(source).forEach(function(key) {
54070
+ if (propertyIsUnsafe(target, key)) {
54071
+ return;
54072
+ }
54073
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
54074
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
54075
+ } else {
54076
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
54077
+ }
54078
+ });
54079
+ return destination;
54080
+ }
54081
+ function deepmerge(target, source, options) {
54082
+ options = options || {};
54083
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
54084
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
54085
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
54086
+ var sourceIsArray = Array.isArray(source);
54087
+ var targetIsArray = Array.isArray(target);
54088
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
54089
+ if (!sourceAndTargetTypesMatch) {
54090
+ return cloneUnlessOtherwiseSpecified(source, options);
54091
+ } else if (sourceIsArray) {
54092
+ return options.arrayMerge(target, source, options);
54093
+ } else {
54094
+ return mergeObject(target, source, options);
54095
+ }
54096
+ }
54097
+ deepmerge.all = function deepmergeAll(array, options) {
54098
+ if (!Array.isArray(array)) {
54099
+ throw new Error("first argument should be an array");
54100
+ }
54101
+ return array.reduce(function(prev, next) {
54102
+ return deepmerge(prev, next, options);
54103
+ }, {});
54104
+ };
54105
+ var deepmerge_1 = deepmerge;
54106
+ module.exports = deepmerge_1;
54107
+ }
54108
+ });
54109
+
54110
54110
  // src/codegen/index.ts
54111
54111
  var graphql26 = __toESM(require_graphql2(), 1);
54112
54112
 
@@ -54297,9 +54297,9 @@ var fragmentKey = " $fragments";
54297
54297
 
54298
54298
  // src/runtime/lib/key.ts
54299
54299
  var computeKey = ({ field, args }) => {
54300
- const keys = Object.keys(args ?? {});
54301
- keys.sort();
54302
- return args && keys.length > 0 ? `${field}(${keys.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
54300
+ const keys2 = Object.keys(args ?? {});
54301
+ keys2.sort();
54302
+ return args && keys2.length > 0 ? `${field}(${keys2.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
54303
54303
  };
54304
54304
  var stringifyObjectWithNoQuotesOnKeys = (obj_from_json) => {
54305
54305
  if (Array.isArray(obj_from_json)) {
@@ -56251,7 +56251,8 @@ var CacheInternal = class {
56251
56251
  parent = rootID,
56252
56252
  variables,
56253
56253
  stepsFromConnection = null,
56254
- ignoreMasking
56254
+ ignoreMasking,
56255
+ fullCheck = false
56255
56256
  }) {
56256
56257
  if (parent === null) {
56257
56258
  return { data: null, partial: false, stale: false, hasData: true };
@@ -56276,11 +56277,28 @@ var CacheInternal = class {
56276
56277
  let targetSelection = getFieldsForType(selection, typename);
56277
56278
  for (const [
56278
56279
  attributeName,
56279
- { type, keyRaw, selection: fieldSelection, nullable, list, visible }
56280
+ { type, keyRaw, selection: fieldSelection, nullable, list, visible, directives }
56280
56281
  ] of Object.entries(targetSelection)) {
56281
- if (!visible && !ignoreMasking) {
56282
+ if (!visible && !ignoreMasking && !fullCheck) {
56282
56283
  continue;
56283
56284
  }
56285
+ const includeDirective = directives?.find((d) => {
56286
+ return d.name === "include";
56287
+ });
56288
+ if (includeDirective) {
56289
+ if (!evaluateFragmentVariables(includeDirective.arguments, variables ?? {})["if"]) {
56290
+ continue;
56291
+ }
56292
+ }
56293
+ const skipDirective = directives?.find((d) => {
56294
+ return d.name === "skip";
56295
+ });
56296
+ if (skipDirective) {
56297
+ if (evaluateFragmentVariables(skipDirective.arguments, variables ?? {})["if"]) {
56298
+ continue;
56299
+ }
56300
+ }
56301
+ const fieldTarget = visible || ignoreMasking ? target : {};
56284
56302
  const key = evaluateKey(keyRaw, variables);
56285
56303
  const { value } = this.storage.get(parent, key);
56286
56304
  const dt_field = this.staleManager.getFieldTime(parent, key);
@@ -56303,16 +56321,16 @@ var CacheInternal = class {
56303
56321
  partial = true;
56304
56322
  }
56305
56323
  if (typeof value === "undefined" || value === null) {
56306
- target[attributeName] = null;
56324
+ fieldTarget[attributeName] = null;
56307
56325
  if (typeof value !== "undefined") {
56308
56326
  hasData = true;
56309
56327
  }
56310
56328
  } else if (!fieldSelection) {
56311
56329
  const fnUnmarshal = this.config?.scalars?.[type]?.unmarshal;
56312
56330
  if (fnUnmarshal) {
56313
- target[attributeName] = fnUnmarshal(value);
56331
+ fieldTarget[attributeName] = fnUnmarshal(value);
56314
56332
  } else {
56315
- target[attributeName] = value;
56333
+ fieldTarget[attributeName] = value;
56316
56334
  }
56317
56335
  hasData = true;
56318
56336
  } else if (Array.isArray(value)) {
@@ -56321,9 +56339,10 @@ var CacheInternal = class {
56321
56339
  variables,
56322
56340
  linkedList: value,
56323
56341
  stepsFromConnection: nextStep,
56324
- ignoreMasking: !!ignoreMasking
56342
+ ignoreMasking: !!ignoreMasking,
56343
+ fullCheck
56325
56344
  });
56326
- target[attributeName] = listValue.data;
56345
+ fieldTarget[attributeName] = listValue.data;
56327
56346
  if (listValue.partial) {
56328
56347
  partial = true;
56329
56348
  }
@@ -56339,9 +56358,10 @@ var CacheInternal = class {
56339
56358
  selection: fieldSelection,
56340
56359
  variables,
56341
56360
  stepsFromConnection: nextStep,
56342
- ignoreMasking
56361
+ ignoreMasking,
56362
+ fullCheck
56343
56363
  });
56344
- target[attributeName] = objectFields.data;
56364
+ fieldTarget[attributeName] = objectFields.data;
56345
56365
  if (objectFields.partial) {
56346
56366
  partial = true;
56347
56367
  }
@@ -56352,7 +56372,7 @@ var CacheInternal = class {
56352
56372
  hasData = true;
56353
56373
  }
56354
56374
  }
56355
- if (target[attributeName] === null && !nullable && !embeddedCursor) {
56375
+ if (fieldTarget[attributeName] === null && !nullable && !embeddedCursor) {
56356
56376
  cascadeNull = true;
56357
56377
  }
56358
56378
  }
@@ -56384,7 +56404,8 @@ var CacheInternal = class {
56384
56404
  variables,
56385
56405
  linkedList,
56386
56406
  stepsFromConnection,
56387
- ignoreMasking
56407
+ ignoreMasking,
56408
+ fullCheck
56388
56409
  }) {
56389
56410
  const result = [];
56390
56411
  let partialData = false;
@@ -56397,7 +56418,8 @@ var CacheInternal = class {
56397
56418
  variables,
56398
56419
  linkedList: entry,
56399
56420
  stepsFromConnection,
56400
- ignoreMasking
56421
+ ignoreMasking,
56422
+ fullCheck
56401
56423
  });
56402
56424
  result.push(nestedValue.data);
56403
56425
  if (nestedValue.partial) {
@@ -56419,7 +56441,8 @@ var CacheInternal = class {
56419
56441
  selection: fields,
56420
56442
  variables,
56421
56443
  stepsFromConnection,
56422
- ignoreMasking
56444
+ ignoreMasking,
56445
+ fullCheck
56423
56446
  });
56424
56447
  result.push(data);
56425
56448
  if (partial) {
@@ -56618,11 +56641,10 @@ var query = documentPlugin(ArtifactKind.Query, function() {
56618
56641
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
56619
56642
  }
56620
56643
  lastVariables = { ...marshalVariables(ctx) };
56621
- const variables = lastVariables;
56622
56644
  subscriptionSpec = {
56623
56645
  rootType: ctx.artifact.rootType,
56624
56646
  selection: ctx.artifact.selection,
56625
- variables: () => variables,
56647
+ variables: () => lastVariables,
56626
56648
  set: (newValue) => {
56627
56649
  resolve2(ctx, {
56628
56650
  data: newValue,
@@ -56651,17 +56673,12 @@ var query = documentPlugin(ArtifactKind.Query, function() {
56651
56673
  // src/runtime/client/plugins/fragment.ts
56652
56674
  var fragment = documentPlugin(ArtifactKind.Fragment, function() {
56653
56675
  let subscriptionSpec = null;
56654
- let lastReference = null;
56655
56676
  return {
56656
56677
  start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
56657
56678
  if (!ctx.stuff.parentID) {
56658
56679
  return next(ctx);
56659
56680
  }
56660
- const currentReference = {
56661
- parent: ctx.stuff.parentID,
56662
- variables: marshalVariables(ctx)
56663
- };
56664
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
56681
+ if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
56665
56682
  if (subscriptionSpec) {
56666
56683
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
56667
56684
  }
@@ -56684,7 +56701,6 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
56684
56701
  }
56685
56702
  };
56686
56703
  cache_default.subscribe(subscriptionSpec, variables);
56687
- lastReference = currentReference;
56688
56704
  }
56689
56705
  next(ctx);
56690
56706
  },
@@ -56908,40 +56924,13 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
56908
56924
 
56909
56925
  // src/lib/parse.ts
56910
56926
  var import_parser = __toESM(require_lib3(), 1);
56911
-
56912
- // src/lib/deepMerge.ts
56913
- var import_deepmerge = __toESM(require_cjs(), 1);
56914
- function deepMerge(filepath, ...targets) {
56915
- try {
56916
- if (targets.length === 1) {
56917
- return targets[0];
56918
- } else if (targets.length === 2) {
56919
- return (0, import_deepmerge.default)(targets[0], targets[1], {
56920
- arrayMerge: (source, update) => [...new Set(source.concat(update))]
56921
- });
56922
- }
56923
- return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
56924
- } catch (e) {
56925
- throw new HoudiniError({
56926
- filepath,
56927
- message: "could not merge: " + JSON.stringify(targets, null, 4),
56928
- description: e.message
56929
- });
56930
- }
56931
- }
56932
-
56933
- // src/lib/parse.ts
56934
- async function parseJS(str, config2) {
56935
- const defaultConfig = {
56936
- plugins: ["typescript"],
56937
- sourceType: "module"
56938
- };
56927
+ async function parseJS(str) {
56939
56928
  return {
56940
56929
  start: 0,
56941
- script: (0, import_parser.parse)(
56942
- str || "",
56943
- config2 ? deepMerge("", defaultConfig, config2) : defaultConfig
56944
- ).program,
56930
+ script: (0, import_parser.parse)(str || "", {
56931
+ plugins: ["typescript"],
56932
+ sourceType: "module"
56933
+ }).program,
56945
56934
  end: str.length
56946
56935
  };
56947
56936
  }
@@ -56991,6 +56980,27 @@ async function cleanupFiles(pathFolder, listOfObj) {
56991
56980
  return allFilesNotInList;
56992
56981
  }
56993
56982
 
56983
+ // src/lib/deepMerge.ts
56984
+ var import_deepmerge = __toESM(require_cjs(), 1);
56985
+ function deepMerge(filepath, ...targets) {
56986
+ try {
56987
+ if (targets.length === 1) {
56988
+ return targets[0];
56989
+ } else if (targets.length === 2) {
56990
+ return (0, import_deepmerge.default)(targets[0], targets[1], {
56991
+ arrayMerge: (source, update) => [...new Set(source.concat(update))]
56992
+ });
56993
+ }
56994
+ return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
56995
+ } catch (e) {
56996
+ throw new HoudiniError({
56997
+ filepath,
56998
+ message: "could not merge: " + targets,
56999
+ description: e.message
57000
+ });
57001
+ }
57002
+ }
57003
+
56994
57004
  // ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
56995
57005
  var WalkerBase = class {
56996
57006
  constructor() {
@@ -57476,6 +57486,205 @@ function murmurHash(str) {
57476
57486
  return s;
57477
57487
  }
57478
57488
 
57489
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/types.js
57490
+ var VOID = -1;
57491
+ var PRIMITIVE = 0;
57492
+ var ARRAY = 1;
57493
+ var OBJECT = 2;
57494
+ var DATE = 3;
57495
+ var REGEXP = 4;
57496
+ var MAP = 5;
57497
+ var SET = 6;
57498
+ var ERROR = 7;
57499
+ var BIGINT = 8;
57500
+
57501
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/deserialize.js
57502
+ var env = typeof self === "object" ? self : globalThis;
57503
+ var deserializer = ($, _) => {
57504
+ const as = (out, index) => {
57505
+ $.set(index, out);
57506
+ return out;
57507
+ };
57508
+ const unpair = (index) => {
57509
+ if ($.has(index))
57510
+ return $.get(index);
57511
+ const [type, value] = _[index];
57512
+ switch (type) {
57513
+ case PRIMITIVE:
57514
+ case VOID:
57515
+ return as(value, index);
57516
+ case ARRAY: {
57517
+ const arr = as([], index);
57518
+ for (const index2 of value)
57519
+ arr.push(unpair(index2));
57520
+ return arr;
57521
+ }
57522
+ case OBJECT: {
57523
+ const object = as({}, index);
57524
+ for (const [key, index2] of value)
57525
+ object[unpair(key)] = unpair(index2);
57526
+ return object;
57527
+ }
57528
+ case DATE:
57529
+ return as(new Date(value), index);
57530
+ case REGEXP: {
57531
+ const { source, flags } = value;
57532
+ return as(new RegExp(source, flags), index);
57533
+ }
57534
+ case MAP: {
57535
+ const map = as(/* @__PURE__ */ new Map(), index);
57536
+ for (const [key, index2] of value)
57537
+ map.set(unpair(key), unpair(index2));
57538
+ return map;
57539
+ }
57540
+ case SET: {
57541
+ const set = as(/* @__PURE__ */ new Set(), index);
57542
+ for (const index2 of value)
57543
+ set.add(unpair(index2));
57544
+ return set;
57545
+ }
57546
+ case ERROR: {
57547
+ const { name, message } = value;
57548
+ return as(new env[name](message), index);
57549
+ }
57550
+ case BIGINT:
57551
+ return as(BigInt(value), index);
57552
+ case "BigInt":
57553
+ return as(Object(BigInt(value)), index);
57554
+ }
57555
+ return as(new env[type](value), index);
57556
+ };
57557
+ return unpair;
57558
+ };
57559
+ var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
57560
+
57561
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/serialize.js
57562
+ var EMPTY = "";
57563
+ var { toString } = {};
57564
+ var { keys } = Object;
57565
+ var typeOf = (value) => {
57566
+ const type = typeof value;
57567
+ if (type !== "object" || !value)
57568
+ return [PRIMITIVE, type];
57569
+ const asString = toString.call(value).slice(8, -1);
57570
+ switch (asString) {
57571
+ case "Array":
57572
+ return [ARRAY, EMPTY];
57573
+ case "Object":
57574
+ return [OBJECT, EMPTY];
57575
+ case "Date":
57576
+ return [DATE, EMPTY];
57577
+ case "RegExp":
57578
+ return [REGEXP, EMPTY];
57579
+ case "Map":
57580
+ return [MAP, EMPTY];
57581
+ case "Set":
57582
+ return [SET, EMPTY];
57583
+ }
57584
+ if (asString.includes("Array"))
57585
+ return [ARRAY, asString];
57586
+ if (asString.includes("Error"))
57587
+ return [ERROR, asString];
57588
+ return [OBJECT, asString];
57589
+ };
57590
+ var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
57591
+ var serializer = (strict, json, $, _) => {
57592
+ const as = (out, value) => {
57593
+ const index = _.push(out) - 1;
57594
+ $.set(value, index);
57595
+ return index;
57596
+ };
57597
+ const pair = (value) => {
57598
+ if ($.has(value))
57599
+ return $.get(value);
57600
+ let [TYPE, type] = typeOf(value);
57601
+ switch (TYPE) {
57602
+ case PRIMITIVE: {
57603
+ let entry = value;
57604
+ switch (type) {
57605
+ case "bigint":
57606
+ TYPE = BIGINT;
57607
+ entry = value.toString();
57608
+ break;
57609
+ case "function":
57610
+ case "symbol":
57611
+ if (strict)
57612
+ throw new TypeError("unable to serialize " + type);
57613
+ entry = null;
57614
+ break;
57615
+ case "undefined":
57616
+ return as([VOID], value);
57617
+ }
57618
+ return as([TYPE, entry], value);
57619
+ }
57620
+ case ARRAY: {
57621
+ if (type)
57622
+ return as([type, [...value]], value);
57623
+ const arr = [];
57624
+ const index = as([TYPE, arr], value);
57625
+ for (const entry of value)
57626
+ arr.push(pair(entry));
57627
+ return index;
57628
+ }
57629
+ case OBJECT: {
57630
+ if (type) {
57631
+ switch (type) {
57632
+ case "BigInt":
57633
+ return as([type, value.toString()], value);
57634
+ case "Boolean":
57635
+ case "Number":
57636
+ case "String":
57637
+ return as([type, value.valueOf()], value);
57638
+ }
57639
+ }
57640
+ if (json && "toJSON" in value)
57641
+ return pair(value.toJSON());
57642
+ const entries = [];
57643
+ const index = as([TYPE, entries], value);
57644
+ for (const key of keys(value)) {
57645
+ if (strict || !shouldSkip(typeOf(value[key])))
57646
+ entries.push([pair(key), pair(value[key])]);
57647
+ }
57648
+ return index;
57649
+ }
57650
+ case DATE:
57651
+ return as([TYPE, value.toISOString()], value);
57652
+ case REGEXP: {
57653
+ const { source, flags } = value;
57654
+ return as([TYPE, { source, flags }], value);
57655
+ }
57656
+ case MAP: {
57657
+ const entries = [];
57658
+ const index = as([TYPE, entries], value);
57659
+ for (const [key, entry] of value) {
57660
+ if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
57661
+ entries.push([pair(key), pair(entry)]);
57662
+ }
57663
+ return index;
57664
+ }
57665
+ case SET: {
57666
+ const entries = [];
57667
+ const index = as([TYPE, entries], value);
57668
+ for (const entry of value) {
57669
+ if (strict || !shouldSkip(typeOf(entry)))
57670
+ entries.push(pair(entry));
57671
+ }
57672
+ return index;
57673
+ }
57674
+ }
57675
+ const { message } = value;
57676
+ return as([TYPE, { name: type, message }], value);
57677
+ };
57678
+ return pair;
57679
+ };
57680
+ var serialize = (value, { json, lossy } = {}) => {
57681
+ const _ = [];
57682
+ return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
57683
+ };
57684
+
57685
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/index.js
57686
+ var esm_default = typeof structuredClone === "function" ? (any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any) : (any, options) => deserialize(serialize(any, options));
57687
+
57479
57688
  // src/codegen/transforms/fragmentVariables.ts
57480
57689
  var graphql4 = __toESM(require_graphql2(), 1);
57481
57690
 
@@ -57623,100 +57832,106 @@ function inlineFragmentArgs({
57623
57832
  filepath,
57624
57833
  document
57625
57834
  ).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
57626
- const result = graphql4.visit(document, {
57627
- FragmentSpread(node) {
57628
- if (!fragmentDefinitions[node.name.value]) {
57629
- throw new Error("Could not find definition for fragment" + node.name.value);
57630
- }
57631
- const { definition } = fragmentDefinitions[node.name.value];
57632
- let { args, hash } = collectWithArguments(config2, filepath, node, scope);
57633
- const newFragmentName = `${node.name.value}${hash}`;
57634
- config2.registerFragmentVariablesHash({
57635
- hash: newFragmentName,
57636
- fragment: node.name.value,
57637
- args
57638
- });
57639
- if (!visitedFragments.has(newFragmentName)) {
57640
- visitedFragments.add(newFragmentName);
57641
- const defaultArguments = collectDefaultArgumentValues(config2, filepath, definition);
57642
- if (args) {
57643
- for (const [field, value] of Object.entries(defaultArguments || {})) {
57644
- if (!args[field]) {
57645
- args[field] = value;
57646
- }
57647
- }
57648
- generatedFragments[newFragmentName] = inlineFragmentArgs({
57649
- config: config2,
57835
+ const result = esm_default(
57836
+ graphql4.visit(document, {
57837
+ FragmentSpread(node) {
57838
+ if (!fragmentDefinitions[node.name.value]) {
57839
+ throw new Error("Could not find definition for fragment" + node.name.value);
57840
+ }
57841
+ const { definition } = fragmentDefinitions[node.name.value];
57842
+ let { args, hash } = collectWithArguments(config2, filepath, node, scope);
57843
+ const newFragmentName = `${node.name.value}${hash}`;
57844
+ config2.registerFragmentVariablesHash({
57845
+ hash: newFragmentName,
57846
+ fragment: node.name.value,
57847
+ args
57848
+ });
57849
+ if (!visitedFragments.has(newFragmentName)) {
57850
+ visitedFragments.add(newFragmentName);
57851
+ const defaultArguments = collectDefaultArgumentValues(
57852
+ config2,
57650
57853
  filepath,
57651
- fragmentDefinitions,
57652
- document: fragmentDefinitions[node.name.value].definition,
57653
- generatedFragments,
57654
- visitedFragments,
57655
- scope: args,
57656
- newName: newFragmentName
57657
- });
57658
- } else {
57659
- const doc = fragmentDefinitions[node.name.value].document;
57660
- const definitionIndex = doc.document.definitions.findIndex(
57661
- (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
57854
+ definition
57662
57855
  );
57663
- const localDefinitions = [...doc.document.definitions];
57664
- localDefinitions.splice(definitionIndex, 1);
57665
- localDefinitions.push(
57666
- inlineFragmentArgs({
57856
+ if (args) {
57857
+ for (const [field, value] of Object.entries(defaultArguments || {})) {
57858
+ if (!args[field]) {
57859
+ args[field] = value;
57860
+ }
57861
+ }
57862
+ generatedFragments[newFragmentName] = inlineFragmentArgs({
57667
57863
  config: config2,
57668
57864
  filepath,
57669
57865
  fragmentDefinitions,
57670
57866
  document: fragmentDefinitions[node.name.value].definition,
57671
57867
  generatedFragments,
57672
57868
  visitedFragments,
57673
- scope: defaultArguments,
57674
- newName: ""
57675
- })
57676
- );
57677
- doc.document = {
57678
- ...doc.document,
57679
- definitions: localDefinitions
57680
- };
57869
+ scope: args,
57870
+ newName: newFragmentName
57871
+ });
57872
+ } else {
57873
+ const doc = fragmentDefinitions[node.name.value].document;
57874
+ const definitionIndex = doc.document.definitions.findIndex(
57875
+ (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
57876
+ );
57877
+ const localDefinitions = [...doc.document.definitions];
57878
+ localDefinitions.splice(definitionIndex, 1);
57879
+ localDefinitions.push(
57880
+ inlineFragmentArgs({
57881
+ config: config2,
57882
+ filepath,
57883
+ fragmentDefinitions,
57884
+ document: fragmentDefinitions[node.name.value].definition,
57885
+ generatedFragments,
57886
+ visitedFragments,
57887
+ scope: defaultArguments,
57888
+ newName: ""
57889
+ })
57890
+ );
57891
+ doc.document = {
57892
+ ...doc.document,
57893
+ definitions: localDefinitions
57894
+ };
57895
+ }
57896
+ if (node.name.value !== newFragmentName) {
57897
+ return {
57898
+ ...node,
57899
+ name: {
57900
+ kind: "Name",
57901
+ value: newFragmentName
57902
+ }
57903
+ };
57904
+ }
57905
+ }
57906
+ },
57907
+ Argument(node) {
57908
+ const value = node.value;
57909
+ if (value.kind !== "Variable") {
57910
+ return;
57911
+ }
57912
+ if (!scope) {
57913
+ throw new HoudiniError({
57914
+ filepath,
57915
+ message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
57916
+ });
57681
57917
  }
57682
- if (node.name.value !== newFragmentName) {
57918
+ const newValue = scope[value.name.value];
57919
+ if (newValue) {
57683
57920
  return {
57684
57921
  ...node,
57685
- name: {
57686
- kind: "Name",
57687
- value: newFragmentName
57688
- }
57922
+ value: newValue
57689
57923
  };
57690
57924
  }
57925
+ if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
57926
+ throw new HoudiniError({
57927
+ filepath,
57928
+ message: "Missing value for required arg: " + value.name.value
57929
+ });
57930
+ }
57931
+ return null;
57691
57932
  }
57692
- },
57693
- Argument(node) {
57694
- const value = node.value;
57695
- if (value.kind !== "Variable") {
57696
- return;
57697
- }
57698
- if (!scope) {
57699
- throw new HoudiniError({
57700
- filepath,
57701
- message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
57702
- });
57703
- }
57704
- const newValue = scope[value.name.value];
57705
- if (newValue) {
57706
- return {
57707
- ...node,
57708
- value: newValue
57709
- };
57710
- }
57711
- if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
57712
- throw new HoudiniError({
57713
- filepath,
57714
- message: "Missing value for required arg: " + value.name.value
57715
- });
57716
- }
57717
- return null;
57718
- }
57719
- });
57933
+ })
57934
+ );
57720
57935
  if (newName) {
57721
57936
  result.name = {
57722
57937
  kind: graphql4.Kind.NAME,
@@ -58432,7 +58647,7 @@ async function paginate(config2, documents) {
58432
58647
  ]
58433
58648
  }
58434
58649
  ];
58435
- const keys = config2.keyFieldsForType(!nodeQuery ? config2.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
58650
+ const keys2 = config2.keyFieldsForType(!nodeQuery ? config2.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
58436
58651
  if (fragment2 === config2.schema.getQueryType()?.name) {
58437
58652
  return [];
58438
58653
  }
@@ -58482,7 +58697,7 @@ async function paginate(config2, documents) {
58482
58697
  }
58483
58698
  })
58484
58699
  ).concat(
58485
- !nodeQuery ? [] : keys.map(
58700
+ !nodeQuery ? [] : keys2.map(
58486
58701
  (key) => ({
58487
58702
  kind: graphql9.Kind.VARIABLE_DEFINITION,
58488
58703
  type: key.type,
@@ -58505,7 +58720,7 @@ async function paginate(config2, documents) {
58505
58720
  kind: graphql9.Kind.NAME,
58506
58721
  value: typeConfig?.resolve?.queryField || "node"
58507
58722
  },
58508
- ["arguments"]: keys.map((key) => ({
58723
+ ["arguments"]: keys2.map((key) => ({
58509
58724
  kind: graphql9.Kind.ARGUMENT,
58510
58725
  name: {
58511
58726
  kind: graphql9.Kind.NAME,
@@ -59199,12 +59414,24 @@ function prepareSelection({
59199
59414
  }
59200
59415
  const typeName = fieldType.toString();
59201
59416
  const pathSoFar = path2.concat(attributeName);
59202
- const keys = config2.keyFieldsForType(rootType);
59417
+ const keys2 = config2.keyFieldsForType(rootType);
59203
59418
  let fieldObj = {
59204
59419
  type: typeName,
59205
59420
  keyRaw: fieldKey(config2, field)
59206
59421
  };
59207
- if (keys.includes(field.name.value)) {
59422
+ if (field.directives && field.directives.length > 0) {
59423
+ fieldObj.directives = field.directives?.map((directive) => ({
59424
+ name: directive.name.value,
59425
+ arguments: (directive.arguments ?? []).reduce(
59426
+ (acc, arg) => ({
59427
+ ...acc,
59428
+ [arg.name.value]: config2.serializeValueMap({ field: arg.value })["field"]
59429
+ }),
59430
+ {}
59431
+ )
59432
+ }));
59433
+ }
59434
+ if (keys2.includes(field.name.value)) {
59208
59435
  fieldObj.visible = true;
59209
59436
  }
59210
59437
  if (nullable) {
@@ -59429,12 +59656,7 @@ function artifactGenerator(stats) {
59429
59656
  writeIndexFile(config2, docs)
59430
59657
  ].concat(
59431
59658
  docs.map(async (doc) => {
59432
- const {
59433
- document,
59434
- name,
59435
- generateArtifact,
59436
- originalParsed
59437
- } = doc;
59659
+ const { document, name, generateArtifact, originalParsed, originalString } = doc;
59438
59660
  if (!generateArtifact) {
59439
59661
  return;
59440
59662
  }
@@ -59849,12 +60071,12 @@ ${exportStatement("config")}
59849
60071
  },
59850
60072
  [path_exports.join(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
59851
60073
  }),
59852
- ...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, docs, plugin2)),
60074
+ ...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, plugin2)),
59853
60075
  generatePluginIndex({ config: config2, exportStatement: exportStar })
59854
60076
  ]);
59855
60077
  await generateGraphqlReturnTypes(config2, docs);
59856
60078
  }
59857
- async function generatePluginRuntime(config2, docs, plugin2) {
60079
+ async function generatePluginRuntime(config2, plugin2) {
59858
60080
  if (houdini_mode.is_testing || !plugin2.includeRuntime) {
59859
60081
  return;
59860
60082
  }
@@ -59871,16 +60093,12 @@ async function generatePluginRuntime(config2, docs, plugin2) {
59871
60093
  });
59872
60094
  }
59873
60095
  const pluginDir = config2.pluginRuntimeDirectory(plugin2.name);
59874
- let transformMap = plugin2.transformRuntime ?? {};
59875
- if (transformMap && typeof transformMap === "function") {
59876
- transformMap = transformMap(docs);
59877
- }
59878
60096
  await fs_exports.mkdirp(pluginDir);
59879
60097
  await fs_exports.recursiveCopy(
59880
60098
  runtime_path,
59881
60099
  pluginDir,
59882
60100
  Object.fromEntries(
59883
- Object.entries(transformMap).map(([key, value]) => [
60101
+ Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
59884
60102
  path_exports.join(runtime_path, key),
59885
60103
  (content) => value({ config: config2, content })
59886
60104
  ])
@@ -60320,8 +60538,7 @@ async function generateDocumentTypes(config2, docs) {
60320
60538
  originalParsed: originalDocument,
60321
60539
  name,
60322
60540
  filename,
60323
- generateArtifact,
60324
- artifact
60541
+ generateArtifact
60325
60542
  }) => {
60326
60543
  if (!generateArtifact) {
60327
60544
  return;
@@ -60360,14 +60577,6 @@ async function generateDocumentTypes(config2, docs) {
60360
60577
  missingScalars
60361
60578
  );
60362
60579
  }
60363
- program.body.push(
60364
- AST11.exportNamedDeclaration(
60365
- AST11.tsTypeAliasDeclaration(
60366
- AST11.identifier(`${name}$artifact`),
60367
- convertToTs(serializeValue(artifact))
60368
- )
60369
- )
60370
- );
60371
60580
  await fs_exports.writeFile(typeDefPath, recast11.print(program).code);
60372
60581
  typePaths.push(typeDefPath);
60373
60582
  }
@@ -60394,17 +60603,18 @@ export * from "${module}"
60394
60603
  `;
60395
60604
  let indexContent = recast11.print(typeIndex).code;
60396
60605
  for (const plugin2 of config2.plugins) {
60397
- if (plugin2.indexFile) {
60398
- indexContent = plugin2.indexFile({
60399
- config: config2,
60400
- content: indexContent,
60401
- exportDefaultAs,
60402
- exportStarFrom: exportStarFrom2,
60403
- pluginRoot: config2.pluginDirectory(plugin2.name),
60404
- typedef: true,
60405
- documents: docs
60406
- });
60606
+ if (!plugin2.indexFile) {
60607
+ continue;
60407
60608
  }
60609
+ indexContent = plugin2.indexFile({
60610
+ config: config2,
60611
+ content: indexContent,
60612
+ exportDefaultAs,
60613
+ exportStarFrom: exportStarFrom2,
60614
+ pluginRoot: config2.pluginDirectory(plugin2.name),
60615
+ typedef: true,
60616
+ documents: docs
60617
+ });
60408
60618
  if (plugin2.includeRuntime) {
60409
60619
  indexContent += exportStarFrom2({
60410
60620
  module: "./" + path_exports.relative(config2.rootDir, config2.pluginRuntimeDirectory(plugin2.name))
@@ -60436,42 +60646,6 @@ ${[...missingScalars].map(
60436
60646
  For more information, please visit this link: ${siteURL}/api/config#custom-scalars`);
60437
60647
  }
60438
60648
  }
60439
- function convertToTs(source) {
60440
- if (source.type === "ObjectExpression") {
60441
- return AST11.tsTypeLiteral(
60442
- source.properties.reduce(
60443
- (props, prop) => {
60444
- if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
60445
- return props;
60446
- }
60447
- return [
60448
- ...props,
60449
- AST11.tsPropertySignature(
60450
- prop.key,
60451
- AST11.tsTypeAnnotation(convertToTs(prop.value))
60452
- )
60453
- ];
60454
- },
60455
- []
60456
- )
60457
- );
60458
- }
60459
- if (source.type === "ArrayExpression") {
60460
- return AST11.tsTupleType(
60461
- source.elements.map((element) => convertToTs(element))
60462
- );
60463
- }
60464
- if (source.type === "Literal" && typeof source.value === "boolean") {
60465
- return AST11.tsLiteralType(AST11.booleanLiteral(source.value));
60466
- }
60467
- if (source.type === "Literal" && typeof source.value === "number") {
60468
- return AST11.tsLiteralType(AST11.numericLiteral(source.value));
60469
- }
60470
- if (source.type === "Literal" && typeof source.value === "string") {
60471
- return AST11.tsLiteralType(AST11.stringLiteral(source.value));
60472
- }
60473
- return AST11.tsLiteralType(source);
60474
- }
60475
60649
  async function generateOperationTypeDefs(config2, filepath, body, definition, selections, visitedTypes, missingScalars) {
60476
60650
  let parentType = null;
60477
60651
  if (definition.operation === "query") {
@@ -60743,10 +60917,10 @@ function typeDefinitions(config2, body, docs, returnType) {
60743
60917
  typeName = "__ROOT__";
60744
60918
  }
60745
60919
  let idFields = AST12.tsNeverKeyword();
60746
- const keys = keyFieldsForType(config2.configFile, type.name);
60747
- if (graphql18.isObjectType(type) && keys.length > 0 && keys.every((key) => type.getFields()[key])) {
60920
+ const keys2 = keyFieldsForType(config2.configFile, type.name);
60921
+ if (graphql18.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
60748
60922
  idFields = AST12.tsTypeLiteral(
60749
- keys.map((key) => {
60923
+ keys2.map((key) => {
60750
60924
  const fieldType = type.getFields()[key];
60751
60925
  const unwrapped = unwrapType(config2, fieldType.type);
60752
60926
  return AST12.tsPropertySignature(
@@ -61179,6 +61353,9 @@ async function writeIndexFile2(config2, docs) {
61179
61353
  module: relative2(config2.pluginRuntimeDirectory(plugin2.name))
61180
61354
  });
61181
61355
  }
61356
+ if (!plugin2.indexFile) {
61357
+ continue;
61358
+ }
61182
61359
  }
61183
61360
  await fs_exports.writeFile(path_exports.join(config2.rootDir, "index.js"), body);
61184
61361
  }
@@ -62444,10 +62621,7 @@ async function collectDocuments(config2) {
62444
62621
  }
62445
62622
  }
62446
62623
  } catch (err) {
62447
- throw {
62448
- message: err.message,
62449
- filepath
62450
- };
62624
+ throw new HoudiniError({ ...err, filepath });
62451
62625
  }
62452
62626
  })
62453
62627
  );