houdini 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.
- package/build/cmd-cjs/index.js +126 -129
- package/build/cmd-esm/index.js +126 -129
- package/build/codegen-cjs/index.js +119 -123
- package/build/codegen-esm/index.js +119 -123
- package/build/lib-cjs/index.js +132 -131
- package/build/lib-esm/index.js +132 -131
- package/build/runtime/client/documentStore.d.ts +1 -0
- package/build/runtime-cjs/cache/cache.js +1 -3
- package/build/runtime-cjs/client/documentStore.d.ts +1 -0
- package/build/runtime-cjs/client/documentStore.js +6 -3
- package/build/runtime-cjs/client/plugins/cache.js +1 -1
- package/build/runtime-cjs/client/plugins/subscription.js +1 -0
- package/build/runtime-esm/cache/cache.js +1 -3
- package/build/runtime-esm/client/documentStore.d.ts +1 -0
- package/build/runtime-esm/client/documentStore.js +6 -3
- package/build/runtime-esm/client/plugins/cache.js +1 -1
- package/build/runtime-esm/client/plugins/subscription.js +1 -0
- package/build/test-cjs/index.js +119 -123
- package/build/test-esm/index.js +119 -123
- package/build/vite-cjs/index.js +124 -127
- package/build/vite-esm/index.js +124 -127
- package/package.json +1 -1
package/build/lib-cjs/index.js
CHANGED
|
@@ -15475,109 +15475,6 @@ var require_minimatch = __commonJS({
|
|
|
15475
15475
|
}
|
|
15476
15476
|
});
|
|
15477
15477
|
|
|
15478
|
-
// ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
|
|
15479
|
-
var require_cjs = __commonJS({
|
|
15480
|
-
"../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
|
|
15481
|
-
"use strict";
|
|
15482
|
-
var isMergeableObject = function isMergeableObject2(value) {
|
|
15483
|
-
return isNonNullObject(value) && !isSpecial(value);
|
|
15484
|
-
};
|
|
15485
|
-
function isNonNullObject(value) {
|
|
15486
|
-
return !!value && typeof value === "object";
|
|
15487
|
-
}
|
|
15488
|
-
function isSpecial(value) {
|
|
15489
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
15490
|
-
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
15491
|
-
}
|
|
15492
|
-
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
15493
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
15494
|
-
function isReactElement(value) {
|
|
15495
|
-
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
15496
|
-
}
|
|
15497
|
-
function emptyTarget(val) {
|
|
15498
|
-
return Array.isArray(val) ? [] : {};
|
|
15499
|
-
}
|
|
15500
|
-
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
15501
|
-
return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
|
|
15502
|
-
}
|
|
15503
|
-
function defaultArrayMerge(target, source, options) {
|
|
15504
|
-
return target.concat(source).map(function(element) {
|
|
15505
|
-
return cloneUnlessOtherwiseSpecified(element, options);
|
|
15506
|
-
});
|
|
15507
|
-
}
|
|
15508
|
-
function getMergeFunction(key, options) {
|
|
15509
|
-
if (!options.customMerge) {
|
|
15510
|
-
return deepmerge;
|
|
15511
|
-
}
|
|
15512
|
-
var customMerge = options.customMerge(key);
|
|
15513
|
-
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
15514
|
-
}
|
|
15515
|
-
function getEnumerableOwnPropertySymbols(target) {
|
|
15516
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
15517
|
-
return target.propertyIsEnumerable(symbol);
|
|
15518
|
-
}) : [];
|
|
15519
|
-
}
|
|
15520
|
-
function getKeys(target) {
|
|
15521
|
-
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
15522
|
-
}
|
|
15523
|
-
function propertyIsOnObject(object, property) {
|
|
15524
|
-
try {
|
|
15525
|
-
return property in object;
|
|
15526
|
-
} catch (_) {
|
|
15527
|
-
return false;
|
|
15528
|
-
}
|
|
15529
|
-
}
|
|
15530
|
-
function propertyIsUnsafe(target, key) {
|
|
15531
|
-
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
15532
|
-
}
|
|
15533
|
-
function mergeObject(target, source, options) {
|
|
15534
|
-
var destination = {};
|
|
15535
|
-
if (options.isMergeableObject(target)) {
|
|
15536
|
-
getKeys(target).forEach(function(key) {
|
|
15537
|
-
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
15538
|
-
});
|
|
15539
|
-
}
|
|
15540
|
-
getKeys(source).forEach(function(key) {
|
|
15541
|
-
if (propertyIsUnsafe(target, key)) {
|
|
15542
|
-
return;
|
|
15543
|
-
}
|
|
15544
|
-
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
15545
|
-
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
15546
|
-
} else {
|
|
15547
|
-
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
15548
|
-
}
|
|
15549
|
-
});
|
|
15550
|
-
return destination;
|
|
15551
|
-
}
|
|
15552
|
-
function deepmerge(target, source, options) {
|
|
15553
|
-
options = options || {};
|
|
15554
|
-
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
15555
|
-
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
15556
|
-
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
15557
|
-
var sourceIsArray = Array.isArray(source);
|
|
15558
|
-
var targetIsArray = Array.isArray(target);
|
|
15559
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
15560
|
-
if (!sourceAndTargetTypesMatch) {
|
|
15561
|
-
return cloneUnlessOtherwiseSpecified(source, options);
|
|
15562
|
-
} else if (sourceIsArray) {
|
|
15563
|
-
return options.arrayMerge(target, source, options);
|
|
15564
|
-
} else {
|
|
15565
|
-
return mergeObject(target, source, options);
|
|
15566
|
-
}
|
|
15567
|
-
}
|
|
15568
|
-
deepmerge.all = function deepmergeAll(array, options) {
|
|
15569
|
-
if (!Array.isArray(array)) {
|
|
15570
|
-
throw new Error("first argument should be an array");
|
|
15571
|
-
}
|
|
15572
|
-
return array.reduce(function(prev, next) {
|
|
15573
|
-
return deepmerge(prev, next, options);
|
|
15574
|
-
}, {});
|
|
15575
|
-
};
|
|
15576
|
-
var deepmerge_1 = deepmerge;
|
|
15577
|
-
module2.exports = deepmerge_1;
|
|
15578
|
-
}
|
|
15579
|
-
});
|
|
15580
|
-
|
|
15581
15478
|
// ../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
|
|
15582
15479
|
var require_universalify = __commonJS({
|
|
15583
15480
|
"../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
|
|
@@ -58387,6 +58284,109 @@ var require_main2 = __commonJS({
|
|
|
58387
58284
|
}
|
|
58388
58285
|
});
|
|
58389
58286
|
|
|
58287
|
+
// ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
|
|
58288
|
+
var require_cjs = __commonJS({
|
|
58289
|
+
"../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module2) {
|
|
58290
|
+
"use strict";
|
|
58291
|
+
var isMergeableObject = function isMergeableObject2(value) {
|
|
58292
|
+
return isNonNullObject(value) && !isSpecial(value);
|
|
58293
|
+
};
|
|
58294
|
+
function isNonNullObject(value) {
|
|
58295
|
+
return !!value && typeof value === "object";
|
|
58296
|
+
}
|
|
58297
|
+
function isSpecial(value) {
|
|
58298
|
+
var stringValue = Object.prototype.toString.call(value);
|
|
58299
|
+
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
58300
|
+
}
|
|
58301
|
+
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
58302
|
+
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
58303
|
+
function isReactElement(value) {
|
|
58304
|
+
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
58305
|
+
}
|
|
58306
|
+
function emptyTarget(val) {
|
|
58307
|
+
return Array.isArray(val) ? [] : {};
|
|
58308
|
+
}
|
|
58309
|
+
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
58310
|
+
return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
|
|
58311
|
+
}
|
|
58312
|
+
function defaultArrayMerge(target, source, options) {
|
|
58313
|
+
return target.concat(source).map(function(element) {
|
|
58314
|
+
return cloneUnlessOtherwiseSpecified(element, options);
|
|
58315
|
+
});
|
|
58316
|
+
}
|
|
58317
|
+
function getMergeFunction(key, options) {
|
|
58318
|
+
if (!options.customMerge) {
|
|
58319
|
+
return deepmerge;
|
|
58320
|
+
}
|
|
58321
|
+
var customMerge = options.customMerge(key);
|
|
58322
|
+
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
58323
|
+
}
|
|
58324
|
+
function getEnumerableOwnPropertySymbols(target) {
|
|
58325
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
58326
|
+
return target.propertyIsEnumerable(symbol);
|
|
58327
|
+
}) : [];
|
|
58328
|
+
}
|
|
58329
|
+
function getKeys(target) {
|
|
58330
|
+
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
58331
|
+
}
|
|
58332
|
+
function propertyIsOnObject(object, property) {
|
|
58333
|
+
try {
|
|
58334
|
+
return property in object;
|
|
58335
|
+
} catch (_) {
|
|
58336
|
+
return false;
|
|
58337
|
+
}
|
|
58338
|
+
}
|
|
58339
|
+
function propertyIsUnsafe(target, key) {
|
|
58340
|
+
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
58341
|
+
}
|
|
58342
|
+
function mergeObject(target, source, options) {
|
|
58343
|
+
var destination = {};
|
|
58344
|
+
if (options.isMergeableObject(target)) {
|
|
58345
|
+
getKeys(target).forEach(function(key) {
|
|
58346
|
+
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
58347
|
+
});
|
|
58348
|
+
}
|
|
58349
|
+
getKeys(source).forEach(function(key) {
|
|
58350
|
+
if (propertyIsUnsafe(target, key)) {
|
|
58351
|
+
return;
|
|
58352
|
+
}
|
|
58353
|
+
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
58354
|
+
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
58355
|
+
} else {
|
|
58356
|
+
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
58357
|
+
}
|
|
58358
|
+
});
|
|
58359
|
+
return destination;
|
|
58360
|
+
}
|
|
58361
|
+
function deepmerge(target, source, options) {
|
|
58362
|
+
options = options || {};
|
|
58363
|
+
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
58364
|
+
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
58365
|
+
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
58366
|
+
var sourceIsArray = Array.isArray(source);
|
|
58367
|
+
var targetIsArray = Array.isArray(target);
|
|
58368
|
+
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
58369
|
+
if (!sourceAndTargetTypesMatch) {
|
|
58370
|
+
return cloneUnlessOtherwiseSpecified(source, options);
|
|
58371
|
+
} else if (sourceIsArray) {
|
|
58372
|
+
return options.arrayMerge(target, source, options);
|
|
58373
|
+
} else {
|
|
58374
|
+
return mergeObject(target, source, options);
|
|
58375
|
+
}
|
|
58376
|
+
}
|
|
58377
|
+
deepmerge.all = function deepmergeAll(array, options) {
|
|
58378
|
+
if (!Array.isArray(array)) {
|
|
58379
|
+
throw new Error("first argument should be an array");
|
|
58380
|
+
}
|
|
58381
|
+
return array.reduce(function(prev, next) {
|
|
58382
|
+
return deepmerge(prev, next, options);
|
|
58383
|
+
}, {});
|
|
58384
|
+
};
|
|
58385
|
+
var deepmerge_1 = deepmerge;
|
|
58386
|
+
module2.exports = deepmerge_1;
|
|
58387
|
+
}
|
|
58388
|
+
});
|
|
58389
|
+
|
|
58390
58390
|
// src/lib/index.ts
|
|
58391
58391
|
var lib_exports = {};
|
|
58392
58392
|
__export(lib_exports, {
|
|
@@ -61900,9 +61900,6 @@ var houdini_mode = {
|
|
|
61900
61900
|
}
|
|
61901
61901
|
};
|
|
61902
61902
|
|
|
61903
|
-
// src/lib/deepMerge.ts
|
|
61904
|
-
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
61905
|
-
|
|
61906
61903
|
// src/lib/error.ts
|
|
61907
61904
|
var HoudiniError = class extends Error {
|
|
61908
61905
|
filepath = null;
|
|
@@ -61922,20 +61919,6 @@ var HoudiniError = class extends Error {
|
|
|
61922
61919
|
}
|
|
61923
61920
|
};
|
|
61924
61921
|
|
|
61925
|
-
// src/lib/deepMerge.ts
|
|
61926
|
-
function deepMerge(filepath, ...targets) {
|
|
61927
|
-
try {
|
|
61928
|
-
if (targets.length === 1) {
|
|
61929
|
-
return targets[0];
|
|
61930
|
-
} else if (targets.length === 2) {
|
|
61931
|
-
return (0, import_deepmerge.default)(targets[0], targets[1]);
|
|
61932
|
-
}
|
|
61933
|
-
return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
|
|
61934
|
-
} catch (e2) {
|
|
61935
|
-
throw new HoudiniError({ filepath, message: "could not merge: " + targets });
|
|
61936
|
-
}
|
|
61937
|
-
}
|
|
61938
|
-
|
|
61939
61922
|
// src/lib/fs.ts
|
|
61940
61923
|
var fs_exports = {};
|
|
61941
61924
|
__export(fs_exports, {
|
|
@@ -64958,9 +64941,7 @@ var CacheInternal = class {
|
|
|
64958
64941
|
let targetSelection = getFieldsForType(selection, data["__typename"]);
|
|
64959
64942
|
for (const [field, value] of Object.entries(data)) {
|
|
64960
64943
|
if (!selection || !targetSelection[field]) {
|
|
64961
|
-
|
|
64962
|
-
"Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection)
|
|
64963
|
-
);
|
|
64944
|
+
continue;
|
|
64964
64945
|
}
|
|
64965
64946
|
let {
|
|
64966
64947
|
type: linkedType,
|
|
@@ -65515,7 +65496,7 @@ var cachePolicy = ({
|
|
|
65515
65496
|
stale: value.stale
|
|
65516
65497
|
});
|
|
65517
65498
|
}
|
|
65518
|
-
if (useCache && !value.partial && !value.stale) {
|
|
65499
|
+
if (useCache && !value.partial && !value.stale && ctx.policy !== "CacheAndNetwork") {
|
|
65519
65500
|
return;
|
|
65520
65501
|
}
|
|
65521
65502
|
}
|
|
@@ -65740,6 +65721,7 @@ function subscription(factory) {
|
|
|
65740
65721
|
},
|
|
65741
65722
|
cleanup() {
|
|
65742
65723
|
clearSubscription?.();
|
|
65724
|
+
check = null;
|
|
65743
65725
|
}
|
|
65744
65726
|
};
|
|
65745
65727
|
});
|
|
@@ -65833,9 +65815,7 @@ var DocumentStore = class extends Writable {
|
|
|
65833
65815
|
super(initialState, () => {
|
|
65834
65816
|
return () => {
|
|
65835
65817
|
this.#lastVariables = null;
|
|
65836
|
-
|
|
65837
|
-
plugin2.cleanup?.(this.#lastContext);
|
|
65838
|
-
}
|
|
65818
|
+
this.cleanup();
|
|
65839
65819
|
};
|
|
65840
65820
|
});
|
|
65841
65821
|
this.#artifact = artifact;
|
|
@@ -65901,6 +65881,11 @@ var DocumentStore = class extends Writable {
|
|
|
65901
65881
|
this.#step("forward", state);
|
|
65902
65882
|
});
|
|
65903
65883
|
}
|
|
65884
|
+
async cleanup() {
|
|
65885
|
+
for (const plugin2 of this.#plugins) {
|
|
65886
|
+
plugin2.cleanup?.(this.#lastContext);
|
|
65887
|
+
}
|
|
65888
|
+
}
|
|
65904
65889
|
#step(direction, ctx, value) {
|
|
65905
65890
|
const hook = direction === "error" ? "catch" : steps[direction][ctx.currentStep];
|
|
65906
65891
|
let valid = (i2) => i2 <= this.#plugins.length;
|
|
@@ -66751,11 +66736,12 @@ async function getConfig({
|
|
|
66751
66736
|
for (const plugin2 of plugins2) {
|
|
66752
66737
|
if (plugin2.config) {
|
|
66753
66738
|
try {
|
|
66754
|
-
const configFactory = await import(plugin2.config);
|
|
66755
|
-
|
|
66756
|
-
|
|
66739
|
+
const configFactory = (await import(plugin2.config)).default;
|
|
66740
|
+
if (configFactory) {
|
|
66741
|
+
configFile = typeof configFactory === "function" ? configFactory(configFile) : configFactory;
|
|
66742
|
+
}
|
|
66757
66743
|
} catch {
|
|
66758
|
-
console.log("could not load config file" + plugin2.config);
|
|
66744
|
+
console.log("could not load config file " + plugin2.config);
|
|
66759
66745
|
}
|
|
66760
66746
|
}
|
|
66761
66747
|
}
|
|
@@ -67163,6 +67149,21 @@ async function cleanupFiles(pathFolder, listOfObj) {
|
|
|
67163
67149
|
return allFilesNotInList;
|
|
67164
67150
|
}
|
|
67165
67151
|
|
|
67152
|
+
// src/lib/deepMerge.ts
|
|
67153
|
+
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
67154
|
+
function deepMerge(filepath, ...targets) {
|
|
67155
|
+
try {
|
|
67156
|
+
if (targets.length === 1) {
|
|
67157
|
+
return targets[0];
|
|
67158
|
+
} else if (targets.length === 2) {
|
|
67159
|
+
return (0, import_deepmerge.default)(targets[0], targets[1]);
|
|
67160
|
+
}
|
|
67161
|
+
return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
|
|
67162
|
+
} catch (e2) {
|
|
67163
|
+
throw new HoudiniError({ filepath, message: "could not merge: " + targets });
|
|
67164
|
+
}
|
|
67165
|
+
}
|
|
67166
|
+
|
|
67166
67167
|
// ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
|
|
67167
67168
|
var WalkerBase = class {
|
|
67168
67169
|
constructor() {
|
package/build/lib-esm/index.js
CHANGED
|
@@ -15480,109 +15480,6 @@ var require_minimatch = __commonJS({
|
|
|
15480
15480
|
}
|
|
15481
15481
|
});
|
|
15482
15482
|
|
|
15483
|
-
// ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
|
|
15484
|
-
var require_cjs = __commonJS({
|
|
15485
|
-
"../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
|
|
15486
|
-
"use strict";
|
|
15487
|
-
var isMergeableObject = function isMergeableObject2(value) {
|
|
15488
|
-
return isNonNullObject(value) && !isSpecial(value);
|
|
15489
|
-
};
|
|
15490
|
-
function isNonNullObject(value) {
|
|
15491
|
-
return !!value && typeof value === "object";
|
|
15492
|
-
}
|
|
15493
|
-
function isSpecial(value) {
|
|
15494
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
15495
|
-
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
15496
|
-
}
|
|
15497
|
-
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
15498
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
15499
|
-
function isReactElement(value) {
|
|
15500
|
-
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
15501
|
-
}
|
|
15502
|
-
function emptyTarget(val) {
|
|
15503
|
-
return Array.isArray(val) ? [] : {};
|
|
15504
|
-
}
|
|
15505
|
-
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
15506
|
-
return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
|
|
15507
|
-
}
|
|
15508
|
-
function defaultArrayMerge(target, source, options) {
|
|
15509
|
-
return target.concat(source).map(function(element) {
|
|
15510
|
-
return cloneUnlessOtherwiseSpecified(element, options);
|
|
15511
|
-
});
|
|
15512
|
-
}
|
|
15513
|
-
function getMergeFunction(key, options) {
|
|
15514
|
-
if (!options.customMerge) {
|
|
15515
|
-
return deepmerge;
|
|
15516
|
-
}
|
|
15517
|
-
var customMerge = options.customMerge(key);
|
|
15518
|
-
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
15519
|
-
}
|
|
15520
|
-
function getEnumerableOwnPropertySymbols(target) {
|
|
15521
|
-
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
15522
|
-
return target.propertyIsEnumerable(symbol);
|
|
15523
|
-
}) : [];
|
|
15524
|
-
}
|
|
15525
|
-
function getKeys(target) {
|
|
15526
|
-
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
15527
|
-
}
|
|
15528
|
-
function propertyIsOnObject(object, property) {
|
|
15529
|
-
try {
|
|
15530
|
-
return property in object;
|
|
15531
|
-
} catch (_) {
|
|
15532
|
-
return false;
|
|
15533
|
-
}
|
|
15534
|
-
}
|
|
15535
|
-
function propertyIsUnsafe(target, key) {
|
|
15536
|
-
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
15537
|
-
}
|
|
15538
|
-
function mergeObject(target, source, options) {
|
|
15539
|
-
var destination = {};
|
|
15540
|
-
if (options.isMergeableObject(target)) {
|
|
15541
|
-
getKeys(target).forEach(function(key) {
|
|
15542
|
-
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
15543
|
-
});
|
|
15544
|
-
}
|
|
15545
|
-
getKeys(source).forEach(function(key) {
|
|
15546
|
-
if (propertyIsUnsafe(target, key)) {
|
|
15547
|
-
return;
|
|
15548
|
-
}
|
|
15549
|
-
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
15550
|
-
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
15551
|
-
} else {
|
|
15552
|
-
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
15553
|
-
}
|
|
15554
|
-
});
|
|
15555
|
-
return destination;
|
|
15556
|
-
}
|
|
15557
|
-
function deepmerge(target, source, options) {
|
|
15558
|
-
options = options || {};
|
|
15559
|
-
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
15560
|
-
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
15561
|
-
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
15562
|
-
var sourceIsArray = Array.isArray(source);
|
|
15563
|
-
var targetIsArray = Array.isArray(target);
|
|
15564
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
15565
|
-
if (!sourceAndTargetTypesMatch) {
|
|
15566
|
-
return cloneUnlessOtherwiseSpecified(source, options);
|
|
15567
|
-
} else if (sourceIsArray) {
|
|
15568
|
-
return options.arrayMerge(target, source, options);
|
|
15569
|
-
} else {
|
|
15570
|
-
return mergeObject(target, source, options);
|
|
15571
|
-
}
|
|
15572
|
-
}
|
|
15573
|
-
deepmerge.all = function deepmergeAll(array, options) {
|
|
15574
|
-
if (!Array.isArray(array)) {
|
|
15575
|
-
throw new Error("first argument should be an array");
|
|
15576
|
-
}
|
|
15577
|
-
return array.reduce(function(prev, next) {
|
|
15578
|
-
return deepmerge(prev, next, options);
|
|
15579
|
-
}, {});
|
|
15580
|
-
};
|
|
15581
|
-
var deepmerge_1 = deepmerge;
|
|
15582
|
-
module.exports = deepmerge_1;
|
|
15583
|
-
}
|
|
15584
|
-
});
|
|
15585
|
-
|
|
15586
15483
|
// ../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
|
|
15587
15484
|
var require_universalify = __commonJS({
|
|
15588
15485
|
"../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
|
|
@@ -58392,6 +58289,109 @@ var require_main2 = __commonJS({
|
|
|
58392
58289
|
}
|
|
58393
58290
|
});
|
|
58394
58291
|
|
|
58292
|
+
// ../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js
|
|
58293
|
+
var require_cjs = __commonJS({
|
|
58294
|
+
"../../node_modules/.pnpm/deepmerge@4.2.2/node_modules/deepmerge/dist/cjs.js"(exports, module) {
|
|
58295
|
+
"use strict";
|
|
58296
|
+
var isMergeableObject = function isMergeableObject2(value) {
|
|
58297
|
+
return isNonNullObject(value) && !isSpecial(value);
|
|
58298
|
+
};
|
|
58299
|
+
function isNonNullObject(value) {
|
|
58300
|
+
return !!value && typeof value === "object";
|
|
58301
|
+
}
|
|
58302
|
+
function isSpecial(value) {
|
|
58303
|
+
var stringValue = Object.prototype.toString.call(value);
|
|
58304
|
+
return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
|
|
58305
|
+
}
|
|
58306
|
+
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
58307
|
+
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
|
|
58308
|
+
function isReactElement(value) {
|
|
58309
|
+
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
58310
|
+
}
|
|
58311
|
+
function emptyTarget(val) {
|
|
58312
|
+
return Array.isArray(val) ? [] : {};
|
|
58313
|
+
}
|
|
58314
|
+
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
58315
|
+
return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
|
|
58316
|
+
}
|
|
58317
|
+
function defaultArrayMerge(target, source, options) {
|
|
58318
|
+
return target.concat(source).map(function(element) {
|
|
58319
|
+
return cloneUnlessOtherwiseSpecified(element, options);
|
|
58320
|
+
});
|
|
58321
|
+
}
|
|
58322
|
+
function getMergeFunction(key, options) {
|
|
58323
|
+
if (!options.customMerge) {
|
|
58324
|
+
return deepmerge;
|
|
58325
|
+
}
|
|
58326
|
+
var customMerge = options.customMerge(key);
|
|
58327
|
+
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
58328
|
+
}
|
|
58329
|
+
function getEnumerableOwnPropertySymbols(target) {
|
|
58330
|
+
return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
58331
|
+
return target.propertyIsEnumerable(symbol);
|
|
58332
|
+
}) : [];
|
|
58333
|
+
}
|
|
58334
|
+
function getKeys(target) {
|
|
58335
|
+
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
|
|
58336
|
+
}
|
|
58337
|
+
function propertyIsOnObject(object, property) {
|
|
58338
|
+
try {
|
|
58339
|
+
return property in object;
|
|
58340
|
+
} catch (_) {
|
|
58341
|
+
return false;
|
|
58342
|
+
}
|
|
58343
|
+
}
|
|
58344
|
+
function propertyIsUnsafe(target, key) {
|
|
58345
|
+
return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
|
|
58346
|
+
}
|
|
58347
|
+
function mergeObject(target, source, options) {
|
|
58348
|
+
var destination = {};
|
|
58349
|
+
if (options.isMergeableObject(target)) {
|
|
58350
|
+
getKeys(target).forEach(function(key) {
|
|
58351
|
+
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
58352
|
+
});
|
|
58353
|
+
}
|
|
58354
|
+
getKeys(source).forEach(function(key) {
|
|
58355
|
+
if (propertyIsUnsafe(target, key)) {
|
|
58356
|
+
return;
|
|
58357
|
+
}
|
|
58358
|
+
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
58359
|
+
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
58360
|
+
} else {
|
|
58361
|
+
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
58362
|
+
}
|
|
58363
|
+
});
|
|
58364
|
+
return destination;
|
|
58365
|
+
}
|
|
58366
|
+
function deepmerge(target, source, options) {
|
|
58367
|
+
options = options || {};
|
|
58368
|
+
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
58369
|
+
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
58370
|
+
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
58371
|
+
var sourceIsArray = Array.isArray(source);
|
|
58372
|
+
var targetIsArray = Array.isArray(target);
|
|
58373
|
+
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
58374
|
+
if (!sourceAndTargetTypesMatch) {
|
|
58375
|
+
return cloneUnlessOtherwiseSpecified(source, options);
|
|
58376
|
+
} else if (sourceIsArray) {
|
|
58377
|
+
return options.arrayMerge(target, source, options);
|
|
58378
|
+
} else {
|
|
58379
|
+
return mergeObject(target, source, options);
|
|
58380
|
+
}
|
|
58381
|
+
}
|
|
58382
|
+
deepmerge.all = function deepmergeAll(array, options) {
|
|
58383
|
+
if (!Array.isArray(array)) {
|
|
58384
|
+
throw new Error("first argument should be an array");
|
|
58385
|
+
}
|
|
58386
|
+
return array.reduce(function(prev, next) {
|
|
58387
|
+
return deepmerge(prev, next, options);
|
|
58388
|
+
}, {});
|
|
58389
|
+
};
|
|
58390
|
+
var deepmerge_1 = deepmerge;
|
|
58391
|
+
module.exports = deepmerge_1;
|
|
58392
|
+
}
|
|
58393
|
+
});
|
|
58394
|
+
|
|
58395
58395
|
// src/lib/pipeline.ts
|
|
58396
58396
|
async function runPipeline(config, pipeline2, target) {
|
|
58397
58397
|
for (const transform of pipeline2) {
|
|
@@ -61849,9 +61849,6 @@ var houdini_mode = {
|
|
|
61849
61849
|
}
|
|
61850
61850
|
};
|
|
61851
61851
|
|
|
61852
|
-
// src/lib/deepMerge.ts
|
|
61853
|
-
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
61854
|
-
|
|
61855
61852
|
// src/lib/error.ts
|
|
61856
61853
|
var HoudiniError = class extends Error {
|
|
61857
61854
|
filepath = null;
|
|
@@ -61871,20 +61868,6 @@ var HoudiniError = class extends Error {
|
|
|
61871
61868
|
}
|
|
61872
61869
|
};
|
|
61873
61870
|
|
|
61874
|
-
// src/lib/deepMerge.ts
|
|
61875
|
-
function deepMerge(filepath, ...targets) {
|
|
61876
|
-
try {
|
|
61877
|
-
if (targets.length === 1) {
|
|
61878
|
-
return targets[0];
|
|
61879
|
-
} else if (targets.length === 2) {
|
|
61880
|
-
return (0, import_deepmerge.default)(targets[0], targets[1]);
|
|
61881
|
-
}
|
|
61882
|
-
return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
|
|
61883
|
-
} catch (e2) {
|
|
61884
|
-
throw new HoudiniError({ filepath, message: "could not merge: " + targets });
|
|
61885
|
-
}
|
|
61886
|
-
}
|
|
61887
|
-
|
|
61888
61871
|
// src/lib/fs.ts
|
|
61889
61872
|
var fs_exports = {};
|
|
61890
61873
|
__export(fs_exports, {
|
|
@@ -64907,9 +64890,7 @@ var CacheInternal = class {
|
|
|
64907
64890
|
let targetSelection = getFieldsForType(selection, data["__typename"]);
|
|
64908
64891
|
for (const [field, value] of Object.entries(data)) {
|
|
64909
64892
|
if (!selection || !targetSelection[field]) {
|
|
64910
|
-
|
|
64911
|
-
"Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection)
|
|
64912
|
-
);
|
|
64893
|
+
continue;
|
|
64913
64894
|
}
|
|
64914
64895
|
let {
|
|
64915
64896
|
type: linkedType,
|
|
@@ -65464,7 +65445,7 @@ var cachePolicy = ({
|
|
|
65464
65445
|
stale: value.stale
|
|
65465
65446
|
});
|
|
65466
65447
|
}
|
|
65467
|
-
if (useCache && !value.partial && !value.stale) {
|
|
65448
|
+
if (useCache && !value.partial && !value.stale && ctx.policy !== "CacheAndNetwork") {
|
|
65468
65449
|
return;
|
|
65469
65450
|
}
|
|
65470
65451
|
}
|
|
@@ -65689,6 +65670,7 @@ function subscription(factory) {
|
|
|
65689
65670
|
},
|
|
65690
65671
|
cleanup() {
|
|
65691
65672
|
clearSubscription?.();
|
|
65673
|
+
check = null;
|
|
65692
65674
|
}
|
|
65693
65675
|
};
|
|
65694
65676
|
});
|
|
@@ -65782,9 +65764,7 @@ var DocumentStore = class extends Writable {
|
|
|
65782
65764
|
super(initialState, () => {
|
|
65783
65765
|
return () => {
|
|
65784
65766
|
this.#lastVariables = null;
|
|
65785
|
-
|
|
65786
|
-
plugin2.cleanup?.(this.#lastContext);
|
|
65787
|
-
}
|
|
65767
|
+
this.cleanup();
|
|
65788
65768
|
};
|
|
65789
65769
|
});
|
|
65790
65770
|
this.#artifact = artifact;
|
|
@@ -65850,6 +65830,11 @@ var DocumentStore = class extends Writable {
|
|
|
65850
65830
|
this.#step("forward", state);
|
|
65851
65831
|
});
|
|
65852
65832
|
}
|
|
65833
|
+
async cleanup() {
|
|
65834
|
+
for (const plugin2 of this.#plugins) {
|
|
65835
|
+
plugin2.cleanup?.(this.#lastContext);
|
|
65836
|
+
}
|
|
65837
|
+
}
|
|
65853
65838
|
#step(direction, ctx, value) {
|
|
65854
65839
|
const hook = direction === "error" ? "catch" : steps[direction][ctx.currentStep];
|
|
65855
65840
|
let valid = (i2) => i2 <= this.#plugins.length;
|
|
@@ -66699,11 +66684,12 @@ async function getConfig({
|
|
|
66699
66684
|
for (const plugin2 of plugins2) {
|
|
66700
66685
|
if (plugin2.config) {
|
|
66701
66686
|
try {
|
|
66702
|
-
const configFactory = await import(plugin2.config);
|
|
66703
|
-
|
|
66704
|
-
|
|
66687
|
+
const configFactory = (await import(plugin2.config)).default;
|
|
66688
|
+
if (configFactory) {
|
|
66689
|
+
configFile = typeof configFactory === "function" ? configFactory(configFile) : configFactory;
|
|
66690
|
+
}
|
|
66705
66691
|
} catch {
|
|
66706
|
-
console.log("could not load config file" + plugin2.config);
|
|
66692
|
+
console.log("could not load config file " + plugin2.config);
|
|
66707
66693
|
}
|
|
66708
66694
|
}
|
|
66709
66695
|
}
|
|
@@ -67111,6 +67097,21 @@ async function cleanupFiles(pathFolder, listOfObj) {
|
|
|
67111
67097
|
return allFilesNotInList;
|
|
67112
67098
|
}
|
|
67113
67099
|
|
|
67100
|
+
// src/lib/deepMerge.ts
|
|
67101
|
+
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
67102
|
+
function deepMerge(filepath, ...targets) {
|
|
67103
|
+
try {
|
|
67104
|
+
if (targets.length === 1) {
|
|
67105
|
+
return targets[0];
|
|
67106
|
+
} else if (targets.length === 2) {
|
|
67107
|
+
return (0, import_deepmerge.default)(targets[0], targets[1]);
|
|
67108
|
+
}
|
|
67109
|
+
return deepMerge(filepath, targets[0], deepMerge(filepath, ...targets.slice(1)));
|
|
67110
|
+
} catch (e2) {
|
|
67111
|
+
throw new HoudiniError({ filepath, message: "could not merge: " + targets });
|
|
67112
|
+
}
|
|
67113
|
+
}
|
|
67114
|
+
|
|
67114
67115
|
// ../../node_modules/.pnpm/estree-walker@3.0.1/node_modules/estree-walker/src/walker.js
|
|
67115
67116
|
var WalkerBase = class {
|
|
67116
67117
|
constructor() {
|
|
@@ -15,6 +15,7 @@ export declare class DocumentStore<_Data extends GraphQLObject, _Input extends R
|
|
|
15
15
|
fetching?: boolean;
|
|
16
16
|
});
|
|
17
17
|
send({ metadata, session, fetch, variables, policy, stuff, cacheParams, setup, silenceEcho, }?: SendParams): Promise<QueryResult<_Data, _Input>>;
|
|
18
|
+
cleanup(): Promise<void>;
|
|
18
19
|
}
|
|
19
20
|
declare function marshalVariables<_Data extends GraphQLObject, _Input extends {}>(ctx: ClientPluginContext): Record<string, any>;
|
|
20
21
|
export type ClientPlugin = () => ClientHooks | null | (ClientHooks | ClientPlugin | null)[];
|
|
@@ -201,9 +201,7 @@ class CacheInternal {
|
|
|
201
201
|
let targetSelection = (0, import_selection.getFieldsForType)(selection, data["__typename"]);
|
|
202
202
|
for (const [field, value] of Object.entries(data)) {
|
|
203
203
|
if (!selection || !targetSelection[field]) {
|
|
204
|
-
|
|
205
|
-
"Could not find field listing in selection for " + field + " @ " + JSON.stringify(selection)
|
|
206
|
-
);
|
|
204
|
+
continue;
|
|
207
205
|
}
|
|
208
206
|
let {
|
|
209
207
|
type: linkedType,
|