houdini-svelte 1.1.2 → 1.1.4-react.0

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 (46) hide show
  1. package/build/plugin-cjs/index.js +261 -225
  2. package/build/plugin-esm/index.js +261 -225
  3. package/build/preprocess-cjs/index.js +272 -225
  4. package/build/preprocess-esm/index.js +272 -225
  5. package/build/runtime/stores/index.d.ts +1 -1
  6. package/build/runtime/stores/pagination/fragment.d.ts +4 -7
  7. package/build/runtime/stores/pagination/query.d.ts +3 -4
  8. package/build/runtime/stores/query.d.ts +2 -54
  9. package/build/runtime/types.d.ts +40 -28
  10. package/build/runtime-cjs/stores/index.d.ts +1 -1
  11. package/build/runtime-cjs/stores/pagination/fragment.d.ts +4 -7
  12. package/build/runtime-cjs/stores/pagination/fragment.js +6 -9
  13. package/build/runtime-cjs/stores/pagination/query.d.ts +3 -4
  14. package/build/runtime-cjs/stores/pagination/query.js +28 -22
  15. package/build/runtime-cjs/stores/query.d.ts +2 -54
  16. package/build/runtime-cjs/types.d.ts +40 -28
  17. package/build/runtime-esm/stores/index.d.ts +1 -1
  18. package/build/runtime-esm/stores/pagination/fragment.d.ts +4 -7
  19. package/build/runtime-esm/stores/pagination/fragment.js +4 -7
  20. package/build/runtime-esm/stores/pagination/query.d.ts +3 -4
  21. package/build/runtime-esm/stores/pagination/query.js +23 -17
  22. package/build/runtime-esm/stores/query.d.ts +2 -54
  23. package/build/runtime-esm/types.d.ts +40 -28
  24. package/build/test-cjs/index.js +601 -491
  25. package/build/test-esm/index.js +601 -491
  26. package/package.json +2 -2
  27. package/build/runtime/stores/pagination/cursor.d.ts +0 -13
  28. package/build/runtime/stores/pagination/fetch.d.ts +0 -3
  29. package/build/runtime/stores/pagination/offset.d.ts +0 -20
  30. package/build/runtime/stores/pagination/pageInfo.d.ts +0 -13
  31. package/build/runtime-cjs/stores/pagination/cursor.d.ts +0 -13
  32. package/build/runtime-cjs/stores/pagination/cursor.js +0 -191
  33. package/build/runtime-cjs/stores/pagination/fetch.d.ts +0 -3
  34. package/build/runtime-cjs/stores/pagination/fetch.js +0 -16
  35. package/build/runtime-cjs/stores/pagination/offset.d.ts +0 -20
  36. package/build/runtime-cjs/stores/pagination/offset.js +0 -89
  37. package/build/runtime-cjs/stores/pagination/pageInfo.d.ts +0 -13
  38. package/build/runtime-cjs/stores/pagination/pageInfo.js +0 -79
  39. package/build/runtime-esm/stores/pagination/cursor.d.ts +0 -13
  40. package/build/runtime-esm/stores/pagination/cursor.js +0 -167
  41. package/build/runtime-esm/stores/pagination/fetch.d.ts +0 -3
  42. package/build/runtime-esm/stores/pagination/fetch.js +0 -0
  43. package/build/runtime-esm/stores/pagination/offset.d.ts +0 -20
  44. package/build/runtime-esm/stores/pagination/offset.js +0 -65
  45. package/build/runtime-esm/stores/pagination/pageInfo.d.ts +0 -13
  46. package/build/runtime-esm/stores/pagination/pageInfo.js +0 -52
