houdini-svelte 1.0.3 → 1.0.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.
@@ -46321,107 +46321,6 @@ var require_minimatch = __commonJS2({
46321
46321
  minimatch2.Minimatch = Minimatch;
46322
46322
  }
46323
46323
  });
46324
- var require_cjs = __commonJS2({
46325
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
46326
- "use strict";
46327
- var isMergeableObject = function isMergeableObject2(value2) {
46328
- return isNonNullObject(value2) && !isSpecial(value2);
46329
- };
46330
- function isNonNullObject(value2) {
46331
- return !!value2 && typeof value2 === "object";
46332
- }
46333
- function isSpecial(value2) {
46334
- var stringValue = Object.prototype.toString.call(value2);
46335
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
46336
- }
46337
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
46338
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
46339
- function isReactElement(value2) {
46340
- return value2.$$typeof === REACT_ELEMENT_TYPE;
46341
- }
46342
- function emptyTarget(val) {
46343
- return Array.isArray(val) ? [] : {};
46344
- }
46345
- function cloneUnlessOtherwiseSpecified(value2, options) {
46346
- return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
46347
- }
46348
- function defaultArrayMerge(target, source, options) {
46349
- return target.concat(source).map(function(element) {
46350
- return cloneUnlessOtherwiseSpecified(element, options);
46351
- });
46352
- }
46353
- function getMergeFunction(key, options) {
46354
- if (!options.customMerge) {
46355
- return deepmerge;
46356
- }
46357
- var customMerge = options.customMerge(key);
46358
- return typeof customMerge === "function" ? customMerge : deepmerge;
46359
- }
46360
- function getEnumerableOwnPropertySymbols(target) {
46361
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
46362
- return target.propertyIsEnumerable(symbol);
46363
- }) : [];
46364
- }
46365
- function getKeys(target) {
46366
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
46367
- }
46368
- function propertyIsOnObject(object, property) {
46369
- try {
46370
- return property in object;
46371
- } catch (_) {
46372
- return false;
46373
- }
46374
- }
46375
- function propertyIsUnsafe(target, key) {
46376
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
46377
- }
46378
- function mergeObject(target, source, options) {
46379
- var destination = {};
46380
- if (options.isMergeableObject(target)) {
46381
- getKeys(target).forEach(function(key) {
46382
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
46383
- });
46384
- }
46385
- getKeys(source).forEach(function(key) {
46386
- if (propertyIsUnsafe(target, key)) {
46387
- return;
46388
- }
46389
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
46390
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
46391
- } else {
46392
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
46393
- }
46394
- });
46395
- return destination;
46396
- }
46397
- function deepmerge(target, source, options) {
46398
- options = options || {};
46399
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
46400
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
46401
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
46402
- var sourceIsArray = Array.isArray(source);
46403
- var targetIsArray = Array.isArray(target);
46404
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
46405
- if (!sourceAndTargetTypesMatch) {
46406
- return cloneUnlessOtherwiseSpecified(source, options);
46407
- } else if (sourceIsArray) {
46408
- return options.arrayMerge(target, source, options);
46409
- } else {
46410
- return mergeObject(target, source, options);
46411
- }
46412
- }
46413
- deepmerge.all = function deepmergeAll(array, options) {
46414
- if (!Array.isArray(array)) {
46415
- throw new Error("first argument should be an array");
46416
- }
46417
- return array.reduce(function(prev, next) {
46418
- return deepmerge(prev, next, options);
46419
- }, {});
46420
- };
46421
- var deepmerge_1 = deepmerge;
46422
- module2.exports = deepmerge_1;
46423
- }
46424
- });
46425
46324
  var require_universalify = __commonJS2({
46426
46325
  "../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
46427
46326
  "use strict";
@@ -89009,6 +88908,107 @@ var require_main2 = __commonJS2({
89009
88908
  }
89010
88909
  }
89011
88910
  });
