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
|
@@ -34618,25 +34618,25 @@ var require_definition = __commonJS2({
|
|
|
34618
34618
|
return arr && arr.length > 0 ? arr : void 0;
|
|
34619
34619
|
}
|
|
34620
34620
|
var GraphQLScalarType4 = /* @__PURE__ */ function() {
|
|
34621
|
-
function GraphQLScalarType5(
|
|
34621
|
+
function GraphQLScalarType5(config22) {
|
|
34622
34622
|
var _config$parseValue, _config$serialize, _config$parseLiteral;
|
|
34623
|
-
var parseValue = (_config$parseValue =
|
|
34624
|
-
this.name =
|
|
34625
|
-
this.description =
|
|
34626
|
-
this.specifiedByUrl =
|
|
34627
|
-
this.serialize = (_config$serialize =
|
|
34623
|
+
var parseValue = (_config$parseValue = config22.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.default;
|
|
34624
|
+
this.name = config22.name;
|
|
34625
|
+
this.description = config22.description;
|
|
34626
|
+
this.specifiedByUrl = config22.specifiedByUrl;
|
|
34627
|
+
this.serialize = (_config$serialize = config22.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.default;
|
|
34628
34628
|
this.parseValue = parseValue;
|
|
34629
|
-
this.parseLiteral = (_config$parseLiteral =
|
|
34629
|
+
this.parseLiteral = (_config$parseLiteral = config22.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function(node2, variables) {
|
|
34630
34630
|
return parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node2, variables));
|
|
34631
34631
|
};
|
|
34632
|
-
this.extensions =
|
|
34633
|
-
this.astNode =
|
|
34634
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34635
|
-
typeof
|
|
34636
|
-
|
|
34637
|
-
|
|
34638
|
-
if (
|
|
34639
|
-
typeof
|
|
34632
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34633
|
+
this.astNode = config22.astNode;
|
|
34634
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34635
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34636
|
+
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), "."));
|
|
34637
|
+
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.'));
|
|
34638
|
+
if (config22.parseLiteral) {
|
|
34639
|
+
typeof config22.parseValue === "function" && typeof config22.parseLiteral === "function" || (0, _devAssert.default)(0, "".concat(this.name, ' must provide both "parseValue" and "parseLiteral" functions.'));
|
|
34640
34640
|
}
|
|
34641
34641
|
}
|
|
34642
34642
|
var _proto = GraphQLScalarType5.prototype;
|
|
@@ -34671,17 +34671,17 @@ var require_definition = __commonJS2({
|
|
|
34671
34671
|
exports.GraphQLScalarType = GraphQLScalarType4;
|
|
34672
34672
|
(0, _defineInspect.default)(GraphQLScalarType4);
|
|
34673
34673
|
var GraphQLObjectType5 = /* @__PURE__ */ function() {
|
|
34674
|
-
function GraphQLObjectType6(
|
|
34675
|
-
this.name =
|
|
34676
|
-
this.description =
|
|
34677
|
-
this.isTypeOf =
|
|
34678
|
-
this.extensions =
|
|
34679
|
-
this.astNode =
|
|
34680
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34681
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
34682
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
34683
|
-
typeof
|
|
34684
|
-
|
|
34674
|
+
function GraphQLObjectType6(config22) {
|
|
34675
|
+
this.name = config22.name;
|
|
34676
|
+
this.description = config22.description;
|
|
34677
|
+
this.isTypeOf = config22.isTypeOf;
|
|
34678
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34679
|
+
this.astNode = config22.astNode;
|
|
34680
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34681
|
+
this._fields = defineFieldMap.bind(void 0, config22);
|
|
34682
|
+
this._interfaces = defineInterfaces.bind(void 0, config22);
|
|
34683
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34684
|
+
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), "."));
|
|
34685
34685
|
}
|
|
34686
34686
|
var _proto2 = GraphQLObjectType6.prototype;
|
|
34687
34687
|
_proto2.getFields = function getFields() {
|
|
@@ -34724,22 +34724,22 @@ var require_definition = __commonJS2({
|
|
|
34724
34724
|
}();
|
|
34725
34725
|
exports.GraphQLObjectType = GraphQLObjectType5;
|
|
34726
34726
|
(0, _defineInspect.default)(GraphQLObjectType5);
|
|
34727
|
-
function defineInterfaces(
|
|
34727
|
+
function defineInterfaces(config22) {
|
|
34728
34728
|
var _resolveThunk;
|
|
34729
|
-
var interfaces = (_resolveThunk = resolveThunk(
|
|
34730
|
-
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(
|
|
34729
|
+
var interfaces = (_resolveThunk = resolveThunk(config22.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : [];
|
|
34730
|
+
Array.isArray(interfaces) || (0, _devAssert.default)(0, "".concat(config22.name, " interfaces must be an Array or a function which returns an Array."));
|
|
34731
34731
|
return interfaces;
|
|
34732
34732
|
}
|
|
34733
|
-
function defineFieldMap(
|
|
34734
|
-
var fieldMap = resolveThunk(
|
|
34735
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
34733
|
+
function defineFieldMap(config22) {
|
|
34734
|
+
var fieldMap = resolveThunk(config22.fields);
|
|
34735
|
+
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."));
|
|
34736
34736
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
34737
34737
|
var _fieldConfig$args;
|
|
34738
|
-
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
34739
|
-
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
34740
|
-
fieldConfig.resolve == null || typeof fieldConfig.resolve === "function" || (0, _devAssert.default)(0, "".concat(
|
|
34738
|
+
isPlainObj(fieldConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " field config must be an object."));
|
|
34739
|
+
!("isDeprecated" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, ' should provide "deprecationReason" instead of "isDeprecated".'));
|
|
34740
|
+
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), "."));
|
|
34741
34741
|
var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
|
|
34742
|
-
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(
|
|
34742
|
+
isPlainObj(argsConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " args must be an object with argument names as keys."));
|
|
34743
34743
|
var args = (0, _objectEntries.default)(argsConfig).map(function(_ref) {
|
|
34744
34744
|
var argName = _ref[0], argConfig = _ref[1];
|
|
34745
34745
|
return {
|
|
@@ -34801,17 +34801,17 @@ var require_definition = __commonJS2({
|
|
|
34801
34801
|
return isNonNullType6(arg.type) && arg.defaultValue === void 0;
|
|
34802
34802
|
}
|
|
34803
34803
|
var GraphQLInterfaceType5 = /* @__PURE__ */ function() {
|
|
34804
|
-
function GraphQLInterfaceType6(
|
|
34805
|
-
this.name =
|
|
34806
|
-
this.description =
|
|
34807
|
-
this.resolveType =
|
|
34808
|
-
this.extensions =
|
|
34809
|
-
this.astNode =
|
|
34810
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34811
|
-
this._fields = defineFieldMap.bind(void 0,
|
|
34812
|
-
this._interfaces = defineInterfaces.bind(void 0,
|
|
34813
|
-
typeof
|
|
34814
|
-
|
|
34804
|
+
function GraphQLInterfaceType6(config22) {
|
|
34805
|
+
this.name = config22.name;
|
|
34806
|
+
this.description = config22.description;
|
|
34807
|
+
this.resolveType = config22.resolveType;
|
|
34808
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34809
|
+
this.astNode = config22.astNode;
|
|
34810
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34811
|
+
this._fields = defineFieldMap.bind(void 0, config22);
|
|
34812
|
+
this._interfaces = defineInterfaces.bind(void 0, config22);
|
|
34813
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34814
|
+
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), "."));
|
|
34815
34815
|
}
|
|
34816
34816
|
var _proto3 = GraphQLInterfaceType6.prototype;
|
|
34817
34817
|
_proto3.getFields = function getFields() {
|
|
@@ -34856,16 +34856,16 @@ var require_definition = __commonJS2({
|
|
|
34856
34856
|
exports.GraphQLInterfaceType = GraphQLInterfaceType5;
|
|
34857
34857
|
(0, _defineInspect.default)(GraphQLInterfaceType5);
|
|
34858
34858
|
var GraphQLUnionType3 = /* @__PURE__ */ function() {
|
|
34859
|
-
function GraphQLUnionType4(
|
|
34860
|
-
this.name =
|
|
34861
|
-
this.description =
|
|
34862
|
-
this.resolveType =
|
|
34863
|
-
this.extensions =
|
|
34864
|
-
this.astNode =
|
|
34865
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34866
|
-
this._types = defineTypes.bind(void 0,
|
|
34867
|
-
typeof
|
|
34868
|
-
|
|
34859
|
+
function GraphQLUnionType4(config22) {
|
|
34860
|
+
this.name = config22.name;
|
|
34861
|
+
this.description = config22.description;
|
|
34862
|
+
this.resolveType = config22.resolveType;
|
|
34863
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34864
|
+
this.astNode = config22.astNode;
|
|
34865
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34866
|
+
this._types = defineTypes.bind(void 0, config22);
|
|
34867
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34868
|
+
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), "."));
|
|
34869
34869
|
}
|
|
34870
34870
|
var _proto4 = GraphQLUnionType4.prototype;
|
|
34871
34871
|
_proto4.getTypes = function getTypes() {
|
|
@@ -34902,26 +34902,26 @@ var require_definition = __commonJS2({
|
|
|
34902
34902
|
}();
|
|
34903
34903
|
exports.GraphQLUnionType = GraphQLUnionType3;
|
|
34904
34904
|
(0, _defineInspect.default)(GraphQLUnionType3);
|
|
34905
|
-
function defineTypes(
|
|
34906
|
-
var types42 = resolveThunk(
|
|
34907
|
-
Array.isArray(types42) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(
|
|
34905
|
+
function defineTypes(config22) {
|
|
34906
|
+
var types42 = resolveThunk(config22.types);
|
|
34907
|
+
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, "."));
|
|
34908
34908
|
return types42;
|
|
34909
34909
|
}
|
|
34910
34910
|
var GraphQLEnumType4 = /* @__PURE__ */ function() {
|
|
34911
|
-
function GraphQLEnumType5(
|
|
34912
|
-
this.name =
|
|
34913
|
-
this.description =
|
|
34914
|
-
this.extensions =
|
|
34915
|
-
this.astNode =
|
|
34916
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
34917
|
-
this._values = defineEnumValues(this.name,
|
|
34911
|
+
function GraphQLEnumType5(config22) {
|
|
34912
|
+
this.name = config22.name;
|
|
34913
|
+
this.description = config22.description;
|
|
34914
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
34915
|
+
this.astNode = config22.astNode;
|
|
34916
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
34917
|
+
this._values = defineEnumValues(this.name, config22.values);
|
|
34918
34918
|
this._valueLookup = new Map(this._values.map(function(enumValue) {
|
|
34919
34919
|
return [enumValue.value, enumValue];
|
|
34920
34920
|
}));
|
|
34921
34921
|
this._nameLookup = (0, _keyMap.default)(this._values, function(value2) {
|
|
34922
34922
|
return value2.name;
|
|
34923
34923
|
});
|
|
34924
|
-
typeof
|
|
34924
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
34925
34925
|
}
|
|
34926
34926
|
var _proto5 = GraphQLEnumType5.prototype;
|
|
34927
34927
|
_proto5.getValues = function getValues() {
|
|
@@ -35023,14 +35023,14 @@ var require_definition = __commonJS2({
|
|
|
35023
35023
|
});
|
|
35024
35024
|
}
|
|
35025
35025
|
var GraphQLInputObjectType4 = /* @__PURE__ */ function() {
|
|
35026
|
-
function GraphQLInputObjectType5(
|
|
35027
|
-
this.name =
|
|
35028
|
-
this.description =
|
|
35029
|
-
this.extensions =
|
|
35030
|
-
this.astNode =
|
|
35031
|
-
this.extensionASTNodes = undefineIfEmpty(
|
|
35032
|
-
this._fields = defineInputFieldMap.bind(void 0,
|
|
35033
|
-
typeof
|
|
35026
|
+
function GraphQLInputObjectType5(config22) {
|
|
35027
|
+
this.name = config22.name;
|
|
35028
|
+
this.description = config22.description;
|
|
35029
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
35030
|
+
this.astNode = config22.astNode;
|
|
35031
|
+
this.extensionASTNodes = undefineIfEmpty(config22.extensionASTNodes);
|
|
35032
|
+
this._fields = defineInputFieldMap.bind(void 0, config22);
|
|
35033
|
+
typeof config22.name === "string" || (0, _devAssert.default)(0, "Must provide name.");
|
|
35034
35034
|
}
|
|
35035
35035
|
var _proto6 = GraphQLInputObjectType5.prototype;
|
|
35036
35036
|
_proto6.getFields = function getFields() {
|
|
@@ -35076,11 +35076,11 @@ var require_definition = __commonJS2({
|
|
|
35076
35076
|
}();
|
|
35077
35077
|
exports.GraphQLInputObjectType = GraphQLInputObjectType4;
|
|
35078
35078
|
(0, _defineInspect.default)(GraphQLInputObjectType4);
|
|
35079
|
-
function defineInputFieldMap(
|
|
35080
|
-
var fieldMap = resolveThunk(
|
|
35081
|
-
isPlainObj(fieldMap) || (0, _devAssert.default)(0, "".concat(
|
|
35079
|
+
function defineInputFieldMap(config22) {
|
|
35080
|
+
var fieldMap = resolveThunk(config22.fields);
|
|
35081
|
+
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."));
|
|
35082
35082
|
return (0, _mapValue.default)(fieldMap, function(fieldConfig, fieldName) {
|
|
35083
|
-
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(
|
|
35083
|
+
!("resolve" in fieldConfig) || (0, _devAssert.default)(0, "".concat(config22.name, ".").concat(fieldName, " field has a resolve property, but Input Types cannot define resolvers."));
|
|
35084
35084
|
return {
|
|
35085
35085
|
name: fieldName,
|
|
35086
35086
|
description: fieldConfig.description,
|
|
@@ -36259,18 +36259,18 @@ var require_directives = __commonJS2({
|
|
|
36259
36259
|
return directive;
|
|
36260
36260
|
}
|
|
36261
36261
|
var GraphQLDirective2 = /* @__PURE__ */ function() {
|
|
36262
|
-
function GraphQLDirective3(
|
|
36262
|
+
function GraphQLDirective3(config22) {
|
|
36263
36263
|
var _config$isRepeatable, _config$args;
|
|
36264
|
-
this.name =
|
|
36265
|
-
this.description =
|
|
36266
|
-
this.locations =
|
|
36267
|
-
this.isRepeatable = (_config$isRepeatable =
|
|
36268
|
-
this.extensions =
|
|
36269
|
-
this.astNode =
|
|
36270
|
-
|
|
36271
|
-
Array.isArray(
|
|
36272
|
-
var args = (_config$args =
|
|
36273
|
-
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(
|
|
36264
|
+
this.name = config22.name;
|
|
36265
|
+
this.description = config22.description;
|
|
36266
|
+
this.locations = config22.locations;
|
|
36267
|
+
this.isRepeatable = (_config$isRepeatable = config22.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
|
|
36268
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
36269
|
+
this.astNode = config22.astNode;
|
|
36270
|
+
config22.name || (0, _devAssert.default)(0, "Directive must be named.");
|
|
36271
|
+
Array.isArray(config22.locations) || (0, _devAssert.default)(0, "@".concat(config22.name, " locations must be an Array."));
|
|
36272
|
+
var args = (_config$args = config22.args) !== null && _config$args !== void 0 ? _config$args : {};
|
|
36273
|
+
(0, _isObjectLike.default)(args) && !Array.isArray(args) || (0, _devAssert.default)(0, "@".concat(config22.name, " args must be an object with argument names as keys."));
|
|
36274
36274
|
this.args = (0, _objectEntries.default)(args).map(function(_ref) {
|
|
36275
36275
|
var argName = _ref[0], argConfig = _ref[1];
|
|
36276
36276
|
return {
|
|
@@ -36424,23 +36424,23 @@ var require_schema = __commonJS2({
|
|
|
36424
36424
|
return schema;
|
|
36425
36425
|
}
|
|
36426
36426
|
var GraphQLSchema2 = /* @__PURE__ */ function() {
|
|
36427
|
-
function GraphQLSchema3(
|
|
36427
|
+
function GraphQLSchema3(config22) {
|
|
36428
36428
|
var _config$directives;
|
|
36429
|
-
this.__validationErrors =
|
|
36430
|
-
(0, _isObjectLike.default)(
|
|
36431
|
-
!
|
|
36432
|
-
!
|
|
36433
|
-
this.description =
|
|
36434
|
-
this.extensions =
|
|
36435
|
-
this.astNode =
|
|
36436
|
-
this.extensionASTNodes =
|
|
36437
|
-
this._queryType =
|
|
36438
|
-
this._mutationType =
|
|
36439
|
-
this._subscriptionType =
|
|
36440
|
-
this._directives = (_config$directives =
|
|
36441
|
-
var allReferencedTypes = new Set(
|
|
36442
|
-
if (
|
|
36443
|
-
for (var _i2 = 0, _config$types2 =
|
|
36429
|
+
this.__validationErrors = config22.assumeValid === true ? [] : void 0;
|
|
36430
|
+
(0, _isObjectLike.default)(config22) || (0, _devAssert.default)(0, "Must provide configuration object.");
|
|
36431
|
+
!config22.types || Array.isArray(config22.types) || (0, _devAssert.default)(0, '"types" must be Array if provided but got: '.concat((0, _inspect.default)(config22.types), "."));
|
|
36432
|
+
!config22.directives || Array.isArray(config22.directives) || (0, _devAssert.default)(0, '"directives" must be Array if provided but got: ' + "".concat((0, _inspect.default)(config22.directives), "."));
|
|
36433
|
+
this.description = config22.description;
|
|
36434
|
+
this.extensions = config22.extensions && (0, _toObjMap.default)(config22.extensions);
|
|
36435
|
+
this.astNode = config22.astNode;
|
|
36436
|
+
this.extensionASTNodes = config22.extensionASTNodes;
|
|
36437
|
+
this._queryType = config22.query;
|
|
36438
|
+
this._mutationType = config22.mutation;
|
|
36439
|
+
this._subscriptionType = config22.subscription;
|
|
36440
|
+
this._directives = (_config$directives = config22.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives;
|
|
36441
|
+
var allReferencedTypes = new Set(config22.types);
|
|
36442
|
+
if (config22.types != null) {
|
|
36443
|
+
for (var _i2 = 0, _config$types2 = config22.types; _i2 < _config$types2.length; _i2++) {
|
|
36444
36444
|
var type = _config$types2[_i2];
|
|
36445
36445
|
allReferencedTypes.delete(type);
|
|
36446
36446
|
collectReferencedTypes(type, allReferencedTypes);
|
|
@@ -42630,9 +42630,9 @@ var require_extendSchema = __commonJS2({
|
|
|
42630
42630
|
return typeMap[type.name];
|
|
42631
42631
|
}
|
|
42632
42632
|
function replaceDirective(directive) {
|
|
42633
|
-
var
|
|
42634
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
42635
|
-
args: (0, _mapValue.default)(
|
|
42633
|
+
var config22 = directive.toConfig();
|
|
42634
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42635
|
+
args: (0, _mapValue.default)(config22.args, extendArg)
|
|
42636
42636
|
}));
|
|
42637
42637
|
}
|
|
42638
42638
|
function extendNamedType(type) {
|
|
@@ -42661,80 +42661,80 @@ var require_extendSchema = __commonJS2({
|
|
|
42661
42661
|
}
|
|
42662
42662
|
function extendInputObjectType(type) {
|
|
42663
42663
|
var _typeExtensionsMap$co;
|
|
42664
|
-
var
|
|
42665
|
-
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[
|
|
42666
|
-
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({},
|
|
42664
|
+
var config22 = type.toConfig();
|
|
42665
|
+
var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
|
|
42666
|
+
return new _definition.GraphQLInputObjectType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42667
42667
|
fields: function fields() {
|
|
42668
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
42668
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config22.fields, function(field) {
|
|
42669
42669
|
return _objectSpread(_objectSpread({}, field), {}, {
|
|
42670
42670
|
type: replaceType(field.type)
|
|
42671
42671
|
});
|
|
42672
42672
|
})), buildInputFieldMap(extensions));
|
|
42673
42673
|
},
|
|
42674
|
-
extensionASTNodes:
|
|
42674
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42675
42675
|
}));
|
|
42676
42676
|
}
|
|
42677
42677
|
function extendEnumType(type) {
|
|
42678
42678
|
var _typeExtensionsMap$ty;
|
|
42679
|
-
var
|
|
42679
|
+
var config22 = type.toConfig();
|
|
42680
42680
|
var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
|
|
42681
|
-
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({},
|
|
42682
|
-
values: _objectSpread(_objectSpread({},
|
|
42683
|
-
extensionASTNodes:
|
|
42681
|
+
return new _definition.GraphQLEnumType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42682
|
+
values: _objectSpread(_objectSpread({}, config22.values), buildEnumValueMap(extensions)),
|
|
42683
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42684
42684
|
}));
|
|
42685
42685
|
}
|
|
42686
42686
|
function extendScalarType(type) {
|
|
42687
42687
|
var _typeExtensionsMap$co2;
|
|
42688
|
-
var
|
|
42689
|
-
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[
|
|
42690
|
-
var specifiedByUrl =
|
|
42688
|
+
var config22 = type.toConfig();
|
|
42689
|
+
var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
|
|
42690
|
+
var specifiedByUrl = config22.specifiedByUrl;
|
|
42691
42691
|
for (var _i8 = 0; _i8 < extensions.length; _i8++) {
|
|
42692
42692
|
var _getSpecifiedByUrl;
|
|
42693
42693
|
var extensionNode = extensions[_i8];
|
|
42694
42694
|
specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl;
|
|
42695
42695
|
}
|
|
42696
|
-
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({},
|
|
42696
|
+
return new _definition.GraphQLScalarType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42697
42697
|
specifiedByUrl,
|
|
42698
|
-
extensionASTNodes:
|
|
42698
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42699
42699
|
}));
|
|
42700
42700
|
}
|
|
42701
42701
|
function extendObjectType(type) {
|
|
42702
42702
|
var _typeExtensionsMap$co3;
|
|
42703
|
-
var
|
|
42704
|
-
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[
|
|
42705
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
42703
|
+
var config22 = type.toConfig();
|
|
42704
|
+
var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
|
|
42705
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42706
42706
|
interfaces: function interfaces() {
|
|
42707
42707
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
42708
42708
|
},
|
|
42709
42709
|
fields: function fields() {
|
|
42710
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
42710
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config22.fields, extendField)), buildFieldMap(extensions));
|
|
42711
42711
|
},
|
|
42712
|
-
extensionASTNodes:
|
|
42712
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42713
42713
|
}));
|
|
42714
42714
|
}
|
|
42715
42715
|
function extendInterfaceType(type) {
|
|
42716
42716
|
var _typeExtensionsMap$co4;
|
|
42717
|
-
var
|
|
42718
|
-
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[
|
|
42719
|
-
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({},
|
|
42717
|
+
var config22 = type.toConfig();
|
|
42718
|
+
var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
|
|
42719
|
+
return new _definition.GraphQLInterfaceType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42720
42720
|
interfaces: function interfaces() {
|
|
42721
42721
|
return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
|
|
42722
42722
|
},
|
|
42723
42723
|
fields: function fields() {
|
|
42724
|
-
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(
|
|
42724
|
+
return _objectSpread(_objectSpread({}, (0, _mapValue.default)(config22.fields, extendField)), buildFieldMap(extensions));
|
|
42725
42725
|
},
|
|
42726
|
-
extensionASTNodes:
|
|
42726
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42727
42727
|
}));
|
|
42728
42728
|
}
|
|
42729
42729
|
function extendUnionType(type) {
|
|
42730
42730
|
var _typeExtensionsMap$co5;
|
|
42731
|
-
var
|
|
42732
|
-
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[
|
|
42733
|
-
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({},
|
|
42731
|
+
var config22 = type.toConfig();
|
|
42732
|
+
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config22.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
42733
|
+
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
42734
42734
|
types: function types42() {
|
|
42735
42735
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
42736
42736
|
},
|
|
42737
|
-
extensionASTNodes:
|
|
42737
|
+
extensionASTNodes: config22.extensionASTNodes.concat(extensions)
|
|
42738
42738
|
}));
|
|
42739
42739
|
}
|
|
42740
42740
|
function extendField(field) {
|
|
@@ -43049,24 +43049,24 @@ var require_buildASTSchema = __commonJS2({
|
|
|
43049
43049
|
extensionASTNodes: [],
|
|
43050
43050
|
assumeValid: false
|
|
43051
43051
|
};
|
|
43052
|
-
var
|
|
43053
|
-
if (
|
|
43054
|
-
for (var _i2 = 0, _config$types2 =
|
|
43052
|
+
var config22 = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options);
|
|
43053
|
+
if (config22.astNode == null) {
|
|
43054
|
+
for (var _i2 = 0, _config$types2 = config22.types; _i2 < _config$types2.length; _i2++) {
|
|
43055
43055
|
var type = _config$types2[_i2];
|
|
43056
43056
|
switch (type.name) {
|
|
43057
43057
|
case "Query":
|
|
43058
|
-
|
|
43058
|
+
config22.query = type;
|
|
43059
43059
|
break;
|
|
43060
43060
|
case "Mutation":
|
|
43061
|
-
|
|
43061
|
+
config22.mutation = type;
|
|
43062
43062
|
break;
|
|
43063
43063
|
case "Subscription":
|
|
43064
|
-
|
|
43064
|
+
config22.subscription = type;
|
|
43065
43065
|
break;
|
|
43066
43066
|
}
|
|
43067
43067
|
}
|
|
43068
43068
|
}
|
|
43069
|
-
var directives =
|
|
43069
|
+
var directives = config22.directives;
|
|
43070
43070
|
var _loop = function _loop2(_i42) {
|
|
43071
43071
|
var stdDirective = _directives.specifiedDirectives[_i42];
|
|
43072
43072
|
if (directives.every(function(directive) {
|
|
@@ -43078,7 +43078,7 @@ var require_buildASTSchema = __commonJS2({
|
|
|
43078
43078
|
for (var _i4 = 0; _i4 < _directives.specifiedDirectives.length; _i4++) {
|
|
43079
43079
|
_loop(_i4);
|
|
43080
43080
|
}
|
|
43081
|
-
return new _schema.GraphQLSchema(
|
|
43081
|
+
return new _schema.GraphQLSchema(config22);
|
|
43082
43082
|
}
|
|
43083
43083
|
function buildSchema3(source, options) {
|
|
43084
43084
|
var document2 = (0, _parser.parse)(source, {
|
|
@@ -43178,12 +43178,12 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
43178
43178
|
return maybeType && replaceNamedType(maybeType);
|
|
43179
43179
|
}
|
|
43180
43180
|
function sortDirective(directive) {
|
|
43181
|
-
var
|
|
43182
|
-
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({},
|
|
43183
|
-
locations: sortBy(
|
|
43181
|
+
var config22 = directive.toConfig();
|
|
43182
|
+
return new _directives.GraphQLDirective(_objectSpread(_objectSpread({}, config22), {}, {
|
|
43183
|
+
locations: sortBy(config22.locations, function(x22) {
|
|
43184
43184
|
return x22;
|
|
43185
43185
|
}),
|
|
43186
|
-
args: sortArgs(
|
|
43186
|
+
args: sortArgs(config22.args)
|
|
43187
43187
|
}));
|
|
43188
43188
|
}
|
|
43189
43189
|
function sortArgs(args) {
|
|
@@ -43216,13 +43216,13 @@ var require_lexicographicSortSchema = __commonJS2({
|
|
|
43216
43216
|
return type;
|
|
43217
43217
|
}
|
|
43218
43218
|
if ((0, _definition.isObjectType)(type)) {
|
|
43219
|
-
var
|
|
43220
|
-
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({},
|
|
43219
|
+
var config22 = type.toConfig();
|
|
43220
|
+
return new _definition.GraphQLObjectType(_objectSpread(_objectSpread({}, config22), {}, {
|
|
43221
43221
|
interfaces: function interfaces() {
|
|
43222
|
-
return sortTypes(
|
|
43222
|
+
return sortTypes(config22.interfaces);
|
|
43223
43223
|
},
|
|
43224
43224
|
fields: function fields() {
|
|
43225
|
-
return sortFields(
|
|
43225
|
+
return sortFields(config22.fields);
|
|
43226
43226
|
}
|
|
43227
43227
|
}));
|
|
43228
43228
|
}
|
|
@@ -84591,13 +84591,13 @@ var require_esprima2 = __commonJS2({
|
|
|
84591
84591
|
return Reader2;
|
|
84592
84592
|
}();
|
|
84593
84593
|
var Tokenizer = function() {
|
|
84594
|
-
function Tokenizer2(code,
|
|
84594
|
+
function Tokenizer2(code, config22) {
|
|
84595
84595
|
this.errorHandler = new error_handler_1.ErrorHandler();
|
|
84596
|
-
this.errorHandler.tolerant =
|
|
84596
|
+
this.errorHandler.tolerant = config22 ? typeof config22.tolerant === "boolean" && config22.tolerant : false;
|
|
84597
84597
|
this.scanner = new scanner_1.Scanner(code, this.errorHandler);
|
|
84598
|
-
this.scanner.trackComment =
|
|
84599
|
-
this.trackRange =
|
|
84600
|
-
this.trackLoc =
|
|
84598
|
+
this.scanner.trackComment = config22 ? typeof config22.comment === "boolean" && config22.comment : false;
|
|
84599
|
+
this.trackRange = config22 ? typeof config22.range === "boolean" && config22.range : false;
|
|
84600
|
+
this.trackLoc = config22 ? typeof config22.loc === "boolean" && config22.loc : false;
|
|
84601
84601
|
this.buffer = [];
|
|
84602
84602
|
this.reader = new Reader();
|
|
84603
84603
|
}
|
|
@@ -86748,11 +86748,11 @@ var require_printer2 = __commonJS2({
|
|
|
86748
86748
|
return this.code;
|
|
86749
86749
|
};
|
|
86750
86750
|
var emptyPrintResult = new PrintResult("");
|
|
86751
|
-
var Printer = function Printer2(
|
|
86751
|
+
var Printer = function Printer2(config22) {
|
|
86752
86752
|
assert_1.default.ok(this instanceof Printer2);
|
|
86753
|
-
var explicitTabWidth =
|
|
86754
|
-
|
|
86755
|
-
|
|
86753
|
+
var explicitTabWidth = config22 && config22.tabWidth;
|
|
86754
|
+
config22 = (0, options_1.normalize)(config22);
|
|
86755
|
+
config22.sourceFileName = null;
|
|
86756
86756
|
function makePrintFunctionWith(options, overrides) {
|
|
86757
86757
|
options = Object.assign({}, options, overrides);
|
|
86758
86758
|
return function(path22) {
|
|
@@ -86767,19 +86767,19 @@ var require_printer2 = __commonJS2({
|
|
|
86767
86767
|
includeComments: false
|
|
86768
86768
|
}));
|
|
86769
86769
|
}
|
|
86770
|
-
var oldTabWidth =
|
|
86770
|
+
var oldTabWidth = config22.tabWidth;
|
|
86771
86771
|
if (!explicitTabWidth) {
|
|
86772
86772
|
var loc = path22.getNode().loc;
|
|
86773
86773
|
if (loc && loc.lines && loc.lines.guessTabWidth) {
|
|
86774
|
-
|
|
86774
|
+
config22.tabWidth = loc.lines.guessTabWidth();
|
|
86775
86775
|
}
|
|
86776
86776
|
}
|
|
86777
86777
|
var reprinter = (0, patcher_1.getReprinter)(path22);
|
|
86778
|
-
var lines = reprinter ? reprinter(print5) : genericPrint(path22,
|
|
86778
|
+
var lines = reprinter ? reprinter(print5) : genericPrint(path22, config22, options, makePrintFunctionWith(options, {
|
|
86779
86779
|
includeComments: true,
|
|
86780
86780
|
avoidRootParens: false
|
|
86781
86781
|
}));
|
|
86782
|
-
|
|
86782
|
+
config22.tabWidth = oldTabWidth;
|
|
86783
86783
|
return lines;
|
|
86784
86784
|
}
|
|
86785
86785
|
this.print = function(ast) {
|
|
@@ -86790,7 +86790,7 @@ var require_printer2 = __commonJS2({
|
|
|
86790
86790
|
includeComments: true,
|
|
86791
86791
|
avoidRootParens: false
|
|
86792
86792
|
});
|
|
86793
|
-
return new PrintResult(lines.toString(
|
|
86793
|
+
return new PrintResult(lines.toString(config22), util2.composeSourceMaps(config22.inputSourceMap, lines.getSourceMap(config22.sourceMapName, config22.sourceRoot)));
|
|
86794
86794
|
};
|
|
86795
86795
|
this.printGenerically = function(ast) {
|
|
86796
86796
|
if (!ast) {
|
|
@@ -86798,26 +86798,26 @@ var require_printer2 = __commonJS2({
|
|
|
86798
86798
|
}
|
|
86799
86799
|
function printGenerically(path3) {
|
|
86800
86800
|
return (0, comments_1.printComments)(path3, function(path4) {
|
|
86801
|
-
return genericPrint(path4,
|
|
86801
|
+
return genericPrint(path4, config22, {
|
|
86802
86802
|
includeComments: true,
|
|
86803
86803
|
avoidRootParens: false
|
|
86804
86804
|
}, printGenerically);
|
|
86805
86805
|
});
|
|
86806
86806
|
}
|
|
86807
86807
|
var path22 = fast_path_1.default.from(ast);
|
|
86808
|
-
var oldReuseWhitespace =
|
|
86809
|
-
|
|
86810
|
-
var pr = new PrintResult(printGenerically(path22).toString(
|
|
86811
|
-
|
|
86808
|
+
var oldReuseWhitespace = config22.reuseWhitespace;
|
|
86809
|
+
config22.reuseWhitespace = false;
|
|
86810
|
+
var pr = new PrintResult(printGenerically(path22).toString(config22));
|
|
86811
|
+
config22.reuseWhitespace = oldReuseWhitespace;
|
|
86812
86812
|
return pr;
|
|
86813
86813
|
};
|
|
86814
86814
|
};
|
|
86815
86815
|
exports.Printer = Printer;
|
|
86816
|
-
function genericPrint(path22,
|
|
86816
|
+
function genericPrint(path22, config22, options, printPath) {
|
|
86817
86817
|
assert_1.default.ok(path22 instanceof fast_path_1.default);
|
|
86818
86818
|
var node2 = path22.getValue();
|
|
86819
86819
|
var parts = [];
|
|
86820
|
-
var linesWithoutParens = genericPrintNoParens(path22,
|
|
86820
|
+
var linesWithoutParens = genericPrintNoParens(path22, config22, printPath);
|
|
86821
86821
|
if (!node2 || linesWithoutParens.isEmpty()) {
|
|
86822
86822
|
return linesWithoutParens;
|
|
86823
86823
|
}
|
|
@@ -89031,9 +89031,9 @@ var require_cjs = __commonJS2({
|
|
|
89031
89031
|
module.exports = deepmerge_1;
|
|
89032
89032
|
}
|
|
89033
89033
|
});
|
|
89034
|
-
async function runPipeline(
|
|
89034
|
+
async function runPipeline(config22, pipeline22, target) {
|
|
89035
89035
|
for (const transform of pipeline22) {
|
|
89036
|
-
await transform?.(
|
|
89036
|
+
await transform?.(config22, target);
|
|
89037
89037
|
}
|
|
89038
89038
|
}
|
|
89039
89039
|
var import_graphql16 = __toESM2(require_graphql2(), 1);
|
|
@@ -89444,7 +89444,7 @@ async function marshalSelection({
|
|
|
89444
89444
|
selection,
|
|
89445
89445
|
data: data2
|
|
89446
89446
|
}) {
|
|
89447
|
-
const
|
|
89447
|
+
const config22 = getCurrentConfig();
|
|
89448
89448
|
if (data2 === null || typeof data2 === "undefined") {
|
|
89449
89449
|
return data2;
|
|
89450
89450
|
}
|
|
@@ -89462,8 +89462,8 @@ async function marshalSelection({
|
|
|
89462
89462
|
if (selection2) {
|
|
89463
89463
|
return [fieldName, await marshalSelection({ selection: selection2, data: value2 })];
|
|
89464
89464
|
}
|
|
89465
|
-
if (
|
|
89466
|
-
const marshalFn =
|
|
89465
|
+
if (config22.scalars?.[type]) {
|
|
89466
|
+
const marshalFn = config22.scalars[type].marshal;
|
|
89467
89467
|
if (!marshalFn) {
|
|
89468
89468
|
throw new Error(
|
|
89469
89469
|
`scalar type ${type} is missing a \`marshal\` function. see https://github.com/AlecAivazis/houdini#%EF%B8%8Fcustom-scalars`
|
|
@@ -90439,10 +90439,10 @@ function plugin(name, hooks) {
|
|
|
90439
90439
|
name,
|
|
90440
90440
|
plugin: hooks,
|
|
90441
90441
|
__plugin_init__: true,
|
|
90442
|
-
with(
|
|
90442
|
+
with(config22) {
|
|
90443
90443
|
return {
|
|
90444
90444
|
...data2,
|
|
90445
|
-
config:
|
|
90445
|
+
config: config22
|
|
90446
90446
|
};
|
|
90447
90447
|
}
|
|
90448
90448
|
};
|
|
@@ -91653,7 +91653,7 @@ var InMemorySubscriptions = class {
|
|
|
91653
91653
|
};
|
|
91654
91654
|
var Cache = class {
|
|
91655
91655
|
_internal_unstable;
|
|
91656
|
-
constructor({ disabled, ...
|
|
91656
|
+
constructor({ disabled, ...config22 } = {}) {
|
|
91657
91657
|
this._internal_unstable = new CacheInternal({
|
|
91658
91658
|
cache: this,
|
|
91659
91659
|
storage: new InMemoryStorage(),
|
|
@@ -91663,8 +91663,8 @@ var Cache = class {
|
|
|
91663
91663
|
staleManager: new StaleManager(this),
|
|
91664
91664
|
disabled: disabled ?? typeof globalThis.window === "undefined"
|
|
91665
91665
|
});
|
|
91666
|
-
if (Object.keys(
|
|
91667
|
-
this.setConfig(defaultConfigValues(
|
|
91666
|
+
if (Object.keys(config22).length > 0) {
|
|
91667
|
+
this.setConfig(defaultConfigValues(config22));
|
|
91668
91668
|
}
|
|
91669
91669
|
}
|
|
91670
91670
|
write({
|
|
@@ -91718,8 +91718,8 @@ var Cache = class {
|
|
|
91718
91718
|
this._internal_unstable.lists.removeIDFromAllLists(id2, layer);
|
|
91719
91719
|
this._internal_unstable.storage.delete(id2, layer);
|
|
91720
91720
|
}
|
|
91721
|
-
setConfig(
|
|
91722
|
-
this._internal_unstable.setConfig(
|
|
91721
|
+
setConfig(config22) {
|
|
91722
|
+
this._internal_unstable.setConfig(config22);
|
|
91723
91723
|
}
|
|
91724
91724
|
markTypeStale(options) {
|
|
91725
91725
|
if (!options) {
|
|
@@ -91844,7 +91844,7 @@ var CacheInternal = class {
|
|
|
91844
91844
|
lifetimes,
|
|
91845
91845
|
staleManager,
|
|
91846
91846
|
disabled,
|
|
91847
|
-
config:
|
|
91847
|
+
config: config22
|
|
91848
91848
|
}) {
|
|
91849
91849
|
this.storage = storage;
|
|
91850
91850
|
this.subscriptions = subscriptions;
|
|
@@ -91852,7 +91852,7 @@ var CacheInternal = class {
|
|
|
91852
91852
|
this.cache = cache;
|
|
91853
91853
|
this.lifetimes = lifetimes;
|
|
91854
91854
|
this.staleManager = staleManager;
|
|
91855
|
-
this._config =
|
|
91855
|
+
this._config = config22;
|
|
91856
91856
|
this._disabled = disabled;
|
|
91857
91857
|
try {
|
|
91858
91858
|
if (process.env.HOUDINI_TEST === "true") {
|
|
@@ -91864,8 +91864,8 @@ var CacheInternal = class {
|
|
|
91864
91864
|
get config() {
|
|
91865
91865
|
return this._config ?? getCurrentConfig();
|
|
91866
91866
|
}
|
|
91867
|
-
setConfig(
|
|
91868
|
-
this._config =
|
|
91867
|
+
setConfig(config22) {
|
|
91868
|
+
this._config = config22;
|
|
91869
91869
|
}
|
|
91870
91870
|
writeSelection({
|
|
91871
91871
|
data: data2,
|
|
@@ -92741,23 +92741,23 @@ function operation_requires_variables(operation) {
|
|
|
92741
92741
|
)
|
|
92742
92742
|
);
|
|
92743
92743
|
}
|
|
92744
|
-
function unwrapType(
|
|
92744
|
+
function unwrapType(config22, type, wrappers = []) {
|
|
92745
92745
|
if (type.kind === "NonNullType") {
|
|
92746
|
-
return unwrapType(
|
|
92746
|
+
return unwrapType(config22, type.type, [TypeWrapper.NonNull, ...wrappers]);
|
|
92747
92747
|
}
|
|
92748
92748
|
if (type instanceof graphql3.GraphQLNonNull) {
|
|
92749
|
-
return unwrapType(
|
|
92749
|
+
return unwrapType(config22, type.ofType, [TypeWrapper.NonNull, ...wrappers]);
|
|
92750
92750
|
}
|
|
92751
92751
|
if (wrappers[0] !== TypeWrapper.NonNull) {
|
|
92752
92752
|
wrappers.unshift(TypeWrapper.Nullable);
|
|
92753
92753
|
}
|
|
92754
92754
|
if (type.kind === "ListType") {
|
|
92755
|
-
return unwrapType(
|
|
92755
|
+
return unwrapType(config22, type.type, [TypeWrapper.List, ...wrappers]);
|
|
92756
92756
|
}
|
|
92757
92757
|
if (type instanceof graphql3.GraphQLList) {
|
|
92758
|
-
return unwrapType(
|
|
92758
|
+
return unwrapType(config22, type.ofType, [TypeWrapper.List, ...wrappers]);
|
|
92759
92759
|
}
|
|
92760
|
-
const namedType =
|
|
92760
|
+
const namedType = config22.schema.getType(type.name.value || type.name);
|
|
92761
92761
|
if (!namedType) {
|
|
92762
92762
|
throw new Error("Could not unwrap type: " + JSON.stringify(type));
|
|
92763
92763
|
}
|
|
@@ -92790,12 +92790,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
92790
92790
|
});
|
|
92791
92791
|
}
|
|
92792
92792
|
}
|
|
92793
|
-
function parseJS(str,
|
|
92793
|
+
function parseJS(str, config22) {
|
|
92794
92794
|
const defaultConfig = {
|
|
92795
|
-
plugins: ["typescript", "importAssertions", "decorators"],
|
|
92795
|
+
plugins: ["typescript", "importAssertions", "decorators-legacy"],
|
|
92796
92796
|
sourceType: "module"
|
|
92797
92797
|
};
|
|
92798
|
-
return (0, import_parser.parse)(str || "",
|
|
92798
|
+
return (0, import_parser.parse)(str || "", config22 ? deepMerge2("", defaultConfig, config22) : defaultConfig).program;
|
|
92799
92799
|
}
|
|
92800
92800
|
async function printJS(script, options) {
|
|
92801
92801
|
if (options?.pretty) {
|
|
@@ -92807,7 +92807,7 @@ async function printJS(script, options) {
|
|
|
92807
92807
|
var recast = __toESM2(require_main2(), 1);
|
|
92808
92808
|
var AST = recast.types.builders;
|
|
92809
92809
|
function ensureImports({
|
|
92810
|
-
config:
|
|
92810
|
+
config: config22,
|
|
92811
92811
|
body,
|
|
92812
92812
|
import: importID,
|
|
92813
92813
|
sourceModule,
|
|
@@ -92860,12 +92860,12 @@ async function detectFromPackageJSON(cwd) {
|
|
|
92860
92860
|
}
|
|
92861
92861
|
const { devDependencies, dependencies } = packageJSON;
|
|
92862
92862
|
const hasDependency = (dep) => Boolean(devDependencies?.[dep] || dependencies?.[dep]);
|
|
92863
|
-
let
|
|
92863
|
+
let frameworkInfo = { framework: "svelte" };
|
|
92864
92864
|
if (hasDependency("@sveltejs/kit")) {
|
|
92865
|
-
|
|
92865
|
+
frameworkInfo = { framework: "kit" };
|
|
92866
92866
|
}
|
|
92867
92867
|
return {
|
|
92868
|
-
|
|
92868
|
+
frameworkInfo,
|
|
92869
92869
|
module: packageJSON["type"] === "module" ? "esm" : "commonjs"
|
|
92870
92870
|
};
|
|
92871
92871
|
}
|
|
@@ -92976,7 +92976,7 @@ async function asyncWalk(ast, { enter, leave }) {
|
|
|
92976
92976
|
return await instance.visit(ast, null);
|
|
92977
92977
|
}
|
|
92978
92978
|
var graphql4 = __toESM2(require_graphql2(), 1);
|
|
92979
|
-
async function find_graphql(
|
|
92979
|
+
async function find_graphql(config22, parsedScript, walker) {
|
|
92980
92980
|
await asyncWalk(parsedScript, {
|
|
92981
92981
|
async enter(node2, parent2) {
|
|
92982
92982
|
if (node2.type !== "TaggedTemplateExpression" && node2.type !== "CallExpression") {
|
|
@@ -93009,7 +93009,7 @@ async function find_graphql(config4, parsedScript, walker) {
|
|
|
93009
93009
|
if (walker.where && !walker.where(parsedTag, { node: node2, parent: parent2 })) {
|
|
93010
93010
|
return;
|
|
93011
93011
|
}
|
|
93012
|
-
const definition =
|
|
93012
|
+
const definition = config22.extractDefinition(parsedTag);
|
|
93013
93013
|
const name = definition.name?.value;
|
|
93014
93014
|
if (!name) {
|
|
93015
93015
|
throw new Error("Could not find definition name");
|
|
@@ -93026,7 +93026,7 @@ async function find_graphql(config4, parsedScript, walker) {
|
|
|
93026
93026
|
kind = CompiledSubscriptionKind;
|
|
93027
93027
|
}
|
|
93028
93028
|
}
|
|
93029
|
-
walker.dependency?.(
|
|
93029
|
+
walker.dependency?.(config22.artifactPath(parsedTag));
|
|
93030
93030
|
await walker.tag({
|
|
93031
93031
|
parsedDocument: parsedTag,
|
|
93032
93032
|
node: {
|
|
@@ -188685,7 +188685,7 @@ directive @${config4.blockingDisableDirective} on QUERY
|
|
|
188685
188685
|
framework = cfgPlugin.framework;
|
|
188686
188686
|
} else {
|
|
188687
188687
|
const detected = await detectFromPackageJSON(cfg.projectRoot);
|
|
188688
|
-
framework = detected.framework === "kit" ? "kit" : "svelte";
|
|
188688
|
+
framework = detected.frameworkInfo.framework === "kit" ? "kit" : "svelte";
|
|
188689
188689
|
}
|
|
188690
188690
|
},
|
|
188691
188691
|
async env({ config: config4 }) {
|