houdini 1.1.3 → 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 (41) hide show
  1. package/build/cmd-cjs/index.js +230 -158
  2. package/build/cmd-esm/index.js +230 -158
  3. package/build/codegen-cjs/index.js +217 -156
  4. package/build/codegen-esm/index.js +217 -156
  5. package/build/lib/config.d.ts +1 -0
  6. package/build/lib/parse.d.ts +2 -1
  7. package/build/lib/types.d.ts +4 -1
  8. package/build/lib-cjs/index.js +178 -146
  9. package/build/lib-esm/index.js +178 -146
  10. package/build/runtime/client/documentStore.d.ts +3 -0
  11. package/build/runtime/client/index.d.ts +1 -1
  12. package/build/runtime/lib/pageInfo.d.ts +7 -0
  13. package/build/runtime/lib/pagination.d.ts +29 -0
  14. package/build/runtime/lib/types.d.ts +46 -0
  15. package/build/runtime-cjs/client/documentStore.d.ts +3 -0
  16. package/build/runtime-cjs/client/documentStore.js +11 -6
  17. package/build/runtime-cjs/client/index.d.ts +1 -1
  18. package/build/runtime-cjs/client/plugins/cache.js +6 -3
  19. package/build/runtime-cjs/client/plugins/fragment.js +8 -1
  20. package/build/runtime-cjs/client/plugins/query.js +2 -1
  21. package/build/runtime-cjs/lib/pageInfo.d.ts +7 -0
  22. package/build/runtime-cjs/lib/pageInfo.js +79 -0
  23. package/build/runtime-cjs/lib/pagination.d.ts +29 -0
  24. package/build/runtime-cjs/lib/pagination.js +231 -0
  25. package/build/runtime-cjs/lib/types.d.ts +46 -0
  26. package/build/runtime-esm/client/documentStore.d.ts +3 -0
  27. package/build/runtime-esm/client/documentStore.js +11 -6
  28. package/build/runtime-esm/client/index.d.ts +1 -1
  29. package/build/runtime-esm/client/plugins/cache.js +6 -3
  30. package/build/runtime-esm/client/plugins/fragment.js +8 -1
  31. package/build/runtime-esm/client/plugins/query.js +2 -1
  32. package/build/runtime-esm/lib/pageInfo.d.ts +7 -0
  33. package/build/runtime-esm/lib/pageInfo.js +52 -0
  34. package/build/runtime-esm/lib/pagination.d.ts +29 -0
  35. package/build/runtime-esm/lib/pagination.js +206 -0
  36. package/build/runtime-esm/lib/types.d.ts +46 -0
  37. package/build/test-cjs/index.js +224 -155
  38. package/build/test-esm/index.js +224 -155
  39. package/build/vite-cjs/index.js +228 -156
  40. package/build/vite-esm/index.js +228 -156
  41. package/package.json +1 -1