88911
+ var require_cjs = __commonJS2({
88912
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
88913
+ "use strict";
88914
+ var isMergeableObject = function isMergeableObject2(value2) {
88915
+ return isNonNullObject(value2) && !isSpecial(value2);
88916
+ };
88917
+ function isNonNullObject(value2) {
88918
+ return !!value2 && typeof value2 === "object";
88919
+ }
88920
+ function isSpecial(value2) {
88921
+ var stringValue = Object.prototype.toString.call(value2);
88922
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
88923
+ }
88924
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
88925
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
88926
+ function isReactElement(value2) {
88927
+ return value2.$$typeof === REACT_ELEMENT_TYPE;
88928
+ }
88929
+ function emptyTarget(val) {
88930
+ return Array.isArray(val) ? [] : {};
88931
+ }
88932
+ function cloneUnlessOtherwiseSpecified(value2, options) {
88933
+ return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
88934
+ }
88935
+ function defaultArrayMerge(target, source, options) {
88936
+ return target.concat(source).map(function(element) {
88937
+ return cloneUnlessOtherwiseSpecified(element, options);
88938
+ });
88939
+ }
88940
+ function getMergeFunction(key, options) {
88941
+ if (!options.customMerge) {
88942
+ return deepmerge;
88943
+ }
88944
+ var customMerge = options.customMerge(key);
88945
+ return typeof customMerge === "function" ? customMerge : deepmerge;
88946
+ }
88947
+ function getEnumerableOwnPropertySymbols(target) {
88948
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
88949
+ return target.propertyIsEnumerable(symbol);
88950
+ }) : [];
88951
+ }
88952
+ function getKeys(target) {
88953
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
88954
+ }
88955
+ function propertyIsOnObject(object, property) {
88956
+ try {
88957
+ return property in object;
88958
+ } catch (_) {
88959
+ return false;
88960
+ }
88961
+ }
88962
+ function propertyIsUnsafe(target, key) {
88963
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
88964
+ }
88965
+ function mergeObject(target, source, options) {
88966
+ var destination = {};
88967
+ if (options.isMergeableObject(target)) {
88968
+ getKeys(target).forEach(function(key) {
88969
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
88970
+ });
88971
+ }
88972
+ getKeys(source).forEach(function(key) {
88973
+ if (propertyIsUnsafe(target, key)) {
88974
+ return;
88975
+ }
88976
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
88977
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
88978
+ } else {
88979
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
88980
+ }
88981
+ });
88982
+ return destination;
88983
+ }
88984
+ function deepmerge(target, source, options) {
88985
+ options = options || {};
88986
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
88987
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
88988
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
88989
+ var sourceIsArray = Array.isArray(source);
88990
+ var targetIsArray = Array.isArray(target);
88991
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
88992
+ if (!sourceAndTargetTypesMatch) {
88993
+ return cloneUnlessOtherwiseSpecified(source, options);
88994
+ } else if (sourceIsArray) {
88995
+ return options.arrayMerge(target, source, options);
88996
+ } else {
88997
+ return mergeObject(target, source, options);
88998
+ }
88999
+ }
89000
+ deepmerge.all = function deepmergeAll(array, options) {
89001
+ if (!Array.isArray(array)) {
89002
+ throw new Error("first argument should be an array");
89003
+ }
89004
+ return array.reduce(function(prev, next) {
89005
+ return deepmerge(prev, next, options);
89006
+ }, {});
89007
+ };
89008
+ var deepmerge_1 = deepmerge;
89009
+ module2.exports = deepmerge_1;
89010
+ }
89011
+ });
89012
89012
  async function runPipeline(config4, pipeline22, target) {
89013
89013
  for (const transform of pipeline22) {
89014
89014
  await transform?.(config4, target);
@@ -89463,7 +89463,6 @@ var houdini_mode = {
89463
89463
  return process.env.HOUDINI_TEST === "true";
89464
89464
  }
89465
89465
  };
89466
- var import_deepmerge = __toESM2(require_cjs(), 1);
89467
89466
  var HoudiniError = class extends Error {
89468
89467
  filepath = null;
89469
89468
  description = null;
@@ -91714,9 +91713,7 @@ var CacheInternal = class {
91714
91713
  let targetSelection = getFieldsForType(selection, data2["__typename"]);
91715
91714
  for (const [field, value2] of Object.entries(data2)) {
91716
91715
  if (!selection || !targetSelection[field]) {
91717
- throw new Error(
91718
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection)
91719
- );
91716
+ continue;
91720
91717
  }
91721
91718
  let {
91722
91719
  type: linkedType,
@@ -92463,6 +92460,7 @@ async function cleanupFiles(pathFolder, listOfObj) {
92463
92460
  );
92464
92461
  return allFilesNotInList;
92465
92462
  }
92463
+ var import_deepmerge = __toESM2(require_cjs(), 1);
92466
92464
  var WalkerBase = class {
92467
92465
  constructor() {
92468
92466
  this.should_skip = false;
@@ -111251,107 +111249,6 @@ var require_graphql22 = __commonJS3({
111251
111249
  var _index7 = require_utilities3();
111252
111250
  }
111253
111251
  });
111254
- var require_cjs2 = __commonJS3({
111255
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
111256
- "use strict";
111257
- var isMergeableObject = function isMergeableObject2(value2) {
111258
- return isNonNullObject(value2) && !isSpecial(value2);
111259
- };
111260
- function isNonNullObject(value2) {
111261
- return !!value2 && typeof value2 === "object";
111262
- }
111263
- function isSpecial(value2) {
111264
- var stringValue = Object.prototype.toString.call(value2);
111265
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
111266
- }
111267
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
111268
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
111269
- function isReactElement(value2) {
111270
- return value2.$$typeof === REACT_ELEMENT_TYPE;
111271
- }
111272
- function emptyTarget(val) {
111273
- return Array.isArray(val) ? [] : {};
111274
- }
111275
- function cloneUnlessOtherwiseSpecified(value2, options) {
111276
- return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
111277
- }
111278
- function defaultArrayMerge(target, source, options) {
111279
- return target.concat(source).map(function(element) {
111280
- return cloneUnlessOtherwiseSpecified(element, options);
111281
- });
111282
- }
111283
- function getMergeFunction(key, options) {
111284
- if (!options.customMerge) {
111285
- return deepmerge;
111286
- }
111287
- var customMerge = options.customMerge(key);
111288
- return typeof customMerge === "function" ? customMerge : deepmerge;
111289
- }
111290
- function getEnumerableOwnPropertySymbols(target) {
111291
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
111292
- return target.propertyIsEnumerable(symbol);
111293
- }) : [];
111294
- }
111295
- function getKeys(target) {
111296
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
111297
- }
111298
- function propertyIsOnObject(object, property) {
111299
- try {
111300
- return property in object;
111301
- } catch (_) {
111302
- return false;
111303
- }
111304
- }
111305
- function propertyIsUnsafe(target, key) {
111306
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
111307
- }
111308
- function mergeObject(target, source, options) {
111309
- var destination = {};
111310
- if (options.isMergeableObject(target)) {
111311
- getKeys(target).forEach(function(key) {
111312
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
111313
- });
111314
- }
111315
- getKeys(source).forEach(function(key) {
111316
- if (propertyIsUnsafe(target, key)) {
111317
- return;
111318
- }
111319
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
111320
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
111321
- } else {
111322
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
111323
- }
111324
- });
111325
- return destination;
111326
- }
111327
- function deepmerge(target, source, options) {
111328
- options = options || {};
111329
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
111330
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
111331
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
111332
- var sourceIsArray = Array.isArray(source);
111333
- var targetIsArray = Array.isArray(target);
111334
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
111335
- if (!sourceAndTargetTypesMatch) {
111336
- return cloneUnlessOtherwiseSpecified(source, options);
111337
- } else if (sourceIsArray) {
111338
- return options.arrayMerge(target, source, options);
111339
- } else {
111340
- return mergeObject(target, source, options);
111341
- }
111342
- }
111343
- deepmerge.all = function deepmergeAll(array, options) {
111344
- if (!Array.isArray(array)) {
111345
- throw new Error("first argument should be an array");
111346
- }
111347
- return array.reduce(function(prev, next) {
111348
- return deepmerge(prev, next, options);
111349
- }, {});
111350
- };
111351
- var deepmerge_1 = deepmerge;
111352
- module2.exports = deepmerge_1;
111353
- }
111354
- });
111355
111252
  var require_universalify2 = __commonJS3({
111356
111253
  "../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
111357
111254
  "use strict";
@@ -153939,6 +153836,107 @@ var require_main22 = __commonJS3({
153939
153836
  }
153940
153837
  }
153941
153838
  });
