houdini-svelte 1.2.8 → 1.2.9
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/plugin-cjs/index.js +208 -208
- package/build/plugin-esm/index.js +208 -208
- package/build/preprocess-cjs/index.js +885 -844
- package/build/preprocess-esm/index.js +885 -844
- package/build/test-cjs/index.js +244 -244
- package/build/test-esm/index.js +244 -244
- package/package.json +2 -2
|
@@ -34627,25 +34627,25 @@ var require_definition = __commonJS2({
|
|
|
34627
34627
|
return arr && arr.length > 0 ? arr : void 0;
|
|
34628
34628
|
}
|
|
34629
34629
|
var GraphQLScalarType4 = /* @__PURE__ */ function() {
|
|
34630
|
-
function GraphQLScalarType5(
|
|
34630
|
+
function GraphQLScalarType5(config22) {
|
|
34631
34631
|
var _config$parseValue, _config$serialize, _config$parseLiteral;
|
|
34632
|
-
var parseValue = (_config$parseValue =
|
|
34633
|
-
this.name =
|
|
34634
|
-
this.description =
|
|
34635
|
-
this.specifiedByUrl =
|
|
34636
|
-
this.serialize = (_config$serialize =
|
|
34632
|
+
var parseValue = (_config$parseValue = config22.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.default;
|
|
34633
|
+
this.name = config22.name;
|
|
34634
|
+
this.description = config22.description;
|
|
34635
|
+
this.specifiedByUrl = config22.specifiedByUrl;
|
|
34636
|
+
this.serialize = (_config$serialize = config22.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.default;
|
|
34637
34637
|
this.parseValue = parseValue;
|
|
34638
|
-
this.parseLiteral = (_config$parseLiteral =
|
|
34638
|
+
this.parseLiteral = (_config$parseLiteral = config22.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function(node2, variables) {
|
|
34639
34639
|
return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node2, variables));
|
|
34640
34640
|
};
|
|
34641
|
-
this.extensions =
|
|
34642
|
-
this.astNode =
|
|
34643
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34644
|
-
typeof
|
|
34645
|
-
|
|
34646
|
-
|
|
34647
|
-
if (
|
|
34648
|
-
typeof
|
|
34641
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34642
|
+
this.astNode = config22.astNode;
|
|
34643
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34644
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34645
|
+
config22.specifiedByUrl == null || typeof config22.specifiedByUrl === "string" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "specifiedByUrl" as a string, ') + "but got: ".concat((0, _inspect.default)(config22.specifiedByUrl), "."));
|
|
34646
|
+
config22.serialize == null || typeof config22.serialize === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.'));
|
|
34647
|
+
if (config22.parseLiteral) {
|
|
34648
|
+
typeof config22.parseValue === "function" && typeof config22.parseLiteral === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide both "parseValue" and "parseLiteral" functions.'));
|
|
34649
34649
|
}
|
|
34650
34650
|
}
|
|
34651
34651
|
var _proto = GraphQLScalarType5.prototype;
|
|
@@ -34680,17 +34680,17 @@ var require_definition = __commonJS2({
|
|
|
34680
34680
|
exports.GraphQLScalarType = GraphQLScalarType4;
|
|
34681
34681
|
(0, _defineInspect.default)(GraphQLScalarType4);
|
|
34682
34682
|
var GraphQLObjectType5 = /* @__PURE__ */ function() {
|
|
34683
|
-
function GraphQLObjectType6(
|
|
34684
|
-
this.name =
|
|
34685
|
-
this.description =
|
|
34686
|
-
this.isTypeOf =
|
|
34687
|
-
this.extensions =
|
|
34688
|
-
this.astNode =
|
|
34689
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34690
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
34691
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
34692
|
-
typeof
|
|
34693
|
-
|
|
34683
|
+
function GraphQLObjectType6(config22) {
|
|
34684
|
+
this.name = config22.name;
|
|
34685
|
+
this.description = config22.description;
|
|
34686
|
+
this.isTypeOf = config22.isTypeOf;
|
|
34687
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34688
|
+
this.astNode = config22.astNode;
|
|
34689
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34690
|
+
this._fields = defineFieldMap.bind(void 0, config22);
|
|
34691
|
+
this._interfaces = defineInterfaces.bind(void 0, config22);
|
|
34692
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34693
|
+
config22.isTypeOf == null || typeof config22.isTypeOf === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "isTypeOf" as a function, ') + "but got: ".concat((0, _inspect.default)(config22.isTypeOf), "."));
|
|
34694
34694
|
}
|
|
34695
34695
|
var _proto2 = GraphQLObjectType6.prototype;
|
|
34696
34696
|
_proto2.getFields = function getFields() {
|
|
@@ -34733,22 +34733,22 @@ var require_definition = __commonJS2({
|
|
|
34733
34733
|
}();
|
|
34734
34734
|
exports.GraphQLObjectType = GraphQLObjectType5;
|
|
34735
34735
|
(0, _defineInspect.default)(GraphQLObjectType5);
|
|
34736
|
-
function defineInterfaces(
|
|
34736
|
+
function defineInterfaces(config22) {
|
|
34737
34737
|
var _resolveThunk;
|
|
34738
|
-
var interfaces = (_resolveThunk = resolveThunk(
|
|
34739
|
-
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(
|
|
34738
|
+
var interfaces = (_resolveThunk = resolveThunk(config22.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : [];
|
|
34739
|
+
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(config22.name, " interfaces must be an Array or a function which returns an Array."));
|
|
34740
34740
|
return interfaces;
|
|
34741
34741
|
}
|
|
34742
|
-
function defineFieldMap(
|
|
34743
|
-
var fieldMap = resolveThunk(
|
|
34744
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
34742
|
+
function defineFieldMap(config22) {
|
|
34743
|
+
var fieldMap = resolveThunk(config22.fields);
|
|
34744
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config22.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
34745
34745
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
34746
34746
|
var _fieldConfig$args;
|
|
34747
|
-
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
34748
|
-
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
34749
|
-
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(
|
|
34747
|
+
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " field config must be an object."));
|
|
34748
|
+
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, ' should provide "deprecationReason" instead of "isDeprecated".'));
|
|
34749
|
+
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat((0, _inspect.default)(fieldConfig.resolve), "."));
|
|
34750
34750
|
var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
|
|
34751
|
-
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(
|
|
34751
|
+
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " args must be an object with argument names as keys."));
|
|
34752
34752
|
var args = (0, _objectEntries.default)(argsConfig).map(function(_ref) {
|
|
34753
34753
|
var argName = _ref[0], argConfig = _ref[1];
|
|
34754
34754
|
return {
|
|
@@ -34810,17 +34810,17 @@ var require_definition = __commonJS2({
|
|
|
34810
34810
|
return isNonNullType6(arg.type) && arg.defaultValue === void 0;
|
|
34811
34811
|
}
|
|
34812
34812
|
var GraphQLInterfaceType5 = /* @__PURE__ */ function() {
|
|
34813
|
-
function GraphQLInterfaceType6(
|
|
34814
|
-
this.name =
|
|
34815
|
-
this.description =
|
|
34816
|
-
this.resolveType =
|
|
34817
|
-
this.extensions =
|
|
34818
|
-
this.astNode =
|
|
34819
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34820
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
34821
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
34822
|
-
typeof
|
|
34823
|
-
|
|
34813
|
+
function GraphQLInterfaceType6(config22) {
|
|
34814
|
+
this.name = config22.name;
|
|
34815
|
+
this.description = config22.description;
|
|
34816
|
+
this.resolveType = config22.resolveType;
|
|
34817
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34818
|
+
this.astNode = config22.astNode;
|
|
34819
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34820
|
+
this._fields = defineFieldMap.bind(void 0, config22);
|
|
34821
|
+
this._interfaces = defineInterfaces.bind(void 0, config22);
|
|
34822
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34823
|
+
config22.resolveType == null || typeof config22.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config22.resolveType), "."));
|
|
34824
34824
|
}
|
|
34825
34825
|
var _proto3 = GraphQLInterfaceType6.prototype;
|
|
34826
34826
|
_proto3.getFields = function getFields() {
|
|
@@ -34865,16 +34865,16 @@ var require_definition = __commonJS2({
|
|
|
34865
34865
|
exports.GraphQLInterfaceType = GraphQLInterfaceType5;
|
|
34866
34866
|
(0, _defineInspect.default)(GraphQLInterfaceType5);
|
|
34867
34867
|
var GraphQLUnionType3 = /* @__PURE__ */ function() {
|
|
34868
|
-
function GraphQLUnionType4(
|
|
34869
|
-
this.name =
|
|
34870
|
-
this.description =
|
|
34871
|
-
this.resolveType =
|
|
34872
|
-
this.extensions =
|
|
34873
|
-
this.astNode =
|
|
34874
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34875
|
-
this._types = defineTypes.bind(void 0,
|
|
34876
|
-
typeof
|
|
34877
|
-
|
|
34868
|
+
function GraphQLUnionType4(config22) {
|
|
34869
|
+
this.name = config22.name;
|
|
34870
|
+
this.description = config22.description;
|
|
34871
|
+
this.resolveType = config22.resolveType;
|
|
34872
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34873
|
+
this.astNode = config22.astNode;
|
|
34874
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34875
|
+
this._types = defineTypes.bind(void 0, config22);
|
|
34876
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34877
|
+
config22.resolveType == null || typeof config22.resolveType === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide "resolveType" as a function, ') + "but got: ".concat((0, _inspect.default)(config22.resolveType), "."));
|
|
34878
34878
|
}
|
|
34879
34879
|
var _proto4 = GraphQLUnionType4.prototype;
|
|
34880
34880
|
_proto4.getTypes = function getTypes() {
|
|
@@ -34911,26 +34911,26 @@ var require_definition = __commonJS2({
|
|
|
34911
34911
|
}();
|
|
34912
34912
|
exports.GraphQLUnionType = GraphQLUnionType3;
|
|
34913
34913
|
(0, _defineInspect.default)(GraphQLUnionType3);
|
|
34914
|
-
function defineTypes(
|
|
34915
|
-
var types42 = resolveThunk(
|
|
34916
|
-
Array.isArray(types42) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(
|
|
34914
|
+
function defineTypes(config22) {
|
|
34915
|
+
var types42 = resolveThunk(config22.types);
|
|
34916
|
+
Array.isArray(types42) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config22.name, "."));
|
|
34917
34917
|
return types42;
|
|
34918
34918
|
}
|
|
34919
34919
|
var GraphQLEnumType4 = /* @__PURE__ */ function() {
|
|
34920
|
-
function GraphQLEnumType5(
|
|
34921
|
-
this.name =
|
|
34922
|
-
this.description =
|
|
34923
|
-
this.extensions =
|
|
34924
|
-
this.astNode =
|
|
34925
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34926
|
-
this._values = defineEnumValues(this.name,
|
|
34920
|
+
function GraphQLEnumType5(config22) {
|
|
34921
|
+
this.name = config22.name;
|
|
34922
|
+
this.description = config22.description;
|
|
34923
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34924
|
+
this.astNode = config22.astNode;
|
|
34925
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34926
|
+
this._values = defineEnumValues(this.name, config22.values);
|
|
34927
34927
|
this._valueLookup = new Map(this._values.map(function(enumValue) {
|
|
34928
34928
|
return [enumValue.value, enumValue];
|
|
34929
34929
|
}));
|
|
34930
34930
|
this._nameLookup = (0, _keyMap.default)(this._values, function(value2) {
|
|
34931
34931
|
return value2.name;
|
|
34932
34932
|
});
|
|
34933
|
-
typeof
|
|
34933
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34934
34934
|
}
|
|
34935
34935
|
var _proto5 = GraphQLEnumType5.prototype;
|
|
34936
34936
|
_proto5.getValues = function getValues() {
|
|
@@ -35032,14 +35032,14 @@ var require_definition = __commonJS2({
|
|
|
35032
35032
|
});
|
|
35033
35033
|
}
|
|
35034
35034
|
var GraphQLInputObjectType4 = /* @__PURE__ */ function() {
|
|
35035
|
-
function GraphQLInputObjectType5(
|
|
35036
|
-
this.name =
|
|
35037
|
-
this.description =
|
|
35038
|
-
this.extensions =
|
|
35039
|
-
this.astNode =
|
|
35040
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
35041
|
-
this._fields = defineInputFieldMap.bind(void 0,
|
|
35042
|
-
typeof
|
|
35035
|
+
function GraphQLInputObjectType5(config22) {
|
|
35036
|
+
this.name = config22.name;
|
|
35037
|
+
this.description = config22.description;
|
|
35038
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
35039
|
+
this.astNode = config22.astNode;
|
|
35040
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
35041
|
+
this._fields = defineInputFieldMap.bind(void 0, config22);
|
|
35042
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
35043
35043
|
}
|
|
35044
35044
|
var _proto6 = GraphQLInputObjectType5.prototype;
|
|
35045
35045
|
_proto6.getFields = function getFields() {
|
|
@@ -35085,11 +35085,11 @@ var require_definition = __commonJS2({
|
|
|
35085
35085
|
}();
|
|
35086
35086
|
exports.GraphQLInputObjectType = GraphQLInputObjectType4;
|
|
35087
35087
|
(0, _defineInspect.default)(GraphQLInputObjectType4);
|
|
35088
|
-
function defineInputFieldMap(
|
|
35089
|
-
var fieldMap = resolveThunk(
|
|
35090
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
35088
|
+
function defineInputFieldMap(config22) {
|
|
35089
|
+
var fieldMap = resolveThunk(config22.fields);
|
|
35090
|
+
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(config22.name, " fields must be an object with field names as keys or a function which returns such an object."));
|
|
35091
35091
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
35092
|
-
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
35092
|
+
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " field has a resolve property, but Input Types cannot define resolvers."));
|
|
35093
35093
|
return {
|
|
35094
35094
|
name: fieldName,
|
|
35095
35095
|
description: fieldConfig.description,
|
|
@@ -36268,18 +36268,18 @@ var require_directives = __commonJS2({
|
|
|
36268
36268
|
return directive;
|
|
36269
36269
|
}
|
|
36270
36270
|
var GraphQLDirective2 = /* @__PURE__ */ function() {
|
|
36271
|
-
function GraphQLDirective3(
|
|
36271
|
+
function GraphQLDirective3(config22) {
|
|
36272
36272
|
var _config$isRepeatable, _config$args;
|
|
36273
|
-
this.name =
|
|
36274
|
-
this.description =
|
|
36275
|
-
this.locations =
|
|
36276
|
-
this.isRepeatable = (_config$isRepeatable =
|
|
36277
|
-
this.extensions =
|
|
36278
|
-
this.astNode =
|
|
36279
|
-
|
|
36280
|
-
Array.isArray(
|
|
36281
|
-
var args = (_config$args =
|
|
36282
|
-
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(
|
|
36273
|
+
this.name = config22.name;
|
|
36274
|
+
this.description = config22.description;
|
|
36275
|
+
this.locations = config22.locations;
|
|
36276
|
+
this.isRepeatable = (_config$isRepeatable = config22.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
|
|
36277
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
36278
|
+
this.astNode = config22.astNode;
|
|
36279
|
+
config22.name || (0, _devAssert.default)(0, "Directive must be named.");
|
|
36280
|
+
Array.isArray(config22.locations) || (0, _devAssert.default)(0, "@".concat(config22.name, " locations must be an Array."));
|
|
36281
|
+
var args = (_config$args = config22.args) !== null && _config$args !== void 0 ? _config$args : {};
|
|
36282
|
+
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(config22.name, " args must be an object with argument names as keys."));
|
|
36283
36283
|
this.args = (0, _objectEntries.default)(args).map(function(_ref) {
|
|
36284
36284
|
var argName = _ref[0], argConfig = _ref[1];
|
|
36285
36285
|
return {
|
|
@@ -36433,23 +36433,23 @@ var require_schema = __commonJS2({
|
|
|
36433
36433
|
return schema;
|
|
36434
36434
|
}
|
|
36435
36435
|
var GraphQLSchema2 = /* @__PURE__ */ function() {
|
|
36436
|
-
function GraphQLSchema3(
|
|
36436
|
+
function GraphQLSchema3(config22) {
|
|
36437
36437
|
var _config$directives;
|
|
36438
|
-
this.__validationErrors =
|
|
36439
|
-
(0, _isObjectLike.default)(
|
|
36440
|
-
!
|
|
36441
|
-
!
|
|
36442
|
-
this.description =
|
|
36443
|
-
this.extensions =
|
|
36444
|
-
this.astNode =
|
|
36445
|
-
this.extensionASTNodes =
|
|
36446
|
-
this._queryType =
|
|
36447
|
-
this._mutationType =
|
|
36448
|
-
this._subscriptionType =
|
|
36449
|
-
this._directives = (_config$directives =
|
|
36450
|
-
var allReferencedTypes = new Set(
|
|
36451
|
-
if (
|
|
36452
|
-
for (var _i2 = 0, _config$types2 =
|
|
36438
|
+
this.__validationErrors = config22.assumeValid === true ? [] : void 0;
|
|
36439
|
+
(0, _isObjectLike.default)(config22) || (0, _devAssert.default)(0, "Must provide configuration object.");
|
|
36440
|
+
!config22.types || Array.isArray(config22.types) || (0, _devAssert.default)(0, '"types" must be Array if provided but got: '.concat((0, _inspect.default)(config22.types), "."));
|
|
36441
|
+
!config22.directives || Array.isArray(config22.directives) || (0, _devAssert.default)(0, '"directives" must be Array if provided but got: ' + "".concat((0, _inspect.default)(config22.directives), "."));
|
|
36442
|
+
this.description = config22.description;
|
|
36443
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
36444
|
+
this.astNode = config22.astNode;
|
|
36445
|
+
this.extensionASTNodes = config22.extensionASTNodes;
|
|
36446
|
+
this._queryType = config22.query;
|
|
36447
|
+
this._mutationType = config22.mutation;
|
|
36448
|
+
this._subscriptionType = config22.subscription;
|
|
36449
|
+
this._directives = (_config$directives = config22.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives;
|
|
36450
|
+
var allReferencedTypes = new Set(config22.types);
|
|
36451
|
+
if (config22.types != null) {
|
|
36452
|
+
for (var _i2 = 0, _config$types2 = config22.types; _i2 < _config$types2.length; _i2++) {
|
|
36453
36453
|
var type = _config$types2[_i2];
|
|
36454
36454
|
allReferencedTypes.delete(type);
|
|
36455
36455
|
collectReferencedTypes(type, allReferencedTypes);
|
|
@@ -42639,9 +42639,9 @@ var require_extendSchema = __commonJS2({
|
|
|
42639
42639
|
return typeMap[type.name];
|
|
42640
42640
|
}
|
|
42641
42641
|
function replaceDirective(directive) {
|
|
42642
|
-
var
|
|
42643
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
42644
|
-
args: (0, _mapValue.default)(
|
|
42642
|
+
var config22 = directive.toConfig();
|
|
42643
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42644
|
+
args: (0, _mapValue.default)(config22.args, extendArg)
|
|
42645
42645
|
}));
|
|
42646
42646
|
}
|
|
42647
42647
|
function extendNamedType(type) {
|
|
@@ -42670,80 +42670,80 @@ var require_extendSchema = __commonJS2({
|
|
|
42670
42670
|
}
|
|
42671
42671
|
function extendInputObjectType(type) {
|
|
42672
42672
|
var _typeExtensionsMap$co;
|
|
42673
|
-
var
|
|
42674
|
-
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[
|
|
42675
|
-
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({},
|
|
42673
|
+
var config22 = type.toConfig();
|
|
42674
|
+
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
|
|
42675
|
+
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42676
42676
|
fields: function fields() {
|
|
42677
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
42677
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config22.fields, function(field) {
|
|
42678
42678
|
return _objectSpread(_objectSpread({}, field), {}, {
|
|
42679
42679
|
type: replaceType(field.type)
|
|
42680
42680
|
});
|
|
42681
42681
|
})), buildInputFieldMap(extensions));
|
|
42682
42682
|
},
|
|
42683
|
-
extensionASTNodes:
|
|
42683
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42684
42684
|
}));
|
|
42685
42685
|
}
|
|
42686
42686
|
function extendEnumType(type) {
|
|
42687
42687
|
var _typeExtensionsMap$ty;
|
|
42688
|
-
var
|
|
42688
|
+
var config22 = type.toConfig();
|
|
42689
42689
|
var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
|
|
42690
|
-
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({},
|
|
42691
|
-
values: _objectSpread(_objectSpread({},
|
|
42692
|
-
extensionASTNodes:
|
|
42690
|
+
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42691
|
+
values: _objectSpread(_objectSpread({}, config22.values), buildEnumValueMap(extensions)),
|
|
42692
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42693
42693
|
}));
|
|
42694
42694
|
}
|
|
42695
42695
|
function extendScalarType(type) {
|
|
42696
42696
|
var _typeExtensionsMap$co2;
|
|
42697
|
-
var
|
|
42698
|
-
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[
|
|
42699
|
-
var specifiedByUrl =
|
|
42697
|
+
var config22 = type.toConfig();
|
|
42698
|
+
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
|
|
42699
|
+
var specifiedByUrl = config22.specifiedByUrl;
|
|
42700
42700
|
for (var _i8 = 0; _i8 < extensions.length; _i8++) {
|
|
42701
42701
|
var _getSpecifiedByUrl;
|
|
42702
42702
|
var extensionNode = extensions[_i8];
|
|
42703
42703
|
specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl;
|
|
42704
42704
|
}
|
|
42705
|
-
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({},
|
|
42705
|
+
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42706
42706
|
specifiedByUrl,
|
|
42707
|
-
extensionASTNodes:
|
|
42707
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42708
42708
|
}));
|
|
42709
42709
|
}
|
|
42710
42710
|
function extendObjectType(type) {
|
|
42711
42711
|
var _typeExtensionsMap$co3;
|
|
42712
|
-
var
|
|
42713
|
-
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[
|
|
42714
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
42712
|
+
var config22 = type.toConfig();
|
|
42713
|
+
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
|
|
42714
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42715
42715
|
interfaces: function interfaces() {
|
|
42716
42716
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
42717
42717
|
},
|
|
42718
42718
|
fields: function fields() {
|
|
42719
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
42719
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config22.fields, extendField)), buildFieldMap(extensions));
|
|
42720
42720
|
},
|
|
42721
|
-
extensionASTNodes:
|
|
42721
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42722
42722
|
}));
|
|
42723
42723
|
}
|
|
42724
42724
|
function extendInterfaceType(type) {
|
|
42725
42725
|
var _typeExtensionsMap$co4;
|
|
42726
|
-
var
|
|
42727
|
-
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[
|
|
42728
|
-
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({},
|
|
42726
|
+
var config22 = type.toConfig();
|
|
42727
|
+
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
|
|
42728
|
+
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42729
42729
|
interfaces: function interfaces() {
|
|
42730
42730
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
42731
42731
|
},
|
|
42732
42732
|
fields: function fields() {
|
|
42733
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
42733
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config22.fields, extendField)), buildFieldMap(extensions));
|
|
42734
42734
|
},
|
|
42735
|
-
extensionASTNodes:
|
|
42735
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42736
42736
|
}));
|
|
42737
42737
|
}
|
|
42738
42738
|
function extendUnionType(type) {
|
|
42739
42739
|
var _typeExtensionsMap$co5;
|
|
42740
|
-
var
|
|
42741
|
-
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[
|
|
42742
|
-
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({},
|
|
42740
|
+
var config22 = type.toConfig();
|
|
42741
|
+
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
42742
|
+
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42743
42743
|
types: function types42() {
|
|
42744
42744
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
42745
42745
|
},
|
|
42746
|
-
extensionASTNodes:
|
|
42746
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42747
42747
|
}));
|
|
42748
42748
|
}
|
|
42749
42749
|
function extendField(field) {
|
|
@@ -43058,24 +43058,24 @@ var require_buildASTSchema = __commonJS2({
|
|
|
43058
43058
|
extensionASTNodes: [],
|
|
43059
43059
|
assumeValid: false
|
|
43060
43060
|
};
|
|
43061
|
-
var
|
|
43062
|
-
if (
|
|
43063
|
-
for (var _i2 = 0, _config$types2 =
|
|
43061
|
+
var config22 = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options);
|
|
43062
|
+
if (config22.astNode == null) {
|
|
43063
|
+
for (var _i2 = 0, _config$types2 = config22.types; _i2 < _config$types2.length; _i2++) {
|
|
43064
43064
|
var type = _config$types2[_i2];
|
|
43065
43065
|
switch (type.name) {
|
|
43066
43066
|
case "Query":
|
|
43067
|
-
|
|
43067
|
+
config22.query = type;
|
|
43068
43068
|
break;
|
|
43069
43069
|
case "Mutation":
|
|
43070
|
-
|
|
43070
|
+
config22.mutation = type;
|
|
43071
43071
|
break;
|
|
43072
43072
|
case "Subscription":
|
|
43073
|
-
|
|
43073
|
+
config22.subscription = type;
|
|
43074
43074
|
break;
|
|
43075
43075
|
}
|
|
43076
43076
|
}
|
|
43077
43077
|
}
|
|
43078
|
-
var directives =
|
|
43078
|
+
var directives = config22.directives;
|
|
43079
43079
|
var _loop = function _loop2(_i42) {
|
|
43080
43080
|
var stdDirective = _directives.specifiedDirectives[_i42];
|
|
43081
43081
|
if (directives.every(function(directive) {
|
|
@@ -43087,7 +43087,7 @@ var require_buildASTSchema = __commonJS2({
|
|
|
43087
43087
|
for (var _i4 = 0; _i4 < _directives.specifiedDirectives.length; _i4++) {
|
|
43088
43088
|
_loop(_i4);
|
|
43089
43089
|
}
|
|
43090
|
-
return new _schema.GraphQLSchema(
|
|
43090
|
+
return new _schema.GraphQLSchema(config22);
|
|
43091
43091
|
}
|
|
43092
43092
|
function buildSchema3(source, options) {
|
|
43093
43093
|
var document2 = (0, _parser.parse)(source, {
|
|
@@ -43187,12 +43187,12 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
43187
43187
|
return maybeType && replaceNamedType(maybeType);
|
|
43188
43188
|
}
|
|
43189
43189
|
function sortDirective(directive) {
|
|
43190
|
-
var
|
|
43191
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
43192
|
-
locations: sortBy(
|
|
43190
|
+
var config22 = directive.toConfig();
|
|
43191
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config22), {}, {
|
|
43192
|
+
locations: sortBy(config22.locations, function(x22) {
|
|
43193
43193
|
return x22;
|
|
43194
43194
|
}),
|
|
43195
|
-
args: sortArgs(
|
|
43195
|
+
args: sortArgs(config22.args)
|
|
43196
43196
|
}));
|
|
43197
43197
|
}
|
|
43198
43198
|
function sortArgs(args) {
|
|
@@ -43225,13 +43225,13 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
43225
43225
|
return type;
|
|
43226
43226
|
}
|
|
43227
43227
|
if ((0, _definition.isObjectType)(type)) {
|
|
43228
|
-
var
|
|
43229
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
43228
|
+
var config22 = type.toConfig();
|
|
43229
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
43230
43230
|
interfaces: function interfaces() {
|
|
43231
|
-
return sortTypes(
|
|
43231
|
+
return sortTypes(config22.interfaces);
|
|
43232
43232
|
},
|
|
43233
43233
|
fields: function fields() {
|
|
43234
|
-
return sortFields(
|
|
43234
|
+
return sortFields(config22.fields);
|
|
43235
43235
|
}
|
|
43236
43236
|
}));
|
|
43237
43237
|
}
|
|
@@ -84600,13 +84600,13 @@ var require_esprima2 = __commonJS2({
|
|
|
84600
84600
|
return Reader2;
|
|
84601
84601
|
}();
|
|
84602
84602
|
var Tokenizer = function() {
|
|
84603
|
-
function Tokenizer2(code,
|
|
84603
|
+
function Tokenizer2(code, config22) {
|
|
84604
84604
|
this.errorHandler = new error_handler_1.ErrorHandler();
|
|
84605
|
-
this.errorHandler.tolerant =
|
|
84605
|
+
this.errorHandler.tolerant = config22 ? typeof config22.tolerant === "boolean" && config22.tolerant : false;
|
|
84606
84606
|
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
|
|
84607
|
-
this.scanner.trackComment =
|
|
84608
|
-
this.trackRange =
|
|
84609
|
-
this.trackLoc =
|
|
84607
|
+
this.scanner.trackComment = config22 ? typeof config22.comment === "boolean" && config22.comment : false;
|
|
84608
|
+
this.trackRange = config22 ? typeof config22.range === "boolean" && config22.range : false;
|
|
84609
|
+
this.trackLoc = config22 ? typeof config22.loc === "boolean" && config22.loc : false;
|
|
84610
84610
|
this.buffer = [];
|
|
84611
84611
|
this.reader = new Reader();
|
|
84612
84612
|
}
|
|
@@ -86757,11 +86757,11 @@ var require_printer2 = __commonJS2({
|
|
|
86757
86757
|
return this.code;
|
|
86758
86758
|
};
|
|
86759
86759
|
var emptyPrintResult = new PrintResult("");
|
|
86760
|
-
var Printer = function Printer2(
|
|
86760
|
+
var Printer = function Printer2(config22) {
|
|
86761
86761
|
assert_1.default.ok(this instanceof Printer2);
|
|
86762
|
-
var explicitTabWidth =
|
|
86763
|
-
|
|
86764
|
-
|
|
86762
|
+
var explicitTabWidth = config22 && config22.tabWidth;
|
|
86763
|
+
config22 = (0, options_1.normalize)(config22);
|
|
86764
|
+
config22.sourceFileName = null;
|
|
86765
86765
|
function makePrintFunctionWith(options, overrides) {
|
|
86766
86766
|
options = Object.assign({}, options, overrides);
|
|
86767
86767
|
return function(path22) {
|
|
@@ -86776,19 +86776,19 @@ var require_printer2 = __commonJS2({
|
|
|
86776
86776
|
includeComments: false
|
|
86777
86777
|
}));
|
|
86778
86778
|
}
|
|
86779
|
-
var oldTabWidth =
|
|
86779
|
+
var oldTabWidth = config22.tabWidth;
|
|
86780
86780
|
if (!explicitTabWidth) {
|
|
86781
86781
|
var loc = path22.getNode().loc;
|
|
86782
86782
|
if (loc && loc.lines && loc.lines.guessTabWidth) {
|
|
86783
|
-
|
|
86783
|
+
config22.tabWidth = loc.lines.guessTabWidth();
|
|
86784
86784
|
}
|
|
86785
86785
|
}
|
|
86786
86786
|
var reprinter = (0, patcher_1.getReprinter)(path22);
|
|
86787
|
-
var lines = reprinter ? reprinter(print5) : genericPrint(path22,
|
|
86787
|
+
var lines = reprinter ? reprinter(print5) : genericPrint(path22, config22, options, makePrintFunctionWith(options, {
|
|
86788
86788
|
includeComments: true,
|
|
86789
86789
|
avoidRootParens: false
|
|
86790
86790
|
}));
|
|
86791
|
-
|
|
86791
|
+
config22.tabWidth = oldTabWidth;
|
|
86792
86792
|
return lines;
|
|
86793
86793
|
}
|
|
86794
86794
|
this.print = function(ast) {
|
|
@@ -86799,7 +86799,7 @@ var require_printer2 = __commonJS2({
|
|
|
86799
86799
|
includeComments: true,
|
|
86800
86800
|
avoidRootParens: false
|
|
86801
86801
|
});
|
|
86802
|
-
return new PrintResult(lines.toString(
|
|
86802
|
+
return new PrintResult(lines.toString(config22), util2.composeSourceMaps(config22.inputSourceMap, lines.getSourceMap(config22.sourceMapName, config22.sourceRoot)));
|
|
86803
86803
|
};
|
|
86804
86804
|
this.printGenerically = function(ast) {
|
|
86805
86805
|
if (!ast) {
|
|
@@ -86807,26 +86807,26 @@ var require_printer2 = __commonJS2({
|
|
|
86807
86807
|
}
|
|
86808
86808
|
function printGenerically(path3) {
|
|
86809
86809
|
return (0, comments_1.printComments)(path3, function(path4) {
|
|
86810
|
-
return genericPrint(path4,
|
|
86810
|
+
return genericPrint(path4, config22, {
|
|
86811
86811
|
includeComments: true,
|
|
86812
86812
|
avoidRootParens: false
|
|
86813
86813
|
}, printGenerically);
|
|
86814
86814
|
});
|
|
86815
86815
|
}
|
|
86816
86816
|
var path22 = fast_path_1.default.from(ast);
|
|
86817
|
-
var oldReuseWhitespace =
|
|
86818
|
-
|
|
86819
|
-
var pr = new PrintResult(printGenerically(path22).toString(
|
|
86820
|
-
|
|
86817
|
+
var oldReuseWhitespace = config22.reuseWhitespace;
|
|
86818
|
+
config22.reuseWhitespace = false;
|
|
86819
|
+
var pr = new PrintResult(printGenerically(path22).toString(config22));
|
|
86820
|
+
config22.reuseWhitespace = oldReuseWhitespace;
|
|
86821
86821
|
return pr;
|
|
86822
86822
|
};
|
|
86823
86823
|
};
|
|
86824
86824
|
exports.Printer = Printer;
|
|
86825
|
-
function genericPrint(path22,
|
|
86825
|
+
function genericPrint(path22, config22, options, printPath) {
|
|
86826
86826
|
assert_1.default.ok(path22 instanceof fast_path_1.default);
|
|
86827
86827
|
var node2 = path22.getValue();
|
|
86828
86828
|
var parts = [];
|
|
86829
|
-
var linesWithoutParens = genericPrintNoParens(path22,
|
|
86829
|
+
var linesWithoutParens = genericPrintNoParens(path22, config22, printPath);
|
|
86830
86830
|
if (!node2 || linesWithoutParens.isEmpty()) {
|
|
86831
86831
|
return linesWithoutParens;
|
|
86832
86832
|
}
|
|
@@ -89040,9 +89040,9 @@ var require_cjs = __commonJS2({
|
|
|
89040
89040
|
module2.exports = deepmerge_1;
|
|
89041
89041
|
}
|
|
89042
89042
|
});
|
|
89043
|
-
async function runPipeline(
|
|
89043
|
+
async function runPipeline(config22, pipeline22, target) {
|
|
89044
89044
|
for (const transform of pipeline22) {
|
|
89045
|
-
await transform?.(
|
|
89045
|
+
await transform?.(config22, target);
|
|
89046
89046
|
}
|
|
89047
89047
|
}
|
|
89048
89048
|
var import_graphql16 = __toESM2(require_graphql2(), 1);
|
|
@@ -89453,7 +89453,7 @@ async function marshalSelection({
|
|
|
89453
89453
|
selection,
|
|
89454
89454
|
data: data2
|
|
89455
89455
|
}) {
|
|
89456
|
-
const
|
|
89456
|
+
const config22 = getCurrentConfig();
|
|
89457
89457
|
if (data2 === null || typeof data2 === "undefined") {
|
|
89458
89458
|
return data2;
|
|
89459
89459
|
}
|
|
@@ -89471,8 +89471,8 @@ async function marshalSelection({
|
|
|
89471
89471
|
if (selection2) {
|
|
89472
89472
|
return [fieldName, await marshalSelection({ selection: selection2, data: value2 })];
|
|
89473
89473
|
}
|
|
89474
|
-
if (
|
|
89475
|
-
const marshalFn =
|
|
89474
|
+
if (config22.scalars?.[type]) {
|
|
89475
|
+
const marshalFn = config22.scalars[type].marshal;
|
|
89476
89476
|
if (!marshalFn) {
|
|
89477
89477
|
throw new Error(
|
|
89478
89478
|
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
@@ -90448,10 +90448,10 @@ function plugin(name, hooks) {
|
|
|
90448
90448
|
name,
|
|
90449
90449
|
plugin: hooks,
|
|
90450
90450
|
__plugin_init__: true,
|
|
90451
|
-
with(
|
|
90451
|
+
with(config22) {
|
|
90452
90452
|
return {
|
|
90453
90453
|
...data2,
|
|
90454
|
-
config:
|
|
90454
|
+
config: config22
|
|
90455
90455
|
};
|
|
90456
90456
|
}
|
|
90457
90457
|
};
|
|
@@ -91662,7 +91662,7 @@ var InMemorySubscriptions = class {
|
|
|
91662
91662
|
};
|
|
91663
91663
|
var Cache = class {
|
|
91664
91664
|
_internal_unstable;
|
|
91665
|
-
constructor({ disabled, ...
|
|
91665
|
+
constructor({ disabled, ...config22 } = {}) {
|
|
91666
91666
|
this._internal_unstable = new CacheInternal({
|
|
91667
91667
|
cache: this,
|
|
91668
91668
|
storage: new InMemoryStorage(),
|
|
@@ -91672,8 +91672,8 @@ var Cache = class {
|
|
|
91672
91672
|
staleManager: new StaleManager(this),
|
|
91673
91673
|
disabled: disabled ?? typeof globalThis.window === "undefined"
|
|
91674
91674
|
});
|
|
91675
|
-
if (Object.keys(
|
|
91676
|
-
this.setConfig(defaultConfigValues(
|
|
91675
|
+
if (Object.keys(config22).length > 0) {
|
|
91676
|
+
this.setConfig(defaultConfigValues(config22));
|
|
91677
91677
|
}
|
|
91678
91678
|
}
|
|
91679
91679
|
write({
|
|
@@ -91727,8 +91727,8 @@ var Cache = class {
|
|
|
91727
91727
|
this._internal_unstable.lists.removeIDFromAllLists(id2, layer);
|
|
91728
91728
|
this._internal_unstable.storage.delete(id2, layer);
|
|
91729
91729
|
}
|
|
91730
|
-
setConfig(
|
|
91731
|
-
this._internal_unstable.setConfig(
|
|
91730
|
+
setConfig(config22) {
|
|
91731
|
+
this._internal_unstable.setConfig(config22);
|
|
91732
91732
|
}
|
|
91733
91733
|
markTypeStale(options) {
|
|
91734
91734
|
if (!options) {
|
|
@@ -91853,7 +91853,7 @@ var CacheInternal = class {
|
|
|
91853
91853
|
lifetimes,
|
|
91854
91854
|
staleManager,
|
|
91855
91855
|
disabled,
|
|
91856
|
-
config:
|
|
91856
|
+
config: config22
|
|
91857
91857
|
}) {
|
|
91858
91858
|
this.storage = storage;
|
|
91859
91859
|
this.subscriptions = subscriptions;
|
|
@@ -91861,7 +91861,7 @@ var CacheInternal = class {
|
|
|
91861
91861
|
this.cache = cache;
|
|
91862
91862
|
this.lifetimes = lifetimes;
|
|
91863
91863
|
this.staleManager = staleManager;
|
|
91864
|
-
this._config =
|
|
91864
|
+
this._config = config22;
|
|
91865
91865
|
this._disabled = disabled;
|
|
91866
91866
|
try {
|
|
91867
91867
|
if (process.env.HOUDINI_TEST === "true") {
|
|
@@ -91873,8 +91873,8 @@ var CacheInternal = class {
|
|
|
91873
91873
|
get config() {
|
|
91874
91874
|
return this._config ?? getCurrentConfig();
|
|
91875
91875
|
}
|
|
91876
|
-
setConfig(
|
|
91877
|
-
this._config =
|
|
91876
|
+
setConfig(config22) {
|
|
91877
|
+
this._config = config22;
|
|
91878
91878
|
}
|
|
91879
91879
|
writeSelection({
|
|
91880
91880
|
data: data2,
|
|
@@ -92750,23 +92750,23 @@ function operation_requires_variables(operation) {
|
|
|
92750
92750
|
)
|
|
92751
92751
|
);
|
|
92752
92752
|
}
|
|
92753
|
-
function unwrapType(
|
|
92753
|
+
function unwrapType(config22, type, wrappers = []) {
|
|
92754
92754
|
if (type.kind === "NonNullType") {
|
|
92755
|
-
return unwrapType(
|
|
92755
|
+
return unwrapType(config22, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
92756
92756
|
}
|
|
92757
92757
|
if (type instanceof graphql3.GraphQLNonNull) {
|
|
92758
|
-
return unwrapType(
|
|
92758
|
+
return unwrapType(config22, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
|
|
92759
92759
|
}
|
|
92760
92760
|
if (wrappers[0] !== TypeWrapper.NonNull) {
|
|
92761
92761
|
wrappers.unshift(TypeWrapper.Nullable);
|
|
92762
92762
|
}
|
|
92763
92763
|
if (type.kind === "ListType") {
|
|
92764
|
-
return unwrapType(
|
|
92764
|
+
return unwrapType(config22, type.type, [TypeWrapper.List, ...wrappers]);
|
|
92765
92765
|
}
|
|
92766
92766
|
if (type instanceof graphql3.GraphQLList) {
|
|
92767
|
-
return unwrapType(
|
|
92767
|
+
return unwrapType(config22, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
92768
92768
|
}
|
|
92769
|
-
const namedType =
|
|
92769
|
+
const namedType = config22.schema.getType(type.name.value || type.name);
|
|
92770
92770
|
if (!namedType) {
|
|
92771
92771
|
throw new Error("Could not unwrap type: " + JSON.stringify(type));
|
|
92772
92772
|
}
|
|
@@ -92799,12 +92799,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
92799
92799
|
});
|
|
92800
92800
|
}
|
|
92801
92801
|
}
|
|
92802
|
-
function parseJS(str,
|
|
92802
|
+
function parseJS(str, config22) {
|
|
92803
92803
|
const defaultConfig = {
|
|
92804
|
-
plugins: ["typescript", "importAssertions", "decorators"],
|
|
92804
|
+
plugins: ["typescript", "importAssertions", "decorators-legacy"],
|
|
92805
92805
|
sourceType: "module"
|
|
92806
92806
|
};
|
|
92807
|
-
return (0, import_parser.parse)(str || "",
|
|
92807
|
+
return (0, import_parser.parse)(str || "", config22 ? deepMerge2("", defaultConfig, config22) : defaultConfig).program;
|
|
92808
92808
|
}
|
|
92809
92809
|
async function printJS(script, options) {
|
|
92810
92810
|
if (options?.pretty) {
|
|
@@ -92816,7 +92816,7 @@ async function printJS(script, options) {
|
|
|
92816
92816
|
var recast = __toESM2(require_main2(), 1);
|
|
92817
92817
|
var AST = recast.types.builders;
|
|
92818
92818
|
function ensureImports({
|
|
92819
|
-
config:
|
|
92819
|
+
config: config22,
|
|
92820
92820
|
body,
|
|
92821
92821
|
import: importID,
|
|
92822
92822
|
sourceModule,
|
|
@@ -92869,12 +92869,12 @@ async function detectFromPackageJSON(cwd) {
|
|
|
92869
92869
|
}
|
|
92870
92870
|
const { devDependencies, dependencies } = packageJSON;
|
|
92871
92871
|
const hasDependency = (dep) => Boolean(devDependencies?.[dep] || dependencies?.[dep]);
|
|
92872
|
-
let
|
|
92872
|
+
let frameworkInfo = { framework: "svelte" };
|
|
92873
92873
|
if (hasDependency("@sveltejs/kit")) {
|
|
92874
|
-
|
|
92874
|
+
frameworkInfo = { framework: "kit" };
|
|
92875
92875
|
}
|
|
92876
92876
|
return {
|
|
92877
|
-
|
|
92877
|
+
frameworkInfo,
|
|
92878
92878
|
module: packageJSON["type"] === "module" ? "esm" : "commonjs"
|
|
92879
92879
|
};
|
|
92880
92880
|
}
|
|
@@ -92985,7 +92985,7 @@ async function asyncWalk(ast, { enter, leave }) {
|
|
|
92985
92985
|
return await instance.visit(ast, null);
|
|
92986
92986
|
}
|
|
92987
92987
|
var graphql4 = __toESM2(require_graphql2(), 1);
|
|
92988
|
-
async function find_graphql(
|
|
92988
|
+
async function find_graphql(config22, parsedScript, walker) {
|
|
92989
92989
|
await asyncWalk(parsedScript, {
|
|
92990
92990
|
async enter(node2, parent2) {
|
|
92991
92991
|
if (node2.type !== "TaggedTemplateExpression" && node2.type !== "CallExpression") {
|
|
@@ -93018,7 +93018,7 @@ async function find_graphql(config4, parsedScript, walker) {
|
|
|
93018
93018
|
if (walker.where && !walker.where(parsedTag, { node: node2, parent: parent2 })) {
|
|
93019
93019
|
return;
|
|
93020
93020
|
}
|
|
93021
|
-
const definition =
|
|
93021
|
+
const definition = config22.extractDefinition(parsedTag);
|
|
93022
93022
|
const name = definition.name?.value;
|
|
93023
93023
|
if (!name) {
|
|
93024
93024
|
throw new Error("Could not find definition name");
|
|
@@ -93035,7 +93035,7 @@ async function find_graphql(config4, parsedScript, walker) {
|
|
|
93035
93035
|
kind = CompiledSubscriptionKind;
|
|
93036
93036
|
}
|
|
93037
93037
|
}
|
|
93038
|
-
walker.dependency?.(
|
|
93038
|
+
walker.dependency?.(config22.artifactPath(parsedTag));
|
|
93039
93039
|
await walker.tag({
|
|
93040
93040
|
parsedDocument: parsedTag,
|
|
93041
93041
|
node: {
|
|
@@ -188695,7 +188695,7 @@ directive @${config4.blockingDisableDirective} on QUERY
|
|
|
188695
188695
|
framework = cfgPlugin.framework;
|
|
188696
188696
|
} else {
|
|
188697
188697
|
const detected = await detectFromPackageJSON(cfg.projectRoot);
|
|
188698
|
-
framework = detected.framework === "kit" ? "kit" : "svelte";
|
|
188698
|
+
framework = detected.frameworkInfo.framework === "kit" ? "kit" : "svelte";
|
|
188699
188699
|
}
|
|
188700
188700
|
},
|
|
188701
188701
|
async env({ config: config4 }) {
|