@@ -33428,7 +33428,7 @@ var require_visitor = __commonJS2({
33428
33428
  Object.defineProperty(exports, "__esModule", {
33429
33429
  value: true
33430
33430
  });
33431
- exports.visit = visit2;
33431
+ exports.visit = visit3;
33432
33432
  exports.visitInParallel = visitInParallel;
33433
33433
  exports.getVisitFn = getVisitFn;
33434
33434
  exports.BREAK = exports.QueryDocumentKeys = void 0;
@@ -33491,7 +33491,7 @@ var require_visitor = __commonJS2({
33491
33491
  exports.QueryDocumentKeys = QueryDocumentKeys;
33492
33492
  var BREAK = Object.freeze({});
33493
33493
  exports.BREAK = BREAK;
33494
- function visit2(root, visitor) {
33494
+ function visit3(root, visitor) {
33495
33495
  var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
33496
33496
  var stack = void 0;
33497
33497
  var inArray = Array.isArray(root);
@@ -72717,6 +72717,107 @@ var require_lib3 = __commonJS2({
72717
72717
  exports.tokTypes = tokTypes;
72718
72718
  }
72719
72719
  });
72720
+ var require_cjs = __commonJS2({
72721
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
72722
+ "use strict";
72723
+ var isMergeableObject = function isMergeableObject2(value2) {
72724
+ return isNonNullObject(value2) && !isSpecial(value2);
72725
+ };
72726
+ function isNonNullObject(value2) {
72727
+ return !!value2 && typeof value2 === "object";
72728
+ }
72729
+ function isSpecial(value2) {
72730
+ var stringValue = Object.prototype.toString.call(value2);
72731
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
72732
+ }
72733
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
72734
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
72735
+ function isReactElement(value2) {
72736
+ return value2.$$typeof === REACT_ELEMENT_TYPE;
72737
+ }
72738
+ function emptyTarget(val) {
72739
+ return Array.isArray(val) ? [] : {};
72740
+ }
72741
+ function cloneUnlessOtherwiseSpecified(value2, options) {
72742
+ return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
72743
+ }
72744
+ function defaultArrayMerge(target, source, options) {
72745
+ return target.concat(source).map(function(element) {
72746
+ return cloneUnlessOtherwiseSpecified(element, options);
72747
+ });
72748
+ }
72749
+ function getMergeFunction(key, options) {
72750
+ if (!options.customMerge) {
72751
+ return deepmerge;
72752
+ }
72753
+ var customMerge = options.customMerge(key);
72754
+ return typeof customMerge === "function" ? customMerge : deepmerge;
72755
+ }
72756
+ function getEnumerableOwnPropertySymbols(target) {
72757
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
72758
+ return target.propertyIsEnumerable(symbol);
72759
+ }) : [];
72760
+ }
72761
+ function getKeys(target) {
72762
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
72763
+ }
72764
+ function propertyIsOnObject(object, property) {
72765
+ try {
72766
+ return property in object;
72767
+ } catch (_) {
72768
+ return false;
72769
+ }
72770
+ }
72771
+ function propertyIsUnsafe(target, key) {
72772
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
72773
+ }
72774
+ function mergeObject(target, source, options) {
72775
+ var destination = {};
72776
+ if (options.isMergeableObject(target)) {
72777
+ getKeys(target).forEach(function(key) {
72778
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
72779
+ });
72780
+ }
72781
+ getKeys(source).forEach(function(key) {
72782
+ if (propertyIsUnsafe(target, key)) {
72783
+ return;
72784
+ }
72785
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
72786
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
72787
+ } else {
72788
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
72789
+ }
72790
+ });
72791
+ return destination;
72792
+ }
72793
+ function deepmerge(target, source, options) {
72794
+ options = options || {};
72795
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
72796
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
72797
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
72798
+ var sourceIsArray = Array.isArray(source);
72799
+ var targetIsArray = Array.isArray(target);
72800
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
72801
+ if (!sourceAndTargetTypesMatch) {
72802
+ return cloneUnlessOtherwiseSpecified(source, options);
72803
+ } else if (sourceIsArray) {
72804
+ return options.arrayMerge(target, source, options);
72805
+ } else {
72806
+ return mergeObject(target, source, options);
72807
+ }
72808
+ }
72809
+ deepmerge.all = function deepmergeAll(array, options) {
72810
+ if (!Array.isArray(array)) {
72811
+ throw new Error("first argument should be an array");
72812
+ }
72813
+ return array.reduce(function(prev, next) {
72814
+ return deepmerge(prev, next, options);
72815
+ }, {});
72816
+ };
72817
+ var deepmerge_1 = deepmerge;
72818
+ module2.exports = deepmerge_1;
72819
+ }
72820
+ });
72720
72821
  var require_tslib = __commonJS2({
72721
72822
  "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module2) {
72722
72823
  var __extends;
@@ -74973,7 +75074,7 @@ var require_path_visitor = __commonJS2({
74973
75074
  }
74974
75075
  return target;
74975
75076
  }
74976
- PathVisitor.visit = function visit2(node2, methods) {
75077
+ PathVisitor.visit = function visit3(node2, methods) {
74977
75078
  return PathVisitor.fromMethodsObject(methods).visit(node2);
74978
75079
  };
74979
75080
  var PVp = PathVisitor.prototype;
@@ -75164,7 +75265,7 @@ var require_path_visitor = __commonJS2({
75164
75265
  this.needToCallTraverse = false;
75165
75266
  return visitChildren(path22, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
75166
75267
  };
75167
- sharedContextProtoMethods.visit = function visit2(path22, newVisitor) {
75268
+ sharedContextProtoMethods.visit = function visit3(path22, newVisitor) {
75168
75269
  if (!(this instanceof this.Context)) {
75169
75270
  throw new Error("");
75170
75271
  }
@@ -76507,7 +76608,7 @@ var require_main = __commonJS2({
76507
76608
  var someField = _a.someField;
76508
76609
  var Type = _a.Type;
76509
76610
  var use = _a.use;
76510
- var visit2 = _a.visit;
76611
+ var visit3 = _a.visit;
76511
76612
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
76512
76613
  exports.builders = builders;
76513
76614
  exports.builtInTypes = builtInTypes;
@@ -76524,7 +76625,7 @@ var require_main = __commonJS2({
76524
76625
  exports.someField = someField;
76525
76626
  exports.Type = Type;
76526
76627
  exports.use = use;
76527
- exports.visit = visit2;
76628
+ exports.visit = visit3;
76528
76629
  Object.assign(namedTypes_1.namedTypes, n);
76529
76630
  }
76530
76631
  });
@@ -88939,107 +89040,6 @@ var require_main2 = __commonJS2({
88939
89040
  }
88940
89041
  }
88941
89042
  });
88942
- var require_cjs = __commonJS2({
88943
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
88944
- "use strict";
88945
- var isMergeableObject = function isMergeableObject2(value2) {
88946
- return isNonNullObject(value2) && !isSpecial(value2);
88947
- };
88948
- function isNonNullObject(value2) {
88949
- return !!value2 && typeof value2 === "object";
88950
- }
88951
- function isSpecial(value2) {
88952
- var stringValue = Object.prototype.toString.call(value2);
88953
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
88954
- }
88955
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
88956
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
88957
- function isReactElement(value2) {
88958
- return value2.$$typeof === REACT_ELEMENT_TYPE;
88959
- }
88960
- function emptyTarget(val) {
88961
- return Array.isArray(val) ? [] : {};
88962
- }
88963
- function cloneUnlessOtherwiseSpecified(value2, options) {
88964
- return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
88965
- }
88966
- function defaultArrayMerge(target, source, options) {
88967
- return target.concat(source).map(function(element) {
88968
- return cloneUnlessOtherwiseSpecified(element, options);
88969
- });
88970
- }
88971
- function getMergeFunction(key, options) {
88972
- if (!options.customMerge) {
88973
- return deepmerge;
88974
- }
88975
- var customMerge = options.customMerge(key);
88976
- return typeof customMerge === "function" ? customMerge : deepmerge;
88977
- }
88978
- function getEnumerableOwnPropertySymbols(target) {
88979
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
88980
- return target.propertyIsEnumerable(symbol);
88981
- }) : [];
88982
- }
88983
- function getKeys(target) {
88984
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
88985
- }
88986
- function propertyIsOnObject(object, property) {
88987
- try {
88988
- return property in object;
88989
- } catch (_) {
88990
- return false;
88991
- }
88992
- }
88993
- function propertyIsUnsafe(target, key) {
88994
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
88995
- }
88996
- function mergeObject(target, source, options) {
88997
- var destination = {};
88998
- if (options.isMergeableObject(target)) {
88999
- getKeys(target).forEach(function(key) {
89000
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
89001
- });
89002
- }
89003
- getKeys(source).forEach(function(key) {
89004
- if (propertyIsUnsafe(target, key)) {
89005
- return;
89006
- }
89007
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
89008
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
89009
- } else {
89010
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
89011
- }
89012
- });
89013
- return destination;
89014
- }
89015
- function deepmerge(target, source, options) {
89016
- options = options || {};
89017
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
89018
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
89019
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
89020
- var sourceIsArray = Array.isArray(source);
89021
- var targetIsArray = Array.isArray(target);
89022
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
89023
- if (!sourceAndTargetTypesMatch) {
89024
- return cloneUnlessOtherwiseSpecified(source, options);
89025
- } else if (sourceIsArray) {
89026
- return options.arrayMerge(target, source, options);
89027
- } else {
89028
- return mergeObject(target, source, options);
89029
- }
89030
- }
89031
- deepmerge.all = function deepmergeAll(array, options) {
89032
- if (!Array.isArray(array)) {
89033
- throw new Error("first argument should be an array");
89034
- }
89035
- return array.reduce(function(prev, next) {
89036
- return deepmerge(prev, next, options);
89037
- }, {});
89038
- };
89039
- var deepmerge_1 = deepmerge;
89040
- module2.exports = deepmerge_1;
89041
- }
89042
- });
89043
89043
  async function runPipeline(config4, pipeline22, target) {
89044
89044
  for (const transform of pipeline22) {
89045
89045
  await transform?.(config4, target);
@@ -92399,10 +92399,11 @@ var query = documentPlugin(ArtifactKind.Query, function() {
92399
92399
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
92400
92400
  }
92401
92401
  lastVariables = { ...marshalVariables2(ctx) };
92402
+ const variables = lastVariables;
92402
92403
  subscriptionSpec = {
92403
92404
  rootType: ctx.artifact.rootType,
92404
92405
  selection: ctx.artifact.selection,
92405
- variables: () => lastVariables,
92406
+ variables: () => variables,
92406
92407
  set: (newValue) => {
92407
92408
  resolve22(ctx, {
92408
92409
  data: newValue,
@@ -92429,12 +92430,17 @@ var query = documentPlugin(ArtifactKind.Query, function() {
92429
92430
  });
92430
92431
  var fragment = documentPlugin(ArtifactKind.Fragment, function() {
92431
92432
  let subscriptionSpec = null;
92433
+ let lastReference = null;
92432
92434
  return {
92433
92435
  start(ctx, { next, resolve: resolve22, variablesChanged: variablesChanged2, marshalVariables: marshalVariables2 }) {
92434
92436
  if (!ctx.stuff.parentID) {
92435
92437
  return next(ctx);
92436
92438
  }
92437
- if (variablesChanged2(ctx) && !ctx.cacheParams?.disableSubscriptions) {
92439
+ const currentReference = {
92440
+ parent: ctx.stuff.parentID,
92441
+ variables: marshalVariables2(ctx)
92442
+ };
92443
+ if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged2(ctx))) {
92438
92444
  if (subscriptionSpec) {
92439
92445
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
92440
92446
  }
@@ -92457,6 +92463,7 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
92457
92463
  }
92458
92464
  };
92459
92465
  cache_default.subscribe(subscriptionSpec, variables);
92466
+ lastReference = currentReference;
92460
92467
  }
92461
92468
  next(ctx);
92462
92469
  },
@@ -92575,13 +92582,36 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
92575
92582
  return TypeWrapper2;
92576
92583
  })(TypeWrapper || {});
92577
92584
  var import_parser = __toESM2(require_lib3(), 1);
92578
- async function parseJS(str) {
92585
+ var import_deepmerge = __toESM2(require_cjs(), 1);
92586
+ function deepMerge(filepath, ...targets) {
92587
+ try {
92588
+ if (targets.length === 1) {
92589
+ return targets[0];
92590
+ } else if (targets.length === 2) {
92591
+ return (0, import_deepmerge.default)(targets[0], targets[1], {
92592
+ arrayMerge: (source, update) => [...new Set(source.concat(update))]
92593
+ });
92594
+ }
92595
+ return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
92596
+ } catch (e22) {
92597
+ throw new HoudiniError({
92598
+ filepath,
92599
+ message: "could not merge: " + JSON.stringify(targets, null, 4),
92600
+ description: e22.message
92601
+ });
92602
+ }
92603
+ }
92604
+ async function parseJS(str, config4) {
92605
+ const defaultConfig = {
92606
+ plugins: ["typescript"],
92607
+ sourceType: "module"
92608
+ };
92579
92609
  return {
92580
92610
  start: 0,
92581
- script: (0, import_parser.parse)(str || "", {
92582
- plugins: ["typescript"],
92583
- sourceType: "module"
92584
- }).program,
92611
+ script: (0, import_parser.parse)(
92612
+ str || "",
92613
+ config4 ? deepMerge("", defaultConfig, config4) : defaultConfig
92614
+ ).program,
92585
92615
  end: str.length
92586
92616
  };
92587
92617
  }
@@ -92626,7 +92656,6 @@ async function cleanupFiles(pathFolder, listOfObj) {
92626
92656
  );
92627
92657
  return allFilesNotInList;
92628
92658
  }
92629
- var import_deepmerge = __toESM2(require_cjs(), 1);
92630
92659
  async function detectFromPackageJSON(cwd) {
92631
92660
  try {
92632
92661
  const packageJSONFile = await fs_exports.readFile(path_exports.join(cwd, "package.json"));
@@ -99337,7 +99366,7 @@ var require_visitor3 = __commonJS3({
99337
99366
  Object.defineProperty(exports, "__esModule", {
99338
99367
  value: true
99339
99368
  });
99340
- exports.visit = visit13;
99369
+ exports.visit = visit14;
99341
99370
  exports.visitInParallel = visitInParallel;
99342
99371
  exports.getVisitFn = getVisitFn;
99343
99372
  exports.BREAK = exports.QueryDocumentKeys = void 0;
@@ -99400,7 +99429,7 @@ var require_visitor3 = __commonJS3({
99400
99429
  exports.QueryDocumentKeys = QueryDocumentKeys;
99401
99430
  var BREAK = Object.freeze({});
99402
99431
  exports.BREAK = BREAK;
99403
- function visit13(root, visitor) {
99432
+ function visit14(root, visitor) {
99404
99433
  var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
99405
99434
  var stack = void 0;
99406
99435
  var inArray = Array.isArray(root);
@@ -137871,6 +137900,107 @@ var require_lib32 = __commonJS3({
137871
137900
  exports.tokTypes = tokTypes;
137872
137901
  }
137873
137902
  });
137903
+ var require_cjs2 = __commonJS3({
137904
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
137905
+ "use strict";
137906
+ var isMergeableObject = function isMergeableObject2(value2) {
137907
+ return isNonNullObject(value2) && !isSpecial(value2);
137908
+ };
137909
+ function isNonNullObject(value2) {
137910
+ return !!value2 && typeof value2 === "object";
137911
+ }
137912
+ function isSpecial(value2) {
137913
+ var stringValue = Object.prototype.toString.call(value2);
137914
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
137915
+ }
137916
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
137917
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
137918
+ function isReactElement(value2) {
137919
+ return value2.$$typeof === REACT_ELEMENT_TYPE;
137920
+ }
137921
+ function emptyTarget(val) {
137922
+ return Array.isArray(val) ? [] : {};
137923
+ }
137924
+ function cloneUnlessOtherwiseSpecified(value2, options) {
137925
+ return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
137926
+ }
137927
+ function defaultArrayMerge(target, source, options) {
137928
+ return target.concat(source).map(function(element) {
137929
+ return cloneUnlessOtherwiseSpecified(element, options);
137930
+ });
137931
+ }
137932
+ function getMergeFunction(key, options) {
137933
+ if (!options.customMerge) {
137934
+ return deepmerge;
137935
+ }
137936
+ var customMerge = options.customMerge(key);
137937
+ return typeof customMerge === "function" ? customMerge : deepmerge;
137938
+ }
137939
+ function getEnumerableOwnPropertySymbols(target) {
137940
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
137941
+ return target.propertyIsEnumerable(symbol);
137942
+ }) : [];
137943
+ }
137944
+ function getKeys(target) {
137945
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
137946
+ }
137947
+ function propertyIsOnObject(object, property) {
137948
+ try {
137949
+ return property in object;
137950
+ } catch (_) {
137951
+ return false;
137952
+ }
137953
+ }
137954
+ function propertyIsUnsafe(target, key) {
137955
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
137956
+ }
137957
+ function mergeObject(target, source, options) {
137958
+ var destination = {};
137959
+ if (options.isMergeableObject(target)) {
137960
+ getKeys(target).forEach(function(key) {
137961
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
137962
+ });
137963
+ }
137964
+ getKeys(source).forEach(function(key) {
137965
+ if (propertyIsUnsafe(target, key)) {
137966
+ return;
137967
+ }
137968
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
137969
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
137970
+ } else {
137971
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
137972
+ }
137973
+ });
137974
+ return destination;
137975
+ }
137976
+ function deepmerge(target, source, options) {
137977
+ options = options || {};
137978
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
137979
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
137980
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
137981
+ var sourceIsArray = Array.isArray(source);
137982
+ var targetIsArray = Array.isArray(target);
137983
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
137984
+ if (!sourceAndTargetTypesMatch) {
137985
+ return cloneUnlessOtherwiseSpecified(source, options);
137986
+ } else if (sourceIsArray) {
137987
+ return options.arrayMerge(target, source, options);
137988
+ } else {
137989
+ return mergeObject(target, source, options);
137990
+ }
137991
+ }
137992
+ deepmerge.all = function deepmergeAll(array, options) {
137993
+ if (!Array.isArray(array)) {
137994
+ throw new Error("first argument should be an array");
137995
+ }
137996
+ return array.reduce(function(prev, next) {
137997
+ return deepmerge(prev, next, options);
137998
+ }, {});
137999
+ };
138000
+ var deepmerge_1 = deepmerge;
138001
+ module2.exports = deepmerge_1;
138002
+ }
138003
+ });
137874
138004
  var require_tslib2 = __commonJS3({
137875
138005
  "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module2) {
137876
138006
  var __extends;
@@ -140127,7 +140257,7 @@ var require_path_visitor2 = __commonJS3({
140127
140257
  }
140128
140258
  return target;
140129
140259
  }
140130
- PathVisitor.visit = function visit13(node2, methods) {
140260
+ PathVisitor.visit = function visit14(node2, methods) {
140131
140261
  return PathVisitor.fromMethodsObject(methods).visit(node2);
140132
140262
  };
140133
140263
  var PVp = PathVisitor.prototype;
@@ -140318,7 +140448,7 @@ var require_path_visitor2 = __commonJS3({
140318
140448
  this.needToCallTraverse = false;
140319
140449
  return visitChildren(path22, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
140320
140450
  };
140321
- sharedContextProtoMethods.visit = function visit13(path22, newVisitor) {
140451
+ sharedContextProtoMethods.visit = function visit14(path22, newVisitor) {
140322
140452
  if (!(this instanceof this.Context)) {
140323
140453
  throw new Error("");
140324
140454
  }
@@ -141661,7 +141791,7 @@ var require_main3 = __commonJS3({
141661
141791
  var someField = _a.someField;
141662
141792
  var Type = _a.Type;
141663
141793
  var use = _a.use;
141664
- var visit13 = _a.visit;
141794
+ var visit14 = _a.visit;
141665
141795
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
141666
141796
  exports.builders = builders;
141667
141797
  exports.builtInTypes = builtInTypes;
@@ -141678,7 +141808,7 @@ var require_main3 = __commonJS3({
141678
141808
  exports.someField = someField;
141679
141809
  exports.Type = Type;
141680
141810
  exports.use = use;
141681
- exports.visit = visit13;
141811
+ exports.visit = visit14;
141682
141812
  Object.assign(namedTypes_1.namedTypes, n);
141683
141813
  }
141684
141814
  });
@@ -154093,107 +154223,6 @@ var require_main22 = __commonJS3({
154093
154223
  }
154094
154224
  }
154095
154225
  });
154096
- var require_cjs2 = __commonJS3({
154097
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
154098
- "use strict";
154099
- var isMergeableObject = function isMergeableObject2(value2) {
154100
- return isNonNullObject(value2) && !isSpecial(value2);
154101
- };
154102
- function isNonNullObject(value2) {
154103
- return !!value2 && typeof value2 === "object";
154104
- }
154105
- function isSpecial(value2) {
154106
- var stringValue = Object.prototype.toString.call(value2);
154107
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
154108
- }
154109
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
154110
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
154111
- function isReactElement(value2) {
154112
- return value2.$$typeof === REACT_ELEMENT_TYPE;
154113
- }
154114
- function emptyTarget(val) {
154115
- return Array.isArray(val) ? [] : {};
154116
- }
154117
- function cloneUnlessOtherwiseSpecified(value2, options) {
154118
- return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
154119
- }
154120
- function defaultArrayMerge(target, source, options) {
154121
- return target.concat(source).map(function(element) {
154122
- return cloneUnlessOtherwiseSpecified(element, options);
154123
- });
154124
- }
154125
- function getMergeFunction(key, options) {
154126
- if (!options.customMerge) {
154127
- return deepmerge;
154128
- }
154129
- var customMerge = options.customMerge(key);
154130
- return typeof customMerge === "function" ? customMerge : deepmerge;
154131
- }
154132
- function getEnumerableOwnPropertySymbols(target) {
154133
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
154134
- return target.propertyIsEnumerable(symbol);
154135
- }) : [];
154136
- }
154137
- function getKeys(target) {
154138
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
154139
- }
154140
- function propertyIsOnObject(object, property) {
154141
- try {
154142
- return property in object;
154143
- } catch (_) {
154144
- return false;
154145
- }
154146
- }
154147
- function propertyIsUnsafe(target, key) {
154148
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
154149
- }
154150
- function mergeObject(target, source, options) {
154151
- var destination = {};
154152
- if (options.isMergeableObject(target)) {
154153
- getKeys(target).forEach(function(key) {
154154
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
154155
- });
154156
- }
154157
- getKeys(source).forEach(function(key) {
154158
- if (propertyIsUnsafe(target, key)) {
154159
- return;
154160
- }
154161
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
154162
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
154163
- } else {
154164
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
154165
- }
154166
- });
154167
- return destination;
154168
- }
154169
- function deepmerge(target, source, options) {
154170
- options = options || {};
154171
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
154172
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
154173
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
154174
- var sourceIsArray = Array.isArray(source);
154175
- var targetIsArray = Array.isArray(target);
154176
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
154177
- if (!sourceAndTargetTypesMatch) {
154178
- return cloneUnlessOtherwiseSpecified(source, options);
154179
- } else if (sourceIsArray) {
154180
- return options.arrayMerge(target, source, options);
154181
- } else {
154182
- return mergeObject(target, source, options);
154183
- }
154184
- }
154185
- deepmerge.all = function deepmergeAll(array, options) {
154186
- if (!Array.isArray(array)) {
154187
- throw new Error("first argument should be an array");
154188
- }
154189
- return array.reduce(function(prev, next) {
154190
- return deepmerge(prev, next, options);
154191
- }, {});
154192
- };
154193
- var deepmerge_1 = deepmerge;
154194
- module2.exports = deepmerge_1;
154195
- }
154196
- });
154197
154226
  var import_minimatch2 = __toESM3(require_minimatch2(), 1);
154198
154227
  var config = {
154199
154228
  reset: {
@@ -157647,10 +157676,11 @@ var query2 = documentPlugin2(ArtifactKind2.Query, function() {
157647
157676
  cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
157648
157677
  }
157649
157678
  lastVariables = { ...marshalVariables(ctx) };
157679
+ const variables = lastVariables;
157650
157680
  subscriptionSpec = {
157651
157681
  rootType: ctx.artifact.rootType,
157652
157682
  selection: ctx.artifact.selection,
157653
- variables: () => lastVariables,
157683
+ variables: () => variables,
157654
157684
  set: (newValue) => {
157655
157685
  resolve22(ctx, {
157656
157686
  data: newValue,
@@ -157677,12 +157707,17 @@ var query2 = documentPlugin2(ArtifactKind2.Query, function() {
157677
157707
  });
157678
157708
  var fragment2 = documentPlugin2(ArtifactKind2.Fragment, function() {
157679
157709
  let subscriptionSpec = null;
157710
+ let lastReference = null;
157680
157711
  return {
157681
157712
  start(ctx, { next, resolve: resolve22, variablesChanged, marshalVariables }) {
157682
157713
  if (!ctx.stuff.parentID) {
157683
157714
  return next(ctx);
157684
157715
  }
157685
- if (variablesChanged(ctx) && !ctx.cacheParams?.disableSubscriptions) {
157716
+ const currentReference = {
157717
+ parent: ctx.stuff.parentID,
157718
+ variables: marshalVariables(ctx)
157719
+ };
157720
+ if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals2(lastReference, currentReference) || variablesChanged(ctx))) {
157686
157721
  if (subscriptionSpec) {
157687
157722
  cache_default2.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
157688
157723
  }
@@ -157705,6 +157740,7 @@ var fragment2 = documentPlugin2(ArtifactKind2.Fragment, function() {
157705
157740
  }
157706
157741
  };
157707
157742
  cache_default2.subscribe(subscriptionSpec, variables);
157743
+ lastReference = currentReference;
157708
157744
  }
157709
157745
  next(ctx);
157710
157746
  },
@@ -157770,9 +157806,9 @@ var emptySchema2 = graphql22.buildSchema("type Query { hello: String }");
157770
157806
  var defaultDirectives2 = emptySchema2.getDirectives().map((dir) => dir.name);
157771
157807
  var graphql32 = __toESM3(require_graphql22(), 1);
157772
157808
  var import_parser2 = __toESM3(require_lib32(), 1);
157809
+ var import_deepmerge2 = __toESM3(require_cjs2(), 1);
157773
157810
  var recast2 = __toESM3(require_main22(), 1);
157774
157811
  var AST2 = recast2.types.builders;
157775
- var import_deepmerge2 = __toESM3(require_cjs2(), 1);
157776
157812
  var graphql42 = __toESM3(require_graphql22(), 1);
157777
157813
  var graphql14 = __toESM3(require_graphql22(), 1);
157778
157814
  var recast5 = __toESM3(require_main22(), 1);