153839
+ var require_cjs2 = __commonJS3({
153840
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
153841
+ "use strict";
153842
+ var isMergeableObject = function isMergeableObject2(value2) {
153843
+ return isNonNullObject(value2) && !isSpecial(value2);
153844
+ };
153845
+ function isNonNullObject(value2) {
153846
+ return !!value2 && typeof value2 === "object";
153847
+ }
153848
+ function isSpecial(value2) {
153849
+ var stringValue = Object.prototype.toString.call(value2);
153850
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value2);
153851
+ }
153852
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
153853
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
153854
+ function isReactElement(value2) {
153855
+ return value2.$$typeof === REACT_ELEMENT_TYPE;
153856
+ }
153857
+ function emptyTarget(val) {
153858
+ return Array.isArray(val) ? [] : {};
153859
+ }
153860
+ function cloneUnlessOtherwiseSpecified(value2, options) {
153861
+ return options.clone !== false && options.isMergeableObject(value2) ? deepmerge(emptyTarget(value2), value2, options) : value2;
153862
+ }
153863
+ function defaultArrayMerge(target, source, options) {
153864
+ return target.concat(source).map(function(element) {
153865
+ return cloneUnlessOtherwiseSpecified(element, options);
153866
+ });
153867
+ }
153868
+ function getMergeFunction(key, options) {
153869
+ if (!options.customMerge) {
153870
+ return deepmerge;
153871
+ }
153872
+ var customMerge = options.customMerge(key);
153873
+ return typeof customMerge === "function" ? customMerge : deepmerge;
153874
+ }
153875
+ function getEnumerableOwnPropertySymbols(target) {
153876
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
153877
+ return target.propertyIsEnumerable(symbol);
153878
+ }) : [];
153879
+ }
153880
+ function getKeys(target) {
153881
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
153882
+ }
153883
+ function propertyIsOnObject(object, property) {
153884
+ try {
153885
+ return property in object;
153886
+ } catch (_) {
153887
+ return false;
153888
+ }
153889
+ }
153890
+ function propertyIsUnsafe(target, key) {
153891
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
153892
+ }
153893
+ function mergeObject(target, source, options) {
153894
+ var destination = {};
153895
+ if (options.isMergeableObject(target)) {
153896
+ getKeys(target).forEach(function(key) {
153897
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
153898
+ });
153899
+ }
153900
+ getKeys(source).forEach(function(key) {
153901
+ if (propertyIsUnsafe(target, key)) {
153902
+ return;
153903
+ }
153904
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
153905
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
153906
+ } else {
153907
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
153908
+ }
153909
+ });
153910
+ return destination;
153911
+ }
153912
+ function deepmerge(target, source, options) {
153913
+ options = options || {};
153914
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
153915
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
153916
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
153917
+ var sourceIsArray = Array.isArray(source);
153918
+ var targetIsArray = Array.isArray(target);
153919
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
153920
+ if (!sourceAndTargetTypesMatch) {
153921
+ return cloneUnlessOtherwiseSpecified(source, options);
153922
+ } else if (sourceIsArray) {
153923
+ return options.arrayMerge(target, source, options);
153924
+ } else {
153925
+ return mergeObject(target, source, options);
153926
+ }
153927
+ }
153928
+ deepmerge.all = function deepmergeAll(array, options) {
153929
+ if (!Array.isArray(array)) {
153930
+ throw new Error("first argument should be an array");
153931
+ }
153932
+ return array.reduce(function(prev, next) {
153933
+ return deepmerge(prev, next, options);
153934
+ }, {});
153935
+ };
153936
+ var deepmerge_1 = deepmerge;
153937
+ module2.exports = deepmerge_1;
153938
+ }
153939
+ });
153942
153940
  var import_minimatch2 = __toESM3(require_minimatch2(), 1);
