houdini 1.1.4-react.0 → 1.1.5

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 +603 -442
  2. package/build/cmd-esm/index.js +603 -442
  3. package/build/codegen/transforms/fragmentVariables.d.ts +0 -11
  4. package/build/codegen-cjs/index.js +572 -398
  5. package/build/codegen-esm/index.js +572 -398
  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 +188 -196
  10. package/build/lib-esm/index.js +188 -196
  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 +594 -424
  34. package/build/test-esm/index.js +594 -424
  35. package/build/vite-cjs/index.js +613 -450
  36. package/build/vite-esm/index.js +613 -450
  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
@@ -1978,16 +1978,16 @@ var require_GraphQLError = __commonJS({
1978
1978
  return obj && obj.__esModule ? obj : { default: obj };
1979
1979
  }
1980
1980
  function ownKeys(object, enumerableOnly) {
1981
- var keys = Object.keys(object);
1981
+ var keys2 = Object.keys(object);
1982
1982
  if (Object.getOwnPropertySymbols) {
1983
1983
  var symbols = Object.getOwnPropertySymbols(object);
1984
1984
  if (enumerableOnly)
1985
1985
  symbols = symbols.filter(function(sym) {
1986
1986
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1987
1987
  });
1988
- keys.push.apply(keys, symbols);
1988
+ keys2.push.apply(keys2, symbols);
1989
1989
  }
1990
- return keys;
1990
+ return keys2;
1991
1991
  }
1992
1992
  function _objectSpread(target) {
1993
1993
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -2224,7 +2224,7 @@ var require_GraphQLError = __commonJS({
2224
2224
  }
2225
2225
  _createClass(GraphQLError5, [{
2226
2226
  key: "toString",
2227
- value: function toString() {
2227
+ value: function toString2() {
2228
2228
  return printError(this);
2229
2229
  }
2230
2230
  }, {
@@ -2546,14 +2546,14 @@ var require_inspect = __commonJS({
2546
2546
  return formatObject2(value, seenValues);
2547
2547
  }
2548
2548
  function formatObject2(object, seenValues) {
2549
- var keys = Object.keys(object);
2550
- if (keys.length === 0) {
2549
+ var keys2 = Object.keys(object);
2550
+ if (keys2.length === 0) {
2551
2551
  return "{}";
2552
2552
  }
2553
2553
  if (seenValues.length > MAX_RECURSIVE_DEPTH2) {
2554
2554
  return "[" + getObjectTag2(object) + "]";
2555
2555
  }
2556
- var properties = keys.map(function(key) {
2556
+ var properties = keys2.map(function(key) {
2557
2557
  var value = formatValue2(object[key], seenValues);
2558
2558
  return key + ": " + value;
2559
2559
  });
@@ -4151,7 +4151,7 @@ var require_visitor = __commonJS({
4151
4151
  Object.defineProperty(exports, "__esModule", {
4152
4152
  value: true
4153
4153
  });
4154
- exports.visit = visit14;
4154
+ exports.visit = visit13;
4155
4155
  exports.visitInParallel = visitInParallel;
4156
4156
  exports.getVisitFn = getVisitFn;
4157
4157
  exports.BREAK = exports.QueryDocumentKeys = void 0;
@@ -4214,11 +4214,11 @@ var require_visitor = __commonJS({
4214
4214
  exports.QueryDocumentKeys = QueryDocumentKeys;
4215
4215
  var BREAK = Object.freeze({});
4216
4216
  exports.BREAK = BREAK;
4217
- function visit14(root, visitor) {
4217
+ function visit13(root, visitor) {
4218
4218
  var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
4219
4219
  var stack = void 0;
4220
4220
  var inArray = Array.isArray(root);
4221
- var keys = [root];
4221
+ var keys2 = [root];
4222
4222
  var index = -1;
4223
4223
  var edits = [];
4224
4224
  var node = void 0;
@@ -4229,7 +4229,7 @@ var require_visitor = __commonJS({
4229
4229
  var newRoot = root;
4230
4230
  do {
4231
4231
  index++;
4232
- var isLeaving = index === keys.length;
4232
+ var isLeaving = index === keys2.length;
4233
4233
  var isEdited = isLeaving && edits.length !== 0;
4234
4234
  if (isLeaving) {
4235
4235
  key = ancestors.length === 0 ? void 0 : path2[path2.length - 1];
@@ -4262,12 +4262,12 @@ var require_visitor = __commonJS({
4262
4262
  }
4263
4263
  }
4264
4264
  index = stack.index;
4265
- keys = stack.keys;
4265
+ keys2 = stack.keys;
4266
4266
  edits = stack.edits;
4267
4267
  inArray = stack.inArray;
4268
4268
  stack = stack.prev;
4269
4269
  } else {
4270
- key = parent ? inArray ? index : keys[index] : void 0;
4270
+ key = parent ? inArray ? index : keys2[index] : void 0;
4271
4271
  node = parent ? parent[key] : newRoot;
4272
4272
  if (node === null || node === void 0) {
4273
4273
  continue;
@@ -4315,12 +4315,12 @@ var require_visitor = __commonJS({
4315
4315
  stack = {
4316
4316
  inArray,
4317
4317
  index,
4318
- keys,
4318
+ keys: keys2,
4319
4319
  edits,
4320
4320
  prev: stack
4321
4321
  };
4322
4322
  inArray = Array.isArray(node);
4323
- keys = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
4323
+ keys2 = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
4324
4324
  index = -1;
4325
4325
  edits = [];
4326
4326
  if (parent) {
@@ -5303,7 +5303,7 @@ var require_definition = __commonJS({
5303
5303
  return new GraphQLList6(ofType);
5304
5304
  }
5305
5305
  }
5306
- GraphQLList6.prototype.toString = function toString() {
5306
+ GraphQLList6.prototype.toString = function toString2() {
5307
5307
  return "[" + String(this.ofType) + "]";
5308
5308
  };
5309
5309
  GraphQLList6.prototype.toJSON = function toJSON() {
@@ -5322,7 +5322,7 @@ var require_definition = __commonJS({
5322
5322
  return new GraphQLNonNull6(ofType);
5323
5323
  }
5324
5324
  }
5325
- GraphQLNonNull6.prototype.toString = function toString() {
5325
+ GraphQLNonNull6.prototype.toString = function toString2() {
5326
5326
  return String(this.ofType) + "!";
5327
5327
  };
5328
5328
  GraphQLNonNull6.prototype.toJSON = function toJSON() {
@@ -5418,7 +5418,7 @@ var require_definition = __commonJS({
5418
5418
  extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : []
5419
5419
  };
5420
5420
  };
5421
- _proto.toString = function toString() {
5421
+ _proto.toString = function toString2() {
5422
5422
  return this.name;
5423
5423
  };
5424
5424
  _proto.toJSON = function toJSON() {
@@ -5472,7 +5472,7 @@ var require_definition = __commonJS({
5472
5472
  extensionASTNodes: this.extensionASTNodes || []
5473
5473
  };
5474
5474
  };
5475
- _proto2.toString = function toString() {
5475
+ _proto2.toString = function toString2() {
5476
5476
  return this.name;
5477
5477
  };
5478
5478
  _proto2.toJSON = function toJSON() {
@@ -5603,7 +5603,7 @@ var require_definition = __commonJS({
5603
5603
  extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : []
5604
5604
  };
5605
5605
  };
5606
- _proto3.toString = function toString() {
5606
+ _proto3.toString = function toString2() {
5607
5607
  return this.name;
5608
5608
  };
5609
5609
  _proto3.toJSON = function toJSON() {
@@ -5650,7 +5650,7 @@ var require_definition = __commonJS({
5650
5650
  extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : []
5651
5651
  };
5652
5652
  };
5653
- _proto4.toString = function toString() {
5653
+ _proto4.toString = function toString2() {
5654
5654
  return this.name;
5655
5655
  };
5656
5656
  _proto4.toJSON = function toJSON() {
@@ -5694,7 +5694,7 @@ var require_definition = __commonJS({
5694
5694
  _proto5.getValue = function getValue(name) {
5695
5695
  return this._nameLookup[name];
5696
5696
  };
5697
- _proto5.serialize = function serialize(outputValue) {
5697
+ _proto5.serialize = function serialize2(outputValue) {
5698
5698
  var enumValue = this._valueLookup.get(outputValue);
5699
5699
  if (enumValue === void 0) {
5700
5700
  throw new _GraphQLError.GraphQLError('Enum "'.concat(this.name, '" cannot represent value: ').concat((0, _inspect.default)(outputValue)));
@@ -5746,7 +5746,7 @@ var require_definition = __commonJS({
5746
5746
  extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : []
5747
5747
  };
5748
5748
  };
5749
- _proto5.toString = function toString() {
5749
+ _proto5.toString = function toString2() {
5750
5750
  return this.name;
5751
5751
  };
5752
5752
  _proto5.toJSON = function toJSON() {
@@ -5824,7 +5824,7 @@ var require_definition = __commonJS({
5824
5824
  extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : []
5825
5825
  };
5826
5826
  };
5827
- _proto6.toString = function toString() {
5827
+ _proto6.toString = function toString2() {
5828
5828
  return this.name;
5829
5829
  };
5830
5830
  _proto6.toJSON = function toJSON() {
@@ -7078,7 +7078,7 @@ var require_directives = __commonJS({
7078
7078
  astNode: this.astNode
7079
7079
  };
7080
7080
  };
7081
- _proto.toString = function toString() {
7081
+ _proto.toString = function toString2() {
7082
7082
  return "@" + this.name;
7083
7083
  };
7084
7084
  _proto.toJSON = function toJSON() {
@@ -9015,16 +9015,16 @@ var require_KnownArgumentNamesRule = __commonJS({
9015
9015
  return obj && obj.__esModule ? obj : { default: obj };
9016
9016
  }
9017
9017
  function ownKeys(object, enumerableOnly) {
9018
- var keys = Object.keys(object);
9018
+ var keys2 = Object.keys(object);
9019
9019
  if (Object.getOwnPropertySymbols) {
9020
9020
  var symbols = Object.getOwnPropertySymbols(object);
9021
9021
  if (enumerableOnly)
9022
9022
  symbols = symbols.filter(function(sym) {
9023
9023
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
9024
9024
  });
9025
- keys.push.apply(keys, symbols);
9025
+ keys2.push.apply(keys2, symbols);
9026
9026
  }
9027
- return keys;
9027
+ return keys2;
9028
9028
  }
9029
9029
  function _objectSpread(target) {
9030
9030
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -9271,16 +9271,16 @@ var require_ProvidedRequiredArgumentsRule = __commonJS({
9271
9271
  return obj && obj.__esModule ? obj : { default: obj };
9272
9272
  }
9273
9273
  function ownKeys(object, enumerableOnly) {
9274
- var keys = Object.keys(object);
9274
+ var keys2 = Object.keys(object);
9275
9275
  if (Object.getOwnPropertySymbols) {
9276
9276
  var symbols = Object.getOwnPropertySymbols(object);
9277
9277
  if (enumerableOnly)
9278
9278
  symbols = symbols.filter(function(sym) {
9279
9279
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
9280
9280
  });
9281
- keys.push.apply(keys, symbols);
9281
+ keys2.push.apply(keys2, symbols);
9282
9282
  }
9283
- return keys;
9283
+ return keys2;
9284
9284
  }
9285
9285
  function _objectSpread(target) {
9286
9286
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -10538,13 +10538,13 @@ var require_promiseForObject = __commonJS({
10538
10538
  });
10539
10539
  exports.default = promiseForObject;
10540
10540
  function promiseForObject(object) {
10541
- var keys = Object.keys(object);
10542
- var valuesAndPromises = keys.map(function(name) {
10541
+ var keys2 = Object.keys(object);
10542
+ var valuesAndPromises = keys2.map(function(name) {
10543
10543
  return object[name];
10544
10544
  });
10545
10545
  return Promise.all(valuesAndPromises).then(function(values) {
10546
10546
  return values.reduce(function(resolvedObject, value, i2) {
10547
- resolvedObject[keys[i2]] = value;
10547
+ resolvedObject[keys2[i2]] = value;
10548
10548
  return resolvedObject;
10549
10549
  }, /* @__PURE__ */ Object.create(null));
10550
10550
  });
@@ -12996,16 +12996,16 @@ var require_getIntrospectionQuery = __commonJS({
12996
12996
  });
12997
12997
  exports.getIntrospectionQuery = getIntrospectionQuery3;
12998
12998
  function ownKeys(object, enumerableOnly) {
12999
- var keys = Object.keys(object);
12999
+ var keys2 = Object.keys(object);
13000
13000
  if (Object.getOwnPropertySymbols) {
13001
13001
  var symbols = Object.getOwnPropertySymbols(object);
13002
13002
  if (enumerableOnly)
13003
13003
  symbols = symbols.filter(function(sym) {
13004
13004
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
13005
13005
  });
13006
- keys.push.apply(keys, symbols);
13006
+ keys2.push.apply(keys2, symbols);
13007
13007
  }
13008
- return keys;
13008
+ return keys2;
13009
13009
  }
13010
13010
  function _objectSpread(target) {
13011
13011
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -13098,16 +13098,16 @@ var require_introspectionFromSchema = __commonJS({
13098
13098
  return obj && obj.__esModule ? obj : { default: obj };
13099
13099
  }
13100
13100
  function ownKeys(object, enumerableOnly) {
13101
- var keys = Object.keys(object);
13101
+ var keys2 = Object.keys(object);
13102
13102
  if (Object.getOwnPropertySymbols) {
13103
13103
  var symbols = Object.getOwnPropertySymbols(object);
13104
13104
  if (enumerableOnly)
13105
13105
  symbols = symbols.filter(function(sym) {
13106
13106
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
13107
13107
  });
13108
- keys.push.apply(keys, symbols);
13108
+ keys2.push.apply(keys2, symbols);
13109
13109
  }
13110
- return keys;
13110
+ return keys2;
13111
13111
  }
13112
13112
  function _objectSpread(target) {
13113
13113
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -13439,16 +13439,16 @@ var require_extendSchema = __commonJS({
13439
13439
  return obj && obj.__esModule ? obj : { default: obj };
13440
13440
  }
13441
13441
  function ownKeys(object, enumerableOnly) {
13442
- var keys = Object.keys(object);
13442
+ var keys2 = Object.keys(object);
13443
13443
  if (Object.getOwnPropertySymbols) {
13444
13444
  var symbols = Object.getOwnPropertySymbols(object);
13445
13445
  if (enumerableOnly)
13446
13446
  symbols = symbols.filter(function(sym) {
13447
13447
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
13448
13448
  });
13449
- keys.push.apply(keys, symbols);
13449
+ keys2.push.apply(keys2, symbols);
13450
13450
  }
13451
- return keys;
13451
+ return keys2;
13452
13452
  }
13453
13453
  function _objectSpread(target) {
13454
13454
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -14039,16 +14039,16 @@ var require_lexicographicSortSchema = __commonJS({
14039
14039
  return obj && obj.__esModule ? obj : { default: obj };
14040
14040
  }
14041
14041
  function ownKeys(object, enumerableOnly) {
14042
- var keys = Object.keys(object);
14042
+ var keys2 = Object.keys(object);
14043
14043
  if (Object.getOwnPropertySymbols) {
14044
14044
  var symbols = Object.getOwnPropertySymbols(object);
14045
14045
  if (enumerableOnly)
14046
14046
  symbols = symbols.filter(function(sym) {
14047
14047
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
14048
14048
  });
14049
- keys.push.apply(keys, symbols);
14049
+ keys2.push.apply(keys2, symbols);
14050
14050
  }
14051
- return keys;
14051
+ return keys2;
14052
14052
  }
14053
14053
  function _objectSpread(target) {
14054
14054
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -14589,16 +14589,16 @@ var require_findBreakingChanges = __commonJS({
14589
14589
  return obj && obj.__esModule ? obj : { default: obj };
14590
14590
  }
14591
14591
  function ownKeys(object, enumerableOnly) {
14592
- var keys = Object.keys(object);
14592
+ var keys2 = Object.keys(object);
14593
14593
  if (Object.getOwnPropertySymbols) {
14594
14594
  var symbols = Object.getOwnPropertySymbols(object);
14595
14595
  if (enumerableOnly)
14596
14596
  symbols = symbols.filter(function(sym) {
14597
14597
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
14598
14598
  });
14599
- keys.push.apply(keys, symbols);
14599
+ keys2.push.apply(keys2, symbols);
14600
14600
  }
14601
- return keys;
14601
+ return keys2;
14602
14602
  }
14603
14603
  function _objectSpread(target) {
14604
14604
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -17595,9 +17595,9 @@ var require_legacy_streams = __commonJS({
17595
17595
  this.mode = 438;
17596
17596
  this.bufferSize = 64 * 1024;
17597
17597
  options = options || {};
17598
- var keys = Object.keys(options);
17599
- for (var index = 0, length = keys.length; index < length; index++) {
17600
- var key = keys[index];
17598
+ var keys2 = Object.keys(options);
17599
+ for (var index = 0, length = keys2.length; index < length; index++) {
17600
+ var key = keys2[index];
17601
17601
  this[key] = options[key];
17602
17602
  }
17603
17603
  if (this.encoding)
@@ -17645,9 +17645,9 @@ var require_legacy_streams = __commonJS({
17645
17645
  this.mode = 438;
17646
17646
  this.bytesWritten = 0;
17647
17647
  options = options || {};
17648
- var keys = Object.keys(options);
17649
- for (var index = 0, length = keys.length; index < length; index++) {
17650
- var key = keys[index];
17648
+ var keys2 = Object.keys(options);
17649
+ for (var index = 0, length = keys2.length; index < length; index++) {
17650
+ var key = keys2[index];
17651
17651
  this[key] = options[key];
17652
17652
  }
17653
17653
  if (this.start !== void 0) {
@@ -20864,10 +20864,10 @@ var require_glob = __commonJS({
20864
20864
  if (add === null || typeof add !== "object") {
20865
20865
  return origin;
20866
20866
  }
20867
- var keys = Object.keys(add);
20868
- var i2 = keys.length;
20867
+ var keys2 = Object.keys(add);
20868
+ var i2 = keys2.length;
20869
20869
  while (i2--) {
20870
- origin[keys[i2]] = add[keys[i2]];
20870
+ origin[keys2[i2]] = add[keys2[i2]];
20871
20871
  }
20872
20872
  return origin;
20873
20873
  }
@@ -29282,12 +29282,12 @@ var require_lib3 = __commonJS({
29282
29282
  SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
29283
29283
  SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
29284
29284
  };
29285
- var reflect = (keys, last = keys.length - 1) => ({
29285
+ var reflect = (keys2, last = keys2.length - 1) => ({
29286
29286
  get() {
29287
- return keys.reduce((object, key) => object[key], this);
29287
+ return keys2.reduce((object, key) => object[key], this);
29288
29288
  },
29289
29289
  set(value) {
29290
- keys.reduce(
29290
+ keys2.reduce(
29291
29291
  (item, key, i2) => i2 === last ? item[key] = value : item[key],
29292
29292
  this
29293
29293
  );
@@ -31220,9 +31220,9 @@ var require_lib3 = __commonJS({
31220
31220
  }
31221
31221
  clone(skipArrays) {
31222
31222
  const state = new State();
31223
- const keys = Object.keys(this);
31224
- for (let i2 = 0, length = keys.length; i2 < length; i2++) {
31225
- const key = keys[i2];
31223
+ const keys2 = Object.keys(this);
31224
+ for (let i2 = 0, length = keys2.length; i2 < length; i2++) {
31225
+ const key = keys2[i2];
31226
31226
  let val = this[key];
31227
31227
  if (!skipArrays && Array.isArray(val)) {
31228
31228
  val = val.slice();
@@ -33127,9 +33127,9 @@ var require_lib3 = __commonJS({
33127
33127
  {
33128
33128
  NodePrototype.__clone = function() {
33129
33129
  const newNode = new Node(void 0, this.start, this.loc.start);
33130
- const keys = Object.keys(this);
33131
- for (let i2 = 0, length = keys.length; i2 < length; i2++) {
33132
- const key = keys[i2];
33130
+ const keys2 = Object.keys(this);
33131
+ for (let i2 = 0, length = keys2.length; i2 < length; i2++) {
33132
+ const key = keys2[i2];
33133
33133
  if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
33134
33134
  newNode[key] = this[key];
33135
33135
  }
@@ -43769,109 +43769,6 @@ var require_lib3 = __commonJS({
43769
43769
  }
43770
43770
  });
43771
43771
 
43772
- // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
43773
- var require_cjs = __commonJS({
43774
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
43775
- "use strict";
43776
- var isMergeableObject = function isMergeableObject2(value) {
43777
- return isNonNullObject(value) && !isSpecial(value);
43778
- };
43779
- function isNonNullObject(value) {
43780
- return !!value && typeof value === "object";
43781
- }
43782
- function isSpecial(value) {
43783
- var stringValue = Object.prototype.toString.call(value);
43784
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
43785
- }
43786
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
43787
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
43788
- function isReactElement(value) {
43789
- return value.$$typeof === REACT_ELEMENT_TYPE;
43790
- }
43791
- function emptyTarget(val) {
43792
- return Array.isArray(val) ? [] : {};
43793
- }
43794
- function cloneUnlessOtherwiseSpecified(value, options) {
43795
- return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
43796
- }
43797
- function defaultArrayMerge(target, source, options) {
43798
- return target.concat(source).map(function(element) {
43799
- return cloneUnlessOtherwiseSpecified(element, options);
43800
- });
43801
- }
43802
- function getMergeFunction(key, options) {
43803
- if (!options.customMerge) {
43804
- return deepmerge;
43805
- }
43806
- var customMerge = options.customMerge(key);
43807
- return typeof customMerge === "function" ? customMerge : deepmerge;
43808
- }
43809
- function getEnumerableOwnPropertySymbols(target) {
43810
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
43811
- return target.propertyIsEnumerable(symbol);
43812
- }) : [];
43813
- }
43814
- function getKeys(target) {
43815
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
43816
- }
43817
- function propertyIsOnObject(object, property) {
43818
- try {
43819
- return property in object;
43820
- } catch (_) {
43821
- return false;
43822
- }
43823
- }
43824
- function propertyIsUnsafe(target, key) {
43825
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
43826
- }
43827
- function mergeObject(target, source, options) {
43828
- var destination = {};
43829
- if (options.isMergeableObject(target)) {
43830
- getKeys(target).forEach(function(key) {
43831
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
43832
- });
43833
- }
43834
- getKeys(source).forEach(function(key) {
43835
- if (propertyIsUnsafe(target, key)) {
43836
- return;
43837
- }
43838
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
43839
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
43840
- } else {
43841
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
43842
- }
43843
- });
43844
- return destination;
43845
- }
43846
- function deepmerge(target, source, options) {
43847
- options = options || {};
43848
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
43849
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
43850
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
43851
- var sourceIsArray = Array.isArray(source);
43852
- var targetIsArray = Array.isArray(target);
43853
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
43854
- if (!sourceAndTargetTypesMatch) {
43855
- return cloneUnlessOtherwiseSpecified(source, options);
43856
- } else if (sourceIsArray) {
43857
- return options.arrayMerge(target, source, options);
43858
- } else {
43859
- return mergeObject(target, source, options);
43860
- }
43861
- }
43862
- deepmerge.all = function deepmergeAll(array, options) {
43863
- if (!Array.isArray(array)) {
43864
- throw new Error("first argument should be an array");
43865
- }
43866
- return array.reduce(function(prev, next) {
43867
- return deepmerge(prev, next, options);
43868
- }, {});
43869
- };
43870
- var deepmerge_1 = deepmerge;
43871
- module2.exports = deepmerge_1;
43872
- }
43873
- });
43874
-
43875
43772
  // ../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js
43876
43773
  var require_tslib = __commonJS({
43877
43774
  "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module2) {
@@ -46141,7 +46038,7 @@ var require_path_visitor = __commonJS({
46141
46038
  }
46142
46039
  return target;
46143
46040
  }
46144
- PathVisitor.visit = function visit14(node, methods) {
46041
+ PathVisitor.visit = function visit13(node, methods) {
46145
46042
  return PathVisitor.fromMethodsObject(methods).visit(node);
46146
46043
  };
46147
46044
  var PVp = PathVisitor.prototype;
@@ -46332,7 +46229,7 @@ var require_path_visitor = __commonJS({
46332
46229
  this.needToCallTraverse = false;
46333
46230
  return visitChildren(path2, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
46334
46231
  };
46335
- sharedContextProtoMethods.visit = function visit14(path2, newVisitor) {
46232
+ sharedContextProtoMethods.visit = function visit13(path2, newVisitor) {
46336
46233
  if (!(this instanceof this.Context)) {
46337
46234
  throw new Error("");
46338
46235
  }
@@ -47725,7 +47622,7 @@ var require_main = __commonJS({
47725
47622
  var someField = _a.someField;
47726
47623
  var Type = _a.Type;
47727
47624
  var use = _a.use;
47728
- var visit14 = _a.visit;
47625
+ var visit13 = _a.visit;
47729
47626
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
47730
47627
  exports.builders = builders;
47731
47628
  exports.builtInTypes = builtInTypes;
@@ -47742,7 +47639,7 @@ var require_main = __commonJS({
47742
47639
  exports.someField = someField;
47743
47640
  exports.Type = Type;
47744
47641
  exports.use = use;
47745
- exports.visit = visit14;
47642
+ exports.visit = visit13;
47746
47643
  Object.assign(namedTypes_1.namedTypes, n);
47747
47644
  }
47748
47645
  });
@@ -49530,10 +49427,10 @@ var require_util2 = __commonJS({
49530
49427
  var result = {};
49531
49428
  var argc = args.length;
49532
49429
  for (var i2 = 0; i2 < argc; ++i2) {
49533
- var keys = Object.keys(args[i2]);
49534
- var keyCount = keys.length;
49430
+ var keys2 = Object.keys(args[i2]);
49431
+ var keyCount = keys2.length;
49535
49432
  for (var j = 0; j < keyCount; ++j) {
49536
- result[keys[j]] = true;
49433
+ result[keys2[j]] = true;
49537
49434
  }
49538
49435
  }
49539
49436
  return result;
@@ -57193,10 +57090,10 @@ var require_parser2 = __commonJS({
57193
57090
  loc.indent = newIndent;
57194
57091
  this.findTokenRange(loc);
57195
57092
  }
57196
- var keys = Object.keys(node);
57197
- var keyCount = keys.length;
57093
+ var keys2 = Object.keys(node);
57094
+ var keyCount = keys2.length;
57198
57095
  for (var i2 = 0; i2 < keyCount; ++i2) {
57199
- var key = keys[i2];
57096
+ var key = keys2[i2];
57200
57097
  if (key === "loc") {
57201
57098
  copy[key] = node[key];
57202
57099
  } else if (key === "tokens" && node.type === "File") {
@@ -57955,13 +57852,13 @@ var require_patcher = __commonJS({
57955
57852
  if (newPath.needsParens() && !oldPath.hasParens()) {
57956
57853
  return false;
57957
57854
  }
57958
- var keys = (0, util_1.getUnionOfKeys)(oldNode, newNode);
57855
+ var keys2 = (0, util_1.getUnionOfKeys)(oldNode, newNode);
57959
57856
  if (oldNode.type === "File" || newNode.type === "File") {
57960
- delete keys.tokens;
57857
+ delete keys2.tokens;
57961
57858
  }
57962
- delete keys.loc;
57859
+ delete keys2.loc;
57963
57860
  var originalReprintCount = reprints.length;
57964
- for (var k in keys) {
57861
+ for (var k in keys2) {
57965
57862
  if (k.charAt(0) === "_") {
57966
57863
  continue;
57967
57864
  }
@@ -60204,6 +60101,109 @@ var require_main2 = __commonJS({
60204
60101
  }
60205
60102
  });
60206
60103
 
60104
+ // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
60105
+ var require_cjs = __commonJS({
60106
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
60107
+ "use strict";
60108
+ var isMergeableObject = function isMergeableObject2(value) {
60109
+ return isNonNullObject(value) && !isSpecial(value);
60110
+ };
60111
+ function isNonNullObject(value) {
60112
+ return !!value && typeof value === "object";
60113
+ }
60114
+ function isSpecial(value) {
60115
+ var stringValue = Object.prototype.toString.call(value);
60116
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
60117
+ }
60118
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
60119
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
60120
+ function isReactElement(value) {
60121
+ return value.$$typeof === REACT_ELEMENT_TYPE;
60122
+ }
60123
+ function emptyTarget(val) {
60124
+ return Array.isArray(val) ? [] : {};
60125
+ }
60126
+ function cloneUnlessOtherwiseSpecified(value, options) {
60127
+ return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
60128
+ }
60129
+ function defaultArrayMerge(target, source, options) {
60130
+ return target.concat(source).map(function(element) {
60131
+ return cloneUnlessOtherwiseSpecified(element, options);
60132
+ });
60133
+ }
60134
+ function getMergeFunction(key, options) {
60135
+ if (!options.customMerge) {
60136
+ return deepmerge;
60137
+ }
60138
+ var customMerge = options.customMerge(key);
60139
+ return typeof customMerge === "function" ? customMerge : deepmerge;
60140
+ }
60141
+ function getEnumerableOwnPropertySymbols(target) {
60142
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
60143
+ return target.propertyIsEnumerable(symbol);
60144
+ }) : [];
60145
+ }
60146
+ function getKeys(target) {
60147
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
60148
+ }
60149
+ function propertyIsOnObject(object, property) {
60150
+ try {
60151
+ return property in object;
60152
+ } catch (_) {
60153
+ return false;
60154
+ }
60155
+ }
60156
+ function propertyIsUnsafe(target, key) {
60157
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
60158
+ }
60159
+ function mergeObject(target, source, options) {
60160
+ var destination = {};
60161
+ if (options.isMergeableObject(target)) {
60162
+ getKeys(target).forEach(function(key) {
60163
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
60164
+ });
60165
+ }
60166
+ getKeys(source).forEach(function(key) {
60167
+ if (propertyIsUnsafe(target, key)) {
60168
+ return;
60169
+ }
60170
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
60171
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
60172
+ } else {
60173
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
60174
+ }
60175
+ });
60176
+ return destination;
60177
+ }
60178
+ function deepmerge(target, source, options) {
60179
+ options = options || {};
60180
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
60181
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
60182
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
60183
+ var sourceIsArray = Array.isArray(source);
60184
+ var targetIsArray = Array.isArray(target);
60185
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
60186
+ if (!sourceAndTargetTypesMatch) {
60187
+ return cloneUnlessOtherwiseSpecified(source, options);
60188
+ } else if (sourceIsArray) {
60189
+ return options.arrayMerge(target, source, options);
60190
+ } else {
60191
+ return mergeObject(target, source, options);
60192
+ }
60193
+ }
60194
+ deepmerge.all = function deepmergeAll(array, options) {
60195
+ if (!Array.isArray(array)) {
60196
+ throw new Error("first argument should be an array");
60197
+ }
60198
+ return array.reduce(function(prev, next) {
60199
+ return deepmerge(prev, next, options);
60200
+ }, {});
60201
+ };
60202
+ var deepmerge_1 = deepmerge;
60203
+ module2.exports = deepmerge_1;
60204
+ }
60205
+ });
60206
+
60207
60207
  // ../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js
60208
60208
  var require_kleur = __commonJS({
60209
60209
  "../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js"(exports, module2) {
@@ -60250,8 +60250,8 @@ var require_kleur = __commonJS({
60250
60250
  }
60251
60251
  return beg + str + end;
60252
60252
  }
60253
- function chain(has, keys) {
60254
- let ctx = { has, keys };
60253
+ function chain(has, keys2) {
60254
+ let ctx = { has, keys: keys2 };
60255
60255
  ctx.reset = $.reset.bind(ctx);
60256
60256
  ctx.bold = $.bold.bind(ctx);
60257
60257
  ctx.dim = $.dim.bind(ctx);
@@ -62775,7 +62775,7 @@ var require_dist = __commonJS({
62775
62775
  "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.js"(exports, module2) {
62776
62776
  "use strict";
62777
62777
  function ownKeys(object, enumerableOnly) {
62778
- var keys = Object.keys(object);
62778
+ var keys2 = Object.keys(object);
62779
62779
  if (Object.getOwnPropertySymbols) {
62780
62780
  var symbols = Object.getOwnPropertySymbols(object);
62781
62781
  if (enumerableOnly) {
@@ -62783,9 +62783,9 @@ var require_dist = __commonJS({
62783
62783
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
62784
62784
  });
62785
62785
  }
62786
- keys.push.apply(keys, symbols);
62786
+ keys2.push.apply(keys2, symbols);
62787
62787
  }
62788
- return keys;
62788
+ return keys2;
62789
62789
  }
62790
62790
  function _objectSpread(target) {
62791
62791
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -65995,14 +65995,14 @@ function pushComment(node, entity, field, argument) {
65995
65995
  if (typeof comment !== "string" || comment.length === 0) {
65996
65996
  return;
65997
65997
  }
65998
- const keys = [entity];
65998
+ const keys2 = [entity];
65999
65999
  if (field) {
66000
- keys.push(field);
66000
+ keys2.push(field);
66001
66001
  if (argument) {
66002
- keys.push(argument);
66002
+ keys2.push(argument);
66003
66003
  }
66004
66004
  }
66005
- const path2 = keys.join(".");
66005
+ const path2 = keys2.join(".");
66006
66006
  if (!commentsRegistry[path2]) {
66007
66007
  commentsRegistry[path2] = [];
66008
66008
  }
@@ -66021,14 +66021,14 @@ function hasMultilineItems(maybeArray) {
66021
66021
  function addDescription(cb) {
66022
66022
  return (node, _key, _parent, path2, ancestors) => {
66023
66023
  var _a;
66024
- const keys = [];
66024
+ const keys2 = [];
66025
66025
  const parent = path2.reduce((prev, key2) => {
66026
66026
  if (["fields", "arguments", "values"].includes(key2) && prev.name) {
66027
- keys.push(prev.name.value);
66027
+ keys2.push(prev.name.value);
66028
66028
  }
66029
66029
  return prev[key2];
66030
66030
  }, ancestors[0]);
66031
- const key = [...keys, (_a = parent === null || parent === void 0 ? void 0 : parent.name) === null || _a === void 0 ? void 0 : _a.value].filter(Boolean).join(".");
66031
+ const key = [...keys2, (_a = parent === null || parent === void 0 ? void 0 : parent.name) === null || _a === void 0 ? void 0 : _a.value].filter(Boolean).join(".");
66032
66032
  const items = [];
66033
66033
  if (node.kind.includes("Definition") && commentsRegistry[key]) {
66034
66034
  items.push(...commentsRegistry[key]);
@@ -68564,9 +68564,9 @@ var fragmentKey = " $fragments";
68564
68564
 
68565
68565
  // src/runtime/lib/key.ts
68566
68566
  var computeKey = ({ field, args }) => {
68567
- const keys = Object.keys(args ?? {});
68568
- keys.sort();
68569
- return args && keys.length > 0 ? `${field}(${keys.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
68567
+ const keys2 = Object.keys(args ?? {});
68568
+ keys2.sort();
68569
+ return args && keys2.length > 0 ? `${field}(${keys2.map((key) => `${key}: ${stringifyObjectWithNoQuotesOnKeys(args[key])}`).join(", ")})` : field;
68570
68570
  };
68571
68571
  var stringifyObjectWithNoQuotesOnKeys = (obj_from_json) => {
68572
68572
  if (Array.isArray(obj_from_json)) {
@@ -71774,7 +71774,8 @@ var CacheInternal = class {
71774
71774
  parent = rootID,
71775
71775
  variables,
71776
71776
  stepsFromConnection = null,
71777
- ignoreMasking
71777
+ ignoreMasking,
71778
+ fullCheck = false
71778
71779
  }) {
71779
71780
  if (parent === null) {
71780
71781
  return { data: null, partial: false, stale: false, hasData: true };
@@ -71799,11 +71800,28 @@ var CacheInternal = class {
71799
71800
  let targetSelection = getFieldsForType(selection, typename);
71800
71801
  for (const [
71801
71802
  attributeName,
71802
- { type, keyRaw, selection: fieldSelection, nullable, list, visible }
71803
+ { type, keyRaw, selection: fieldSelection, nullable, list, visible, directives }
71803
71804
  ] of Object.entries(targetSelection)) {
71804
- if (!visible && !ignoreMasking) {
71805
+ if (!visible && !ignoreMasking && !fullCheck) {
71805
71806
  continue;
71806
71807
  }
71808
+ const includeDirective = directives?.find((d) => {
71809
+ return d.name === "include";
71810
+ });
71811
+ if (includeDirective) {
71812
+ if (!evaluateFragmentVariables(includeDirective.arguments, variables ?? {})["if"]) {
71813
+ continue;
71814
+ }
71815
+ }
71816
+ const skipDirective = directives?.find((d) => {
71817
+ return d.name === "skip";
71818
+ });
71819
+ if (skipDirective) {
71820
+ if (evaluateFragmentVariables(skipDirective.arguments, variables ?? {})["if"]) {
71821
+ continue;
71822
+ }
71823
+ }
71824
+ const fieldTarget = visible || ignoreMasking ? target : {};
71807
71825
  const key = evaluateKey(keyRaw, variables);
71808
71826
  const { value } = this.storage.get(parent, key);
71809
71827
  const dt_field = this.staleManager.getFieldTime(parent, key);
@@ -71826,16 +71844,16 @@ var CacheInternal = class {
71826
71844
  partial = true;
71827
71845
  }
71828
71846
  if (typeof value === "undefined" || value === null) {
71829
- target[attributeName] = null;
71847
+ fieldTarget[attributeName] = null;
71830
71848
  if (typeof value !== "undefined") {
71831
71849
  hasData = true;
71832
71850
  }
71833
71851
  } else if (!fieldSelection) {
71834
71852
  const fnUnmarshal = this.config?.scalars?.[type]?.unmarshal;
71835
71853
  if (fnUnmarshal) {
71836
- target[attributeName] = fnUnmarshal(value);
71854
+ fieldTarget[attributeName] = fnUnmarshal(value);
71837
71855
  } else {
71838
- target[attributeName] = value;
71856
+ fieldTarget[attributeName] = value;
71839
71857
  }
71840
71858
  hasData = true;
71841
71859
  } else if (Array.isArray(value)) {
@@ -71844,9 +71862,10 @@ var CacheInternal = class {
71844
71862
  variables,
71845
71863
  linkedList: value,
71846
71864
  stepsFromConnection: nextStep,
71847
- ignoreMasking: !!ignoreMasking
71865
+ ignoreMasking: !!ignoreMasking,
71866
+ fullCheck
71848
71867
  });
71849
- target[attributeName] = listValue.data;
71868
+ fieldTarget[attributeName] = listValue.data;
71850
71869
  if (listValue.partial) {
71851
71870
  partial = true;
71852
71871
  }
@@ -71862,9 +71881,10 @@ var CacheInternal = class {
71862
71881
  selection: fieldSelection,
71863
71882
  variables,
71864
71883
  stepsFromConnection: nextStep,
71865
- ignoreMasking
71884
+ ignoreMasking,
71885
+ fullCheck
71866
71886
  });
71867
- target[attributeName] = objectFields.data;
71887
+ fieldTarget[attributeName] = objectFields.data;
71868
71888
  if (objectFields.partial) {
71869
71889
  partial = true;
71870
71890
  }
@@ -71875,7 +71895,7 @@ var CacheInternal = class {
71875
71895
  hasData = true;
71876
71896
  }
71877
71897
  }
71878
- if (target[attributeName] === null && !nullable && !embeddedCursor) {
71898
+ if (fieldTarget[attributeName] === null && !nullable && !embeddedCursor) {
71879
71899
  cascadeNull = true;
71880
71900
  }
71881
71901
  }
@@ -71907,7 +71927,8 @@ var CacheInternal = class {
71907
71927
  variables,
71908
71928
  linkedList,
71909
71929
  stepsFromConnection,
71910
- ignoreMasking
71930
+ ignoreMasking,
71931
+ fullCheck
71911
71932
  }) {
71912
71933
  const result = [];
71913
71934
  let partialData = false;
@@ -71920,7 +71941,8 @@ var CacheInternal = class {
71920
71941
  variables,
71921
71942
  linkedList: entry,
71922
71943
  stepsFromConnection,
71923
- ignoreMasking
71944
+ ignoreMasking,
71945
+ fullCheck
71924
71946
  });
71925
71947
  result.push(nestedValue.data);
71926
71948
  if (nestedValue.partial) {
@@ -71942,7 +71964,8 @@ var CacheInternal = class {
71942
71964
  selection: fields,
71943
71965
  variables,
71944
71966
  stepsFromConnection,
71945
- ignoreMasking
71967
+ ignoreMasking,
71968
+ fullCheck
71946
71969
  });
71947
71970
  result.push(data);
71948
71971
  if (partial) {
@@ -72141,11 +72164,10 @@ var query = documentPlugin(ArtifactKind.Query, function() {
72141
72164
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
72142
72165
  }
72143
72166
  lastVariables = { ...marshalVariables(ctx) };
72144
- const variables = lastVariables;
72145
72167
  subscriptionSpec = {
72146
72168
  rootType: ctx.artifact.rootType,
72147
72169
  selection: ctx.artifact.selection,
72148
- variables: () => variables,
72170
+ variables: () => lastVariables,
72149
72171
  set: (newValue) => {
72150
72172
  resolve2(ctx, {
72151
72173
  data: newValue,
@@ -72174,17 +72196,12 @@ var query = documentPlugin(ArtifactKind.Query, function() {
72174
72196
  // src/runtime/client/plugins/fragment.ts
72175
72197
  var fragment = documentPlugin(ArtifactKind.Fragment, function() {
72176
72198
  let subscriptionSpec = null;
72177
- let lastReference = null;
72178
72199
  return {
72179
72200
  start(ctx, { next, resolve: resolve2, variablesChanged, marshalVariables }) {
72180
72201
  if (!ctx.stuff.parentID) {
72181
72202
  return next(ctx);
72182
72203
  }
72183
- const currentReference = {
72184
- parent: ctx.stuff.parentID,
72185
- variables: marshalVariables(ctx)
72186
- };
72187
- if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged(ctx))) {
72204
+ if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
72188
72205
  if (subscriptionSpec) {
72189
72206
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
72190
72207
  }
@@ -72207,7 +72224,6 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
72207
72224
  }
72208
72225
  };
72209
72226
  cache_default.subscribe(subscriptionSpec, variables);
72210
- lastReference = currentReference;
72211
72227
  }
72212
72228
  next(ctx);
72213
72229
  },
@@ -72372,7 +72388,7 @@ var Config = class {
72372
72388
  this.logLevel = (logLevel || LogLevel.Summary).toLowerCase();
72373
72389
  this.defaultFragmentMasking = defaultFragmentMasking;
72374
72390
  this.routesDir = join2(this.projectRoot, "src", "routes");
72375
- this.schemaPollInterval = watchSchema?.interval ?? 2e3;
72391
+ this.schemaPollInterval = watchSchema?.interval === void 0 ? 2e3 : watchSchema.interval;
72376
72392
  this.schemaPollHeaders = watchSchema?.headers ?? {};
72377
72393
  this.rootDir = join2(this.projectRoot, "$houdini");
72378
72394
  this.#fragmentVariableMaps = {};
@@ -72391,8 +72407,8 @@ var Config = class {
72391
72407
  if (!apiURL) {
72392
72408
  return "";
72393
72409
  }
72394
- const env = await this.getEnv();
72395
- return this.processEnvValues(env, apiURL);
72410
+ const env2 = await this.getEnv();
72411
+ return this.processEnvValues(env2, apiURL);
72396
72412
  }
72397
72413
  get include() {
72398
72414
  if (this.configFile.include) {
@@ -72407,35 +72423,35 @@ var Config = class {
72407
72423
  return this.configFile.plugins?.[name] ?? {};
72408
72424
  }
72409
72425
  async getEnv() {
72410
- let env = process.env;
72426
+ let env2 = process.env;
72411
72427
  for (const plugin2 of this.plugins) {
72412
72428
  if (plugin2.env) {
72413
- env = {
72414
- ...await plugin2.env({ config: this, env })
72429
+ env2 = {
72430
+ ...await plugin2.env({ config: this, env: env2 })
72415
72431
  };
72416
72432
  }
72417
72433
  }
72418
- return env;
72434
+ return env2;
72419
72435
  }
72420
- processEnvValues(env, value) {
72436
+ processEnvValues(env2, value) {
72421
72437
  let headerValue;
72422
72438
  if (typeof value === "function") {
72423
- headerValue = value(env);
72439
+ headerValue = value(env2);
72424
72440
  } else if (value.startsWith("env:")) {
72425
- headerValue = env[value.slice("env:".length)];
72441
+ headerValue = env2[value.slice("env:".length)];
72426
72442
  } else {
72427
72443
  headerValue = value;
72428
72444
  }
72429
72445
  return headerValue;
72430
72446
  }
72431
72447
  async pullHeaders() {
72432
- const env = await this.getEnv();
72448
+ const env2 = await this.getEnv();
72433
72449
  if (typeof this.schemaPollHeaders === "function") {
72434
- return this.schemaPollHeaders(env);
72450
+ return this.schemaPollHeaders(env2);
72435
72451
  }
72436
72452
  const headers = Object.fromEntries(
72437
72453
  Object.entries(this.schemaPollHeaders || {}).map(([key, value]) => {
72438
- const headerValue = this.processEnvValues(env, value);
72454
+ const headerValue = this.processEnvValues(env2, value);
72439
72455
  if (!headerValue) {
72440
72456
  return [];
72441
72457
  }
@@ -72716,17 +72732,6 @@ var Config = class {
72716
72732
  }, []) ?? [];
72717
72733
  return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name));
72718
72734
  }
72719
- needsRefetchArtifact(document) {
72720
- let needsArtifact = false;
72721
- graphql2.visit(document, {
72722
- Directive: (node) => {
72723
- if ([this.paginateDirective].includes(node.name.value)) {
72724
- needsArtifact = true;
72725
- }
72726
- }
72727
- });
72728
- return needsArtifact;
72729
- }
72730
72735
  #fragmentVariableMaps;
72731
72736
  registerFragmentVariablesHash({
72732
72737
  hash,
@@ -72734,7 +72739,7 @@ var Config = class {
72734
72739
  fragment: fragment2
72735
72740
  }) {
72736
72741
  this.#fragmentVariableMaps[hash] = {
72737
- args: this.#serializeValueMap(args),
72742
+ args: this.serializeValueMap(args),
72738
72743
  fragment: fragment2
72739
72744
  };
72740
72745
  }
@@ -72745,7 +72750,7 @@ var Config = class {
72745
72750
  hash
72746
72751
  };
72747
72752
  }
72748
- #serializeValueMap(map) {
72753
+ serializeValueMap(map) {
72749
72754
  if (!map) {
72750
72755
  return null;
72751
72756
  }
@@ -72760,7 +72765,7 @@ var Config = class {
72760
72765
  }
72761
72766
  if ("values" in input) {
72762
72767
  result.values = input.values.map(
72763
- (value) => this.#serializeValueMap({ foo: value }).foo
72768
+ (value) => this.serializeValueMap({ foo: value }).foo
72764
72769
  );
72765
72770
  }
72766
72771
  if ("name" in input) {
@@ -72769,7 +72774,7 @@ var Config = class {
72769
72774
  if ("fields" in input) {
72770
72775
  result.fields = input.fields.map((field) => ({
72771
72776
  name: field.name,
72772
- value: this.#serializeValueMap({ foo: field.value }).foo
72777
+ value: this.serializeValueMap({ foo: field.value }).foo
72773
72778
  }));
72774
72779
  }
72775
72780
  }
@@ -73215,40 +73220,13 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
73215
73220
 
73216
73221
  // src/lib/parse.ts
73217
73222
  var import_parser = __toESM(require_lib3(), 1);
73218
-
73219
- // src/lib/deepMerge.ts
73220
- var import_deepmerge = __toESM(require_cjs(), 1);
73221
- function deepMerge(filepath, ...targets) {
73222
- try {
73223
- if (targets.length === 1) {
73224
- return targets[0];
73225
- } else if (targets.length === 2) {
73226
- return (0, import_deepmerge.default)(targets[0], targets[1], {
73227
- arrayMerge: (source, update) => [...new Set(source.concat(update))]
73228
- });
73229
- }
73230
- return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
73231
- } catch (e2) {
73232
- throw new HoudiniError({
73233
- filepath,
73234
- message: "could not merge: " + JSON.stringify(targets, null, 4),
73235
- description: e2.message
73236
- });
73237
- }
73238
- }
73239
-
73240
- // src/lib/parse.ts
73241
- async function parseJS(str, config2) {
73242
- const defaultConfig = {
73243
- plugins: ["typescript"],
73244
- sourceType: "module"
73245
- };
73223
+ async function parseJS(str) {
73246
73224
  return {
73247
73225
  start: 0,
73248
- script: (0, import_parser.parse)(
73249
- str || "",
73250
- config2 ? deepMerge("", defaultConfig, config2) : defaultConfig
73251
- ).program,
73226
+ script: (0, import_parser.parse)(str || "", {
73227
+ plugins: ["typescript"],
73228
+ sourceType: "module"
73229
+ }).program,
73252
73230
  end: str.length
73253
73231
  };
73254
73232
  }
@@ -73302,6 +73280,27 @@ async function cleanupFiles(pathFolder, listOfObj) {
73302
73280
  return allFilesNotInList;
73303
73281
  }
73304
73282
 
73283
+ // src/lib/deepMerge.ts
73284
+ var import_deepmerge = __toESM(require_cjs(), 1);
73285
+ function deepMerge(filepath, ...targets) {
73286
+ try {
73287
+ if (targets.length === 1) {
73288
+ return targets[0];
73289
+ } else if (targets.length === 2) {
73290
+ return (0, import_deepmerge.default)(targets[0], targets[1], {
73291
+ arrayMerge: (source, update) => [...new Set(source.concat(update))]
73292
+ });
73293
+ }
73294
+ return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
73295
+ } catch (e2) {
73296
+ throw new HoudiniError({
73297
+ filepath,
73298
+ message: "could not merge: " + targets,
73299
+ description: e2.message
73300
+ });
73301
+ }
73302
+ }
73303
+
73305
73304
  // src/lib/detectTools.ts
73306
73305
  async function detectFromPackageJSON(cwd) {
73307
73306
  try {
@@ -73841,6 +73840,205 @@ function murmurHash(str) {
73841
73840
  return s2;
73842
73841
  }
73843
73842
 
73843
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/types.js
73844
+ var VOID = -1;
73845
+ var PRIMITIVE = 0;
73846
+ var ARRAY = 1;
73847
+ var OBJECT = 2;
73848
+ var DATE = 3;
73849
+ var REGEXP = 4;
73850
+ var MAP = 5;
73851
+ var SET = 6;
73852
+ var ERROR = 7;
73853
+ var BIGINT = 8;
73854
+
73855
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/deserialize.js
73856
+ var env = typeof self === "object" ? self : globalThis;
73857
+ var deserializer = ($, _) => {
73858
+ const as = (out, index) => {
73859
+ $.set(index, out);
73860
+ return out;
73861
+ };
73862
+ const unpair = (index) => {
73863
+ if ($.has(index))
73864
+ return $.get(index);
73865
+ const [type, value] = _[index];
73866
+ switch (type) {
73867
+ case PRIMITIVE:
73868
+ case VOID:
73869
+ return as(value, index);
73870
+ case ARRAY: {
73871
+ const arr = as([], index);
73872
+ for (const index2 of value)
73873
+ arr.push(unpair(index2));
73874
+ return arr;
73875
+ }
73876
+ case OBJECT: {
73877
+ const object = as({}, index);
73878
+ for (const [key, index2] of value)
73879
+ object[unpair(key)] = unpair(index2);
73880
+ return object;
73881
+ }
73882
+ case DATE:
73883
+ return as(new Date(value), index);
73884
+ case REGEXP: {
73885
+ const { source, flags } = value;
73886
+ return as(new RegExp(source, flags), index);
73887
+ }
73888
+ case MAP: {
73889
+ const map = as(/* @__PURE__ */ new Map(), index);
73890
+ for (const [key, index2] of value)
73891
+ map.set(unpair(key), unpair(index2));
73892
+ return map;
73893
+ }
73894
+ case SET: {
73895
+ const set = as(/* @__PURE__ */ new Set(), index);
73896
+ for (const index2 of value)
73897
+ set.add(unpair(index2));
73898
+ return set;
73899
+ }
73900
+ case ERROR: {
73901
+ const { name, message } = value;
73902
+ return as(new env[name](message), index);
73903
+ }
73904
+ case BIGINT:
73905
+ return as(BigInt(value), index);
73906
+ case "BigInt":
73907
+ return as(Object(BigInt(value)), index);
73908
+ }
73909
+ return as(new env[type](value), index);
73910
+ };
73911
+ return unpair;
73912
+ };
73913
+ var deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
73914
+
73915
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/serialize.js
73916
+ var EMPTY = "";
73917
+ var { toString } = {};
73918
+ var { keys } = Object;
73919
+ var typeOf = (value) => {
73920
+ const type = typeof value;
73921
+ if (type !== "object" || !value)
73922
+ return [PRIMITIVE, type];
73923
+ const asString = toString.call(value).slice(8, -1);
73924
+ switch (asString) {
73925
+ case "Array":
73926
+ return [ARRAY, EMPTY];
73927
+ case "Object":
73928
+ return [OBJECT, EMPTY];
73929
+ case "Date":
73930
+ return [DATE, EMPTY];
73931
+ case "RegExp":
73932
+ return [REGEXP, EMPTY];
73933
+ case "Map":
73934
+ return [MAP, EMPTY];
73935
+ case "Set":
73936
+ return [SET, EMPTY];
73937
+ }
73938
+ if (asString.includes("Array"))
73939
+ return [ARRAY, asString];
73940
+ if (asString.includes("Error"))
73941
+ return [ERROR, asString];
73942
+ return [OBJECT, asString];
73943
+ };
73944
+ var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
73945
+ var serializer = (strict, json, $, _) => {
73946
+ const as = (out, value) => {
73947
+ const index = _.push(out) - 1;
73948
+ $.set(value, index);
73949
+ return index;
73950
+ };
73951
+ const pair = (value) => {
73952
+ if ($.has(value))
73953
+ return $.get(value);
73954
+ let [TYPE, type] = typeOf(value);
73955
+ switch (TYPE) {
73956
+ case PRIMITIVE: {
73957
+ let entry = value;
73958
+ switch (type) {
73959
+ case "bigint":
73960
+ TYPE = BIGINT;
73961
+ entry = value.toString();
73962
+ break;
73963
+ case "function":
73964
+ case "symbol":
73965
+ if (strict)
73966
+ throw new TypeError("unable to serialize " + type);
73967
+ entry = null;
73968
+ break;
73969
+ case "undefined":
73970
+ return as([VOID], value);
73971
+ }
73972
+ return as([TYPE, entry], value);
73973
+ }
73974
+ case ARRAY: {
73975
+ if (type)
73976
+ return as([type, [...value]], value);
73977
+ const arr = [];
73978
+ const index = as([TYPE, arr], value);
73979
+ for (const entry of value)
73980
+ arr.push(pair(entry));
73981
+ return index;
73982
+ }
73983
+ case OBJECT: {
73984
+ if (type) {
73985
+ switch (type) {
73986
+ case "BigInt":
73987
+ return as([type, value.toString()], value);
73988
+ case "Boolean":
73989
+ case "Number":
73990
+ case "String":
73991
+ return as([type, value.valueOf()], value);
73992
+ }
73993
+ }
73994
+ if (json && "toJSON" in value)
73995
+ return pair(value.toJSON());
73996
+ const entries = [];
73997
+ const index = as([TYPE, entries], value);
73998
+ for (const key of keys(value)) {
73999
+ if (strict || !shouldSkip(typeOf(value[key])))
74000
+ entries.push([pair(key), pair(value[key])]);
74001
+ }
74002
+ return index;
74003
+ }
74004
+ case DATE:
74005
+ return as([TYPE, value.toISOString()], value);
74006
+ case REGEXP: {
74007
+ const { source, flags } = value;
74008
+ return as([TYPE, { source, flags }], value);
74009
+ }
74010
+ case MAP: {
74011
+ const entries = [];
74012
+ const index = as([TYPE, entries], value);
74013
+ for (const [key, entry] of value) {
74014
+ if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
74015
+ entries.push([pair(key), pair(entry)]);
74016
+ }
74017
+ return index;
74018
+ }
74019
+ case SET: {
74020
+ const entries = [];
74021
+ const index = as([TYPE, entries], value);
74022
+ for (const entry of value) {
74023
+ if (strict || !shouldSkip(typeOf(entry)))
74024
+ entries.push(pair(entry));
74025
+ }
74026
+ return index;
74027
+ }
74028
+ }
74029
+ const { message } = value;
74030
+ return as([TYPE, { name: type, message }], value);
74031
+ };
74032
+ return pair;
74033
+ };
74034
+ var serialize = (value, { json, lossy } = {}) => {
74035
+ const _ = [];
74036
+ return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
74037
+ };
74038
+
74039
+ // ../../node_modules/.pnpm/@ungap+structured-clone@1.0.2/node_modules/@ungap/structured-clone/esm/index.js
74040
+ 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));
74041
+
73844
74042
  // src/codegen/transforms/fragmentVariables.ts
73845
74043
  var graphql5 = __toESM(require_graphql2(), 1);
73846
74044
 
@@ -73988,61 +74186,67 @@ function inlineFragmentArgs({
73988
74186
  filepath,
73989
74187
  document
73990
74188
  ).reduce((acc, arg) => ({ ...acc, [arg.name]: arg }), {});
73991
- const result = graphql5.visit(document, {
73992
- FragmentSpread(node) {
73993
- if (!fragmentDefinitions[node.name.value]) {
73994
- throw new Error("Could not find definition for fragment" + node.name.value);
73995
- }
73996
- const { definition } = fragmentDefinitions[node.name.value];
73997
- let { args, hash } = collectWithArguments(config2, filepath, node, scope);
73998
- const newFragmentName = `${node.name.value}${hash}`;
73999
- config2.registerFragmentVariablesHash({
74000
- hash: newFragmentName,
74001
- fragment: node.name.value,
74002
- args
74003
- });
74004
- if (!visitedFragments.has(newFragmentName)) {
74005
- visitedFragments.add(newFragmentName);
74006
- const defaultArguments = collectDefaultArgumentValues(config2, filepath, definition);
74007
- if (args) {
74008
- for (const [field, value] of Object.entries(defaultArguments || {})) {
74009
- if (!args[field]) {
74010
- args[field] = value;
74011
- }
74012
- }
74013
- generatedFragments[newFragmentName] = inlineFragmentArgs({
74014
- config: config2,
74189
+ const result = esm_default(
74190
+ graphql5.visit(document, {
74191
+ FragmentSpread(node) {
74192
+ if (!fragmentDefinitions[node.name.value]) {
74193
+ throw new Error("Could not find definition for fragment" + node.name.value);
74194
+ }
74195
+ const { definition } = fragmentDefinitions[node.name.value];
74196
+ let { args, hash } = collectWithArguments(config2, filepath, node, scope);
74197
+ const newFragmentName = `${node.name.value}${hash}`;
74198
+ config2.registerFragmentVariablesHash({
74199
+ hash: newFragmentName,
74200
+ fragment: node.name.value,
74201
+ args
74202
+ });
74203
+ if (!visitedFragments.has(newFragmentName)) {
74204
+ visitedFragments.add(newFragmentName);
74205
+ const defaultArguments = collectDefaultArgumentValues(
74206
+ config2,
74015
74207
  filepath,
74016
- fragmentDefinitions,
74017
- document: fragmentDefinitions[node.name.value].definition,
74018
- generatedFragments,
74019
- visitedFragments,
74020
- scope: args,
74021
- newName: newFragmentName
74022
- });
74023
- } else {
74024
- const doc = fragmentDefinitions[node.name.value].document;
74025
- const definitionIndex = doc.document.definitions.findIndex(
74026
- (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
74208
+ definition
74027
74209
  );
74028
- const localDefinitions = [...doc.document.definitions];
74029
- localDefinitions.splice(definitionIndex, 1);
74030
- localDefinitions.push(
74031
- inlineFragmentArgs({
74210
+ if (args) {
74211
+ for (const [field, value] of Object.entries(defaultArguments || {})) {
74212
+ if (!args[field]) {
74213
+ args[field] = value;
74214
+ }
74215
+ }
74216
+ generatedFragments[newFragmentName] = inlineFragmentArgs({
74032
74217
  config: config2,
74033
74218
  filepath,
74034
74219
  fragmentDefinitions,
74035
74220
  document: fragmentDefinitions[node.name.value].definition,
74036
74221
  generatedFragments,
74037
74222
  visitedFragments,
74038
- scope: defaultArguments,
74039
- newName: ""
74040
- })
74041
- );
74042
- doc.document = {
74043
- ...doc.document,
74044
- definitions: localDefinitions
74045
- };
74223
+ scope: args,
74224
+ newName: newFragmentName
74225
+ });
74226
+ } else {
74227
+ const doc = fragmentDefinitions[node.name.value].document;
74228
+ const definitionIndex = doc.document.definitions.findIndex(
74229
+ (definition2) => definition2.kind === "FragmentDefinition" && definition2.name.value === node.name.value
74230
+ );
74231
+ const localDefinitions = [...doc.document.definitions];
74232
+ localDefinitions.splice(definitionIndex, 1);
74233
+ localDefinitions.push(
74234
+ inlineFragmentArgs({
74235
+ config: config2,
74236
+ filepath,
74237
+ fragmentDefinitions,
74238
+ document: fragmentDefinitions[node.name.value].definition,
74239
+ generatedFragments,
74240
+ visitedFragments,
74241
+ scope: defaultArguments,
74242
+ newName: ""
74243
+ })
74244
+ );
74245
+ doc.document = {
74246
+ ...doc.document,
74247
+ definitions: localDefinitions
74248
+ };
74249
+ }
74046
74250
  }
74047
74251
  if (node.name.value !== newFragmentName) {
74048
74252
  return {
@@ -74053,35 +74257,35 @@ function inlineFragmentArgs({
74053
74257
  }
74054
74258
  };
74055
74259
  }
74260
+ },
74261
+ Argument(node) {
74262
+ const value = node.value;
74263
+ if (value.kind !== "Variable") {
74264
+ return;
74265
+ }
74266
+ if (!scope) {
74267
+ throw new HoudiniError({
74268
+ filepath,
74269
+ message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
74270
+ });
74271
+ }
74272
+ const newValue = scope[value.name.value];
74273
+ if (newValue) {
74274
+ return {
74275
+ ...node,
74276
+ value: newValue
74277
+ };
74278
+ }
74279
+ if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
74280
+ throw new HoudiniError({
74281
+ filepath,
74282
+ message: "Missing value for required arg: " + value.name.value
74283
+ });
74284
+ }
74285
+ return null;
74056
74286
  }
74057
- },
74058
- Argument(node) {
74059
- const value = node.value;
74060
- if (value.kind !== "Variable") {
74061
- return;
74062
- }
74063
- if (!scope) {
74064
- throw new HoudiniError({
74065
- filepath,
74066
- message: node.name.value + " is not defined in the current scope: " + JSON.stringify(scope)
74067
- });
74068
- }
74069
- const newValue = scope[value.name.value];
74070
- if (newValue) {
74071
- return {
74072
- ...node,
74073
- value: newValue
74074
- };
74075
- }
74076
- if (definitionArgs[value.name.value] && definitionArgs[value.name.value].required) {
74077
- throw new HoudiniError({
74078
- filepath,
74079
- message: "Missing value for required arg: " + value.name.value
74080
- });
74081
- }
74082
- return null;
74083
- }
74084
- });
74287
+ })
74288
+ );
74085
74289
  if (newName) {
74086
74290
  result.name = {
74087
74291
  kind: graphql5.Kind.NAME,
@@ -74797,7 +75001,7 @@ async function paginate(config2, documents) {
74797
75001
  ]
74798
75002
  }
74799
75003
  ];
74800
- const keys = config2.keyFieldsForType(!nodeQuery ? config2.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
75004
+ const keys2 = config2.keyFieldsForType(!nodeQuery ? config2.schema.getQueryType()?.name || "" : fragment2).flatMap((key) => {
74801
75005
  if (fragment2 === config2.schema.getQueryType()?.name) {
74802
75006
  return [];
74803
75007
  }
@@ -74847,7 +75051,7 @@ async function paginate(config2, documents) {
74847
75051
  }
74848
75052
  })
74849
75053
  ).concat(
74850
- !nodeQuery ? [] : keys.map(
75054
+ !nodeQuery ? [] : keys2.map(
74851
75055
  (key) => ({
74852
75056
  kind: graphql10.Kind.VARIABLE_DEFINITION,
74853
75057
  type: key.type,
@@ -74870,7 +75074,7 @@ async function paginate(config2, documents) {
74870
75074
  kind: graphql10.Kind.NAME,
74871
75075
  value: typeConfig?.resolve?.queryField || "node"
74872
75076
  },
74873
- ["arguments"]: keys.map((key) => ({
75077
+ ["arguments"]: keys2.map((key) => ({
74874
75078
  kind: graphql10.Kind.ARGUMENT,
74875
75079
  name: {
74876
75080
  kind: graphql10.Kind.NAME,
@@ -75564,12 +75768,24 @@ function prepareSelection({
75564
75768
  }
75565
75769
  const typeName = fieldType.toString();
75566
75770
  const pathSoFar = path2.concat(attributeName);
75567
- const keys = config2.keyFieldsForType(rootType);
75771
+ const keys2 = config2.keyFieldsForType(rootType);
75568
75772
  let fieldObj = {
75569
75773
  type: typeName,
75570
75774
  keyRaw: fieldKey(config2, field)
75571
75775
  };
75572
- if (keys.includes(field.name.value)) {
75776
+ if (field.directives && field.directives.length > 0) {
75777
+ fieldObj.directives = field.directives?.map((directive) => ({
75778
+ name: directive.name.value,
75779
+ arguments: (directive.arguments ?? []).reduce(
75780
+ (acc, arg) => ({
75781
+ ...acc,
75782
+ [arg.name.value]: config2.serializeValueMap({ field: arg.value })["field"]
75783
+ }),
75784
+ {}
75785
+ )
75786
+ }));
75787
+ }
75788
+ if (keys2.includes(field.name.value)) {
75573
75789
  fieldObj.visible = true;
75574
75790
  }
75575
75791
  if (nullable) {
@@ -75794,12 +76010,7 @@ function artifactGenerator(stats) {
75794
76010
  writeIndexFile(config2, docs)
75795
76011
  ].concat(
75796
76012
  docs.map(async (doc) => {
75797
- const {
75798
- document,
75799
- name,
75800
- generateArtifact,
75801
- originalParsed
75802
- } = doc;
76013
+ const { document, name, generateArtifact, originalParsed, originalString } = doc;
75803
76014
  if (!generateArtifact) {
75804
76015
  return;
75805
76016
  }
@@ -76214,12 +76425,12 @@ ${exportStatement("config")}
76214
76425
  },
76215
76426
  [path_exports.join(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
76216
76427
  }),
76217
- ...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, docs, plugin2)),
76428
+ ...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, plugin2)),
76218
76429
  generatePluginIndex({ config: config2, exportStatement: exportStar })
76219
76430
  ]);
76220
76431
  await generateGraphqlReturnTypes(config2, docs);
76221
76432
  }
76222
- async function generatePluginRuntime(config2, docs, plugin2) {
76433
+ async function generatePluginRuntime(config2, plugin2) {
76223
76434
  if (houdini_mode.is_testing || !plugin2.includeRuntime) {
76224
76435
  return;
76225
76436
  }
@@ -76236,16 +76447,12 @@ async function generatePluginRuntime(config2, docs, plugin2) {
76236
76447
  });
76237
76448
  }
76238
76449
  const pluginDir = config2.pluginRuntimeDirectory(plugin2.name);
76239
- let transformMap = plugin2.transformRuntime ?? {};
76240
- if (transformMap && typeof transformMap === "function") {
76241
- transformMap = transformMap(docs);
76242
- }
76243
76450
  await fs_exports.mkdirp(pluginDir);
76244
76451
  await fs_exports.recursiveCopy(
76245
76452
  runtime_path,
76246
76453
  pluginDir,
76247
76454
  Object.fromEntries(
76248
- Object.entries(transformMap).map(([key, value]) => [
76455
+ Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
76249
76456
  path_exports.join(runtime_path, key),
76250
76457
  (content) => value({ config: config2, content })
76251
76458
  ])
@@ -76685,8 +76892,7 @@ async function generateDocumentTypes(config2, docs) {
76685
76892
  originalParsed: originalDocument,
76686
76893
  name,
76687
76894
  filename,
76688
- generateArtifact,
76689
- artifact
76895
+ generateArtifact
76690
76896
  }) => {
76691
76897
  if (!generateArtifact) {
76692
76898
  return;
@@ -76725,14 +76931,6 @@ async function generateDocumentTypes(config2, docs) {
76725
76931
  missingScalars
76726
76932
  );
76727
76933
  }
76728
- program3.body.push(
76729
- AST11.exportNamedDeclaration(
76730
- AST11.tsTypeAliasDeclaration(
76731
- AST11.identifier(`${name}$artifact`),
76732
- convertToTs(serializeValue(artifact))
76733
- )
76734
- )
76735
- );
76736
76934
  await fs_exports.writeFile(typeDefPath, recast11.print(program3).code);
76737
76935
  typePaths.push(typeDefPath);
76738
76936
  }
@@ -76759,17 +76957,18 @@ export * from "${module2}"
76759
76957
  `;
76760
76958
  let indexContent = recast11.print(typeIndex).code;
76761
76959
  for (const plugin2 of config2.plugins) {
76762
- if (plugin2.indexFile) {
76763
- indexContent = plugin2.indexFile({
76764
- config: config2,
76765
- content: indexContent,
76766
- exportDefaultAs,
76767
- exportStarFrom: exportStarFrom2,
76768
- pluginRoot: config2.pluginDirectory(plugin2.name),
76769
- typedef: true,
76770
- documents: docs
76771
- });
76960
+ if (!plugin2.indexFile) {
76961
+ continue;
76772
76962
  }
76963
+ indexContent = plugin2.indexFile({
76964
+ config: config2,
76965
+ content: indexContent,
76966
+ exportDefaultAs,
76967
+ exportStarFrom: exportStarFrom2,
76968
+ pluginRoot: config2.pluginDirectory(plugin2.name),
76969
+ typedef: true,
76970
+ documents: docs
76971
+ });
76773
76972
  if (plugin2.includeRuntime) {
76774
76973
  indexContent += exportStarFrom2({
76775
76974
  module: "./" + path_exports.relative(config2.rootDir, config2.pluginRuntimeDirectory(plugin2.name))
@@ -76801,42 +77000,6 @@ ${[...missingScalars].map(
76801
77000
  For more information, please visit this link: ${siteURL}/api/config#custom-scalars`);
76802
77001
  }
76803
77002
  }
76804
- function convertToTs(source) {
76805
- if (source.type === "ObjectExpression") {
76806
- return AST11.tsTypeLiteral(
76807
- source.properties.reduce(
76808
- (props, prop) => {
76809
- if (prop.type !== "ObjectProperty" || prop.key.type !== "StringLiteral" && prop.key.type === "Identifier") {
76810
- return props;
76811
- }
76812
- return [
76813
- ...props,
76814
- AST11.tsPropertySignature(
76815
- prop.key,
76816
- AST11.tsTypeAnnotation(convertToTs(prop.value))
76817
- )
76818
- ];
76819
- },
76820
- []
76821
- )
76822
- );
76823
- }
76824
- if (source.type === "ArrayExpression") {
76825
- return AST11.tsTupleType(
76826
- source.elements.map((element) => convertToTs(element))
76827
- );
76828
- }
76829
- if (source.type === "Literal" && typeof source.value === "boolean") {
76830
- return AST11.tsLiteralType(AST11.booleanLiteral(source.value));
76831
- }
76832
- if (source.type === "Literal" && typeof source.value === "number") {
76833
- return AST11.tsLiteralType(AST11.numericLiteral(source.value));
76834
- }
76835
- if (source.type === "Literal" && typeof source.value === "string") {
76836
- return AST11.tsLiteralType(AST11.stringLiteral(source.value));
76837
- }
76838
- return AST11.tsLiteralType(source);
76839
- }
76840
77003
  async function generateOperationTypeDefs(config2, filepath, body, definition, selections, visitedTypes, missingScalars) {
76841
77004
  let parentType = null;
76842
77005
  if (definition.operation === "query") {
@@ -77108,10 +77271,10 @@ function typeDefinitions(config2, body, docs, returnType) {
77108
77271
  typeName = "__ROOT__";
77109
77272
  }
77110
77273
  let idFields = AST12.tsNeverKeyword();
77111
- const keys = keyFieldsForType(config2.configFile, type.name);
77112
- if (graphql19.isObjectType(type) && keys.length > 0 && keys.every((key) => type.getFields()[key])) {
77274
+ const keys2 = keyFieldsForType(config2.configFile, type.name);
77275
+ if (graphql19.isObjectType(type) && keys2.length > 0 && keys2.every((key) => type.getFields()[key])) {
77113
77276
  idFields = AST12.tsTypeLiteral(
77114
- keys.map((key) => {
77277
+ keys2.map((key) => {
77115
77278
  const fieldType = type.getFields()[key];
77116
77279
  const unwrapped = unwrapType(config2, fieldType.type);
77117
77280
  return AST12.tsPropertySignature(
@@ -77544,6 +77707,9 @@ async function writeIndexFile2(config2, docs) {
77544
77707
  module: relative2(config2.pluginRuntimeDirectory(plugin2.name))
77545
77708
  });
77546
77709
  }
77710
+ if (!plugin2.indexFile) {
77711
+ continue;
77712
+ }
77547
77713
  }
77548
77714
  await fs_exports.writeFile(path_exports.join(config2.rootDir, "index.js"), body);
77549
77715
  }
@@ -78809,10 +78975,7 @@ async function collectDocuments(config2) {
78809
78975
  }
78810
78976
  }
78811
78977
  } catch (err) {
78812
- throw {
78813
- message: err.message,
78814
- filepath
78815
- };
78978
+ throw new HoudiniError({ ...err, filepath });
78816
78979
  }
78817
78980
  })
78818
78981
  );
@@ -79337,8 +79500,6 @@ async function updateSvelteMainJs(targetPath, typescript) {
79337
79500
  import './app.css'
79338
79501
  import App from './App.svelte'
79339
79502
 
79340
- client.init();
79341
-
79342
79503
  const app = new App({
79343
79504
  target: document.getElementById('app')
79344
79505
  })
@@ -79359,8 +79520,8 @@ async function updatePackageJSON(targetPath) {
79359
79520
  }
79360
79521
  packageJSON.devDependencies = {
79361
79522
  ...packageJSON.devDependencies,
79362
- houdini: "^1.1.4-react.0",
79363
- "houdini-svelte": "^1.1.4-react.0"
79523
+ houdini: "^1.1.5",
79524
+ "houdini-svelte": "^1.1.5"
79364
79525
  };
79365
79526
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
79366
79527
  }