@@ -2401,7 +2401,7 @@ var require_visitor = __commonJS({
2401
2401
  Object.defineProperty(exports, "__esModule", {
2402
2402
  value: true
2403
2403
  });
2404
- exports.visit = visit2;
2404
+ exports.visit = visit3;
2405
2405
  exports.visitInParallel = visitInParallel;
2406
2406
  exports.getVisitFn = getVisitFn;
2407
2407
  exports.BREAK = exports.QueryDocumentKeys = void 0;
@@ -2464,7 +2464,7 @@ var require_visitor = __commonJS({
2464
2464
  exports.QueryDocumentKeys = QueryDocumentKeys;
2465
2465
  var BREAK = Object.freeze({});
2466
2466
  exports.BREAK = BREAK;
2467
- function visit2(root, visitor) {
2467
+ function visit3(root, visitor) {
2468
2468
  var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
2469
2469
  var stack = void 0;
2470
2470
  var inArray = Array.isArray(root);
@@ -42019,6 +42019,109 @@ var require_lib3 = __commonJS({
42019
42019
  }
42020
42020
  });
42021
42021
 
42022
+ // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
42023
+ var require_cjs = __commonJS({
42024
+ "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
42025
+ "use strict";
42026
+ var isMergeableObject = function isMergeableObject2(value) {
42027
+ return isNonNullObject(value) && !isSpecial(value);
42028
+ };
42029
+ function isNonNullObject(value) {
42030
+ return !!value && typeof value === "object";
42031
+ }
42032
+ function isSpecial(value) {
42033
+ var stringValue = Object.prototype.toString.call(value);
42034
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
42035
+ }
42036
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
42037
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
42038
+ function isReactElement(value) {
42039
+ return value.$$typeof === REACT_ELEMENT_TYPE;
42040
+ }
42041
+ function emptyTarget(val) {
42042
+ return Array.isArray(val) ? [] : {};
42043
+ }
42044
+ function cloneUnlessOtherwiseSpecified(value, options) {
42045
+ return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
42046
+ }
42047
+ function defaultArrayMerge(target, source, options) {
42048
+ return target.concat(source).map(function(element) {
42049
+ return cloneUnlessOtherwiseSpecified(element, options);
42050
+ });
42051
+ }
42052
+ function getMergeFunction(key, options) {
42053
+ if (!options.customMerge) {
42054
+ return deepmerge;
42055
+ }
42056
+ var customMerge = options.customMerge(key);
42057
+ return typeof customMerge === "function" ? customMerge : deepmerge;
42058
+ }
42059
+ function getEnumerableOwnPropertySymbols(target) {
42060
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
42061
+ return target.propertyIsEnumerable(symbol);
42062
+ }) : [];
42063
+ }
42064
+ function getKeys(target) {
42065
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
42066
+ }
42067
+ function propertyIsOnObject(object, property) {
42068
+ try {
42069
+ return property in object;
42070
+ } catch (_) {
42071
+ return false;
42072
+ }
42073
+ }
42074
+ function propertyIsUnsafe(target, key) {
42075
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
42076
+ }
42077
+ function mergeObject(target, source, options) {
42078
+ var destination = {};
42079
+ if (options.isMergeableObject(target)) {
42080
+ getKeys(target).forEach(function(key) {
42081
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
42082
+ });
42083
+ }
42084
+ getKeys(source).forEach(function(key) {
42085
+ if (propertyIsUnsafe(target, key)) {
42086
+ return;
42087
+ }
42088
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
42089
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
42090
+ } else {
42091
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
42092
+ }
42093
+ });
42094
+ return destination;
42095
+ }
42096
+ function deepmerge(target, source, options) {
42097
+ options = options || {};
42098
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
42099
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
42100
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
42101
+ var sourceIsArray = Array.isArray(source);
42102
+ var targetIsArray = Array.isArray(target);
42103
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
42104
+ if (!sourceAndTargetTypesMatch) {
42105
+ return cloneUnlessOtherwiseSpecified(source, options);
42106
+ } else if (sourceIsArray) {
42107
+ return options.arrayMerge(target, source, options);
42108
+ } else {
42109
+ return mergeObject(target, source, options);
42110
+ }
42111
+ }
42112
+ deepmerge.all = function deepmergeAll(array, options) {
42113
+ if (!Array.isArray(array)) {
42114
+ throw new Error("first argument should be an array");
42115
+ }
42116
+ return array.reduce(function(prev, next) {
42117
+ return deepmerge(prev, next, options);
42118
+ }, {});
42119
+ };
42120
+ var deepmerge_1 = deepmerge;
42121
+ module2.exports = deepmerge_1;
42122
+ }
42123
+ });
42124
+
42022
42125
  // ../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js
42023
42126
  var require_tslib = __commonJS({
42024
42127
  "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js"(exports, module2) {
@@ -44288,7 +44391,7 @@ var require_path_visitor = __commonJS({
44288
44391
  }
44289
44392
  return target;
44290
44393
  }
44291
- PathVisitor.visit = function visit2(node, methods) {
44394
+ PathVisitor.visit = function visit3(node, methods) {
44292
44395
  return PathVisitor.fromMethodsObject(methods).visit(node);
44293
44396
  };
44294
44397
  var PVp = PathVisitor.prototype;
@@ -44479,7 +44582,7 @@ var require_path_visitor = __commonJS({
44479
44582
  this.needToCallTraverse = false;
44480
44583
  return visitChildren(path2, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
44481
44584
  };
44482
- sharedContextProtoMethods.visit = function visit2(path2, newVisitor) {
44585
+ sharedContextProtoMethods.visit = function visit3(path2, newVisitor) {
44483
44586
  if (!(this instanceof this.Context)) {
44484
44587
  throw new Error("");
44485
44588
  }
@@ -45872,7 +45975,7 @@ var require_main = __commonJS({
45872
45975
  var someField = _a.someField;
45873
45976
  var Type = _a.Type;
45874
45977
  var use = _a.use;
45875
- var visit2 = _a.visit;
45978
+ var visit3 = _a.visit;
45876
45979
  exports.astNodesAreEquivalent = astNodesAreEquivalent;
45877
45980
  exports.builders = builders;
45878
45981
  exports.builtInTypes = builtInTypes;
@@ -45889,7 +45992,7 @@ var require_main = __commonJS({
45889
45992
  exports.someField = someField;
45890
45993
  exports.Type = Type;
45891
45994
  exports.use = use;
45892
- exports.visit = visit2;
45995
+ exports.visit = visit3;
45893
45996
  Object.assign(namedTypes_1.namedTypes, n);
45894
45997
  }
45895
45998
  });
@@ -58351,109 +58454,6 @@ var require_main2 = __commonJS({
58351
58454
  }
58352
58455
  });
58353
58456
 
58354
- // ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
58355
- var require_cjs = __commonJS({
58356
- "../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
58357
- "use strict";
58358
- var isMergeableObject = function isMergeableObject2(value) {
58359
- return isNonNullObject(value) && !isSpecial(value);
58360
- };
58361
- function isNonNullObject(value) {
58362
- return !!value && typeof value === "object";
58363
- }
58364
- function isSpecial(value) {
58365
- var stringValue = Object.prototype.toString.call(value);
58366
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
58367
- }
58368
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
58369
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
58370
- function isReactElement(value) {
58371
- return value.$$typeof === REACT_ELEMENT_TYPE;
58372
- }
58373
- function emptyTarget(val) {
58374
- return Array.isArray(val) ? [] : {};
58375
- }
58376
- function cloneUnlessOtherwiseSpecified(value, options) {
58377
- return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
58378
- }
58379
- function defaultArrayMerge(target, source, options) {
58380
- return target.concat(source).map(function(element) {
58381
- return cloneUnlessOtherwiseSpecified(element, options);
58382
- });
58383
- }
58384
- function getMergeFunction(key, options) {
58385
- if (!options.customMerge) {
58386
- return deepmerge;
58387
- }
58388
- var customMerge = options.customMerge(key);
58389
- return typeof customMerge === "function" ? customMerge : deepmerge;
58390
- }
58391
- function getEnumerableOwnPropertySymbols(target) {
58392
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
58393
- return target.propertyIsEnumerable(symbol);
58394
- }) : [];
58395
- }
58396
- function getKeys(target) {
58397
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
58398
- }
58399
- function propertyIsOnObject(object, property) {
58400
- try {
58401
- return property in object;
58402
- } catch (_) {
58403
- return false;
58404
- }
58405
- }
58406
- function propertyIsUnsafe(target, key) {
58407
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
58408
- }
58409
- function mergeObject(target, source, options) {
58410
- var destination = {};
58411
- if (options.isMergeableObject(target)) {
58412
- getKeys(target).forEach(function(key) {
58413
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
58414
- });
58415
- }
58416
- getKeys(source).forEach(function(key) {
58417
- if (propertyIsUnsafe(target, key)) {
58418
- return;
58419
- }
58420
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
58421
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
58422
- } else {
58423
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
58424
- }
58425
- });
58426
- return destination;
58427
- }
58428
- function deepmerge(target, source, options) {
58429
- options = options || {};
58430
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
58431
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
58432
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
58433
- var sourceIsArray = Array.isArray(source);
58434
- var targetIsArray = Array.isArray(target);
58435
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
58436
- if (!sourceAndTargetTypesMatch) {
58437
- return cloneUnlessOtherwiseSpecified(source, options);
58438
- } else if (sourceIsArray) {
58439
- return options.arrayMerge(target, source, options);
58440
- } else {
58441
- return mergeObject(target, source, options);
58442
- }
58443
- }
58444
- deepmerge.all = function deepmergeAll(array, options) {
58445
- if (!Array.isArray(array)) {
58446
- throw new Error("first argument should be an array");
58447
- }
58448
- return array.reduce(function(prev, next) {
58449
- return deepmerge(prev, next, options);
58450
- }, {});
58451
- };
58452
- var deepmerge_1 = deepmerge;
58453
- module2.exports = deepmerge_1;
58454
- }
58455
- });
58456
-
58457
58457
  // src/lib/index.ts
58458
58458
  var lib_exports = {};
58459
58459
  __export(lib_exports, {
@@ -65603,11 +65603,12 @@ var cachePolicy = ({
65603
65603
  network(ctx, { initialValue, next, resolve: resolve2, marshalVariables: marshalVariables2 }) {
65604
65604
  const { policy, artifact } = ctx;
65605
65605
  let useCache = false;
65606
- if (enabled && artifact.kind === ArtifactKind.Query && !ctx.cacheParams?.disableRead) {
65606
+ if (enabled && (artifact.kind === ArtifactKind.Query || artifact.kind === ArtifactKind.Fragment) && !ctx.cacheParams?.disableRead) {
65607
65607
  if (policy !== CachePolicy.NetworkOnly) {
65608
65608
  const value = localCache.read({
65609
65609
  selection: artifact.selection,
65610
- variables: marshalVariables2(ctx)
65610
+ variables: marshalVariables2(ctx),
65611
+ parent: ctx.stuff?.parentID
65611
65612
  });
65612
65613
  const allowed = !value.partial || artifact.kind === ArtifactKind.Query && artifact.partial;
65613
65614
  if (policy === CachePolicy.CacheOnly) {
@@ -65643,7 +65644,9 @@ var cachePolicy = ({
65643
65644
  localCache._internal_unstable.collectGarbage();
65644
65645
  }, 0);
65645
65646
  }
65646
- setFetching(!useCache);
65647
+ if (!ctx.stuff?.silenceLoading) {
65648
+ setFetching(!useCache);
65649
+ }
65647
65650
  return next(ctx);
65648
65651
  },
65649
65652
  afterNetwork(ctx, { resolve: resolve2, value, marshalVariables: marshalVariables2 }) {
@@ -65723,10 +65726,11 @@ var query = documentPlugin(ArtifactKind.Query, function() {
65723
65726
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
65724
65727
  }
65725
65728
  lastVariables = { ...marshalVariables2(ctx) };
65729
+ const variables = lastVariables;
65726
65730
  subscriptionSpec = {
65727
65731
  rootType: ctx.artifact.rootType,
65728
65732
  selection: ctx.artifact.selection,
65729
- variables: () => lastVariables,
65733
+ variables: () => variables,
65730
65734
  set: (newValue) => {
65731
65735
  resolve2(ctx, {
65732
65736
  data: newValue,
@@ -65755,12 +65759,17 @@ var query = documentPlugin(ArtifactKind.Query, function() {
65755
65759
  // src/runtime/client/plugins/fragment.ts
65756
65760
  var fragment = documentPlugin(ArtifactKind.Fragment, function() {
65757
65761
  let subscriptionSpec = null;
65762
+ let lastReference = null;
65758
65763
  return {
65759
65764
  start(ctx, { next, resolve: resolve2, variablesChanged: variablesChanged2, marshalVariables: marshalVariables2 }) {
65760
65765
  if (!ctx.stuff.parentID) {
65761
65766
  return next(ctx);
65762
65767
  }
65763
- if (variablesChanged2(ctx) && !ctx.cacheParams?.disableSubscriptions) {
65768
+ const currentReference = {
65769
+ parent: ctx.stuff.parentID,
65770
+ variables: marshalVariables2(ctx)
65771
+ };
65772
+ if (!ctx.cacheParams?.disableSubscriptions && (!deepEquals(lastReference, currentReference) || variablesChanged2(ctx))) {
65764
65773
  if (subscriptionSpec) {
65765
65774
  cache_default.unsubscribe(subscriptionSpec, subscriptionSpec.variables?.() || {});
65766
65775
  }
@@ -65783,6 +65792,7 @@ var fragment = documentPlugin(ArtifactKind.Fragment, function() {
65783
65792
  }
65784
65793
  };
65785
65794
  cache_default.subscribe(subscriptionSpec, variables);
65795
+ lastReference = currentReference;
65786
65796
  }
65787
65797
  next(ctx);
65788
65798
  },
@@ -65983,6 +65993,7 @@ var DocumentStore = class extends Writable {
65983
65993
  #plugins;
65984
65994
  #lastVariables;
65985
65995
  #lastContext = null;
65996
+ pendingPromise = null;
65986
65997
  constructor({
65987
65998
  artifact,
65988
65999
  plugins: plugins2,
@@ -66055,7 +66066,7 @@ var DocumentStore = class extends Writable {
66055
66066
  const draft = context.draft();
66056
66067
  draft.variables = variables ?? null;
66057
66068
  context = context.apply(draft, false);
66058
- return await new Promise((resolve2, reject) => {
66069
+ const promise = new Promise((resolve2, reject) => {
66059
66070
  const state = {
66060
66071
  setup,
66061
66072
  currentStep: 0,
@@ -66064,12 +66075,17 @@ var DocumentStore = class extends Writable {
66064
66075
  promise: {
66065
66076
  resolved: false,
66066
66077
  resolve: resolve2,
66067
- reject
66078
+ reject,
66079
+ then: (...args) => promise.then(...args)
66068
66080
  },
66069
66081
  context
66070
66082
  };
66083
+ if (this.pendingPromise === null) {
66084
+ this.pendingPromise = state.promise;
66085
+ }
66071
66086
  this.#step("forward", state);
66072
66087
  });
66088
+ return await promise;
66073
66089
  }
66074
66090
  async cleanup() {
66075
66091
  for (const plugin2 of this.#plugins) {
@@ -66188,16 +66204,15 @@ var DocumentStore = class extends Writable {
66188
66204
  value
66189
66205
  );
66190
66206
  }
66207
+ if (!ctx.silenceEcho || value.data !== this.state.data) {
66208
+ this.set(value);
66209
+ }
66191
66210
  if (!ctx.promise.resolved) {
66192
66211
  ctx.promise.resolve(value);
66193
66212
  ctx.promise.resolved = true;
66194
66213
  }
66195
66214
  this.#lastContext = ctx.context.draft();
66196
66215
  this.#lastVariables = this.#lastContext.stuff.inputs.marshaled;
66197
- if (ctx.silenceEcho && value.data === this.state.data) {
66198
- return;
66199
- }
66200
- this.set(value);
66201
66216
  }
66202
66217
  };
66203
66218
  var ClientPluginContextWrapper = class {
@@ -66816,6 +66831,17 @@ var Config = class {
66816
66831
  }, []) ?? [];
66817
66832
  return !defaultDirectives.includes(name) && (internalDirectives.includes(name) || this.isDeleteDirective(name));
66818
66833
  }
66834
+ needsRefetchArtifact(document) {
66835
+ let needsArtifact = false;
66836
+ graphql2.visit(document, {
66837
+ Directive: (node) => {
66838
+ if ([this.paginateDirective].includes(node.name.value)) {
66839
+ needsArtifact = true;
66840
+ }
66841
+ }
66842
+ });
66843
+ return needsArtifact;
66844
+ }
66819
66845
  #fragmentVariableMaps;
66820
66846
  registerFragmentVariablesHash({
66821
66847
  hash,
@@ -67311,13 +67337,40 @@ var TypeWrapper = /* @__PURE__ */ ((TypeWrapper2) => {
67311
67337
 
67312
67338
  // src/lib/parse.ts
67313
67339
  var import_parser = __toESM(require_lib3(), 1);
67314
- async function parseJS(str) {
67340
+
67341
+ // src/lib/deepMerge.ts
67342
+ var import_deepmerge = __toESM(require_cjs(), 1);
67343
+ function deepMerge(filepath, ...targets) {
67344
+ try {
67345
+ if (targets.length === 1) {
67346
+ return targets[0];
67347
+ } else if (targets.length === 2) {
67348
+ return (0, import_deepmerge.default)(targets[0], targets[1], {
67349
+ arrayMerge: (source, update) => [...new Set(source.concat(update))]
67350
+ });
67351
+ }
67352
+ return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
67353
+ } catch (e2) {
67354
+ throw new HoudiniError({
67355
+ filepath,
67356
+ message: "could not merge: " + JSON.stringify(targets, null, 4),
67357
+ description: e2.message
67358
+ });
67359
+ }
67360
+ }
67361
+
67362
+ // src/lib/parse.ts
67363
+ async function parseJS(str, config) {
67364
+ const defaultConfig = {
67365
+ plugins: ["typescript"],
67366
+ sourceType: "module"
67367
+ };
67315
67368
  return {
67316
67369
  start: 0,
67317
- script: (0, import_parser.parse)(str || "", {
67318
- plugins: ["typescript"],
67319
- sourceType: "module"
67320
- }).program,
67370
+ script: (0, import_parser.parse)(
67371
+ str || "",
67372
+ config ? deepMerge("", defaultConfig, config) : defaultConfig
67373
+ ).program,
67321
67374
  end: str.length
67322
67375
  };
67323
67376
  }
@@ -67385,27 +67438,6 @@ async function cleanupFiles(pathFolder, listOfObj) {
67385
67438
  return allFilesNotInList;
67386
67439
  }
67387
67440
 
67388
- // src/lib/deepMerge.ts
67389
- var import_deepmerge = __toESM(require_cjs(), 1);
67390
- function deepMerge(filepath, ...targets) {
67391
- try {
67392
- if (targets.length === 1) {
67393
- return targets[0];
67394
- } else if (targets.length === 2) {
67395
- return (0, import_deepmerge.default)(targets[0], targets[1], {
67396
- arrayMerge: (source, update) => [...new Set(source.concat(update))]
67397
- });
67398
- }
67399
- return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
67400
- } catch (e2) {
67401
- throw new HoudiniError({
67402
- filepath,
67403
- message: "could not merge: " + targets,
67404
- description: e2.message
67405
- });
67406
- }
67407
- }
67408
-
67409
67441
  // src/lib/detectTools.ts
67410
67442
  async function detectFromPackageJSON(cwd) {
67411
67443
  try {