153943
153941
  var config = {
153944
153942
  reset: {
@@ -154518,7 +154516,6 @@ var houdini_mode2 = {
154518
154516
  return process.env.HOUDINI_TEST === "true";
154519
154517
  }
154520
154518
  };
154521
- var import_deepmerge2 = __toESM3(require_cjs2(), 1);
154522
154519
  var fs_exports2 = {};
154523
154520
  __export3(fs_exports2, {
154524
154521
  access: () => access2,
@@ -156738,9 +156735,7 @@ var CacheInternal2 = class {
156738
156735
  let targetSelection = getFieldsForType2(selection2, data2["__typename"]);
156739
156736
  for (const [field, value2] of Object.entries(data2)) {
156740
156737
  if (!selection2 || !targetSelection[field]) {
156741
- throw new Error(
156742
- "Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection2)
156743
- );
156738
+ continue;
156744
156739
  }
156745
156740
  let {
156746
156741
  type: linkedType,
@@ -157385,6 +157380,7 @@ var graphql32 = __toESM3(require_graphql22(), 1);
157385
157380
  var import_parser2 = __toESM3(require_lib32(), 1);
157386
157381
  var recast2 = __toESM3(require_main22(), 1);
157387
157382
  var AST2 = recast2.types.builders;
157383
+ var import_deepmerge2 = __toESM3(require_cjs2(), 1);
157388
157384
  var graphql42 = __toESM3(require_graphql22(), 1);
157389
157385
  var graphql14 = __toESM3(require_graphql22(), 1);
157390
157386
  var recast5 = __toESM3(require_main22(), 1);
@@ -186459,6 +186455,13 @@ async function svelteKitGenerator(framework2, { config: config4 }) {
186459
186455
  uniqueLayoutQueries.push(layout);
186460
186456
  }
186461
186457
  }
186458
+ if (!config4.include.some((path3) => path3.includes("js")) && (!plugin_config(config4).static || uniquePageQueries.length > 0 || uniqueLayoutQueries.length > 0)) {
186459
+ console.error(
186460
+ `\u26A0\uFE0F You are using at least one page/layout query but aren't "include"ing .js files in your config.
186461
+
186462
+ This will cause houdini to not pick up the generated files and prevent it from working as expected.`
186463
+ );
186464
+ }
186462
186465
  let skTypeString = await fs_exports.readFile(svelteTypeFilePath);
186463
186466
  if (skTypeString) {
186464
186467
  const pageTypeImports = getTypeImports(houdiniRelative, config4, uniquePageQueries);